Class RESTNamespace


  • public class RESTNamespace
    extends java.lang.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>
     
    Version:
    $Id: $
    Author:
    Oscar Fonts
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String FEATURE_TYPES
      Constant FEATURE_TYPES="featureTypes"
      static java.lang.String NAMESPACE
      Constant NAMESPACE="namespace"
      static java.lang.String PREFIX
      Constant PREFIX="prefix"
      static java.lang.String URI
      Constant URI="uri"
    • Constructor Summary

      Constructors 
      Constructor Description
      RESTNamespace​(org.jdom.Element elem)
      Create a RESTNamespace from a XML element.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static RESTNamespace build​(java.lang.String response)
      Build a RESTNamespace from a REST response.
      java.lang.String getPrefix()
      Get the namespace prefix
      java.net.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 java.lang.String NAMESPACE
        Constant NAMESPACE="namespace"
        See Also:
        Constant Field Values
      • PREFIX

        public static final java.lang.String PREFIX
        Constant PREFIX="prefix"
        See Also:
        Constant Field Values
      • FEATURE_TYPES

        public static final java.lang.String FEATURE_TYPES
        Constant FEATURE_TYPES="featureTypes"
        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​(java.lang.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 java.lang.String getPrefix()
        Get the namespace prefix
        Returns:
        the namespace prefix.
      • getURI

        public java.net.URI getURI()
        Get the namespace URI.
        Returns:
        the namespace uri.