|
Oxygen XML Editor 12.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ro.sync.xml.ProxyNamespaceMapping
public class ProxyNamespaceMapping
Stores the mappings between the namespace prefixes and the URI's. It is mainly used in the content completion process. The implementation consists in two lists. The modifying operations are performed at the end of the lists. Note that duplicates can exist in the mappings.
Constructor Summary | |
---|---|
ProxyNamespaceMapping()
Constructor. |
|
ProxyNamespaceMapping(org.w3c.dom.Node node)
Constructor. |
Method Summary | |
---|---|
void |
addMapping(java.lang.String prefix,
java.lang.String namespace)
Adds a prefix-namespace mapping. |
void |
clear()
Clear all mappings. |
java.lang.Object |
clone()
Clones the prefix namespace mapping. |
ProxyNamespaceMapping |
getMappingsFromAncestor(ProxyNamespaceMapping prefixNamespaceMapping)
Get mapping from ancestor, by removing from the current one the given mappings. |
java.lang.String |
getNamespaceForAttributePrefix(java.lang.String prefix)
Gets the URI namespace for the specified attribute prefix. |
java.lang.String |
getNamespaceForPrefix(java.lang.String prefix)
Gets the URI namespace for the specified prefix. |
java.util.Set<java.lang.String> |
getNamespaces()
Get all the namespaces encountered so far. |
java.lang.String |
getPrefixForAttributeNamespace(java.lang.String namespace)
Gets the prefix namespace for the specified namespace URI ignoring the default namespaces as they do not apply for attributes. |
java.lang.String |
getPrefixForNamespace(java.lang.String namespace)
Gets the prefix namespace for the specified namespace URI. |
protected java.lang.String |
getPrefixForNamespace(java.lang.String namespace,
boolean allowDefault)
Gets the prefix namespace for the specified namespace URI ignoring or not the default namespaces as depending on the allowDefault value. |
java.util.List<java.lang.String> |
getProxies()
Get the prefixes from the mapping. |
void |
removeByNamespace(java.lang.String namespace)
Removes a mapping by indicating the namespace. |
void |
removeByPrefix(java.lang.String prefix)
Removes a mapping by indicating the prefix. |
void |
removeLastMapping()
Removes the last mapping. |
java.lang.String |
toString()
|
void |
update(org.w3c.dom.Node node)
Updates the content of the prefix namespace mapping based on a node and its parents. |
void |
updateNamespaceProxyMapping(java.lang.String namespace,
java.lang.String prefix)
Update a currently available namespace prefix mapping. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ProxyNamespaceMapping(org.w3c.dom.Node node)
node
- The context node, DOM Level 1, the prefix namespace mapping will
be populated based on the xmlns
attributes, starting with the
root element.public ProxyNamespaceMapping()
Method Detail |
---|
public void update(org.w3c.dom.Node node)
node
- The node, must be DOM Level 1.public void addMapping(java.lang.String prefix, java.lang.String namespace)
prefix
- The prefix
string.namespace
- The namespace
string.public java.lang.String getNamespaceForAttributePrefix(java.lang.String prefix)
getNamespaceForPrefix(String)
otherwise.
prefix
- The prefix
string.
null
.public java.lang.String getNamespaceForPrefix(java.lang.String prefix)
prefix
- The prefix string.
null
.public java.lang.String getPrefixForNamespace(java.lang.String namespace)
namespace
- The namespace URI.
null
.public java.lang.String getPrefixForAttributeNamespace(java.lang.String namespace)
namespace
- The namespace URI of an attribute.
null
.protected final java.lang.String getPrefixForNamespace(java.lang.String namespace, boolean allowDefault)
allowDefault
value.
namespace
- The namespace URI of an attribute.allowDefault
- True
if default namespace should be allowed.
null
.public void removeByPrefix(java.lang.String prefix)
prefix
- The prefix string (not null
).public void removeByNamespace(java.lang.String namespace)
namespace
- The namespace URI(not null
).public void clear()
public java.lang.String toString()
toString
in class java.lang.Object
public void removeLastMapping()
public java.util.Set<java.lang.String> getNamespaces()
public java.lang.Object clone()
clone
in class java.lang.Object
public java.util.List<java.lang.String> getProxies()
public ProxyNamespaceMapping getMappingsFromAncestor(ProxyNamespaceMapping prefixNamespaceMapping)
prefixNamespaceMapping
- The prefix namespace mapping that must be
removed from the current one.
public void updateNamespaceProxyMapping(java.lang.String namespace, java.lang.String prefix)
namespace
- The namespace.prefix
- New prefix.
|
Oxygen XML Editor 12.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |