|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.saxon.type.Type
This class contains static information about types and methods for constructing type codes. The class is never instantiated.
Field Summary | |
static AtomicType |
ANY_ATOMIC_TYPE
|
static int |
ANY_SIMPLE_TYPE
|
static int |
ANY_URI
Item type representing the type xs:anyURI |
static AtomicType |
ANY_URI_TYPE
|
static int |
ATOMIC
Constant denoting any atomic type (the union of all primitive types and types derived from primitive types by restriction or by union) |
static short |
ATTRIBUTE
Item type representing an attribute node - attribute() |
static int |
BASE64_BINARY
Item type representing the type xs:base64Binary |
static AtomicType |
BASE64_BINARY_TYPE
|
static int |
BOOLEAN
Item type representing the type xs:boolean |
static AtomicType |
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 AtomicType |
DATE_TIME_TYPE
|
static AtomicType |
DATE_TYPE
|
static int |
DAY_TIME_DURATION
Item type representing the type xdt:dayTimeDuration |
static AtomicType |
DAY_TIME_DURATION_TYPE
|
static int |
DECIMAL
Item type representing the type xs:decimal |
static AtomicType |
DECIMAL_TYPE
|
static int |
DISJOINT
Constant denoting relationship between two types: A is disjoint from B |
static short |
DOCUMENT
Item type representing a document node |
static int |
DOUBLE
Item type representing the type xs:double |
static AtomicType |
DOUBLE_TYPE
|
static int |
DURATION
Item type representing the type xs:duration |
static AtomicType |
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 AtomicType |
FLOAT_TYPE
|
static int |
G_DAY
Item type representing the type xs:gDay |
static AtomicType |
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 AtomicType |
G_MONTH_DAY_TYPE
|
static AtomicType |
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 AtomicType |
G_YEAR_MONTH_TYPE
|
static AtomicType |
G_YEAR_TYPE
|
static int |
HEX_BINARY
Item type representing the type xs:hexBinary |
static AtomicType |
HEX_BINARY_TYPE
|
static int |
ID
Item type representing the type xs:ID |
static AtomicType |
ID_TYPE
|
static int |
IDREF
Item type representing the type xs:IDREF |
static int |
IDREFS
Content type representing the complex type xs:IDREFS |
static int |
INT
Item type representing the type xs:int |
static int |
INTEGER
Item type representing the type xs:integer |
static AtomicType |
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
A type that matches nothing |
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 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 AtomicType |
NOTATION_TYPE
|
static int |
NUMBER
Constant denoting any numeric type (the union of float, double, and decimal) |
static AtomicType |
NUMBER_TYPE
|
static int |
OBJECT
Constant representing the type of an external object (for use by extension functions) |
static int |
OVERLAPS
Constant denoting relationship between two types: A overlaps B |
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 AtomicType |
QNAME_TYPE
|
static int |
SAME_TYPE
Constant denoting relationship between two types: A is the same type as B |
static int |
SHORT
Item type representing the type xs:short |
static int |
STRING
Constants representing primitive data types defined in Schema Part 2 |
static AtomicType |
STRING_TYPE
|
static int |
SUBSUMED_BY
Constant denoting relationship between two types: A is subsumed by B |
static int |
SUBSUMES
Constant denoting relationship between two types: A subsumes B |
static short |
TEXT
Item type representing a text node - text() |
static int |
TIME
Item type representing the type xs:time |
static AtomicType |
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 AtomicType |
UNTYPED_ATOMIC_TYPE
|
static int |
YEAR_MONTH_DURATION
Item type representing the type xdt:yearMonthDuration |
static AtomicType |
YEAR_MONTH_DURATION_TYPE
|
Method Summary | |
static java.lang.String |
displayTypeName(Item item)
Output (for diagnostics) a representation of the type of an item. |
static ItemType |
getBuiltInItemType(java.lang.String namespace,
java.lang.String localName)
Get the SimpleType object for a built-in simple type code |
static ItemType |
getCommonSuperType(ItemType t1,
ItemType t2)
Get a type that is a common supertype of two given types |
static int |
inverseRelationship(int r)
Get the inverse of a relationship between two types |
static boolean |
isComparable(int t1,
int t2)
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 boolean |
isPromotable(ItemType sourceType,
ItemType targetType)
Determine whether type A is numerically promotable to type B, for example xs:integer is promotable to xs:double |
static boolean |
isSubType(ItemType subtype,
ItemType supertype)
Determine whether type A is type B or one of its subtypes, recursively |
static int |
relationship(ItemType t1,
ItemType t2)
Determine the relationship of one item type to another. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final short ELEMENT
public static final short ATTRIBUTE
public static final short TEXT
public static final short PROCESSING_INSTRUCTION
public static final short COMMENT
public static final short DOCUMENT
public static final short NAMESPACE
public static final short NODE
public static final ItemType NODE_TYPE
public static final short ITEM
public static final ItemType ITEM_TYPE
public static final short MAX_NODE_TYPE
public static final short EMPTY
public static final int ATOMIC
public static final int NUMBER
public static final int STRING
public static final int BOOLEAN
public static final int DECIMAL
public static final int FLOAT
public static final int DOUBLE
public static final int DURATION
public static final int DATE_TIME
public static final int TIME
public static final int DATE
public static final int G_YEAR_MONTH
public static final int G_YEAR
public static final int G_MONTH_DAY
public static final int G_DAY
public static final int G_MONTH
public static final int HEX_BINARY
public static final int BASE64_BINARY
public static final int ANY_URI
public static final int QNAME
public static final int NOTATION
public static final int UNTYPED_ATOMIC
public static final int ANY_SIMPLE_TYPE
public static final int OBJECT
public static final int INTEGER
public static final int NON_POSITIVE_INTEGER
public static final int NEGATIVE_INTEGER
public static final int LONG
public static final int INT
public static final int SHORT
public static final int BYTE
public static final int NON_NEGATIVE_INTEGER
public static final int POSITIVE_INTEGER
public static final int UNSIGNED_LONG
public static final int UNSIGNED_INT
public static final int UNSIGNED_SHORT
public static final int UNSIGNED_BYTE
public static final int NORMALIZED_STRING
public static final int TOKEN
public static final int LANGUAGE
public static final int NMTOKEN
public static final int NMTOKENS
public static final int NAME
public static final int NCNAME
public static final int ID
public static final int IDREF
public static final int IDREFS
public static final int ENTITY
public static final int YEAR_MONTH_DURATION
public static final int DAY_TIME_DURATION
public static final AtomicType UNTYPED_ATOMIC_TYPE
public static final AtomicType ANY_ATOMIC_TYPE
public static final AtomicType YEAR_MONTH_DURATION_TYPE
public static final AtomicType DAY_TIME_DURATION_TYPE
public static final AtomicType STRING_TYPE
public static final AtomicType BOOLEAN_TYPE
public static final AtomicType DECIMAL_TYPE
public static final AtomicType FLOAT_TYPE
public static final AtomicType DOUBLE_TYPE
public static final AtomicType DURATION_TYPE
public static final AtomicType DATE_TIME_TYPE
public static final AtomicType TIME_TYPE
public static final AtomicType DATE_TYPE
public static final AtomicType G_YEAR_MONTH_TYPE
public static final AtomicType G_YEAR_TYPE
public static final AtomicType G_MONTH_DAY_TYPE
public static final AtomicType G_DAY_TYPE
public static final AtomicType G_MONTH_TYPE
public static final AtomicType HEX_BINARY_TYPE
public static final AtomicType BASE64_BINARY_TYPE
public static final AtomicType ANY_URI_TYPE
public static final AtomicType QNAME_TYPE
public static final AtomicType NOTATION_TYPE
public static final AtomicType INTEGER_TYPE
public static final AtomicType ID_TYPE
public static final AtomicType NUMBER_TYPE
public static final int SAME_TYPE
public static final int SUBSUMES
public static final int SUBSUMED_BY
public static final int OVERLAPS
public static final int DISJOINT
Method Detail |
public static boolean isNodeType(ItemType type)
type
- The type to be tested
public static final java.lang.String displayTypeName(Item item)
public static ItemType getBuiltInItemType(java.lang.String namespace, java.lang.String localName)
public static boolean isSubType(ItemType subtype, ItemType supertype)
subtype
- identifies the first typesupertype
- identifies the second type
public static int relationship(ItemType t1, ItemType t2)
t1
- the first item typet2
- the second item type
SAME_TYPE
if the types are the same; SUBSUMES
if the first
type subsumes the second (that is, all instances of the second type are also instances
of the first); SUBSUMED_BY
if the second type subsumes the first;
OVERLAPS
if the two types overlap (have a non-empty intersection);
DISJOINT
if the two types are disjoint (have an empty intersection)public static int inverseRelationship(int r)
r
- the relationship of type t1 to t2
public static boolean isPromotable(ItemType sourceType, ItemType targetType)
public static final ItemType getCommonSuperType(ItemType t1, ItemType t2)
t1
- the first item typet2
- the second item type
public static boolean isPrimitiveType(int code)
code
- the item type code to be tested
public static boolean isComparable(int t1, int t2)
t1
- the first type to compared.
This must be a primitive atomic type as defined by ItemType.getPrimitiveType()
t2
- the second type to compared.
This must be a primitive atomic type as defined by ItemType.getPrimitiveType()
public static boolean isOrdered(int type)
type
- the primitive item type being tested
public static boolean isNumericPrimitiveType(ItemType t)
t
- the type being tested
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |