net.sf.saxon.s9api

Class ItemType


public class ItemType
extends java.lang.Object

An item type, as defined in the XPath/XQuery specifications.

This class contains a number of static properties and factory methods to obtain instances representing simple item types, such as item(), node(), node kind tests such as text() and comment(), and built-in atomic types.

More complicated item types, especially those that are dependent on information in a schema, are available using factory methods on the SchemaManager object.

Field Summary

static ItemType
ANY_ATOMIC_VALUE
ItemType representing the type xs:anyAtomicType, that is, any atomic value
static ItemType
ANY_ITEM
ItemType representing the type item(), that is, any item at all
static ItemType
ANY_NODE
ItemType representing the type node(), that is, any node

Constructor Summary

ItemType(ItemType underlyingType, Processor processor)

Method Summary

protected Processor
getProcessor()
Get the underlying Processor
ItemType
getUnderlyingItemType()
Method to get the underlying Saxon implementation object

This gives access to Saxon methods that may change from one release to another.

boolean
matches(XdmItem item)
Determine whether this item type matches a given item.

Field Details

ANY_ATOMIC_VALUE

public static ItemType ANY_ATOMIC_VALUE
ItemType representing the type xs:anyAtomicType, that is, any atomic value

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

Constructor Details

ItemType

protected ItemType(ItemType underlyingType,
                   Processor processor)

Method Details

getProcessor

protected Processor getProcessor()
Get the underlying Processor
Returns:
the processor used to create this ItemType, if any

getUnderlyingItemType

public ItemType getUnderlyingItemType()
Method to get the underlying Saxon implementation object

This gives access to Saxon methods that may change from one release to another.

Returns:
the underlying Saxon implementation object

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.