public final class Namespaces
extends java.lang.Object
| Constructor and Description |
|---|
Namespaces()
Empty constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.basex.data.NSNode |
add(byte[] p,
byte[] u,
int pre)
Adds the specified namespace to the namespace structure
and changes the root node.
|
int |
add(int pre,
int par,
byte[] p,
byte[] u)
Adds a namespace for the specified pre value.
|
int |
addURI(byte[] u)
Adds the specified namespace uri.
|
void |
close(int pre)
Closes a node.
|
void |
delete(byte[] u)
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.
|
boolean |
open()
Opens an element.
|
int |
size()
Returns the number of uri references.
|
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[] n,
boolean elem)
Returns the namespace uri reference for the specified name,
or 0 if namespace cannot be found.
|
int |
uri(byte[] name,
int pre)
Returns the namespace URI reference for the specified QName and pre value.
|
byte[] |
uri(int id)
Returns the specified namespace uri.
|
public org.basex.data.NSNode add(byte[] p,
byte[] u,
int pre)
p - prefixu - uripre - pre valuepublic boolean open()
public void close(int pre)
pre - current pre valuepublic int uri(byte[] n,
boolean elem)
n - tag/attribute nameelem - element flagpublic int size()
public byte[] globalNS()
null
if several (default or prefixed) namespaces are defined.public byte[] uri(int id)
id - namespace uri referencepublic int uri(byte[] name,
int pre)
name - tag/attribute namepre - pre valuepublic void delete(byte[] u)
u - namespace URI referencepublic int add(int pre,
int par,
byte[] p,
byte[] u)
pre - pre valuepar - parentp - prefixu - uripublic int addURI(byte[] u)
u - namespace uri to be addedpublic byte[] table(int s,
int e)
s - start pre valuee - end pre valuepublic byte[] info()
public java.lang.String toString(int s,
int e)
s - start pre valuee - end pre valuepublic java.lang.String toString()
toString in class java.lang.Object