public final class Namespaces extends Object
Constructor and Description |
---|
Namespaces()
Empty constructor.
|
Modifier and Type | Method and Description |
---|---|
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 start,
int end)
Returns a tabular representation of the namespaces.
|
String |
toString() |
String |
toString(int start,
int end)
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.
|
public void prepare()
public org.basex.data.NSNode add(byte[] pref, byte[] uri, int pre)
pref
- prefixuri
- uripre
- pre valuenull
otherwisepublic void close(int pre)
pre
- current pre valuepublic int size()
public byte[] globalNS()
null
if several (default or prefixed) namespaces are defined.null
public byte[] uri(int id)
id
- namespace URI referencepublic int uri(byte[] name, int pre, Data data)
0
if namespace cannot be found.name
- element/attribute namepre
- pre valuedata
- data referencepublic int uri(byte[] uri)
0
if the URI is empty or no namespace is found.uri
- namespace URI0
public int uri(byte[] name, boolean elem)
0
if no namespace is found.name
- element/attribute nameelem
- element flagpublic 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 referencepublic byte[] table(int start, int end)
start
- start pre valueend
- end pre valuepublic byte[] info()
public String toString(int start, int end)
start
- start pre valueend
- end pre valueCopyright © 2005–2015 BaseX Team. All rights reserved.