it.geosolutions.geoserver.rest.encoder
Class GSNamespaceEncoder

java.lang.Object
  extended by it.geosolutions.geoserver.rest.encoder.utils.XmlElement
      extended by it.geosolutions.geoserver.rest.encoder.utils.PropertyXMLEncoder
          extended by it.geosolutions.geoserver.rest.encoder.GSNamespaceEncoder

public class GSNamespaceEncoder
extends PropertyXMLEncoder

Namespace XML encoder. Namespaces must contain a non empty prefix and a URI:

 <namespace>
   <prefix>example</prefix>
   <uri>http://example.com</uri>
 </namespace>
 

Author:
Oscar Fonts
See Also:
GeoServer Documentation

Field Summary
static String NAMESPACE
           
static String PREFIX
           
static String URI
           
 
Constructor Summary
GSNamespaceEncoder(String prefix, URI uri)
          Create a namespace XML encoder.
 
Method Summary
 String getPrefix()
          Get the namespace prefix.
 URI getURI()
          Get the namespace uri.
 void setPrefix(String prefix)
          Change the namespace prefix.
 void setURI(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, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAMESPACE

public static final String NAMESPACE
See Also:
Constant Field Values

PREFIX

public static final String PREFIX
See Also:
Constant Field Values

URI

public static final String URI
See Also:
Constant Field Values
Constructor Detail

GSNamespaceEncoder

public GSNamespaceEncoder(String prefix,
                          URI uri)
Create a namespace XML encoder.

Parameters:
prefix - the namespace prefix
uri - the namespace URI
Throws:
IllegalArgumentException - if prefix or uri are null or empty
Method Detail

getPrefix

public String getPrefix()
Get the namespace prefix.

Returns:
the prefix

setPrefix

public void setPrefix(String prefix)
Change the namespace prefix.

Parameters:
prefix - the new prefix
Throws:
IllegalArgumentException - if prefix is null or empty

getURI

public URI getURI()
Get the namespace uri.

Returns:
the uri

setURI

public void setURI(URI uri)
change the nampespace uri.

Parameters:
URI - the new uri
Throws:
IllegalArgumentException - if uri is null or empty


Copyright © 2007-2013 GeoSolutions. All Rights Reserved.