public final class SeqType
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SeqType.Occ
Number of occurrences (cardinality).
|
| Modifier and Type | Field and Description |
|---|---|
static SeqType |
AAT
Zero or one xs:anyAtomicType.
|
static SeqType |
AAT_ZM
Zero or more xs:anyAtomicType.
|
static SeqType |
AAT_ZO
Zero or one xs:anyAtomicType.
|
static MapType |
ANY_MAP
The general map type.
|
static SeqType |
B64
Single xs:base64Binary.
|
static SeqType |
BLN
Single xs:boolean.
|
static SeqType |
BLN_ZO
Zero or one xs:boolean.
|
static SeqType |
BYT_ZM
Zero or more bytes.
|
static SeqType |
DAT
Single date.
|
static SeqType |
DAT_ZO
Zero or one date.
|
static SeqType |
DBL
Double number.
|
static SeqType |
DBL_ZM
Double number.
|
static SeqType |
DBL_ZO
Zero or one double.
|
static SeqType |
DEC_ZO
Zero or one decimal number.
|
static SeqType |
DOC_O
One document node.
|
static SeqType |
DOC_ZM
Zero or more document node.
|
static SeqType |
DOC_ZO
Zero or one document node.
|
static SeqType |
DTD
One day-time-duration.
|
static SeqType |
DTD_ZO
Zero or one day-time-duration.
|
static SeqType |
DTM
One date-time.
|
static SeqType |
DTM_ZO
Zero or one date-time.
|
static SeqType |
DUR_ZO
Zero or one duration.
|
static SeqType |
ELM
One element node.
|
static SeqType |
ELM_ZM
Zero or more element nodes.
|
static SeqType |
EMP
Zero items.
|
static SeqType |
FUN_O
Single function.
|
static SeqType |
HEX
One xs:hexBinary.
|
static SeqType |
ITEM
Single item.
|
static SeqType |
ITEM_OM
One or more items.
|
static SeqType |
ITEM_ZM
Zero or more items.
|
static SeqType |
ITEM_ZO
Zero or one item.
|
static SeqType |
ITR
Single number; for simplicity, numbers are summarized by this type.
|
static SeqType |
ITR_OM
One or more numbers.
|
static SeqType |
ITR_ZM
Zero or more numbers.
|
static SeqType |
ITR_ZO
Zero or one number.
|
static SeqType |
MAP_O
Single function.
|
static SeqType |
MAP_ZM
Single function.
|
static SeqType |
NCN_ZO
Zero or one NCName.
|
static SeqType |
NOD
Single node.
|
static SeqType |
NOD_OM
One or more nodes.
|
static SeqType |
NOD_ZM
Zero or more nodes.
|
static SeqType |
NOD_ZO
Zero or one nodes.
|
SeqType.Occ |
occ
Number of occurrences.
|
static SeqType |
QNM
Single QName.
|
static SeqType |
QNM_ZO
Zero or one QNames.
|
static SeqType |
STR
Single string.
|
static SeqType |
STR_ZM
Zero or more strings.
|
static SeqType |
STR_ZO
Zero or one strings.
|
static SeqType |
TIM
One time.
|
static SeqType |
TIM_ZO
Zero or one time.
|
Type |
type
Sequence type.
|
static SeqType |
URI
Single URI.
|
static SeqType |
URI_ZM
Zero or more URIs.
|
static SeqType |
URI_ZO
Zero or one URIs.
|
| Modifier and Type | Method and Description |
|---|---|
Item |
cast(Item it,
boolean cast,
QueryContext ctx,
InputInfo ii,
Expr e)
Tries to cast the given item to this sequence type.
|
boolean |
eq(SeqType t)
Checks the types for equality.
|
static SeqType |
get(Type t,
long o)
Returns a sequence type.
|
static SeqType |
get(Type t,
SeqType.Occ o)
Returns a sequence type.
|
static SeqType |
get(Type t,
SeqType.Occ o,
Test k)
Returns a sequence type.
|
boolean |
instance(SeqType t)
Checks if the specified SeqType is an instance of the current SeqType.
|
boolean |
instance(Value val)
Matches a value against this sequence type.
|
SeqType |
intersect(SeqType t)
Combine two sequence types.
|
boolean |
mayBeNumber()
Tests if the type may be numeric.
|
boolean |
mayBeZero()
Tests if the type may yield zero items.
|
long |
occ()
Returns the number of occurrences, or
-1 if the number is unknown. |
boolean |
one()
Tests if the type exactly one item.
|
Value |
promote(Value val,
QueryContext ctx,
InputInfo ii)
Tries to promote the specified value to this sequence type.
|
java.lang.String |
toString() |
boolean |
zeroOrOne()
Tests if the type yields at most one item.
|
public static final SeqType EMP
public static final SeqType ITEM
public static final SeqType ITEM_ZO
public static final SeqType ITEM_ZM
public static final SeqType ITEM_OM
public static final SeqType AAT
public static final SeqType AAT_ZO
public static final SeqType AAT_ZM
public static final SeqType BLN
public static final SeqType BLN_ZO
public static final SeqType DBL
public static final SeqType DBL_ZM
public static final SeqType DBL_ZO
public static final SeqType DEC_ZO
public static final SeqType ITR
public static final SeqType ITR_ZO
public static final SeqType ITR_ZM
public static final SeqType ITR_OM
public static final SeqType NOD
public static final SeqType NOD_ZO
public static final SeqType NOD_ZM
public static final SeqType NOD_OM
public static final SeqType QNM
public static final SeqType QNM_ZO
public static final SeqType URI
public static final SeqType URI_ZO
public static final SeqType URI_ZM
public static final SeqType STR
public static final SeqType STR_ZO
public static final SeqType STR_ZM
public static final SeqType NCN_ZO
public static final SeqType DAT
public static final SeqType DAT_ZO
public static final SeqType DTD
public static final SeqType DTD_ZO
public static final SeqType DTM
public static final SeqType DTM_ZO
public static final SeqType TIM
public static final SeqType TIM_ZO
public static final SeqType DUR_ZO
public static final SeqType FUN_O
public static final SeqType BYT_ZM
public static final SeqType DOC_O
public static final SeqType DOC_ZO
public static final SeqType DOC_ZM
public static final SeqType ELM
public static final SeqType ELM_ZM
public static final MapType ANY_MAP
public static final SeqType MAP_ZM
public static final SeqType MAP_O
public static final SeqType HEX
public static final SeqType B64
public final Type type
public final SeqType.Occ occ
public static SeqType get(Type t, SeqType.Occ o)
t - typeo - occurrencespublic static SeqType get(Type t, long o)
t - typeo - number of occurrencespublic static SeqType get(Type t, SeqType.Occ o, Test k)
t - typeo - occurrencesk - kind testpublic boolean instance(Value val)
val - value to be checkedpublic Item cast(Item it, boolean cast, QueryContext ctx, InputInfo ii, Expr e) throws QueryException
it - item to castcast - explicit cast flagctx - query contextii - input infoe - producing expression, used for error outputQueryException - query exceptionpublic Value promote(Value val, QueryContext ctx, InputInfo ii) throws QueryException
val - value to promotectx - query contextii - input infoQueryException - query exceptionpublic SeqType intersect(SeqType t)
t - second typepublic long occ()
-1 if the number is unknown.public boolean zeroOrOne()
public boolean one()
public boolean mayBeZero()
public boolean mayBeNumber()
public boolean eq(SeqType t)
t - typepublic boolean instance(SeqType t)
t - SeqType to checkpublic java.lang.String toString()
toString in class java.lang.Object