|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<NodeType>
org.basex.query.value.type.NodeType
public enum NodeType
XQuery node types.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.basex.query.value.type.Type |
---|
Type.ID |
Enum Constant Summary | |
---|---|
ATT
Attribute type. |
|
COM
Comment type. |
|
DEL
Document element type. |
|
DOC
Document type. |
|
ELM
Element type. |
|
NOD
Node type. |
|
NSP
Namespace type. |
|
PI
PI type. |
|
SCA
Schema-attribute. |
|
SCE
Schema-element. |
|
TXT
Text type. |
Field Summary | |
---|---|
static NodeType[] |
VALUES
Cached enums (faster). |
Method Summary | |
---|---|
Item |
cast(Item it,
QueryContext ctx,
InputInfo ii)
Casts the specified item to the XQuery data type. |
Item |
cast(java.lang.Object o,
QueryContext ctx,
InputInfo ii)
Casts the specified Java object to the XQuery data type. |
Item |
castString(java.lang.String o,
QueryContext ctx,
InputInfo ii)
Casts the specified string to the XQuery data type. |
boolean |
eq(Type t)
Checks if this type is equal to the given one. |
static NodeType |
find(QNm type)
Finds and returns the specified node type. |
Type.ID |
id()
Returns a type id to differentiate all types. |
boolean |
instanceOf(Type t)
Checks if the current type is an instance of the specified type. |
NodeType |
intersect(Type t)
Computes the intersection between this type and the given one, i.e. |
boolean |
isNode()
Checks if the type refers to a node. |
boolean |
isNumber()
Checks if the type refers to a number. |
boolean |
isNumberOrUntyped()
Checks if the type refers to a number or an untyped item. |
boolean |
isStringOrUntyped()
Checks if the type refers to a number or a string. |
boolean |
isUntyped()
Checks if the type refers to an untyped item. |
boolean |
nsSensitive()
Checks if the type is namespace-sensitive. |
SeqType |
seqType()
Returns the sequence type of this data type. |
byte[] |
string()
Returns the string representation of this type. |
java.lang.String |
toString()
|
Type |
union(Type t)
Computes the union between this type and the given one, i.e. |
static NodeType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static NodeType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final NodeType NOD
public static final NodeType TXT
public static final NodeType PI
public static final NodeType ELM
public static final NodeType DOC
public static final NodeType DEL
public static final NodeType ATT
public static final NodeType COM
public static final NodeType NSP
public static final NodeType SCE
public static final NodeType SCA
Field Detail |
---|
public static final NodeType[] VALUES
Method Detail |
---|
public static NodeType[] values()
for (NodeType c : NodeType.values()) System.out.println(c);
public static NodeType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic final boolean isNode()
Type
isNode
in interface Type
public boolean isNumber()
Type
isNumber
in interface Type
public boolean isUntyped()
Type
isUntyped
in interface Type
public boolean isNumberOrUntyped()
Type
isNumberOrUntyped
in interface Type
public boolean isStringOrUntyped()
Type
isStringOrUntyped
in interface Type
public Item cast(Item it, QueryContext ctx, InputInfo ii) throws QueryException
Type
cast
in interface Type
it
- item to be convertedctx
- query contextii
- input info
QueryException
- query exceptionpublic Item cast(java.lang.Object o, QueryContext ctx, InputInfo ii) throws QueryException
Type
cast
in interface Type
o
- Java objectctx
- TODOii
- input info
QueryException
- query exceptionpublic Item castString(java.lang.String o, QueryContext ctx, InputInfo ii) throws QueryException
Type
castString
in interface Type
o
- string objectctx
- TODOii
- input info
QueryException
- query exceptionpublic SeqType seqType()
Type
seqType
in interface Type
public boolean eq(Type t)
Type
eq
in interface Type
t
- other type
true
if both types are equal, false
otherwisepublic final boolean instanceOf(Type t)
Type
instanceOf
in interface Type
t
- type to be checked
public Type union(Type t)
Type
union
in interface Type
t
- other type
public NodeType intersect(Type t)
Type
null
is
returned.
intersect
in interface Type
t
- other type
null
public Type.ID id()
Type
id
in interface Type
public byte[] string()
Type
string
in interface Type
public java.lang.String toString()
toString
in interface Type
toString
in class java.lang.Enum<NodeType>
public static NodeType find(QNm type)
type
- type as string
null
public boolean nsSensitive()
Type
nsSensitive
in interface Type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |