|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.xqj.SaxonXQItemType
public class SaxonXQItemType
Saxon implementation of the XQJ XQItemType interface
Field Summary |
---|
Fields inherited from interface javax.xml.xquery.XQItemType |
---|
XQBASETYPE_ANYATOMICTYPE, XQBASETYPE_ANYSIMPLETYPE, XQBASETYPE_ANYTYPE, XQBASETYPE_ANYURI, XQBASETYPE_BASE64BINARY, XQBASETYPE_BOOLEAN, XQBASETYPE_BYTE, XQBASETYPE_DATE, XQBASETYPE_DATETIME, XQBASETYPE_DAYTIMEDURATION, XQBASETYPE_DECIMAL, XQBASETYPE_DOUBLE, XQBASETYPE_DURATION, XQBASETYPE_ENTITIES, XQBASETYPE_ENTITY, XQBASETYPE_FLOAT, XQBASETYPE_GDAY, XQBASETYPE_GMONTH, XQBASETYPE_GMONTHDAY, XQBASETYPE_GYEAR, XQBASETYPE_GYEARMONTH, XQBASETYPE_HEXBINARY, XQBASETYPE_ID, XQBASETYPE_IDREF, XQBASETYPE_IDREFS, XQBASETYPE_INT, XQBASETYPE_INTEGER, XQBASETYPE_LANGUAGE, XQBASETYPE_LONG, XQBASETYPE_NAME, XQBASETYPE_NCNAME, XQBASETYPE_NEGATIVE_INTEGER, XQBASETYPE_NMTOKEN, XQBASETYPE_NMTOKENS, XQBASETYPE_NONNEGATIVE_INTEGER, XQBASETYPE_NONPOSITIVE_INTEGER, XQBASETYPE_NORMALIZED_STRING, XQBASETYPE_NOTATION, XQBASETYPE_POSITIVE_INTEGER, XQBASETYPE_QNAME, XQBASETYPE_SHORT, XQBASETYPE_STRING, XQBASETYPE_TIME, XQBASETYPE_TOKEN, XQBASETYPE_UNSIGNED_BYTE, XQBASETYPE_UNSIGNED_INT, XQBASETYPE_UNSIGNED_LONG, XQBASETYPE_UNSIGNED_SHORT, XQBASETYPE_UNTYPED, XQBASETYPE_UNTYPEDATOMIC, XQBASETYPE_YEARMONTHDURATION, XQITEMKIND_ATOMIC, XQITEMKIND_ATTRIBUTE, XQITEMKIND_COMMENT, XQITEMKIND_DOCUMENT, XQITEMKIND_DOCUMENT_ELEMENT, XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT, XQITEMKIND_ELEMENT, XQITEMKIND_ITEM, XQITEMKIND_NODE, XQITEMKIND_PI, XQITEMKIND_SCHEMA_ATTRIBUTE, XQITEMKIND_SCHEMA_ELEMENT, XQITEMKIND_TEXT |
Fields inherited from interface javax.xml.xquery.XQSequenceType |
---|
OCC_EMPTY, OCC_EXACTLY_ONE, OCC_ONE_OR_MORE, OCC_ZERO_OR_MORE, OCC_ZERO_OR_ONE |
Constructor Summary | |
---|---|
protected |
SaxonXQItemType(ItemType itemType,
Configuration config)
|
protected |
SaxonXQItemType(NodeInfo node)
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
Compares the specified object with this item type for equality. |
int |
getBaseType()
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. |
javax.xml.xquery.XQItemType |
getItemType()
Returns the type of the item in the sequence type. |
QName |
getNodeName()
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 . |
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). |
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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected SaxonXQItemType(ItemType itemType, Configuration config)
protected SaxonXQItemType(NodeInfo node)
Method Detail |
---|
public int getBaseType() throws javax.xml.xquery.XQException
javax.xml.xquery.XQItemType
XQBASETYPE_*
constants.
getBaseType
in interface javax.xml.xquery.XQItemType
XQBASETYPE_*
constants
indicating the basic type of the item
javax.xml.xquery.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
public int getItemKind()
javax.xml.xquery.XQItemType
XQITEMKIND_*
constants.
getItemKind
in interface javax.xml.xquery.XQItemType
XQITEMKIND_*
constants
indicating the basic kind of the itempublic int getItemOccurrence()
javax.xml.xquery.XQItemType
XQSequenceType.OCC_EXACTLY_ONE
.
getItemOccurrence
in interface javax.xml.xquery.XQItemType
getItemOccurrence
in interface javax.xml.xquery.XQSequenceType
public QName getNodeName() throws javax.xml.xquery.XQException
javax.xml.xquery.XQItemType
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.
getNodeName
in interface javax.xml.xquery.XQItemType
QName
for the name of the element,
attribute, or document element node. null
if it is a wildcard
javax.xml.xquery.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
public String getPIName() throws javax.xml.xquery.XQException
javax.xml.xquery.XQItemType
XQItemType
must be XQITEMKIND_PI
.
getPIName
in interface javax.xml.xquery.XQItemType
null
if it is a wildcard
javax.xml.xquery.XQException
- if the item kind is not XQITEMKIND_PI
public URI getSchemaURI()
javax.xml.xquery.XQItemType
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
getSchemaURI
in interface javax.xml.xquery.XQItemType
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 String toString()
javax.xml.xquery.XQItemType
toString
in interface javax.xml.xquery.XQItemType
toString
in interface javax.xml.xquery.XQSequenceType
toString
in class Object
public QName getTypeName() throws javax.xml.xquery.XQException
javax.xml.xquery.XQItemType
QName
. If the return type is an
anonymous type, the actual QName
value returned is implementation
defined.
getTypeName
in interface javax.xml.xquery.XQItemType
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
javax.xml.xquery.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
public boolean isAnonymousType()
javax.xml.xquery.XQItemType
isAnonymousType
in interface javax.xml.xquery.XQItemType
true
if the item type is an anonymous
type in the schema, false
otherwisepublic boolean isElementNillable()
javax.xml.xquery.XQItemType
isElementNillable
in interface javax.xml.xquery.XQItemType
true
if the element type is nillable,
false
otherwisepublic javax.xml.xquery.XQItemType getItemType()
javax.xml.xquery.XQSequenceType
getItemType
in interface javax.xml.xquery.XQSequenceType
XQItemType
representing the
item type in the sequence. null
is returned in case of an empty sequence.public boolean equals(Object obj)
javax.xml.xquery.XQItemType
true
only if the argument is an item type object which
represents the same XQuery item type.
equals
and
hashCode
across different implementations the following
algorithm must be used. Return true
if and only if both
objects are XQItemType
and:
getItemKind()
is equalgetBaseType()
is supported for
the item kind, it must be equalgetNodeName()
is supported for
the item kind, it must be equalgetSchemaURI()
is equalgetTypeName()
is supported for
the item kind, it must be equalisAnonymousType()
is equalisElementNillable()
is equalgetPIName()
is supported for the
item kind, it must be equal
equals
in interface javax.xml.xquery.XQItemType
equals
in interface javax.xml.xquery.XQSequenceType
equals
in class Object
obj
- an XQItemType
object representing an XQuery
item type
true
if the input item type object represents
the same XQuery item type, false
otherwisepublic int hashCode()
javax.xml.xquery.XQItemType
equals
and
hashCode
across different implementations the following
algorithm must be used:
hashCode = this.getItemKind(); if this.getSchemaURI != null hashCode = 31*hashCode + this.getSchemaURI().hashCode(); if this.getBaseType() is supported for the item kind hashCode = 31*hashCode + this.getbaseType(); if this.getNodeName () is supported for the item kind and this.getNodeName() != null hashCode = 31*hashCode + this.getNodeName().hashCode() if this.getTypeName () is supported for the item kind hashCode = 31*hashCode + this.getTypeName().hashCode(); if this.getPIName () is supported for the item kind and this.getPIName () != null hashCode = 31*hashCode + this.getPIName().hashCode();
hashCode
in interface javax.xml.xquery.XQItemType
hashCode
in interface javax.xml.xquery.XQSequenceType
hashCode
in class Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |