Class GSNamespaceEncoder
- java.lang.Object
-
- it.geosolutions.geoserver.rest.encoder.utils.XmlElement
-
- it.geosolutions.geoserver.rest.encoder.utils.PropertyXMLEncoder
-
- it.geosolutions.geoserver.rest.encoder.GSNamespaceEncoder
-
public class GSNamespaceEncoder extends PropertyXMLEncoder
Namespace XML encoder. Namespaces must contain a non empty prefix and a URI:- Version:
- $Id: $
- Author:
- Oscar Fonts
-
-
Constructor Summary
Constructors Constructor Description GSNamespaceEncoder(java.lang.String prefix, java.net.URI uri)Create a namespace XML encoder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetPrefix()Get the namespace prefix.java.net.URIgetURI()Get the namespace uri.voidsetPrefix(java.lang.String prefix)Change the namespace prefix.voidsetURI(java.net.URI uri)change the nampespace uri.-
Methods inherited from class it.geosolutions.geoserver.rest.encoder.utils.PropertyXMLEncoder
add, get, get, set
-
Methods inherited from class it.geosolutions.geoserver.rest.encoder.utils.XmlElement
add, addContent, getRoot, isEmpty, remove, set, setRoot, setRoot, toString
-
-
-
-
Field Detail
-
NAMESPACE
public static final java.lang.String NAMESPACE
ConstantNAMESPACE="namespace"- See Also:
- Constant Field Values
-
PREFIX
public static final java.lang.String PREFIX
ConstantPREFIX="prefix"- See Also:
- Constant Field Values
-
URI
public static final java.lang.String URI
ConstantURI="uri"- See Also:
- Constant Field Values
-
-
Method Detail
-
getPrefix
public java.lang.String getPrefix()
Get the namespace prefix.- Returns:
- the prefix
-
setPrefix
public void setPrefix(java.lang.String prefix)
Change the namespace prefix.- Parameters:
prefix- the new prefix- Throws:
java.lang.IllegalArgumentException- if prefix is null or empty
-
getURI
public java.net.URI getURI()
Get the namespace uri.- Returns:
- the uri
-
setURI
public void setURI(java.net.URI uri)
change the nampespace uri.- Parameters:
uri- the new uri- Throws:
java.lang.IllegalArgumentException- if uri is null or empty
-
-