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 Namespace
Converts the specified object into aNamespace
object.static Namespace[]
Converts the specified object into an array ofNamespace
object.getName()
Returns the namespace name.getUri()
Returns the namespace URI.static Namespace
Create aNamespace
from a"name:uri" string pair.static Namespace
Create aNamespace
with the specified name and URI.toString()
-
Method Details
-
of
Create aNamespace
with the specified name and URI.Previously-encountered name/uri pairs return a cached copy.
-
of
Create aNamespace
from a"name:uri" string pair.- Parameters:
key
- The key/pair string.- Returns:
- The namespace object.
-
create
Converts the specified object into aNamespace
object.Can be any of following types:
- A
Namespace
object - 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 ofNamespace
object.Can be any of following types:
- A
Namespace
array - 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
-
getName
Returns the namespace name.- Returns:
- The namespace name.
-
getUri
Returns the namespace URI.- Returns:
- The namespace URI.
-
toString
-