|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<AtomType>
org.basex.query.value.type.AtomType
public enum AtomType
XQuery data types.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.basex.query.value.type.Type |
---|
Type.ID |
Enum Constant Summary | |
---|---|
AAT
Any atomic type. |
|
AST
Any simple type. |
|
ATM
Untyped Atomic type. |
|
ATY
Any type. |
|
B64
Base64 binary type. |
|
BIN
Implementation specific: binary type. |
|
BLN
Boolean type. |
|
BYT
Byte type. |
|
DAT
Date type. |
|
DAY
Day type. |
|
DBL
Double type. |
|
DEC
Decimal type. |
|
DTD
Day time duration type. |
|
DTM
DateTime type. |
|
DTS
DateTimeStamp type. |
|
DUR
Duration type. |
|
ENT
Entity type. |
|
FLT
Float type. |
|
HEX
Hex binary type. |
|
ID
ID type. |
|
IDR
IDREF type. |
|
INT
Int type. |
|
ITEM
Item type. |
|
ITR
Integer type. |
|
JAVA
Java type. |
|
LAN
Language type. |
|
LNG
Long type. |
|
MDA
Month day type. |
|
MON
Month type. |
|
NAM
Name type. |
|
NCN
NCName type. |
|
NIN
Negative integer type. |
|
NMT
NMTOKEN type. |
|
NNI
Non-negative integer type. |
|
NOT
NOTATION Type. |
|
NPI
Non-positive integer type. |
|
NST
Normalized String type. |
|
PDC
Precision decimal type. |
|
PIN
Positive integer type. |
|
QNM
QName Type. |
|
SHR
Short type. |
|
STR
String type. |
|
TIM
Time type. |
|
TOK
Token type. |
|
UBY
Unsigned byte type. |
|
UIN
Short type. |
|
ULN
Unsigned long type. |
|
URI
Any URI type. |
|
USH
Unsigned Short type. |
|
UTY
Untyped type. |
|
YEA
Year type. |
|
YMD
Year month duration type. |
|
YMO
Year month type. |
Field Summary | |
---|---|
QNm |
name
Name. |
AtomType |
par
Parent type. |
static AtomType[] |
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 AtomType |
find(QNm type,
boolean all)
Finds and returns the specified data 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. |
Type |
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 AtomType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static AtomType[] |
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 AtomType ITEM
public static final AtomType UTY
public static final AtomType ATY
public static final AtomType AST
public static final AtomType AAT
public static final AtomType ATM
public static final AtomType STR
public static final AtomType NST
public static final AtomType TOK
public static final AtomType LAN
public static final AtomType NMT
public static final AtomType NAM
public static final AtomType NCN
public static final AtomType ID
public static final AtomType IDR
public static final AtomType ENT
public static final AtomType FLT
public static final AtomType DBL
public static final AtomType DEC
public static final AtomType PDC
public static final AtomType ITR
public static final AtomType NPI
public static final AtomType NIN
public static final AtomType LNG
public static final AtomType INT
public static final AtomType SHR
public static final AtomType BYT
public static final AtomType NNI
public static final AtomType ULN
public static final AtomType UIN
public static final AtomType USH
public static final AtomType UBY
public static final AtomType PIN
public static final AtomType DUR
public static final AtomType YMD
public static final AtomType DTD
public static final AtomType DTM
public static final AtomType DTS
public static final AtomType DAT
public static final AtomType TIM
public static final AtomType YMO
public static final AtomType YEA
public static final AtomType MDA
public static final AtomType DAY
public static final AtomType MON
public static final AtomType BLN
public static final AtomType BIN
public static final AtomType B64
public static final AtomType HEX
public static final AtomType URI
public static final AtomType QNM
public static final AtomType NOT
public static final AtomType JAVA
Field Detail |
---|
public static final AtomType[] VALUES
public final QNm name
public final AtomType par
Method Detail |
---|
public static AtomType[] values()
for (AtomType c : AtomType.values()) System.out.println(c);
public static AtomType 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 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 byte[] string()
Type
string
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 Type intersect(Type t)
Type
null
is
returned.
intersect
in interface Type
t
- other type
null
public final boolean isNode()
Type
isNode
in interface Type
public Type.ID id()
Type
id
in interface Type
public java.lang.String toString()
toString
in interface Type
toString
in class java.lang.Enum<AtomType>
public static AtomType find(QNm type, boolean all)
type
- type as stringall
- accept all types (include those without parent type)
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 |