public final class SequenceType
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static SequenceType |
ANY_SEQUENCE
A type that allows any sequence of items
|
static SequenceType |
ATOMIC_SEQUENCE |
static SequenceType |
EMPTY_SEQUENCE
A type that only permits the empty sequence
|
static SequenceType |
NODE_SEQUENCE
A type that allows a sequence of zero or more nodes
|
static SequenceType |
NON_EMPTY_SEQUENCE
A type that only permits a non-empty sequence
|
static SequenceType |
OPTIONAL_ANY_URI
A type that allows a single optional anyURI
|
static SequenceType |
OPTIONAL_ATOMIC
A type that allows zero or one atomic values
|
static SequenceType |
OPTIONAL_BASE64_BINARY
A type that allows a single optional xs:Base64Binary
|
static SequenceType |
OPTIONAL_BOOLEAN
A type that allows a single optional boolean
|
static SequenceType |
OPTIONAL_BYTE
A type that allows a single optional byte
|
static SequenceType |
OPTIONAL_DATE
A type that allows a single optional date
|
static SequenceType |
OPTIONAL_DATE_TIME
A type that allows a single optional dateTime
|
static SequenceType |
OPTIONAL_DAY_TIME_DURATION
A type that allows a single optional dayTimeDuration
|
static SequenceType |
OPTIONAL_DECIMAL
A type that allows a single optional decimal
|
static SequenceType |
OPTIONAL_DOCUMENT_NODE
A type that allows a single document node
|
static SequenceType |
OPTIONAL_DOUBLE
A type that allows a single optional double
|
static SequenceType |
OPTIONAL_DURATION
A type that allows a single optional duration
|
static SequenceType |
OPTIONAL_FLOAT
A type that allows a single optional float
|
static SequenceType |
OPTIONAL_FUNCTION_ITEM
A type that allows a sequence of zero or one function items
|
static SequenceType |
OPTIONAL_G_DAY
A type that allows a single optional gDay
|
static SequenceType |
OPTIONAL_G_MONTH
A type that allows a single optional gMonth
|
static SequenceType |
OPTIONAL_G_MONTH_DAY
A type that allows a single optional gMonthDay
|
static SequenceType |
OPTIONAL_G_YEAR
A type that allows a single optional gYear
|
static SequenceType |
OPTIONAL_G_YEAR_MONTH
A type that allows a single optional gYearMonth
|
static SequenceType |
OPTIONAL_HEX_BINARY
A type that allows a single optional xs:hexBinary
|
static SequenceType |
OPTIONAL_INTEGER
A type that allows a single optional integer
|
static SequenceType |
OPTIONAL_ITEM
A type that allows zero or one items, of any kind
|
static SequenceType |
OPTIONAL_NODE
A type that allows zero or one nodes
|
static SequenceType |
OPTIONAL_NOTATION
A type that allows a single optional xs:NOTATION
|
static SequenceType |
OPTIONAL_NUMERIC
A type that allows an optional numeric value
|
static SequenceType |
OPTIONAL_QNAME
A type that allows a single optional xs:QName
|
static SequenceType |
OPTIONAL_SHORT
A type that allows a single optional short
|
static SequenceType |
OPTIONAL_STRING
A type that allows a single optional string
|
static SequenceType |
OPTIONAL_TIME
A type that allows a single optional time
|
static SequenceType |
OPTIONAL_YEAR_MONTH_DURATION
A type that allows a single optional yearMonthDuration
|
static SequenceType |
SINGLE_ATOMIC
A type that allows exactly one atomic value
|
static SequenceType |
SINGLE_BOOLEAN
A type that allows a single boolean
|
static SequenceType |
SINGLE_BYTE
A type that allows a single short
|
static SequenceType |
SINGLE_DECIMAL
A type that allows a single decimal
|
static SequenceType |
SINGLE_DOUBLE
A type that allows a single double
|
static SequenceType |
SINGLE_FLOAT
A type that allows a single float
|
static SequenceType |
SINGLE_FUNCTION
A type that allows a single function item
|
static SequenceType |
SINGLE_INTEGER
A type that allows a single integer
|
static SequenceType |
SINGLE_ITEM
A type that allows exactly one item, of any kind
|
static SequenceType |
SINGLE_NODE
A type that allows a single node
|
static SequenceType |
SINGLE_NUMERIC |
static SequenceType |
SINGLE_QNAME
A type that allows a single xs:QName
|
static SequenceType |
SINGLE_SHORT
A type that allows a single short
|
static SequenceType |
SINGLE_STRING
A type that allows a single string
|
static SequenceType |
SINGLE_UNTYPED_ATOMIC
A type that allows a single untyped atomic
|
static SequenceType |
STRING_SEQUENCE
A type that allows a sequence of zero or more string values
|
static SequenceType |
VOID
A type that has no instances
|
Constructor and Description |
---|
SequenceType(ItemType primaryType,
int cardinality)
Construct an instance of SequenceType.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
|
int |
getCardinality()
Get the cardinality component of this SequenceType.
|
ItemType |
getPrimaryType()
Get the "primary" part of this required type.
|
int |
hashCode()
Returns a hash code value for the object.
|
boolean |
isSameType(SequenceType other,
TypeHierarchy th) |
static SequenceType |
makeSequenceType(ItemType primaryType,
int cardinality)
Construct an instance of SequenceType.
|
boolean |
matches(Sequence value,
TypeHierarchy th)
Determine whether a given value is a valid instance of this SequenceType
|
java.lang.String |
toExportString()
Return a string representation of this SequenceType suitable for use in export (SEF) files.
|
java.lang.String |
toString()
Return a string representation of this SequenceType
|
public static final SequenceType ANY_SEQUENCE
public static final SequenceType SINGLE_ITEM
public static final SequenceType OPTIONAL_ITEM
public static final SequenceType SINGLE_ATOMIC
public static final SequenceType OPTIONAL_ATOMIC
public static final SequenceType ATOMIC_SEQUENCE
public static final SequenceType SINGLE_STRING
public static final SequenceType SINGLE_UNTYPED_ATOMIC
public static final SequenceType OPTIONAL_STRING
public static final SequenceType SINGLE_BOOLEAN
public static final SequenceType OPTIONAL_BOOLEAN
public static final SequenceType SINGLE_INTEGER
public static final SequenceType SINGLE_DECIMAL
public static final SequenceType OPTIONAL_INTEGER
public static final SequenceType SINGLE_SHORT
public static final SequenceType OPTIONAL_SHORT
public static final SequenceType SINGLE_BYTE
public static final SequenceType OPTIONAL_BYTE
public static final SequenceType SINGLE_DOUBLE
public static final SequenceType OPTIONAL_DOUBLE
public static final SequenceType SINGLE_FLOAT
public static final SequenceType OPTIONAL_FLOAT
public static final SequenceType OPTIONAL_DECIMAL
public static final SequenceType OPTIONAL_ANY_URI
public static final SequenceType OPTIONAL_DATE
public static final SequenceType OPTIONAL_TIME
public static final SequenceType OPTIONAL_G_YEAR
public static final SequenceType OPTIONAL_G_YEAR_MONTH
public static final SequenceType OPTIONAL_G_MONTH
public static final SequenceType OPTIONAL_G_MONTH_DAY
public static final SequenceType OPTIONAL_G_DAY
public static final SequenceType OPTIONAL_DATE_TIME
public static final SequenceType OPTIONAL_DURATION
public static final SequenceType OPTIONAL_YEAR_MONTH_DURATION
public static final SequenceType OPTIONAL_DAY_TIME_DURATION
public static final SequenceType SINGLE_QNAME
public static final SequenceType OPTIONAL_QNAME
public static final SequenceType OPTIONAL_NOTATION
public static final SequenceType OPTIONAL_BASE64_BINARY
public static final SequenceType OPTIONAL_HEX_BINARY
public static final SequenceType OPTIONAL_NUMERIC
public static final SequenceType SINGLE_NUMERIC
public static final SequenceType OPTIONAL_NODE
public static final SequenceType SINGLE_NODE
public static final SequenceType OPTIONAL_DOCUMENT_NODE
public static final SequenceType NODE_SEQUENCE
public static final SequenceType STRING_SEQUENCE
public static final SequenceType SINGLE_FUNCTION
public static final SequenceType OPTIONAL_FUNCTION_ITEM
public static final SequenceType EMPTY_SEQUENCE
public static final SequenceType NON_EMPTY_SEQUENCE
public static final SequenceType VOID
public SequenceType(ItemType primaryType, int cardinality)
primaryType
- The item typecardinality
- The required cardinalitypublic static SequenceType makeSequenceType(ItemType primaryType, int cardinality)
primaryType
- The item typecardinality
- The required cardinality. This must be one of the constants StaticProperty.EXACTLY_ONE
,
StaticProperty.ALLOWS_ONE_OR_MORE
, etcpublic ItemType getPrimaryType()
public int getCardinality()
StaticProperty.EXACTLY_ONE
,
StaticProperty.ALLOWS_ONE_OR_MORE
, etcCardinality
public boolean matches(Sequence value, TypeHierarchy th) throws XPathException
value
- the value to be testedth
- the type hierarchy cacheXPathException
- if a dynamic error occurs while evaluating the Sequence (this
won't happen if the sequence is grounded)public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toExportString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean isSameType(SequenceType other, TypeHierarchy th)
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.