net.sf.saxon.s9api
Class ItemType

java.lang.Object
  extended by net.sf.saxon.s9api.ItemType

public abstract class ItemType
extends Object

An 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(), and xs:anyAtomicType.

More complicated item types, especially those that are dependent on information in a schema, are available using factory methods on the ItemTypeFactory 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
static ItemType ANY_URI
          ItemType representing the primitive type xs:anyURI
static ItemType BASE64_BINARY
          ItemType representing the primitive type xs:base64Binary
static ItemType BOOLEAN
          ItemType representing the primitive type xs:boolean
static ItemType BYTE
          ItemType representing the built-in (but non-primitive) type xs:byte
static ItemType DATE
          ItemType representing the primitive type xs:date
static ItemType DATE_TIME
          ItemType representing the primitive type xs:dateTime
static ItemType DATE_TIME_STAMP
          ItemType representing the built-in (but non-primitive) type xs:dateTimeStamp (introduced in XSD 1.1)
static ItemType DAY_TIME_DURATION
          ItemType representing the built-in (but non-primitive) type xs:dayTimeDuration
static ItemType DECIMAL
          ItemType representing the primitive type xs:decimal
static ItemType DOUBLE
          ItemType representing the primitive type xs:double
static ItemType DURATION
          ItemType representing the primitive type xs:duration
static ItemType ENTITY
          ItemType representing the built-in (but non-primitive) type xs:ENTITY
static ItemType FLOAT
          ItemType representing the primitive type xs:float
static ItemType G_DAY
          ItemType representing the primitive type xs:gDay
static ItemType G_MONTH
          ItemType representing the primitive type xs:gMonth
static ItemType G_MONTH_DAY
          ItemType representing the primitive type xs:gMonthDay
static ItemType G_YEAR
          ItemType representing the primitive type xs:gYear
static ItemType G_YEAR_MONTH
          ItemType representing the primitive type xs:gYearMonth
static ItemType HEX_BINARY
          ItemType representing the primitive type xs:hexBinary
static ItemType ID
          ItemType representing the built-in (but non-primitive) type xs:ID
static ItemType IDREF
          ItemType representing the built-in (but non-primitive) type xs:IDREF
static ItemType INT
          ItemType representing the built-in (but non-primitive) type xs:int
static ItemType INTEGER
          ItemType representing the built-in (but non-primitive) type xs:integer
static ItemType LANGUAGE
          ItemType representing the built-in (but non-primitive) type xs:language
static ItemType LONG
          ItemType representing the built-in (but non-primitive) type xs:long
static ItemType NAME
          ItemType representing the built-in (but non-primitive) type xs:Name
static ItemType NCNAME
          ItemType representing the built-in (but non-primitive) type xs:NCName
static ItemType NEGATIVE_INTEGER
          ItemType representing the built-in (but non-primitive) type xs:negativeInteger
static ItemType NMTOKEN
          ItemType representing the built-in (but non-primitive) type xs:NMTOKEN
static ItemType NON_NEGATIVE_INTEGER
          ItemType representing the built-in (but non-primitive) type xs:nonNegativeInteger
static ItemType NON_POSITIVE_INTEGER
          ItemType representing the built-in (but non-primitive) type xs:nonPositiveInteger
static ItemType NORMALIZED_STRING
          ItemType representing the built-in (but non-primitive) type xs:normalizedString
static ItemType NOTATION
          ItemType representing the primitive type xs:NOTATION
static ItemType NUMERIC
          A Saxon-specific item type representing the base type of double, float, and decimal
static ItemType POSITIVE_INTEGER
          ItemType representing the built-in (but non-primitive) type xs:positiveInteger
static ItemType QNAME
          ItemType representing the primitive type xs:QName
static ItemType SHORT
          ItemType representing the built-in (but non-primitive) type xs:short
static ItemType STRING
          ItemType representing the primitive type xs:string
static ItemType TIME
          ItemType representing the primitive type xs:time
static ItemType TOKEN
          ItemType representing the built-in (but non-primitive) type xs:token
static ItemType UNSIGNED_BYTE
          ItemType representing the built-in (but non-primitive) type xs:unsignedByte
static ItemType UNSIGNED_INT
          ItemType representing the built-in (but non-primitive) type xs:unsignedInt
static ItemType UNSIGNED_LONG
          ItemType representing the built-in (but non-primitive) type xs:unsignedLong
static ItemType UNSIGNED_SHORT
          ItemType representing the built-in (but non-primitive) type xs:unsignedShort
static ItemType UNTYPED_ATOMIC
          ItemType representing the XPath-defined type xs:untypedAtomic
static ItemType YEAR_MONTH_DURATION
          ItemType representing the built-in (but non-primitive) type xs:yearMonthDuration
 
Constructor Summary
ItemType()
           
 
Method Summary
abstract  ItemType getUnderlyingItemType()
          Method to get the underlying Saxon implementation object
abstract  boolean matches(XdmItem item)
          Determine whether this item type matches a given item.
abstract  boolean subsumes(ItemType other)
          Determine whether this ItemType subsumes another ItemType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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


NUMERIC

public static ItemType NUMERIC
A Saxon-specific item type representing the base type of double, float, and decimal


STRING

public static ItemType STRING
ItemType representing the primitive type xs:string


BOOLEAN

