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

Stores a sequence type definition.

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

Field Summary
 QNm ext
          Extended type info.
 int occ
          Occurrence mode: 0 = default, 1 = "?", 2 = "+", 3 = "*".
 Type type
          Sequence type.
 
Constructor Summary
SeqType(QNm name, int o, boolean e)
          Constructor.
 
Method Summary
 Item cast(Item item, XQContext ctx)
          Casts the specified item.
 Item cast(Iter iter, Expr expr, XQContext ctx)
          Casts the specified iterator item.
 boolean instance(Iter iter)
          Checks the instance of the specified iterator.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ext

public QNm ext
Extended type info.


type

public Type type
Sequence type.


occ

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

Constructor Detail

SeqType

public SeqType(QNm name,
               int o,
               boolean e)
Constructor.

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

instance

public boolean instance(Iter iter)
                 throws XQException
Checks the instance of the specified iterator.

Parameters:
iter - iteration to be checked
Returns:
result of check
Throws:
XQException - evaluation exception

cast

public Item cast(Iter iter,
                 Expr expr,
                 XQContext ctx)
          throws XQException
Casts the specified iterator item.

Parameters:
iter - iterator
expr - expression reference
ctx - xquery context
Returns:
resulting item
Throws:
XQException - evaluation exception

cast

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

Parameters:
item - item to be cast
ctx - xquery context
Returns:
resulting item
Throws:
XQException - evaluation exception

toString

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