Package net.sf.saxon.s9api
Class ItemType
- java.lang.Object
-
- net.sf.saxon.s9api.ItemType
-
public class ItemType extends java.lang.ObjectAn item type, as defined in the XPath/XQuery specifications.This class contains a number of static properties to obtain instances representing simple item types, such as
item(),node(), andxs:anyAtomicType.More complicated item types, especially those that are dependent on information in a schema, are available using factory methods on the
ItemTypeFactoryobject.
-
-
Field Summary
Fields Modifier and Type Field Description static ItemTypeANY_ATOMIC_VALUEItemType representing the type xs:anyAtomicType, that is, any atomic valuestatic ItemTypeANY_ITEMItemType representing the type item(), that is, any item at allstatic ItemTypeANY_NODEItemType representing the type node(), that is, any node
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ProcessorgetProcessor()Get the underlying ProcessorItemTypegetUnderlyingItemType()Method to get the underlying Saxon implementation objectbooleanmatches(XdmItem item)Determine whether this item type matches a given item.booleansubsumes(ItemType other)Determine whether this ItemType subsumes another ItemType.
-
-
-
Field Detail
-
ANY_ITEM
public static ItemType ANY_ITEM
ItemType representing the type item(), that is, any item at all
-
ANY_NODE
public static ItemType ANY_NODE
ItemType representing the type node(), that is, any node
-
ANY_ATOMIC_VALUE
public static ItemType ANY_ATOMIC_VALUE
ItemType representing the type xs:anyAtomicType, that is, any atomic value
-
-
Method Detail
-
matches
public boolean matches(XdmItem item)
Determine whether this item type matches a given item.- Parameters:
item- the item to be tested against this item type- Returns:
- true if the item matches this item type, false if it does not match.
-
subsumes
public boolean subsumes(ItemType other)
Determine whether this ItemType subsumes another ItemType. Specifically,A.subsumes(B) is true if every value that matches the ItemType B also matches the ItemType A.- Parameters:
other- the other ItemType- Returns:
- true if this ItemType subsumes the other ItemType. This includes the case where A and B represent the same ItemType.
- Since:
- 9.1
-
getUnderlyingItemType
public ItemType getUnderlyingItemType()
Method to get the underlying Saxon implementation objectThis gives access to Saxon methods that may change from one release to another.
- Returns:
- the underlying Saxon implementation object
-
getProcessor
protected Processor getProcessor()
Get the underlying Processor- Returns:
- the processor used to create this ItemType, if any
-
-