it.geosolutions.geoserver.rest.decoder
Class RESTNamespace

java.lang.Object
  extended by it.geosolutions.geoserver.rest.decoder.RESTNamespace

public class RESTNamespace
extends Object

Parse namespaces returned as XML REST objects. This is the XML REST representation:

<namespace>
     <prefix>topp</prefix>
     <uri>http://www.openplans.org/topp</uri>
     <featureTypes>
       <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/topp/featuretypes.xml" type="application/xml"/>
     </featureTypes>
   </namespace>
 

Author:
Oscar Fonts

Field Summary
static String FEATURE_TYPES
           
static String NAMESPACE
           
static String PREFIX
           
static String URI
           
 
Constructor Summary
RESTNamespace(org.jdom.Element elem)
          Create a RESTNamespace from a XML element.
 
Method Summary
static RESTNamespace build(String response)
          Build a RESTNamespace from a REST response.
 String getPrefix()
          Get the namespace prefix
 URI getURI()
          Get the namespace URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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

FEATURE_TYPES

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

RESTNamespace

public RESTNamespace(org.jdom.Element elem)
Create a RESTNamespace from a XML element.

Parameters:
elem - The jdom XML Element describing a namespace.
Method Detail

build

public static RESTNamespace build(String response)
Build a RESTNamespace from a REST response.

Parameters:
response - XML representation of the namespace.
Returns:
a new RESTNamespace, or null if XML could not be parsed.

getPrefix

public String getPrefix()
Get the namespace prefix

Returns:
the namespace prefix.

getURI

public URI getURI()
Get the namespace URI.

Returns:
the namespace uri.


Copyright © 2007-2013 GeoSolutions. All Rights Reserved.