Class RESTLayer

  • Direct Known Subclasses:
    RESTLayer21

    public class RESTLayer
    extends java.lang.Object
    Parse Layers returned as XML REST objects.

    This is the XML REST representation:

     
    <layer>
        <name>tasmania_cities</name>
        <path>/</path>
        <type>VECTOR</type>
        <defaultStyle>
            <name>capitals</name>
            <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/styles/capitals.xml" type="application/xml"/>
        </defaultStyle>
        <styles class="linked-hash-set">
        	<style>
          		<name>green</name>
          		<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/styles/green.xml" type="application/xml"/>
        	</style>
      	</styles>
        <resource class="featureType">
            <name>tasmania_cities</name>
            <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/topp/datastores/taz_shapes/featuretypes/tasmania_cities.xml" type="application/xml"/>
        </resource>
        <enabled>true</enabled>
        <queryable>true</queryable>
        <advertised>true</advertised>
        <attribution>
            <logoWidth>0</logoWidth>
            <logoHeight>0</logoHeight>
        </attribution>
        <authorityURLs>
    		<AuthorityURL>
    			<name>authority1</name>
    			<href>http://www.authority1.org</href>
    		</AuthorityURL>
    	</authorityURLs>
    	<identifiers>
    		<Identifier>
    			<authority>authority1</authority>
    			<identifier>identifier1</identifier>
    		</Identifier>
    	</identifiers>
    </layer>
     
    Version:
    $Id: $
    Author:
    etj, eblondel
    • Field Detail

      • layerElem

        protected final org.jdom.Element layerElem
    • Constructor Detail

      • RESTLayer

        public RESTLayer​(org.jdom.Element layerElem)

        Constructor for RESTLayer.

        Parameters:
        layerElem - a Element object.
    • Method Detail

      • build

        public static RESTLayer build​(java.lang.String response)

        build

        Parameters:
        response - a String object.
        Returns:
        a RESTLayer object.
      • getEnabled

        public boolean getEnabled()

        getEnabled

        Returns:
        a boolean.
      • getQueryable

        public boolean getQueryable()

        getQueryable

        Returns:
        a boolean.
      • getAdvertised

        public boolean getAdvertised()

        getAdvertised

        Returns:
        a boolean.
      • getName

        public java.lang.String getName()

        getName

        Returns:
        a String object.
      • getTypeString

        public java.lang.String getTypeString()

        getTypeString

        Returns:
        a String object.
      • getDefaultStyle

        public java.lang.String getDefaultStyle()

        getDefaultStyle

        Returns:
        a String object.
      • getDefaultStyleWorkspace

        public java.lang.String getDefaultStyleWorkspace()

        getDefaultStyleWorkspace

        Returns:
        a String object.
      • getTitle

        public java.lang.String getTitle()

        getTitle

        Returns:
        a String object.
      • getAbstract

        public java.lang.String getAbstract()

        getAbstract

        Returns:
        a String object.
      • getNameSpace

        public java.lang.String getNameSpace()

        getNameSpace

        Returns:
        a String object.
      • getResourceUrl

        public java.lang.String getResourceUrl()
        Get the URL to retrieve the featuretype.
         
         <resource class="featureType">
         <name>tasmania_cities</name>
          <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/workspaces/topp/datastores/taz_shapes/featuretypes/tasmania_cities.xml" type="application/xml"/>
         </resource>
          
        Returns:
        a String object.
      • getEncodedAuthorityURLInfoList

        public java.util.List<GSAuthorityURLInfoEncoder> getEncodedAuthorityURLInfoList()
        Decodes the list of AuthorityURLInfo from the GeoServer Layer
        Returns:
        the list of GSAuthorityURLInfoEncoder
      • getEncodedIdentifierInfoList

        public java.util.List<GSIdentifierInfoEncoder> getEncodedIdentifierInfoList()
        Decodes the list of IdentifierInfo from the GeoServer Layer
        Returns:
        the list of IdentifierInfoEncoder