Class SequenceType
java.lang.Object
net.sf.saxon.value.SequenceType
- All Implemented Interfaces:
Serializable
SequenceType: a sequence type consists of a primary type, which indicates the type of item,
and a cardinality, which indicates the number of occurrences permitted. Where the primary type
is element or attribute, there may also be a content type, indicating the required type
annotation on the element or attribute content.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SequenceTypeA type that allows any sequence of itemsstatic final SequenceTypeA type that allows zero or more atomic valuesstatic final SequenceTypeA type that only permits the empty sequencestatic final SequenceTypeA type that allows a sequence of zero or more nodesstatic final SequenceTypeA type that allows a sequence of zero or more numeric valuesstatic final SequenceTypeA type that allows zero or one atomic valuesstatic final SequenceTypeA type that allows a single integerstatic final SequenceTypeA type that allows zero or one nodesstatic final SequenceTypeA type that allows exactly one atomic valuestatic final SequenceTypeA type that allows a single integerstatic final SequenceTypeA type that allows exactly one item, of any kindstatic final SequenceTypeA type that allows a single nodestatic final SequenceTypeA type that allows a single string -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.intGet the cardinality component of this SequenceType.Get the "primary" part of this required type.inthashCode()Returns a hash code value for the object.static SequenceTypemakeSequenceType(ItemType primaryType, int cardinality) Construct an instance of SequenceType.toString()Return a string representation of this SequenceType
-
Field Details
-
ANY_SEQUENCE
A type that allows any sequence of items -
SINGLE_ITEM
A type that allows exactly one item, of any kind -
SINGLE_ATOMIC
A type that allows exactly one atomic value -
OPTIONAL_ATOMIC
A type that allows zero or one atomic values -
ATOMIC_SEQUENCE
A type that allows zero or more atomic values -
SINGLE_STRING
A type that allows a single string -
SINGLE_INTEGER
A type that allows a single integer -
OPTIONAL_INTEGER
A type that allows a single integer -
OPTIONAL_NODE
A type that allows zero or one nodes -
SINGLE_NODE
A type that allows a single node -
NODE_SEQUENCE
A type that allows a sequence of zero or more nodes -
NUMERIC_SEQUENCE
A type that allows a sequence of zero or more numeric values -
EMPTY_SEQUENCE
A type that only permits the empty sequence
-
-
Method Details
-
makeSequenceType
Construct an instance of SequenceType. This is a factory method: it maintains a pool of SequenceType objects to reduce the amount of object creation.- Parameters:
primaryType- The item typecardinality- The required cardinality
-
getPrimaryType
Get the "primary" part of this required type. E.g. for type element(*, xs:date) the "primary type" is element()- Returns:
- The item type code of the primary type
-
getCardinality
public int getCardinality()Get the cardinality component of this SequenceType. This is one of the constants Cardinality.EXACTLY_ONE, Cardinality.ONE_OR_MORE, etc- Returns:
- the required cardinality
- See Also:
-
toString
-
hashCode
-
equals
-