Package org.apache.juneau.xml
Class Namespace
java.lang.Object
org.apache.juneau.xml.Namespace
Represents a simple namespace mapping between a simple name and URI.
In general, the simple name will be used as the XML prefix mapping unless there are conflicts or prefix re-mappings in the serializer.
See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic NamespaceConverts the specified object into aNamespaceobject.static Namespace[]Converts the specified object into an array ofNamespaceobject.getName()Returns the namespace name.getUri()Returns the namespace URI.static NamespaceCreate aNamespacefrom a"name:uri" string pair.static NamespaceCreate aNamespacewith the specified name and URI.toString()
-
Method Details
-
create
Converts the specified object into aNamespaceobject.Can be any of following types:
- A
Namespaceobject - A string containing a name/value pair of the form
"name:uri" .
- Parameters:
o- The input.- Returns:
- The namespace object, or
null if the input wasnull or an empty JSON object.
- A
-
createArray
Converts the specified object into an array ofNamespaceobject.Can be any of following types:
- A
Namespacearray - A comma-delimited string with key/value pairs of the form
"name:uri" . - A
Collection containing any of object that can be passed tocreateArray(Object).
- Parameters:
o- The input.- Returns:
- The namespace objects, or
null if the input wasnull or an empty JSON object.
- A
-
of
Create aNamespacefrom a"name:uri" string pair.- Parameters:
key- The key/pair string.- Returns:
- The namespace object.
-
of
Create aNamespacewith the specified name and URI.Previously-encountered name/uri pairs return a cached copy.
-
getName
Returns the namespace name.- Returns:
- The namespace name.
-
getUri
Returns the namespace URI.- Returns:
- The namespace URI.
-
toString
-