org.basex.query.xquery.item
Class SeqType

java.lang.Object
  extended by org.basex.query.xquery.item.SeqType

public final class SeqType
extends java.lang.Object

Stored a sequence type definition.

Author:
Workgroup DBIS, University of Konstanz 2005-07, ISC License, Christian Gruen

Field Summary
 int occ
          Occurrence mode: 0 = default, 1 = "?"
 Type type
          Sequence type.
 
Constructor Summary
SeqType(QNm name, int o, byte[] e)
          Constructor.
 
Method Summary
 Item cast(Item item, XQContext ctx)
          Cast the specified item.
 boolean empty(Item item)
          Check if item can be empty.
 boolean instance(Item item)
          Check correctness of specified item type.
 boolean instanced(Item item)
          Check if the sequence type is instance of the specified item.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

occ

public int occ
Occurrence mode: 0 = default, 1 = "?", 2 = "+", 3 = "*".


type

public Type type
Sequence type.

Constructor Detail

SeqType

public SeqType(QNm name,
               int o,
               byte[] e)
Constructor.

Parameters:
name - sequence type
o - occurrences
e - extended type info
Method Detail

cast

public Item cast(Item item,
                 XQContext ctx)
          throws XQException
Cast the specified item.

Parameters:
item - item to be checked
ctx - xquery context
Returns:
result of check
Throws:
XQException - evaluation exception

empty

public boolean empty(Item item)
Check if item can be empty.

Parameters:
item - item to be checked
Returns:
result of check

instance

public boolean instance(Item item)
Check correctness of specified item type.

Parameters:
item - item to be checked
Returns:
result of check

instanced

public boolean instanced(Item item)
Check if the sequence type is instance of the specified item.

Parameters:
item - item to be checked
Returns:
result of check

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object