|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xml_project.morganaxpath.type.SequenceType
public class SequenceType
An object representing XPath's sequence type syntax
Nested Class Summary | |
---|---|
static class |
SequenceType.OccurrenceIndicator
Enumeration of the occurrence indicators (including empty) |
Method Summary | |
---|---|
boolean |
checkCardinality(XdmSequence op)
Checks whether the given XDM sequence has the cardinality if this sequence type |
static boolean |
checkCardinality(XdmSequence aSequence,
SequenceType.OccurrenceIndicator occ)
Checks the cardinality of the given sequence. |
static boolean |
checkItemType(XdmSequence aSequence,
ItemType theItemType)
Checks whether the all items in the given sequence match the given type. |
boolean |
fulfilledBy(SequenceType test)
Tests whether this sequence type is fulfilled by another sequence type |
boolean |
fulfilledBy(SequenceType test,
boolean checkPromotion)
Tests whether this sequence type is fulfilled by another sequence type, optionally using type promotion |
ItemType |
getItemType()
Gets the item Type represented by this sequence type. |
SequenceType.OccurrenceIndicator |
getOccurenceIndicator()
gets the occurence indicator represented by this sequence type. |
boolean |
isAtomicType()
Checks whether this SequenceType represents an atomic type |
boolean |
isAtomicType(java.lang.Class<? extends XS_AnyType> type)
Checks whether this Sequence represents a special atomic type |
boolean |
isValid()
|
static SequenceType |
makeSequenceType(java.lang.Class<? extends XS_AnyType> anAtomicType)
Makes a sequence type from the given XDM value type, cardinality exactly one. |
static SequenceType |
makeSequenceType(java.lang.Class<? extends XS_AnyType> anAtomicType,
SequenceType.OccurrenceIndicator occ)
Makes a sequence type from the given XDM value type and the given cardinality |
static SequenceType |
makeSequenceType(ItemType item)
Creates a sequence type representing the given item type, cardinality = exactly one. |
static SequenceType |
makeSequenceType(ItemType item,
SequenceType.OccurrenceIndicator occ)
Create a sequence type representing the given item type and cardinality. |
static SequenceType |
makeSequenceType(SequenceType orgType,
SequenceType.OccurrenceIndicator occ)
Makes a sequence type from another sequence type with the given cardinality |
boolean |
matches(XdmSequence aSequence)
Checks whether the given XDM sequence matches this sequence type. |
java.lang.String |
toString()
Returns a string representation of this sequence type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final SequenceType EMPTY_TYPE
public static final SequenceType NONE
public static final SequenceType EMPTY_SEQUENCE
public static final SequenceType ANY_SEQUENCE
public static final SequenceType ITEM_ONE
public static final SequenceType ITEM_ZERO_OR_ONE
public static final SequenceType BOOLEAN_ONE
public static final SequenceType BOOLEAN_ZERO_OR_ONE
public static final SequenceType INTEGER_ONE
public static final SequenceType INTEGER_ZERO_OR_MORE
public static final SequenceType DOUBLE_ONE
public static final SequenceType DOUBLE_ZERO_OR_ONE
public static final SequenceType NODE_ZERO_OR_ONE
public static final SequenceType NODE_ONE
public static final SequenceType NODE_ZERO_OR_MORE
public static final SequenceType NODE_ONE_OR_MORE
public static final SequenceType STRING_ZERO_OR_ONE
public static final SequenceType STRING_ONE
public static final SequenceType STRING_ZERO_OR_MORE
public static final SequenceType STRING_ONE_OR_MORE
public static final SequenceType QNAME_ONE
public static final SequenceType NCNAME_ONE
public static final SequenceType ANYURI_ONE
public static final SequenceType TOKEN_ONE
public static final SequenceType DATE_TIME_ONE
public static final SequenceType DOCUMENT_ZERO_OR_ONE
public static final SequenceType DOCUMENT_ONE
public static final SequenceType DOCUMENT_ZERO_OR_MORE
public static final SequenceType DOCUMENT_ONE_OR_MORE
public static final SequenceType ANY_MAP
public static final SequenceType ANY_ARRAY
Method Detail |
---|
public boolean isValid()
public boolean isAtomicType()
public boolean isAtomicType(java.lang.Class<? extends XS_AnyType> type)
type
- the type to check for
public ItemType getItemType()
public SequenceType.OccurrenceIndicator getOccurenceIndicator()
public static boolean checkCardinality(XdmSequence aSequence, SequenceType.OccurrenceIndicator occ)
aSequence
- the sequence to test.occ
- the cardinality to check for.
public static SequenceType makeSequenceType(ItemType item)
item
- the item type.
public static SequenceType makeSequenceType(ItemType item, SequenceType.OccurrenceIndicator occ)
item
- the item typeocc
- the cardinality
public static SequenceType makeSequenceType(java.lang.Class<? extends XS_AnyType> anAtomicType)
anAtomicType
- the XDM value type.
public static SequenceType makeSequenceType(java.lang.Class<? extends XS_AnyType> anAtomicType, SequenceType.OccurrenceIndicator occ)
anAtomicType
- the XDM value typeocc
- the cardinality
public static SequenceType makeSequenceType(SequenceType orgType, SequenceType.OccurrenceIndicator occ)
orgType
- a sequence typeocc
- the cardinality
public static boolean checkItemType(XdmSequence aSequence, ItemType theItemType) throws XPathException
aSequence
- the sequence to test.theItemType
- the item type to test for.
XPathException
- raised, when an error occurred.public boolean matches(XdmSequence aSequence) throws XPathException
aSequence
- the XDM sequence to test.
XPathException
- raised, when an error occcurred.public boolean checkCardinality(XdmSequence op)
op
- the sequence to test.
public boolean fulfilledBy(SequenceType test, boolean checkPromotion) throws XPathException
test
- the sequence type to testcheckPromotion
- - use type promotion or not.
XPathException
- raised, if an error occurred.public boolean fulfilledBy(SequenceType test) throws XPathException
test
- the sequence type to test
XPathException
- raised, if an error occurred.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |