net.sf.saxon.type

Class AnyItemType

public class AnyItemType extends Object implements ItemType, Serializable

An implementation of ItemType that matches any item (node or atomic value)
Method Summary
AtomicTypegetAtomizedItemType()
static AnyItemTypegetInstance()
Factory method to get the singleton instance
ItemTypegetPrimitiveItemType()
Get the primitive item type corresponding to this item type.
intgetPrimitiveType()
ItemTypegetSuperType(TypeHierarchy th)
inthashCode()
Returns a hash code value for the object.
booleanisAtomicType()
Determine whether this item type is atomic (that is, whether it can ONLY match atomic values)
booleanisAtomizable()
Ask whether values of this type are atomizable
booleanmatchesItem(Item item, boolean allowURIPromotion, Configuration config)
Test whether a given item conforms to this type
StringtoString()
StringtoString(NamePool pool)

Method Detail

getAtomizedItemType

public AtomicType getAtomizedItemType()

getInstance

public static AnyItemType getInstance()
Factory method to get the singleton instance

getPrimitiveItemType

public ItemType getPrimitiveItemType()
Get the primitive item type corresponding to this item type. For item(), this is Type.ITEM. For node(), it is Type.NODE. For specific node kinds, it is the value representing the node kind, for example Type.ELEMENT. For anyAtomicValue it is Type.ATOMIC_VALUE. For numeric it is Type.NUMBER. For other atomic types it is the primitive type as defined in XML Schema, except that INTEGER is considered to be a primitive type.

getPrimitiveType

public int getPrimitiveType()

getSuperType

public ItemType getSuperType(TypeHierarchy th)

hashCode

public int hashCode()
Returns a hash code value for the object.

isAtomicType

public boolean isAtomicType()
Determine whether this item type is atomic (that is, whether it can ONLY match atomic values)

Returns: false: this type can match nodes or atomic values

isAtomizable

public boolean isAtomizable()
Ask whether values of this type are atomizable

Returns: true unless it is known that these items will be elements with element-only content, in which case return false

matchesItem

public boolean matchesItem(Item item, boolean allowURIPromotion, Configuration config)
Test whether a given item conforms to this type

Parameters: item The item to be tested allowURIPromotion config

Returns: true if the item is an instance of this type; false otherwise

toString

public String toString()

toString

public String toString(NamePool pool)