|
Oxygen XML Editor 11.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(Node node)
Constructor. |
Method Summary | |
---|---|
void |
addMapping(String prefix,
String namespace)
Adds a prefix-namespace mapping. |
void |
clear()
Clear all mappings. |
Object |
clone()
Clones the prefix namespace mapping. |
ProxyNamespaceMapping |
getMappingsFromAncestor(ProxyNamespaceMapping prefixNamespaceMapping)
Get mapping from ancestor, by removing from the current one the given mappings. |
String |
getNamespaceForAttributePrefix(String prefix)
Gets the URI namespace for the specified attribute prefix. |
String |
getNamespaceForPrefix(String prefix)
Gets the URI namespace for the specified prefix. |
Set<String> |
getNamespaces()
Get all the namespaces encountered so far. |
String |
getPrefixForAttributeNamespace(String namespace)
Gets the prefix namespace for the specified namespace URI ignoring the default namespaces as they do not apply for attributes. |
String |
getPrefixForNamespace(String namespace)
Gets the prefix namespace for the specified namespace URI. |
protected String |
getPrefixForNamespace(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. |
List<String> |
getProxies()
Get the prefixes from the mapping. |
void |
removeByNamespace(String namespace)
Removes a mapping by indicating the namespace. |
void |
removeByPrefix(String prefix)
Removes a mapping by indicating the prefix. |
void |
removeLastMapping()
Removes the last mapping. |
String |
toString()
|
void |
update(Node node)
Updates the content of the prefix namespace mapping based on a node and its parents. |
void |
updateNamespaceProxyMapping(String namespace,
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(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(Node node)
node
- The node, must be DOM Level 1.public void addMapping(String prefix, String namespace)
prefix
- The prefix
string.namespace
- The namespace
string.public String getNamespaceForAttributePrefix(String prefix)
getNamespaceForPrefix(String)
otherwise.
prefix
- The prefix
string.
null
.public String getNamespaceForPrefix(String prefix)
prefix
- The prefix string.
null
.public String getPrefixForNamespace(String namespace)
namespace
- The namespace URI.
null
.public String getPrefixForAttributeNamespace(String namespace)
namespace
- The namespace URI of an attribute.
null
.protected final String getPrefixForNamespace(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(String prefix)
prefix
- The prefix string (not null
).public void removeByNamespace(String namespace)
namespace
- The namespace URI(not null
).public void clear()
public String toString()
toString
in class Object
public void removeLastMapping()
public Set<String> getNamespaces()
public Object clone()
clone
in class Object
public List<String> getProxies()
public ProxyNamespaceMapping getMappingsFromAncestor(ProxyNamespaceMapping prefixNamespaceMapping)
prefixNamespaceMapping
- The prefix namespace mapping that must be
removed from the current one.
public void updateNamespaceProxyMapping(String namespace, String prefix)
namespace
- The namespace.prefix
- New prefix.
|
Oxygen XML Editor 11.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |