it.geosolutions.unredd.geostore
Class UNREDDGeostoreManager

java.lang.Object
  extended by it.geosolutions.unredd.geostore.UNREDDGeostoreManager

public class UNREDDGeostoreManager
extends Object

Invoke calls on GeoStore, bridging UNREDD model.


Constructor Summary
UNREDDGeostoreManager(it.geosolutions.geostore.services.rest.GeoStoreClient client)
           
UNREDDGeostoreManager(String host, String user, String pwd)
           
 
Method Summary
 void deleteChartScript(String chartScriptName)
           
 void deleteLayer(String layerName)
           
 void deleteStats(String statsDefName)
           
 boolean existLayer(String layerName)
          checks if layer exists in the category layer
 boolean existLayerUpdate(String baseLayerName, String year, String month, String day)
          check if layer exists in the category layerupdate
 boolean existResourceInCategory(String resourceName, UNREDDCategories category)
          check if a generic resource exists in a given category
 it.geosolutions.geostore.services.rest.GeoStoreClient getClient()
           
 List<it.geosolutions.geostore.core.model.Resource> getFeedbacks()
          Returns all feedback resources
 List<it.geosolutions.geostore.core.model.Resource> getLayers()
          Returns the list of all stat defs
 List<it.geosolutions.geostore.core.model.Resource> getStatsDefs()
          Returns the list of all layers
 List<it.geosolutions.geostore.core.model.Resource> getUNREDDResources(UNREDDCategories cat)
          Returns the list of all resources with a given UNREDDResources value
 void insertFeedback(Map<String,String> attributes, String data)
          Inserts a feedback resource
 void recurseDelete(String resourceName, UNREDDCategories parentCategory, UNREDDCategories childCategory, AttributeDef childAttribute)
           
 List<it.geosolutions.geostore.core.model.Resource> searchChartDataByChartScript(String chartScriptName)
          Returns a list of ChartData objects having attribute CHARTSCRIPT=chartScriptName
 List<it.geosolutions.geostore.core.model.Resource> searchChartScriptByStatsDef(String statsdef)
           
 it.geosolutions.geostore.core.model.Resource searchLayer(String layerName)
          Returns a layer with the given name
 List<it.geosolutions.geostore.core.model.Resource> searchLayerUpdatesByLayerName(String layerName)
          Returns a list of layerUpdate objects having attribute Layer=layerName
 it.geosolutions.geostore.core.model.Resource searchResourceByName(String resourceName)
           
 it.geosolutions.geostore.core.model.Resource searchResourceByName(String resourceName, UNREDDCategories cat)
           
 Map<it.geosolutions.geostore.core.model.Resource,String> searchStatsDataByStatsDef(String statsDefName)
          Deprecated.  
 List<it.geosolutions.geostore.core.model.Resource> searchStatsDataByStatsDef2(String statsDefName)
           
 List<it.geosolutions.geostore.core.model.Resource> searchStatsDefByLayer(String layername)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UNREDDGeostoreManager

public UNREDDGeostoreManager(String host,
                             String user,
                             String pwd)

UNREDDGeostoreManager

public UNREDDGeostoreManager(it.geosolutions.geostore.services.rest.GeoStoreClient client)
Method Detail

getClient

public it.geosolutions.geostore.services.rest.GeoStoreClient getClient()

existResourceInCategory

public boolean existResourceInCategory(String resourceName,
                                       UNREDDCategories category)
check if a generic resource exists in a given category

Parameters:
resourceName -
category -
Returns:

existLayer

public boolean existLayer(String layerName)
checks if layer exists in the category layer

Parameters:
layerName -
Returns:

existLayerUpdate

public boolean existLayerUpdate(String baseLayerName,
                                String year,
                                String month,
                                String day)
check if layer exists in the category layerupdate

Parameters:
baseLayerName -
year -
month -
Returns:

searchStatsDefByLayer

public List<it.geosolutions.geostore.core.model.Resource> searchStatsDefByLayer(String layername)
                                                                         throws UnsupportedEncodingException,
                                                                                JAXBException
