net.sf.saxon.type
public abstract class Type extends Object implements Serializable
Field Summary | |
---|---|
static int | ANY_ATOMIC
Constant denoting any atomic type (the union of all primitive types and types
derived from primitive types by restriction or by union) |
static BuiltInAtomicType | ANY_ATOMIC_TYPE |
static int | ANY_SIMPLE_TYPE |
static int | ANY_URI
Item type representing the type xs:anyURI |
static BuiltInAtomicType | ANY_URI_TYPE |
static short | ATTRIBUTE
Item type representing an attribute node - attribute() |
static int | BASE64_BINARY
Item type representing the type xs:base64Binary |
static BuiltInAtomicType | BASE64_BINARY_TYPE |
static int | BOOLEAN
Item type representing the type xs:boolean |
static BuiltInAtomicType | BOOLEAN_TYPE |
static int | BYTE
Item type representing the type xs:byte |
static short | COMMENT
Item type representing a comment node |
static int | DATE
Item type representing the type xs:date |
static int | DATE_TIME
Item type representing the type xs:dateTime |
static BuiltInAtomicType | DATE_TIME_TYPE |
static BuiltInAtomicType | DATE_TYPE |
static int | DAY_TIME_DURATION
Item type representing the type xdt:dayTimeDuration |
static BuiltInAtomicType | DAY_TIME_DURATION_TYPE |
static int | DECIMAL
Item type representing the type xs:decimal |
static BuiltInAtomicType | DECIMAL_TYPE |
static short | DOCUMENT
Item type representing a document node |
static int | DOUBLE
Item type representing the type xs:double |
static BuiltInAtomicType | DOUBLE_TYPE |
static int | DURATION
Item type representing the type xs:duration |
static BuiltInAtomicType | DURATION_TYPE |
static short | ELEMENT
Type representing an element node - element() |
static short | EMPTY
Item type that matches no items (corresponds to SequenceType empty()) |
static int | ENTITY
Item type representing the type xs:ENTITY |
static int | FLOAT
Item type representing the type xs:float |
static BuiltInAtomicType | FLOAT_TYPE |
static int | G_DAY
Item type representing the type xs:gDay |
static BuiltInAtomicType | G_DAY_TYPE |
static int | G_MONTH
Item type representing the type xs:gMonth |
static int | G_MONTH_DAY
Item type representing the type xs:monthDay |
static BuiltInAtomicType | G_MONTH_DAY_TYPE |
static BuiltInAtomicType | G_MONTH_TYPE |
static int | G_YEAR
Item type representing the type xs:gYear |
static int | G_YEAR_MONTH
Item type representing the type xs:gYearMonth |
static BuiltInAtomicType | G_YEAR_MONTH_TYPE |
static BuiltInAtomicType | G_YEAR_TYPE |
static int | HEX_BINARY
Item type representing the type xs:hexBinary |
static BuiltInAtomicType | HEX_BINARY_TYPE |
static int | ID
Item type representing the type xs:ID |
static int | IDREF
Item type representing the type xs:IDREF |
static int | IDREFS
Content type representing the complex type xs:IDREFS |
static BuiltInAtomicType | ID_TYPE |
static int | INT
Item type representing the type xs:int |
static int | INTEGER
Item type representing the type xs:integer |
static BuiltInAtomicType | INTEGER_TYPE |
static short | ITEM
An item type that matches any item |
static ItemType | ITEM_TYPE |
static int | LANGUAGE
Item type representing the type xs:language |
static int | LONG
Item type representing the type xs:long |
static short | MAX_NODE_TYPE |
static int | NAME
Item type representing the type xs:NAME |
static short | NAMESPACE
Item type representing a namespace node |
static int | NCNAME
Item type representing the type xs:NCNAME |
static BuiltInAtomicType | NCNAME_TYPE |
static int | NEGATIVE_INTEGER
Item type representing the type xs:negativeInteger |
static int | NMTOKEN
Item type representing the type xs:NMTOKEN |
static int | NMTOKENS
Content type representing the complex type xs:NMTOKENS |
static short | NODE
An item type that matches any node |
static ItemType | NODE_TYPE |
static int | NON_NEGATIVE_INTEGER
Item type representing the type xs:nonNegativeInteger |
static int | NON_POSITIVE_INTEGER
Item type representing the type xs:nonPositiveInteger |
static int | NORMALIZED_STRING
Item type representing the type xs:normalizedString |
static int | NOTATION
Item type representing the type xs:NOTATION
|
static BuiltInAtomicType | NOTATION_TYPE |
static int | NUMBER
Constant denoting any numeric type (the union of float, double, and decimal) |
static BuiltInAtomicType | NUMBER_TYPE |
static int | OBJECT
Constant representing the type of an external object (for use by extension functions) |
static short | PARENT_POINTER
Dummy node kind used in the tiny tree to contain a parent pointer |
static int | POSITIVE_INTEGER
Item type representing the type xs:positiveInteger |
static short | PROCESSING_INSTRUCTION
Item type representing a processing-instruction node |
static int | QNAME
Item type representing the type xs:QName |
static BuiltInAtomicType | QNAME_TYPE |
static int | SHORT
Item type representing the type xs:short |
static short | STOPPER
Dummy node kind used in the tiny tree to mark the end of the tree |
static int | STRING
Constants representing primitive data types defined in Schema Part 2 |
static BuiltInAtomicType | STRING_TYPE |
static short | TEXT
Item type representing a text node - text() |
static int | TIME
Item type representing the type xs:time |
static BuiltInAtomicType | TIME_TYPE |
static int | TOKEN
Item type representing the type xs:token |
static int | UNSIGNED_BYTE
Item type representing the type xs:unsignedByte |
static int | UNSIGNED_INT
Item type representing the type xs:unsignedInt |
static int | UNSIGNED_LONG
Item type representing the type xs:unsignedLong |
static int | UNSIGNED_SHORT
Item type representing the type xs:unsignedShort |
static int | UNTYPED_ATOMIC
Item type representing the type xdt:untypedAtomic
(the type of the content of a schema-less node) |
static BuiltInAtomicType | UNTYPED_ATOMIC_TYPE |
static short | WHITESPACE_TEXT
Item type representing a text node stored in the tiny tree as compressed whitespace |
static int | YEAR_MONTH_DURATION
Item type representing the type xdt:yearMonthDuration |
static BuiltInAtomicType | YEAR_MONTH_DURATION_TYPE |
Method Summary | |
---|---|
static String | displayTypeName(Item item)
Output (for diagnostics) a representation of the type of an item. |
static ItemType | getBuiltInItemType(String namespace, String localName)
Get the SimpleType object for a built-in simple type code |
static ItemType | getCommonSuperType(ItemType t1, ItemType t2, TypeHierarchy th)
Get a type that is a common supertype of two given types
|
static ItemType | getItemType(Item item)
Get the ItemType of an Item |
static boolean | isComparable(int t1, int t2, boolean ordered)
Determine whether two primitive atomic types are comparable |
static boolean | isNodeType(ItemType type)
Test whether a given type is (some subtype of) node()
|
static boolean | isNumericPrimitiveType(ItemType t)
Test whether the supplied type, which must be a primitive type, is one of
the numeric primitive types |
static boolean | isOrdered(int type)
Determine whether a primitive type is ordered. |
static boolean | isPrimitiveType(int code)
Determine whether this type is a primitive type. |
static int | schemaTypeRelationship(SchemaType s1, SchemaType s2)
Get the relationship of two schema types to each other |
Returns: the SimpleType, or null if not found
Parameters: t1 the first item type t2 the second item type th
Returns: the item type that is a supertype of both the supplied item types
Parameters: t1 the first type to compared. This must be a primitive atomic type as defined by ItemType t2 the second type to compared. This must be a primitive atomic type as defined by ItemType ordered true if testing for an ordering comparison (lt, gt, le, ge). False if testing for an equality comparison (eq, ne)
Returns: true if the types are comparable, as defined by the rules of the "eq" operator
Parameters: type The type to be tested
Returns: true if the item type is node() or a subtype of node()
Parameters: t the type being tested
Returns: true if the type is integer, double, float, decimal, or the abstract type "numeric"
Parameters: type the primitive item type being tested
Returns: true if the types are potentially comparable. For abstract types (type=ATOMIC) we give the benefit of the doubt and return true.
Parameters: code the item type code to be tested
Returns: true if the type is considered primitive under the above rules