|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The XQItemType interface represents an item type as defined in
XQuery 1.0: An XML Query language.
The XQItemType extends the XQSequenceType but
restricts the occurance indicator to be exactly one. This derivation allows passing
an item type wherever a sequence type is expected, but not the other way.
The XQItemType interface contains methods to represent
information about the following aspects of an item type:
XQITEMKIND_* constantsXQBASETYPE_*constantsXQItemType class is a standalone
object that is independant of the XQJConnection and
any XQuery static or dynamic context.
| Field Summary | |
static int |
XQBASETYPE_ANYATOMICTYPE
Represents the schema type xs:anyAtomicType |
static int |
XQBASETYPE_ANYSIMPLETYPE
Represents the schema type xs:anySimpleType |
static int |
XQBASETYPE_ANYTYPE
Represents a complex element with a type annotation of xs:anyType |
static int |
XQBASETYPE_ANYURI
Represents the schema type xs:anyURI |
static int |
XQBASETYPE_BASE64BINARY
Represents the schema type xs:base64Binary |
static int |
XQBASETYPE_BOOLEAN
Represents the schema type xs:boolean |
static int |
XQBASETYPE_BYTE
Represents the schema type xs:byte |
static int |
XQBASETYPE_DATE
Represents the schema type xs:date |
static int |
XQBASETYPE_DATETIME
Represents the schema type xs:dateTime |
static int |
XQBASETYPE_DAYTIMEDURATION
Represents the schema type xs:dayTimeDuration |
static int |
XQBASETYPE_DECIMAL
Represents the schema type xs:decimal |
static int |
XQBASETYPE_DOUBLE
Represents the schema type xs:double |
static int |
XQBASETYPE_DURATION
Represents the schema type xs:duration |
static int |
XQBASETYPE_ENTITIES
Represents the schema type xs:ENTITIES |
static int |
XQBASETYPE_ENTITY
Represents the schema type xs:ENTITY |
static int |
XQBASETYPE_FLOAT
Represents the schema type xs:float |
static int |
XQBASETYPE_GDAY
Represents the schema type xs:gDay |
static int |
XQBASETYPE_GMONTH
Represents the schema type xs:gMonth |
static int |
XQBASETYPE_GMONTHDAY
Represents the schema type xs:gMonthDay |
static int |
XQBASETYPE_GYEAR
Represents the schema type xs:gYear |
static int |
XQBASETYPE_GYEARMONTH
Represents the schema type xs:gYearMonth |
static int |
XQBASETYPE_HEXBINARY
Represents the schema type xs:hexBinary |
static int |
XQBASETYPE_ID
Represents the schema type xs:ID |
static int |
XQBASETYPE_IDREF
Represents the schema type xs:IDREF |
static int |
XQBASETYPE_IDREFS
Represents the schema type xs:IDREFS.
|
static int |
XQBASETYPE_INT
Represents the schema type xs:int |
static int |
XQBASETYPE_INTEGER
Represents the schema type xs:integer |
static int |
XQBASETYPE_LANGUAGE
Represents the schema type xs:language |
static int |
XQBASETYPE_LONG
Represents the schema type xs:long |
static int |
XQBASETYPE_NAME
Represents the schema type xs:Name |
static int |
XQBASETYPE_NCNAME
Represents the schema type xs:NCName |
static int |
XQBASETYPE_NEGATIVE_INTEGER
Represents the schema type xs:negativeInteger |
static int |
XQBASETYPE_NMTOKEN
Represents the schema type xs:NMToken |
static int |
XQBASETYPE_NMTOKENS
Represents the schema type xs:NMTOKENS |
static int |
XQBASETYPE_NONNEGATIVE_INTEGER
Represents the schema type xs:nonNegativeInteger |
static int |
XQBASETYPE_NONPOSITIVE_INTEGER
Represents the schema type xs:nonPositiveInteger |
static int |
XQBASETYPE_NORMALIZED_STRING
Represents the schema type xs:normalizedString |
static int |
XQBASETYPE_NOTATION
Represents the schema type xs:NOTATION |
static int |
XQBASETYPE_POSITIVE_INTEGER
Represents the schema type xs:positiveInteger |
static int |
XQBASETYPE_QNAME
Represents the schema type xs:QName |
static int |
XQBASETYPE_SHORT
Represents the schema type xs:short |
static int |
XQBASETYPE_STRING
Represents the schema type xs:string |
static int |
XQBASETYPE_TIME
Represents the schema type xs:time |
static int |
XQBASETYPE_TOKEN
Represents the schema type xs:token |
static int |
XQBASETYPE_UNSIGNED_BYTE
Represents the schema type xs:unsignedByte |
static int |
XQBASETYPE_UNSIGNED_INT
Represents the schema type xs:unsignedInt |
static int |
XQBASETYPE_UNSIGNED_LONG
Represents the schema type xs:unsignedLong |
static int |
XQBASETYPE_UNSIGNED_SHORT
Represents the schema type xs:unsignedShort |
static int |
XQBASETYPE_UNTYPED
Represents an untyped complex node. |
static int |
XQBASETYPE_UNTYPEDATOMIC
Represents the schema type xs:untypedAtomic |
static int |
XQBASETYPE_XQJ_COMPLEX
Represents a complex element that has a schema type associated with it. |
static int |
XQBASETYPE_XQJ_LISTTYPE
Represents a user-defined list or union type |
static int |
XQBASETYPE_YEARMONTHDURATION
Represents the schema type xs:yearMonthDuration |
static int |
XQITEMKIND_ATOMIC
Some atomic type. |
static int |
XQITEMKIND_ATTRIBUTE
Attribute node |
static int |
XQITEMKIND_COMMENT
Comment node |
static int |
XQITEMKIND_DOCUMENT
Document type (the type information represents the type of the document element) |
static int |
XQITEMKIND_DOCUMENT_ELEMENT
Document node containing a single element node as its child (type information represents type of the element child) |
static int |
XQITEMKIND_ELEMENT
Element node |
static int |
XQITEMKIND_ITEM
Any kind of item |
static int |
XQITEMKIND_NODE
Some node type |
static int |
XQITEMKIND_PI
Processing instruction node |
static int |
XQITEMKIND_TEXT
Text node |
| Fields inherited from interface com.ddtek.xquery3.XQSequenceType |
OCC_EMPTY, OCC_EXACTLY_ONE, OCC_ONE_OR_MORE, OCC_ZERO_OR_MORE, OCC_ZERO_OR_ONE |
| Method Summary | |
int |
getBaseType()
Returns the basic pre-defined type of the item. |
int |
getItemKind()
Returns the basic kind of the item. |
int |
getItemOccurrence()
Returns the occurrence indicator for the item type. |
QName |
getNodeName()
Returns the name of the node in case the item kind is an XQITEMKIND_DOCUMENT_ELEMENT, XQITEMKIND_ELEMENT,
or XQITEMKIND_ATTRIBUTE.
|
String |
getPIName()
Returns the name of the processing instruction type. |
URI |
getSchemaURI()
Returns the schema location URI of the schema that contains the item's element or type definition. |
QName |
getTypeName()
Represents a type name (global or local). |
boolean |
isAnonymousType()
Represents whether the item type is an anonymous type in the schema. |
boolean |
isElementNillable()
Returns whether the element type is nillable or not. |
boolean |
isSchemaAttribute()
Represents whether the item type represents a schema attribute or not. |
boolean |
isSchemaElement()
Represents whether the item type represents a schema element or not. |
String |
toString()
Returns a string representation of the item type. |
| Methods inherited from interface com.ddtek.xquery3.XQSequenceType |
getItemType |
| Field Detail |
public static final int XQITEMKIND_ATOMIC
public static final int XQITEMKIND_ATTRIBUTE
public static final int XQITEMKIND_COMMENT
public static final int XQITEMKIND_DOCUMENT
public static final int XQITEMKIND_DOCUMENT_ELEMENT
public static final int XQITEMKIND_ELEMENT
public static final int XQITEMKIND_ITEM
public static final int XQITEMKIND_NODE
public static final int XQITEMKIND_PI
public static final int XQITEMKIND_TEXT
public static final int XQBASETYPE_UNTYPED
public static final int XQBASETYPE_XQJ_COMPLEX
XQITEMKIND_DOCUMENT_ELEMENT
or XQITEMKIND_ELEMENT.
public static final int XQBASETYPE_ANYTYPE
xs:anyType
public static final int XQBASETYPE_ANYSIMPLETYPE
xs:anySimpleType
public static final int XQBASETYPE_ANYATOMICTYPE
xs:anyAtomicType
public static final int XQBASETYPE_UNTYPEDATOMIC
xs:untypedAtomic
public static final int XQBASETYPE_DAYTIMEDURATION
xs:dayTimeDuration
public static final int XQBASETYPE_YEARMONTHDURATION
xs:yearMonthDuration
public static final int XQBASETYPE_ANYURI
xs:anyURI
public static final int XQBASETYPE_BASE64BINARY
xs:base64Binary
public static final int XQBASETYPE_BOOLEAN
xs:boolean
public static final int XQBASETYPE_DATE
xs:date
public static final int XQBASETYPE_INT
xs:int
public static final int XQBASETYPE_INTEGER
xs:integer
public static final int XQBASETYPE_SHORT
xs:short
public static final int XQBASETYPE_LONG
xs:long
public static final int XQBASETYPE_DATETIME
xs:dateTime
public static final int XQBASETYPE_DECIMAL
xs:decimal
public static final int XQBASETYPE_DOUBLE
xs:double
public static final int XQBASETYPE_DURATION
xs:duration
public static final int XQBASETYPE_FLOAT
xs:float
public static final int XQBASETYPE_GDAY
xs:gDay
public static final int XQBASETYPE_GMONTH
xs:gMonth
public static final int XQBASETYPE_GMONTHDAY
xs:gMonthDay
public static final int XQBASETYPE_GYEAR
xs:gYear
public static final int XQBASETYPE_GYEARMONTH
xs:gYearMonth
public static final int XQBASETYPE_HEXBINARY
xs:hexBinary
public static final int XQBASETYPE_NOTATION
xs:NOTATION
public static final int XQBASETYPE_QNAME
xs:QName
public static final int XQBASETYPE_STRING
xs:string
public static final int XQBASETYPE_TIME
xs:time
public static final int XQBASETYPE_BYTE
xs:byte
public static final int XQBASETYPE_NONPOSITIVE_INTEGER
xs:nonPositiveInteger
public static final int XQBASETYPE_NONNEGATIVE_INTEGER
xs:nonNegativeInteger
public static final int XQBASETYPE_NEGATIVE_INTEGER
xs:negativeInteger
public static final int XQBASETYPE_POSITIVE_INTEGER
xs:positiveInteger
public static final int XQBASETYPE_UNSIGNED_LONG
xs:unsignedLong
public static final int XQBASETYPE_UNSIGNED_INT
xs:unsignedInt
public static final int XQBASETYPE_UNSIGNED_SHORT
xs:unsignedShort
public static final int XQBASETYPE_UNSIGNED_BYTE
xs:unsignedByte
public static final int XQBASETYPE_NORMALIZED_STRING
xs:normalizedString
public static final int XQBASETYPE_TOKEN
xs:token
public static final int XQBASETYPE_LANGUAGE
xs:language
public static final int XQBASETYPE_NAME
xs:Name
public static final int XQBASETYPE_NCNAME
xs:NCName
public static final int XQBASETYPE_NMTOKEN
xs:NMToken
public static final int XQBASETYPE_ID
xs:ID
public static final int XQBASETYPE_IDREF
xs:IDREF
public static final int XQBASETYPE_ENTITY
xs:ENTITY
public static final int XQBASETYPE_IDREFS
xs:IDREFS.
Valid only if the item kind is
XQITEMKIND_ELEMENT, XQITEMKIND_DOCUMENT_ELEMENT,
or XQITEMKIND_ATTRIBUTE
public static final int XQBASETYPE_ENTITIES
xs:ENTITIES
public static final int XQBASETYPE_NMTOKENS
xs:NMTOKENS
public static final int XQBASETYPE_XQJ_LISTTYPE
| Method Detail |
public int getBaseType()
throws XQException
XQBASETYPE_* constants.
XQBASETYPE_* constants
indicating the basic type of the item
XQException - if the item kind is not one of:
XQITEMKIND_DOCUMENT_ELEMENT,
XQITEMKIND_ELEMENT,
XQITEMKIND_ATTRIBUTE, or
XQITEMKIND_ATOMICpublic int getItemKind()
XQITEMKIND_* constants.
XQITEMKIND_* constants
indicating the basic kind of the itempublic int getItemOccurrence()
XQSequenceType.OCC_EXACTLY_ONE.
getItemOccurrence in interface XQSequenceTypepublic String toString()
toString in interface XQSequenceType
public QName getNodeName()
throws XQException
XQITEMKIND_DOCUMENT_ELEMENT, XQITEMKIND_ELEMENT,
or XQITEMKIND_ATTRIBUTE.
For example, in the case of a type for element "foo"
this will return the QName foo. For wildcard entries a
null value will be returned.
QName for the name of the element,
attribute, or document element node. null
if it is a wildcard
XQException - if the item kind is not one of:
XQITEMKIND_DOCUMENT_ELEMENT,
XQITEMKIND_ELEMENT, or
XQITEMKIND_ATTRIBUTEpublic URI getSchemaURI()
null value if it does
not support retrieving the schema location URI.
If the item corresponds to a validated global element in a schema,
the result will be the schema location URI to the XMLSchema containing
the element definition. Otherwise if the item is a schema validated
node, the result will be the schema location URI of the XMLSchema
containing the type definition of that node. If the item is not schema
validated, the result is null
URI representing the schema
location URI of the XMLSchema containing the
global element definition or the type definition
of the current item. null in case
the item is not schema validated or if the
implementation does not support retrieving the
schema URI.
public QName getTypeName()
throws XQException
QName. If the return type is an
anonymous type, the actual QName value returned is implementation
defined.
QName of the schema type in case of a
user defined or anonoymous types. For a built-in type,
returns a predefined type name as QName
(e.g.xs:anyType, xs:decimal,
etc). Cannot be null
XQException - if the item kind is not one of:
XQITEMKIND_DOCUMENT_ELEMENT,
XQITEMKIND_ELEMENT,
XQITEMKIND_ATTRIBUTE, or
XQITEMKIND_ATOMICpublic boolean isAnonymousType()
true if the item type is an anonymous
type in the schema, false otherwisepublic boolean isElementNillable()
true if the element type is nillable,
false otherwisepublic boolean isSchemaElement()
true if the item type represents a schema
element, false otherwisepublic boolean isSchemaAttribute()
true if the item type represents a schema
attribute, false otherwise
public String getPIName()
throws XQException
XQItemType must be XQITEMKIND_PI.
null if it is a wildcard
XQException - if the item kind is not XQITEMKIND_PI
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||