org.basex.query.util
Class Ann

java.lang.Object
  extended by org.basex.util.list.ElementList
      extended by org.basex.query.util.Ann

public final class Ann
extends ElementList

Annotations.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Field Summary
 InputInfo[] infos
          Input Info.
 QNm[] names
          QNames.
static QNm Q_PRIVATE
          Annotation "private".
static QNm Q_PUBLIC
          Annotation "public".
static QNm Q_UPDATING
          Annotation "updating".
 Value[] values
          Values.
 
Fields inherited from class org.basex.util.list.ElementList
factor, size
 
Constructor Summary
Ann()
           
 
Method Summary
 void add(QNm name, Value value, InputInfo info)
          Adds a QName/value pair.
 void check(boolean var)
          Checks all annotations for parsing errors.
 boolean contains(QNm e)
          Checks if the specified element is found in the list.
 boolean contains(QNm k, Value v)
          Checks if the specified key/value pair is found in the list.
 Ann intersect(Ann ann)
          Returns the intersection of these annotations and the given ones.
 java.lang.String toString()
           
 Ann union(Ann ann)
          Returns the union of these annotations and the given ones.
 
Methods inherited from class org.basex.util.list.ElementList
isEmpty, newSize, newSize, reset, size, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Q_PRIVATE

public static final QNm Q_PRIVATE
Annotation "private".


Q_PUBLIC

public static final QNm Q_PUBLIC
Annotation "public".


Q_UPDATING

public static final QNm Q_UPDATING
Annotation "updating".


infos

public InputInfo[] infos
Input Info.


names

public QNm[] names
QNames.


values

public Value[] values
Values.

Constructor Detail

Ann

public Ann()
Method Detail

add

public void add(QNm name,
                Value value,
                InputInfo info)
Adds a QName/value pair.

Parameters:
name - QName
value - value
info - input info

contains

public boolean contains(QNm e)
Checks if the specified element is found in the list.

Parameters:
e - element to be found
Returns:
result of check

contains

public boolean contains(QNm k,
                        Value v)
Checks if the specified key/value pair is found in the list.

Parameters:
k - name of the entry
v - value of the entry
Returns:
result of check

union

public Ann union(Ann ann)
Returns the union of these annotations and the given ones.

Parameters:
ann - other annotations
Returns:
a n Ann instance containing all annotations

intersect

public Ann intersect(Ann ann)
Returns the intersection of these annotations and the given ones.

Parameters:
ann - annotations
Returns:
those annotations that are present in both collections

check

public void check(boolean var)
           throws QueryException
Checks all annotations for parsing errors.

Parameters:
var - variable flag
Throws:
QueryException - query exception

toString

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