|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gnu.xml.NamespaceBinding
public final class NamespaceBinding
A "namespace node" as a link in a linked list. The list may contain duplicates - i.e. multiple namespace bindings for the same prefix but (usually) different uris. In that case the first binding "wins". One reason for allowing duplicates it to allow sharing of the lists between a child and its parent element.
Field Summary | |
---|---|
static NamespaceBinding |
predefinedXML
|
static java.lang.String |
XML_NAMESPACE
|
Constructor Summary | |
---|---|
NamespaceBinding(java.lang.String prefix,
java.lang.String uri,
NamespaceBinding next)
|
Method Summary | |
---|---|
static NamespaceBinding |
commonAncestor(NamespaceBinding ns1,
NamespaceBinding ns2)
|
int |
count(NamespaceBinding fencePost)
Return the number of bindings before the fencePost . |
NamespaceBinding |
getNext()
|
java.lang.String |
getPrefix()
Namespace prefix. |
java.lang.String |
getUri()
Namespace uri. |
static NamespaceBinding |
maybeAdd(java.lang.String prefix,
java.lang.String uri,
NamespaceBinding bindings)
Append a new NamespaceBinding if not redundant. |
static NamespaceBinding |
nconc(NamespaceBinding list1,
NamespaceBinding list2)
Chain the first list in front of the second list. |
void |
readExternal(java.io.ObjectInput in)
|
java.lang.String |
resolve(java.lang.String prefix)
Resolve a prefix. |
java.lang.String |
resolve(java.lang.String prefix,
NamespaceBinding fencePost)
Resolve a prefix, in the initial part of this list. |
NamespaceBinding |
reversePrefix(NamespaceBinding fencePost)
Reverse the chain, until a fencePost. |
void |
setNext(NamespaceBinding next)
|
void |
setPrefix(java.lang.String prefix)
|
void |
setUri(java.lang.String uri)
|
java.lang.String |
toString()
Return a String showing just a single namespace binding. |
java.lang.String |
toStringAll()
Return a String showing the full namespace binding list. |
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String XML_NAMESPACE
public static final NamespaceBinding predefinedXML
Constructor Detail |
---|
public NamespaceBinding(java.lang.String prefix, java.lang.String uri, NamespaceBinding next)
Method Detail |
---|
public final java.lang.String getPrefix()
public final void setPrefix(java.lang.String prefix)
public final java.lang.String getUri()
public final void setUri(java.lang.String uri)
public final NamespaceBinding getNext()
public final void setNext(NamespaceBinding next)
public static final NamespaceBinding nconc(NamespaceBinding list1, NamespaceBinding list2)
nconc
comes from Common Lisp.)
public java.lang.String resolve(java.lang.String prefix)
prefix
- an interned namespace prefix to search for.
public java.lang.String resolve(java.lang.String prefix, NamespaceBinding fencePost)
prefix
- an interned namespace prefix to search for.fencePost
- only search this list until then.
public static NamespaceBinding commonAncestor(NamespaceBinding ns1, NamespaceBinding ns2)
public NamespaceBinding reversePrefix(NamespaceBinding fencePost)
public int count(NamespaceBinding fencePost)
fencePost
.
public static NamespaceBinding maybeAdd(java.lang.String prefix, java.lang.String uri, NamespaceBinding bindings)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringAll()
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |