org.basex.query.xquery.util
Class NSLocal

java.lang.Object
  extended by org.basex.query.xquery.util.NSLocal

public final class NSLocal
extends java.lang.Object

Local Namespaces.

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

Field Summary
 Atts atts
          Namespaces.
 
Constructor Summary
NSLocal()
           
 
Method Summary
 void add(QNm name)
          Adds the specified namespace.
 NSLocal copy()
          Creates a copy with the default namespaces.
 void delete(QNm name)
          Deletes the specified namespace.
 byte[] find(byte[] pre)
          Finds the URI for the specified prefix.
 void finish(byte[] elem)
          Finishes the creation of default namespaces.
 byte[] prefix(byte[] uri)
          Finds the specified URI and returns the prefix.
 int size()
          Returns the number of namespaces.
 void size(int s)
          Sets the number of namespaces.
 byte[] uri(byte[] pre)
          Finds the uri for the specified prefix in the local and global namespaces.
 void uri(QNm qname)
          Assigns a uri to the specified QName.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

atts

public Atts atts
Namespaces.

Constructor Detail

NSLocal

public NSLocal()
Method Detail

add

public void add(QNm name)
         throws XQException
Adds the specified namespace.

Parameters:
name - namespace
Throws:
XQException - evaluation exception

delete

public void delete(QNm name)
Deletes the specified namespace.

Parameters:
name - namespace

uri

public void uri(QNm qname)
Assigns a uri to the specified QName.

Parameters:
qname - qname

uri

public byte[] uri(byte[] pre)
           throws XQException
Finds the uri for the specified prefix in the local and global namespaces.

Parameters:
pre - prefix of the namespace
Returns:
uri
Throws:
XQException - evaluation exception

find

public byte[] find(byte[] pre)
Finds the URI for the specified prefix.

Parameters:
pre - prefix of the namespace
Returns:
uri or null value

prefix

public byte[] prefix(byte[] uri)
Finds the specified URI and returns the prefix.

Parameters:
uri - URI
Returns:
prefix

finish

public void finish(byte[] elem)
Finishes the creation of default namespaces.

Parameters:
elem - default element namespace

copy

public NSLocal copy()
Creates a copy with the default namespaces.

Returns:
copy

size

public int size()
Returns the number of namespaces.

Returns:
namespaces

size

public void size(int s)
Sets the number of namespaces.

Parameters:
s - namespaces