org.gcube.common.geoserverinterface
Class GeoCaller
java.lang.Object
org.gcube.common.geoserverinterface.GeoCallerConfigurationInterface
org.gcube.common.geoserverinterface.GeoCaller
public class GeoCaller
- extends GeoCallerConfigurationInterface
Method Summary |
boolean |
addFeatureType(FeatureTypeRest featureTypeRest,
GeonetworkCommonResourceInterface.GeonetworkCategory category)
|
boolean |
addLayer(LayerRest layerRest)
|
boolean |
addLayersGroup(GroupRest group,
GeonetworkCommonResourceInterface.GeonetworkCategory category)
|
boolean |
addStyleToLayer(String layer,
String style)
|
boolean |
deleteFeatureTypes(String wokspaceName,
String dataStore,
String featureTypes)
|
boolean |
deleteLayer(String LayerName)
|
boolean |
deleteLayersGroup(String name)
|
String |
deleteMetadataById(String id)
|
boolean |
deleteStyleSDL(String schemaName,
boolean purge)
|
CoverageStoreRest |
getCoverageStore(String wokspaceName,
String coverageStore)
|
CoverageTypeRest |
getCoverageType(String wokspaceName,
String coveragestore,
String coverageType)
|
String |
getCurrentWfsGeoserver()
|
String |
getCurrentWmsGeoserver()
|
DataStoreRest |
getDataStore(String wokspaceName,
String dataStore)
|
FeatureTypeRest |
getFeatureType(String wokspaceName,
String dataStore,
String featureType)
|
ArrayList<CswRecord> |
getGeonetworkCswRecordsBySearch(String anyText,
int maxRecords)
|
String |
getGeonetworkLayerInfoBySearchService(String title,
GeonetworkCommonResourceInterface.GeonetworkCategory category,
Boolean similarity)
|
String |
getGeoServerForGroup(String groupName)
|
String |
getGeoServerForLayer(String layerName)
|
String |
getGeoServerForName(String name,
boolean searchgroup)
Returns the first geoserver containing the group name |
String |
getHarvestingById(String id)
|
String |
getHarvestings()
|
LayerRest |
getLayer(String nameLayer)
|
GroupRest |
getLayerGroup(String nameGroup)
|
CswLayersResult |
getLayersFromCsw()
|
CswLayersResult |
getLayersFromCsw(String referredWorkspace)
|
CswLayersResult |
getLayersFromCsw(String referredWorkspace,
int startPosition,
int maxRecords)
|
CswLayersResult |
getLayersFromCsw(String referredWorkspace,
int startPosition,
int maxRecords,
boolean sortByTiyle,
boolean sortAscendent)
|
CswLayersResult |
getLayersFromCsw(String referredWorkspace,
int startPosition,
int maxRecords,
boolean sortByTitle,
boolean sortAscendent,
GeoCaller.FILTER_TYPE filter,
String textToSearch)
|
String |
getLayerTitleByWms(String workspace,
String layerName)
|
List<String> |
getLayerTitlesByWms(List<String> workspaces,
List<String> layerNames)
|
String |
getMetadataByFileIdentifier(String uuid)
|
String |
getMetadataById(String id)
|
InputStream |
getStyle(String styleName)
|
ArrayList<String> |
getWfsGeoserverList()
|
ArrayList<String> |
getWmsGeoserverList()
|
WorkspaceRest |
getWorkspace(String wokspaceName)
|
String |
insertMetadata(MetadataInfo metadataInfo)
|
String |
insertMetadata(String fileIdentifier,
String workspace,
String layerTitle,
String layerName,
String description,
GeonetworkCommonResourceInterface.GeonetworkCategory category,
String geoServerWmsUrl)
|
String |
insertMetadataByCswTransaction(String fileIdentifier,
String workspace,
String layerTitle,
String layerName,
String description,
String geoServerWmsUrl)
|
ArrayList<String> |
listCoverages(String wokspaceName,
String coverageStore)
|
List<String> |
listCoverageStores(String wokspaceName)
|
List<String> |
listDataStores(String wokspaceName)
|
ArrayList<String> |
listFeaturetypes(String wokspaceName,
String dataStore)
|
ArrayList<String> |
listLayerGroups()
|
ArrayList<String> |
listLayers()
|
ArrayList<String> |
listStyles()
|
ArrayList<String> |
listStyles(String layerName)
|
ArrayList<String> |
listWorkspaces()
|
boolean |
modifyLayersGroup(GroupRest group)
|
boolean |
modifyStyleSDL(String schemaName,
String xmlSdl)
|
String |
searchLayerByTitleIsEqualTo(String title)
|
String |
searchLayerByTitleIsLike(String title)
|
boolean |
sendStyleSDL(String xmlSdl)
|
boolean |
setLayer(FeatureTypeRest featureTypeRest,
String defaultStyle,
ArrayList<String> styles)
|
void |
setWfsGeoserver(String geoserverUrl,
String geoserverUsername,
String geoserverPassword)
|
void |
setWfsGeoserverResearchStrategy(GeonetworkCommonResourceInterface.GeoserverMethodResearch strategy)
|
void |
setWmsGeoserver(String geoserverUrl,
String geoserverUsername,
String geoserverPassword)
|
void |
setWmsGeoserverResearchStrategy(GeonetworkCommonResourceInterface.GeoserverMethodResearch strategy)
|
String |
updateHarvesting(String id)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GeoCaller
public GeoCaller(String geonetworkUrl,
String geonetworkUsername,
String geonetworkPassword,
String geoserverWmsUrl,
String geoserverUsername,
String geoserverPassword,
GeonetworkCommonResourceInterface.GeoserverMethodResearch geoserverResearchMethod)
throws Exception
- This constructor instance Geonetwork and load (with sorting criteria passed in input) the lists of Geoserver from Geonetwork (or specific GeoserverCaller with params in input)
- Parameters:
geonetworkUrl
- (mandatory) - if null instance only GeoserverCaller (with params in input) if availablegeonetworkUsername
- (mandatory)geonetworkPassword
- (mandatory)geoserverWmsUrl
- (mandatory) - if null instance only GeonetworkCaller if availablegeoserverUsername
- (mandatory)geoserverPassword
- (mandatory)geoserverResearchMethod
-
- Throws:
Exception
GeoCaller
public GeoCaller(String geoserverWmsUrl,
String geoserverUsername,
String geoserverPassword)
throws Exception
- This constructor instance only GeoserverCaller
- Parameters:
geoserverWmsUrl
- geoserverUsername
- geoserverPassword
-
- Throws:
Exception
setWmsGeoserver
public void setWmsGeoserver(String geoserverUrl,
String geoserverUsername,
String geoserverPassword)
throws Exception
- Throws:
Exception
setWfsGeoserver
public void setWfsGeoserver(String geoserverUrl,
String geoserverUsername,
String geoserverPassword)
throws Exception
- Throws:
Exception
getCurrentWmsGeoserver
public String getCurrentWmsGeoserver()
getCurrentWfsGeoserver
public String getCurrentWfsGeoserver()
getWmsGeoserverList
public ArrayList<String> getWmsGeoserverList()
getWfsGeoserverList
public ArrayList<String> getWfsGeoserverList()
setWmsGeoserverResearchStrategy
public void setWmsGeoserverResearchStrategy(GeonetworkCommonResourceInterface.GeoserverMethodResearch strategy)
throws Exception
- Throws:
Exception
setWfsGeoserverResearchStrategy
public void setWfsGeoserverResearchStrategy(GeonetworkCommonResourceInterface.GeoserverMethodResearch strategy)
throws Exception
- Throws:
Exception
getHarvestings
public String getHarvestings()
throws Exception
- Throws:
Exception
getMetadataByFileIdentifier
public String getMetadataByFileIdentifier(String uuid)
throws Exception
- Throws:
Exception
getMetadataById
public String getMetadataById(String id)
throws Exception
- Throws:
Exception
searchLayerByTitleIsLike
public String searchLayerByTitleIsLike(String title)
throws Exception
- Throws:
Exception
searchLayerByTitleIsEqualTo
public String searchLayerByTitleIsEqualTo(String title)
throws Exception
- Throws:
Exception
getHarvestingById
public String getHarvestingById(String id)
throws Exception
- Throws:
Exception
getGeonetworkLayerInfoBySearchService
public String getGeonetworkLayerInfoBySearchService(String title,
GeonetworkCommonResourceInterface.GeonetworkCategory category,
Boolean similarity)
throws Exception
- Parameters:
title
- - (mandatory) string or nullcategory
- - (mandatory) string or nullsimilarity
- - (mandatory) true is precise - false is imprecise
- Returns:
-
- Throws:
Exception
getGeonetworkCswRecordsBySearch
public ArrayList<CswRecord> getGeonetworkCswRecordsBySearch(String anyText,
int maxRecords)
throws Exception
- Parameters:
anyText
- maxRecords
- = 0 return all records also return max record as specified in input
- Returns:
-
- Throws:
Exception
insertMetadata
public String insertMetadata(String fileIdentifier,
String workspace,
String layerTitle,
String layerName,
String description,
GeonetworkCommonResourceInterface.GeonetworkCategory category,
String geoServerWmsUrl)
throws Exception
- Parameters:
fileIdentifier
- workspace
- layerTitle
- layerName
- description
- category
- geoServerWmsUrl
-
- Returns:
-
- Throws:
Exception
insertMetadata
public String insertMetadata(MetadataInfo metadataInfo)
throws Exception
- Parameters:
metadataInfo
- type MetadataInfo
- Returns:
-
- Throws:
Exception
insertMetadataByCswTransaction
public String insertMetadataByCswTransaction(String fileIdentifier,
String workspace,
String layerTitle,
String layerName,
String description,
String geoServerWmsUrl)
throws Exception
- Parameters:
fileIdentifier
- workspace
- layerTitle
- layerName
- description
- geoServerWmsUrl
-
- Returns:
-
- Throws:
Exception
updateHarvesting
public String updateHarvesting(String id)
throws Exception
- Parameters:
id
- - (mandatory) string
- Returns:
-
- Throws:
Exception
deleteMetadataById
public String deleteMetadataById(String id)
throws Exception
- Parameters:
id
- - (mandatory) string
- Returns:
-
- Throws:
Exception
listWorkspaces
public ArrayList<String> listWorkspaces()
throws Exception
- Throws:
Exception
getWorkspace
public WorkspaceRest getWorkspace(String wokspaceName)
throws Exception
- Throws:
Exception
listDataStores
public List<String> listDataStores(String wokspaceName)
throws Exception
- Throws:
Exception
getDataStore
public DataStoreRest getDataStore(String wokspaceName,
String dataStore)
throws Exception
- Throws:
Exception
listFeaturetypes
public ArrayList<String> listFeaturetypes(String wokspaceName,
String dataStore)
throws Exception
- Throws:
Exception
getFeatureType
public FeatureTypeRest getFeatureType(String wokspaceName,
String dataStore,
String featureType)
throws Exception
- Throws:
Exception
getCoverageType
public CoverageTypeRest getCoverageType(String wokspaceName,
String coveragestore,
String coverageType)
throws Exception
- Throws:
Exception
listLayers
public ArrayList<String> listLayers()
throws Exception
- Throws:
Exception
getLayer
public LayerRest getLayer(String nameLayer)
throws Exception
- Throws:
Exception
listLayerGroups
public ArrayList<String> listLayerGroups()
throws Exception
- Throws:
Exception
getLayerGroup
public GroupRest getLayerGroup(String nameGroup)
throws Exception
- Throws:
Exception
listStyles
public ArrayList<String> listStyles()
throws Exception
- Throws:
Exception
listStyles
public ArrayList<String> listStyles(String layerName)
throws Exception
- Throws:
Exception
getStyle
public InputStream getStyle(String styleName)
throws Exception
- Throws:
Exception
listCoverageStores
public List<String> listCoverageStores(String wokspaceName)
throws Exception
- Throws:
Exception
getCoverageStore
public CoverageStoreRest getCoverageStore(String wokspaceName,
String coverageStore)
throws Exception
- Throws:
Exception
listCoverages
public ArrayList<String> listCoverages(String wokspaceName,
String coverageStore)
throws Exception
- Throws:
Exception
addLayersGroup
public boolean addLayersGroup(GroupRest group,
GeonetworkCommonResourceInterface.GeonetworkCategory category)
throws Exception
- Throws:
Exception
addFeatureType
public boolean addFeatureType(FeatureTypeRest featureTypeRest,
GeonetworkCommonResourceInterface.GeonetworkCategory category)
throws Exception
- Throws:
Exception
addLayer
public boolean addLayer(LayerRest layerRest)
throws Exception
- Throws:
Exception
setLayer
public boolean setLayer(FeatureTypeRest featureTypeRest,
String defaultStyle,
ArrayList<String> styles)
throws Exception
- Throws:
Exception
addStyleToLayer
public boolean addStyleToLayer(String layer,
String style)
throws Exception
- Throws:
Exception
sendStyleSDL
public boolean sendStyleSDL(String xmlSdl)
throws Exception
- Throws:
Exception
modifyLayersGroup
public boolean modifyLayersGroup(GroupRest group)
throws Exception
- Throws:
Exception
modifyStyleSDL
public boolean modifyStyleSDL(String schemaName,
String xmlSdl)
throws Exception
- Throws:
Exception
deleteLayersGroup
public boolean deleteLayersGroup(String name)
throws Exception
- Throws:
Exception
deleteStyleSDL
public boolean deleteStyleSDL(String schemaName,
boolean purge)
throws Exception
- Throws:
Exception
deleteLayer
public boolean deleteLayer(String LayerName)
throws Exception
- Throws:
Exception
deleteFeatureTypes
public boolean deleteFeatureTypes(String wokspaceName,
String dataStore,
String featureTypes)
throws Exception
- Throws:
Exception
getGeoServerForName
public String getGeoServerForName(String name,
boolean searchgroup)
throws Exception
- Returns the first geoserver containing the group name
- Parameters:
groupName
-
- Returns:
-
- Throws:
Exception
getGeoServerForGroup
public String getGeoServerForGroup(String groupName)
throws Exception
- Throws:
Exception
getGeoServerForLayer
public String getGeoServerForLayer(String layerName)
throws Exception
- Throws:
Exception
getLayerTitlesByWms
public List<String> getLayerTitlesByWms(List<String> workspaces,
List<String> layerNames)
throws Exception
- Throws:
Exception
getLayerTitleByWms
public String getLayerTitleByWms(String workspace,
String layerName)
getLayersFromCsw
public CswLayersResult getLayersFromCsw()
throws Exception
- Throws:
Exception
getLayersFromCsw
public CswLayersResult getLayersFromCsw(String referredWorkspace)
throws Exception
- Throws:
Exception
getLayersFromCsw
public CswLayersResult getLayersFromCsw(String referredWorkspace,
int startPosition,
int maxRecords)
throws Exception
- Throws:
Exception
getLayersFromCsw
public CswLayersResult getLayersFromCsw(String referredWorkspace,
int startPosition,
int maxRecords,
boolean sortByTiyle,
boolean sortAscendent)
throws Exception
- Throws:
Exception
getLayersFromCsw
public CswLayersResult getLayersFromCsw(String referredWorkspace,
int startPosition,
int maxRecords,
boolean sortByTitle,
boolean sortAscendent,
GeoCaller.FILTER_TYPE filter,
String textToSearch)
throws Exception
- Throws:
Exception
Copyright © 2012. All Rights Reserved.