public static ItemType BOOLEAN
ItemType representing the primitive type xs:boolean


DURATION

public static ItemType DURATION
ItemType representing the primitive type xs:duration


DATE_TIME

public static ItemType DATE_TIME
ItemType representing the primitive type xs:dateTime


DATE

public static ItemType DATE
ItemType representing the primitive type xs:date


TIME

public static ItemType TIME
ItemType representing the primitive type xs:time


G_YEAR_MONTH

public static ItemType G_YEAR_MONTH
ItemType representing the primitive type xs:gYearMonth


G_MONTH

public static ItemType G_MONTH
ItemType representing the primitive type xs:gMonth


G_MONTH_DAY

public static ItemType G_MONTH_DAY
ItemType representing the primitive type xs:gMonthDay


G_YEAR

public static ItemType G_YEAR
ItemType representing the primitive type xs:gYear


G_DAY

public static ItemType G_DAY
ItemType representing the primitive type xs:gDay


HEX_BINARY

public static ItemType HEX_BINARY
ItemType representing the primitive type xs:hexBinary


BASE64_BINARY

public static ItemType BASE64_BINARY
ItemType representing the primitive type xs:base64Binary


ANY_URI

public static ItemType ANY_URI
ItemType representing the primitive type xs:anyURI


QNAME

public static ItemType QNAME
ItemType representing the primitive type xs:QName


NOTATION

public static ItemType NOTATION
ItemType representing the primitive type xs:NOTATION


UNTYPED_ATOMIC

public static ItemType UNTYPED_ATOMIC
ItemType representing the XPath-defined type xs:untypedAtomic


DECIMAL

public static ItemType DECIMAL
ItemType representing the primitive type xs:decimal


FLOAT

public static ItemType FLOAT
ItemType representing the primitive type xs:float


DOUBLE

public static ItemType DOUBLE
ItemType representing the primitive type xs:double


INTEGER

public static ItemType INTEGER
ItemType representing the built-in (but non-primitive) type xs:integer


NON_POSITIVE_INTEGER

public static ItemType NON_POSITIVE_INTEGER
ItemType representing the built-in (but non-primitive) type xs:nonPositiveInteger


NEGATIVE_INTEGER

public static ItemType NEGATIVE_INTEGER
ItemType representing the built-in (but non-primitive) type xs:negativeInteger


LONG

public static ItemType LONG
ItemType representing the built-in (but non-primitive) type xs:long


INT

public static ItemType INT
ItemType representing the built-in (but non-primitive) type xs:int


SHORT

public static ItemType SHORT
ItemType representing the built-in (but non-primitive) type xs:short


BYTE

public static ItemType BYTE
ItemType representing the built-in (but non-primitive) type xs:byte


NON_NEGATIVE_INTEGER

public static ItemType NON_NEGATIVE_INTEGER
ItemType representing the built-in (but non-primitive) type xs:nonNegativeInteger


POSITIVE_INTEGER

public static ItemType POSITIVE_INTEGER
ItemType representing the built-in (but non-primitive) type xs:positiveInteger


UNSIGNED_LONG

public static ItemType UNSIGNED_LONG
ItemType representing the built-in (but non-primitive) type xs:unsignedLong


UNSIGNED_INT

public static ItemType UNSIGNED_INT
ItemType representing the built-in (but non-primitive) type xs:unsignedInt


UNSIGNED_SHORT

public static ItemType UNSIGNED_SHORT
ItemType representing the built-in (but non-primitive) type xs:unsignedShort


UNSIGNED_BYTE

public static ItemType UNSIGNED_BYTE
ItemType representing the built-in (but non-primitive) type xs:unsignedByte


YEAR_MONTH_DURATION

public static ItemType YEAR_MONTH_DURATION
ItemType representing the built-in (but non-primitive) type xs:yearMonthDuration


DAY_TIME_DURATION

public static ItemType DAY_TIME_DURATION
ItemType representing the built-in (but non-primitive) type xs:dayTimeDuration


NORMALIZED_STRING

public static ItemType NORMALIZED_STRING
ItemType representing the built-in (but non-primitive) type xs:normalizedString


TOKEN

public static ItemType TOKEN
ItemType representing the built-in (but non-primitive) type xs:token


LANGUAGE

public static ItemType LANGUAGE
ItemType representing the built-in (but non-primitive) type xs:language


NAME

public static ItemType NAME
ItemType representing the built-in (but non-primitive) type xs:Name


NMTOKEN

public static ItemType NMTOKEN
ItemType representing the built-in (but non-primitive) type xs:NMTOKEN


NCNAME

public static ItemType NCNAME
ItemType representing the built-in (but non-primitive) type xs:NCName


ID

public static ItemType ID
ItemType representing the built-in (but non-primitive) type xs:ID


IDREF

public static ItemType IDREF
ItemType representing the built-in (but non-primitive) type xs:IDREF


ENTITY

public static ItemType ENTITY
ItemType representing the built-in (but non-primitive) type xs:ENTITY


DATE_TIME_STAMP

public static ItemType DATE_TIME_STAMP
ItemType representing the built-in (but non-primitive) type xs:dateTimeStamp (introduced in XSD 1.1)

Constructor Detail

ItemType

public ItemType()
Method Detail

matches

public abstract 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 abstract 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 abstract 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


Copyright (c) Saxonica Limited. All rights reserved.