|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.data.Namespaces
public final class Namespaces
This class organizes the namespaces of a database.
Constructor Summary | |
---|---|
Namespaces()
Empty constructor. |
Method Summary | |
---|---|
org.basex.data.NSNode |
add(byte[] pref,
byte[] uri,
int pre)
Adds the specified namespace to the namespace structure of the current element. |
int |
add(int pre,
int par,
byte[] pref,
byte[] uri,
Data data)
Adds a namespace for the specified pre value. |
void |
close(int pre)
Closes a namespace node. |
void |
delete(byte[] uri)
Deletes the specified namespace URI from the root node. |
byte[] |
globalNS()
Returns the default namespace of the database, or null
if several (default or prefixed) namespaces are defined. |
byte[] |
info()
Returns namespace information. |
void |
prepare()
Prepares the generation of new namespaces. |
int |
size()
Returns the size of the uri container. |
byte[] |
table(int s,
int e)
Returns a tabular representation of the namespaces. |
java.lang.String |
toString()
|
java.lang.String |
toString(int s,
int e)
Returns a string representation of the namespaces. |
int |
uri(byte[] uri)
Returns a reference to the specified namespace URI, or 0 if the URI is empty or no namespace is found. |
int |
uri(byte[] name,
boolean elem)
Returns the namespace URI reference for the specified name, or 0 if no namespace is found. |
int |
uri(byte[] name,
int pre,
Data data)
Returns the namespace URI reference for the specified name and pre value, or 0 if namespace cannot be found. |
byte[] |
uri(int id)
Returns the specified namespace URI. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Namespaces()
Method Detail |
---|
public void prepare()
public org.basex.data.NSNode add(byte[] pref, byte[] uri, int pre)
pref
- prefixuri
- uripre
- pre value
null
otherwisepublic void close(int pre)
pre
- current pre valuepublic int uri(byte[] name, boolean elem)
0
if no namespace is found.
name
- tag/attribute nameelem
- element flag
public int size()
public byte[] globalNS()
null
if several (default or prefixed) namespaces are defined.
public byte[] uri(int id)
id
- namespace URI reference
public int uri(byte[] name, int pre, Data data)
0
if namespace cannot be found.
name
- element/attribute namepre
- pre valuedata
- data reference
public void delete(byte[] uri)
uri
- namespace URI referencepublic int add(int pre, int par, byte[] pref, byte[] uri, Data data)
pre
- pre valuepar
- parent valuepref
- prefixuri
- uridata
- data reference
public int uri(byte[] uri)
0
if the URI is empty or no namespace is found.
uri
- namespace URI
0
public byte[] table(int s, int e)
s
- start pre valuee
- end pre value
public byte[] info()
public java.lang.String toString(int s, int e)
s
- start pre valuee
- end pre value
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |