The ZorbaXQItemType class represents an item type as defined in XQuery 1.0: An XML Query language. More...
Public Member Functions | |
boolean | equals (Object o) |
Compares the specified object with this item type for equality. | |
int | getBaseType () throws XQException |
Returns the base type of the item. | |
int | getItemKind () |
Returns the kind of the item. | |
int | getItemOccurrence () |
Returns the occurrence indicator for the item type. | |
ZorbaXQItemType | getItemType () |
Returns the type of the item in the sequence type. | |
QName | getNodeName () throws XQException |
Returns the name of the node. | |
String | getPIName () throws XQException |
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 () throws XQException |
Represents a type name (global or local). | |
int | hashCode () |
Returns a hash code consistent with the definition of the equals method. | |
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. | |
String | toString () |
Returns a human-readable implementation-defined string representation of the item type. | |
ZorbaXQItemType (TypeIdentifier typeIdentifier) | |
ZorbaXQItemType (Item zorbaItem) | |
ZorbaXQItemType (int itemkind, String piTarget) | |
ZorbaXQItemType (int itemkind) | |
ZorbaXQItemType (int itemkind, int basetype) | |
ZorbaXQItemType (int itemkind, QName nodename, int basetype) | |
ZorbaXQItemType (int itemkind, QName nodename, int basetype, QName typename, URI schemaURI, boolean allowNill) throws XQException | |
ZorbaXQItemType (int itemkind, QName nodename, int basetype, URI schemaURI) throws XQException |
Static Public Attributes | |
static final int | ZORBA_XQITEMKIND_ANY = 0 |
static final int | ZORBA_XQITEMKIND_ATTRIBUTE = 3 |
static final int | ZORBA_XQITEMKIND_COMMENT = 6 |
static final int | ZORBA_XQITEMKIND_DOCUMENT = 1 |
static final int | ZORBA_XQITEMKIND_ELEMENT = 2 |
static final int | ZORBA_XQITEMKIND_PI = 5 |
static final int | ZORBA_XQITEMKIND_TEXT = 4 |
Protected Member Functions | |
TypeIdentifier | getTypeIdentifier () throws XQException |
The ZorbaXQItemType class represents an item type as defined in XQuery 1.0: An XML Query language.
The ZorbaXQItemType extends the XQSequenceType but restricts the occurrance indicator to be exactly one. This derivation allows passing an item type wherever a sequence type is expected, but not the other way. The ZorbaXQItemType interface contains methods to represent information about the following aspects of an item type:
An instance of the ZorbaXQItemType is a standalone object that is independant of the XQConnection and any XQuery static or dynamic context.
Definition at line 38 of file ZorbaXQItemType.java.
|
inline |
Definition at line 96 of file ZorbaXQItemType.java.
Referenced by org.zorbaxquery.api.xqj.ZorbaXQItemType.equals().
|
inline |
Definition at line 235 of file ZorbaXQItemType.java.
References org.zorbaxquery.api.xqj.ZorbaXQItemType.ZORBA_XQITEMKIND_ANY, org.zorbaxquery.api.xqj.ZorbaXQItemType.ZORBA_XQITEMKIND_ATTRIBUTE, org.zorbaxquery.api.xqj.ZorbaXQItemType.ZORBA_XQITEMKIND_COMMENT, org.zorbaxquery.api.xqj.ZorbaXQItemType.ZORBA_XQITEMKIND_DOCUMENT, org.zorbaxquery.api.xqj.ZorbaXQItemType.ZORBA_XQITEMKIND_ELEMENT, org.zorbaxquery.api.xqj.ZorbaXQItemType.ZORBA_XQITEMKIND_PI, and org.zorbaxquery.api.xqj.ZorbaXQItemType.ZORBA_XQITEMKIND_TEXT.
|
inline |
Definition at line 375 of file ZorbaXQItemType.java.
|
inline |
Definition at line 380 of file ZorbaXQItemType.java.
|
inline |
Definition at line 384 of file ZorbaXQItemType.java.
|
inline |
Definition at line 389 of file ZorbaXQItemType.java.
|
inline |
Definition at line 395 of file ZorbaXQItemType.java.
|
inline |
Definition at line 403 of file ZorbaXQItemType.java.
|
inline |
Compares the specified object with this item type for equality.
The result is true only if the argument is an item type object which represents the same XQuery item type.
In order to comply with the general contract of equals and hashCode across different implementations the following algorithm must be used. Return true if and only if both objects are ZorbaXQItemType and:
o | - an ZorbaXQItemType object representing an XQuery item type |
Definition at line 735 of file ZorbaXQItemType.java.
References org.zorbaxquery.api.xqj.ZorbaXQItemType.getBaseType(), org.zorbaxquery.api.xqj.ZorbaXQItemType.getItemKind(), org.zorbaxquery.api.xqj.ZorbaXQItemType.getNodeName(), org.zorbaxquery.api.xqj.ZorbaXQItemType.getPIName(), org.zorbaxquery.api.xqj.ZorbaXQItemType.getSchemaURI(), org.zorbaxquery.api.xqj.ZorbaXQItemType.getTypeName(), org.zorbaxquery.api.xqj.ZorbaXQItemType.isAnonymousType(), org.zorbaxquery.api.xqj.ZorbaXQItemType.isElementNillable(), and org.zorbaxquery.api.xqj.ZorbaXQItemType.ZorbaXQItemType().
|
inline |
Returns the base type of the item.
One of the XQBASETYPE_* constants.
XQJ defines a constant for each of the built-in schema types defined in XML Schema. For atomic types this is the closest matching built-in XML Schema type, for element and attributes the closest matching built-in XML Schema type this node is based on.
XQException | - if the item kind is not one of: XQITEMKIND_DOCUMENT_ELEMENT, XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT, XQITEMKIND_ELEMENT, XQITEMKIND_SCHEMA_ELEMENT, XQITEMKIND_ATTRIBUTE, XQITEMKIND_SCHEMA_ATTRIBUTE, or XQITEMKIND_ATOMIC |
Definition at line 588 of file ZorbaXQItemType.java.
Referenced by org.zorbaxquery.api.xqj.ZorbaXQItemType.equals(), and org.zorbaxquery.api.xqj.ZorbaXQItemType.hashCode().
|
inline |
Returns the kind of the item.
One of the XQITEMKIND_* constants.
Definition at line 608 of file ZorbaXQItemType.java.
Referenced by org.zorbaxquery.api.xqj.ZorbaXQItemType.equals(), and org.zorbaxquery.api.xqj.ZorbaXQItemType.hashCode().
|
inline |
Returns the occurrence indicator for the item type.
This method will always return the value XQSequenceType.OCC_EXACTLY_ONE.
Definition at line 619 of file ZorbaXQItemType.java.
|
inline |
Returns the type of the item in the sequence type.
Definition at line 713 of file ZorbaXQItemType.java.
|
inline |
Returns the name of the node.
Returns the name of the node in case the item kind is an XQITEMKIND_DOCUMENT_ELEMENT, XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT, XQITEMKIND_ELEMENT, XQITEMKIND_SCHEMA_ELEMENT, XQITEMKIND_ATTRIBUTE, or XQITEMKIND_SCHEMA_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.
XQException | - if the item kind is not one of: XQITEMKIND_DOCUMENT_ELEMENT, XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT, XQITEMKIND_ELEMENT, XQITEMKIND_SCHEMA_ELEMENT, XQITEMKIND_ATTRIBUTE, or XQITEMKIND_SCHEMA_ATTRIBUTE |
Definition at line 631 of file ZorbaXQItemType.java.
Referenced by org.zorbaxquery.api.xqj.ZorbaXQItemType.equals(), and org.zorbaxquery.api.xqj.ZorbaXQItemType.hashCode().
|
inline |
Returns the name of the processing instruction type.
As such the item kind of this ZorbaXQItemType must be XQITEMKIND_PI.
XQException | - if the item kind is not XQITEMKIND_PI |
Definition at line 701 of file ZorbaXQItemType.java.
Referenced by org.zorbaxquery.api.xqj.ZorbaXQItemType.equals(), and org.zorbaxquery.api.xqj.ZorbaXQItemType.hashCode().
|
inline |
Returns the schema location URI of the schema that contains the item's element or type definition.
This method is implementation-definied and an implementation will return a 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.
Definition at line 650 of file ZorbaXQItemType.java.
Referenced by org.zorbaxquery.api.xqj.ZorbaXQItemType.equals(), and org.zorbaxquery.api.xqj.ZorbaXQItemType.hashCode().
|
inlineprotected |
Definition at line 55 of file ZorbaXQItemType.java.
|
inline |
Represents a type name (global or local).
This can be used to represent specific type name such as, element foo of type hatsize. The schema type name is represented as a single QName. If the return type is an anonymous type, the actual QName value returned is implementation defined.
XQException | - if the item kind is not one of: XQITEMKIND_DOCUMENT_ELEMENT, XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT, XQITEMKIND_ATOMIC, XQITEMKIND_ELEMENT, XQITEMKIND_SCHEMA_ELEMENT, XQITEMKIND_ATTRIBUTE, or XQITEMKIND_SCHEMA_ATTRIBUTE |
Definition at line 662 of file ZorbaXQItemType.java.
Referenced by org.zorbaxquery.api.xqj.ZorbaXQItemType.equals(), and org.zorbaxquery.api.xqj.ZorbaXQItemType.hashCode().
|
inline |
Returns a hash code consistent with the definition of the equals method.
In order to comply with the general contract of equals and hashCode across different implementations the following algorithm must be used:
Definition at line 796 of file ZorbaXQItemType.java.
References org.zorbaxquery.api.xqj.ZorbaXQItemType.getBaseType(), org.zorbaxquery.api.xqj.ZorbaXQItemType.getItemKind(), org.zorbaxquery.api.xqj.ZorbaXQItemType.getNodeName(), org.zorbaxquery.api.xqj.ZorbaXQItemType.getPIName(), org.zorbaxquery.api.xqj.ZorbaXQItemType.getSchemaURI(), and org.zorbaxquery.api.xqj.ZorbaXQItemType.getTypeName().
|
inline |
Represents whether the item type is an anonymous type in the schema.
Definition at line 680 of file ZorbaXQItemType.java.
Referenced by org.zorbaxquery.api.xqj.ZorbaXQItemType.equals().
|
inline |
Returns whether the element type is nillable or not.
Definition at line 689 of file ZorbaXQItemType.java.
Referenced by org.zorbaxquery.api.xqj.ZorbaXQItemType.equals().
|
inline |
Returns a human-readable implementation-defined string representation of the item type.
Definition at line 830 of file ZorbaXQItemType.java.
|
static |
Definition at line 39 of file ZorbaXQItemType.java.
Referenced by org.zorbaxquery.api.xqj.ZorbaXQItemType.ZorbaXQItemType().
|
static |
Definition at line 42 of file ZorbaXQItemType.java.
Referenced by org.zorbaxquery.api.xqj.ZorbaXQItemType.ZorbaXQItemType().
|
static |
Definition at line 45 of file ZorbaXQItemType.java.
Referenced by org.zorbaxquery.api.xqj.ZorbaXQItemType.ZorbaXQItemType().
|
static |
Definition at line 40 of file ZorbaXQItemType.java.
Referenced by org.zorbaxquery.api.xqj.ZorbaXQItemType.ZorbaXQItemType().
|
static |
Definition at line 41 of file ZorbaXQItemType.java.
Referenced by org.zorbaxquery.api.xqj.ZorbaXQItemType.ZorbaXQItemType().
|
static |
Definition at line 44 of file ZorbaXQItemType.java.
Referenced by org.zorbaxquery.api.xqj.ZorbaXQItemType.ZorbaXQItemType().
|
static |
Definition at line 43 of file ZorbaXQItemType.java.
Referenced by org.zorbaxquery.api.xqj.ZorbaXQItemType.ZorbaXQItemType().