Throws:
UnsupportedEncodingException
JAXBException

searchChartScriptByStatsDef

public List<it.geosolutions.geostore.core.model.Resource> searchChartScriptByStatsDef(String statsdef)
                                                                               throws UnsupportedEncodingException,
                                                                                      JAXBException
Throws:
UnsupportedEncodingException
JAXBException

searchStatsDataByStatsDef

public Map<it.geosolutions.geostore.core.model.Resource,String> searchStatsDataByStatsDef(String statsDefName)
                                                                                   throws UnsupportedEncodingException,
                                                                                          JAXBException
Deprecated. 

Returns a list of statsDef objects having attribute StatsDef=statsDefName

Parameters:
statsDefName -
Returns:
Throws:
UnsupportedEncodingException
JAXBException

searchStatsDataByStatsDef2

public List<it.geosolutions.geostore.core.model.Resource> searchStatsDataByStatsDef2(String statsDefName)
                                                                              throws UnsupportedEncodingException,
                                                                                     JAXBException
Throws:
UnsupportedEncodingException
JAXBException

searchLayer

public it.geosolutions.geostore.core.model.Resource searchLayer(String layerName)
                                                         throws UnsupportedEncodingException,
                                                                JAXBException
Returns a layer with the given name

Parameters:
layerName -
Returns:
Throws:
UnsupportedEncodingException
JAXBException

searchLayerUpdatesByLayerName

public List<it.geosolutions.geostore.core.model.Resource> searchLayerUpdatesByLayerName(String layerName)
                                                                                 throws UnsupportedEncodingException,
                                                                                        JAXBException
Returns a list of layerUpdate objects having attribute Layer=layerName

Parameters:
statsDefName -
Returns:
Throws:
UnsupportedEncodingException
JAXBException

searchChartDataByChartScript

public List<it.geosolutions.geostore.core.model.Resource> searchChartDataByChartScript(String chartScriptName)
                                                                                throws UnsupportedEncodingException,
                                                                                       JAXBException
Returns a list of ChartData objects having attribute CHARTSCRIPT=chartScriptName

Parameters:
statsDefName -
Returns:
Throws:
UnsupportedEncodingException
JAXBException

getLayers

public List<it.geosolutions.geostore.core.model.Resource> getLayers()
                                                             throws UnsupportedEncodingException,
                                                                    JAXBException
Returns the list of all stat defs

Returns:
Throws:
UnsupportedEncodingException
JAXBException

getFeedbacks

public List<it.geosolutions.geostore.core.model.Resource> getFeedbacks()
                                                                throws UnsupportedEncodingException,
                                                                       JAXBException
Returns all feedback resources

Throws:
UnsupportedEncodingException
JAXBException

insertFeedback

public void insertFeedback(Map<String,String> attributes,
                           String data)
Inserts a feedback resource


searchResourceByName

public it.geosolutions.geostore.core.model.Resource searchResourceByName(String resourceName)

searchResourceByName

public it.geosolutions.geostore.core.model.Resource searchResourceByName(String resourceName,
                                                                         UNREDDCategories cat)

getStatsDefs

public List<it.geosolutions.geostore.core.model.Resource> getStatsDefs()
                                                                throws UnsupportedEncodingException,
                                                                       JAXBException
Returns the list of all layers

Returns:
Throws:
UnsupportedEncodingException
JAXBException

getUNREDDResources

public List<it.geosolutions.geostore.core.model.Resource> getUNREDDResources(UNREDDCategories cat)
                                                                      throws UnsupportedEncodingException,
                                                                             JAXBException
Returns the list of all resources with a given UNREDDResources value

Returns:
Throws:
UnsupportedEncodingException
JAXBException

deleteLayer

public void deleteLayer(String layerName)

deleteStats

public void deleteStats(String statsDefName)

deleteChartScript

public void deleteChartScript(String chartScriptName)

recurseDelete

public void recurseDelete(String resourceName,
                          UNREDDCategories parentCategory,
                          UNREDDCategories childCategory,
                          AttributeDef childAttribute)


Copyright © 2012. All Rights Reserved.