it.geosolutions.geoserver.rest.encoder
Class GSResourceEncoder

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.GSResourceEncoder
Direct Known Subclasses:
GSCoverageEncoder, GSFeatureTypeEncoder

public abstract class GSResourceEncoder
extends PropertyXMLEncoder

Encode a GeoServer resouce. The type regards the GDSDimensionInfoEncoder metadata Type which has different specialization for Features.

Author:
ETj (etj at geo-solutions.it), Carlo Cancellieri - carlo.cancellieri@geo-solutions.it
See Also:
GSDimensionInfoEncoder, GSFeatureDimensionInfoEncoder

Nested Class Summary
static class GSResourceEncoder.ProjectionPolicy
          NONE, REPROJECT_TO_DECLARED, FORCE_DECLARED
 
Field Summary
static String KEYWORDS
           
static String METADATA
           
static String NAME
           
 
Constructor Summary
protected GSResourceEncoder(String rootName)
           
 
Method Summary
 void addKeyword(String keyword)
           
 void addLatLonBoundingBox(double minx, double miny, double maxx, double maxy, String crs)
          Deprecated. use the setSRS.
This method will be set as protected in the next release
protected  void addMetadata(String key, XmlElement dimensionInfo)
          Deprecated. will be set to protected in the next release
 void addName(String name)
          Deprecated. use the setName.
This method will be set as protected in the next release
 void addNativeBoundingBox(double minx, double miny, double maxx, double maxy, String crs)
          Deprecated. use the setSRS.
This method will be set as protected in the next release
 void addProjectionPolicy(GSResourceEncoder.ProjectionPolicy policy)
          Deprecated. use the setProjectionPolicy.
This method will be set as protected in the next release
 void addSRS(String srs)
          Deprecated. use the setSRS.
This method will be set as protected in the next release
 void addTitle(String title)
          Deprecated. use the setTitle.
This method will be set as protected in the next release
 boolean delKeyword(String keyword)
          delete a keyword from the list
 boolean delMetadata(String key)
           
 String getName()
           
 void setEnabled(boolean enabled)
           
 void setLatLonBoundingBox(double minx, double miny, double maxx, double maxy, String crs)
           
protected  void setMetadata(String key, XmlElement dimensionInfo)
           
 void setName(String name)
          Set or modify the 'name' node with a text value from 'name'
 void setNativeBoundingBox(double minx, double miny, double maxx, double maxy, String crs)
           
 void setProjectionPolicy(GSResourceEncoder.ProjectionPolicy policy)
          NONE, REPROJECT_TO_DECLARED, FORCE_DECLARED
 void setSRS(String srs)
          Set or modify the 'SRS' node with a text value from 'srs'
 void setTitle(String title)
          Set or modify the 'title' node with a text value from 'title'
 
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

NAME

public static final String NAME
See Also:
Constant Field Values

METADATA

public static final String METADATA
See Also:
Constant Field Values

KEYWORDS

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

GSResourceEncoder

protected GSResourceEncoder(String rootName)
Parameters:
rootName - Actually 'feature' or 'coverage'
See Also:
GSFeatureTypeEncoder, GSCoverageEncoder
Method Detail

setEnabled

public void setEnabled(boolean enabled)

addMetadata

protected void addMetadata(String key,
                           XmlElement dimensionInfo)
Deprecated. will be set to protected in the next release

Parameters:
key -
dimensionInfo -

setMetadata

protected void setMetadata(String key,
                           XmlElement dimensionInfo)

delMetadata

public boolean delMetadata(String key)
Parameters:
key - the name of the metadata to add (f.e.: elevation, time)
Returns:
true if something is removed, false otherwise

addKeyword

public void addKeyword(String keyword)

delKeyword

public boolean delKeyword(String keyword)
delete a keyword from the list

Parameters:
keyword -
Returns:
true if something is removed, false otherwise

addProjectionPolicy

public void addProjectionPolicy(GSResourceEncoder.ProjectionPolicy policy)
Deprecated. use the setProjectionPolicy.
This method will be set as protected in the next release

NONE, REPROJECT_TO_DECLARED, FORCE_DECLARED


setProjectionPolicy

public void setProjectionPolicy(GSResourceEncoder.ProjectionPolicy policy)
NONE, REPROJECT_TO_DECLARED, FORCE_DECLARED


addName

public void addName(String name)
Deprecated. use the setName.
This method will be set as protected in the next release

Add the 'name' node with a text value from 'name'


setName

public void setName(String name)
Set or modify the 'name' node with a text value from 'name'


getName

public String getName()

addTitle

public void addTitle(String title)
Deprecated. use the setTitle.
This method will be set as protected in the next release

Add the 'title' node with a text value from 'title'


setTitle

public void setTitle(String title)
Set or modify the 'title' node with a text value from 'title'


addSRS

public void addSRS(String srs)
Deprecated. use the setSRS.
This method will be set as protected in the next release

Add the 'SRS' node with a text value from 'srs'


setSRS

public void setSRS(String srs)
Set or modify the 'SRS' node with a text value from 'srs'


addLatLonBoundingBox

public void addLatLonBoundingBox(double minx,
                                 double miny,
                                 double maxx,
                                 double maxy,
                                 String crs)
Deprecated. use the setSRS.
This method will be set as protected in the next release

Parameters:
minx -
maxy -
maxx -
miny -
crs -

setLatLonBoundingBox

public void setLatLonBoundingBox(double minx,
                                 double miny,
                                 double maxx,
                                 double maxy,
                                 String crs)

addNativeBoundingBox

public void addNativeBoundingBox(double minx,
                                 double miny,
                                 double maxx,
                                 double maxy,
                                 String crs)
Deprecated. use the setSRS.
This method will be set as protected in the next release

Parameters:
minx -
maxy -
maxx -
miny -
crs -

setNativeBoundingBox

public void setNativeBoundingBox(double minx,
                                 double miny,
                                 double maxx,
                                 double maxy,
                                 String crs)


Copyright © 2007-2012 GeoSolutions. All Rights Reserved.