|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.xml.Namespaces
A class for handling Namespace declaration and scoping
Nested Class Summary | |
(package private) class |
Namespaces.Namespace
An internal class used to represent a namespace |
(package private) class |
Namespaces.NamespaceEnumerator
A simple Enumeration for Namespace objects |
Constructor Summary | |
Namespaces()
Creates a new Namespaces instance |
|
Namespaces(Namespaces parent)
Creates a new Namespaces instance |
Method Summary | |
void |
addNamespace(java.lang.String prefix,
java.lang.String uri)
Adds the given namespace declaration to this Namespaces |
Namespaces |
createNamespaces()
Creates a new Namespaces instance with this Namespaces as the parent |
void |
declareAsAttributes(org.xml.sax.helpers.AttributeListImpl atts,
boolean localOnly)
Declare the namespaces of this stack in as attributes. |
java.util.Enumeration |
getLocalNamespaces()
Returns an Enumeration of local namespace URIs for this Namespaces. |
java.lang.String |
getNamespacePrefix(java.lang.String nsURI)
Returns the Namespace prefix associated with the given URI. |
java.lang.String[] |
getNamespacePrefixes(java.lang.String nsURI)
Returns all namespace prefixes associated with the given URI, including those from parent scopes. |
java.lang.String[] |
getNamespacePrefixes(java.lang.String nsURI,
boolean local)
Returns the Namespace prefixes associated with the given URI. |
java.lang.String |
getNamespaceURI(java.lang.String prefix)
Returns the Namespace URI associated with the given prefix |
java.lang.String |
getNonDefaultNamespacePrefix(java.lang.String nsURI)
Returns the Namespace prefix associated with the given URI. |
Namespaces |
getParent()
Returns the parent Namespaces for this Namespaces instance. |
void |
setParent(Namespaces namespaces)
Sets the parent Namespaces for this Namespaces instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Namespaces()
public Namespaces(Namespaces parent)
Method Detail |
public void addNamespace(java.lang.String prefix, java.lang.String uri)
prefix
- the namespace prefixuri
- the namespace URI to be associated with the given prefixpublic Namespaces createNamespaces()
public java.util.Enumeration getLocalNamespaces()
public java.lang.String getNamespaceURI(java.lang.String prefix)
prefix
- the namespace prefix to lookup
public java.lang.String getNamespacePrefix(java.lang.String nsURI)
#getNamespacePrefixes
.
nsURI
- the namespace URI to lookup
public java.lang.String[] getNamespacePrefixes(java.lang.String nsURI)
nsURI
- the namespace URI to lookup
public java.lang.String[] getNamespacePrefixes(java.lang.String nsURI, boolean local)
nsURI
- the namespace URI to lookuplocal
- a boolean that when true indicates only the local
scope is searched.
public java.lang.String getNonDefaultNamespacePrefix(java.lang.String nsURI)
nsURI
- the namespace URI to lookup
public Namespaces getParent()
public void setParent(Namespaces namespaces)
namespaces
- the parent Namespacespublic void declareAsAttributes(org.xml.sax.helpers.AttributeListImpl atts, boolean localOnly)
atts
- the Attribute List to fill in.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |