org.gcube.common.geoserverinterface
Class GeonetworkCaller

java.lang.Object
  extended by org.gcube.common.geoserverinterface.GeonetworkCaller

public class GeonetworkCaller
extends Object


Constructor Summary
GeonetworkCaller(String geonetworkUrl, String user, String password)
          This Constructor use only Geonetwork
 
Method Summary
 String deleteMetadataById(String id)
           
 ArrayList<CswRecord> getCswRecordsBySearch(String anyText, int maxRecords)
           
 String getGeonetInfoBySearchService(String title, GeonetworkCommonResourceInterface.GeonetworkCategory category, Boolean similarity)
           
 GeonetworkGetMethods getGeonetworkGetMethods()
           
 GeonetworkPutMethods getGeonetworkPutMethods()
           
 String getHarvestingById(String id)
           
 String getHarvestings()
           
 Boolean getIsLogged()
           
 CswLayersResult getLayersFromCsw(String referredWorkspace, int startPosition, int maxRecords, boolean sortByTitle, boolean sortAscendent, GeoCaller.FILTER_TYPE filter, String textToSearch)
           
 LayerCsw getLayersInformation(GeoCaller.FILTER_TYPE filter, String textToSearch)
           
 String getLayersUrlInformation(GeoCaller.FILTER_TYPE filter, String textToSearch)
           
 String getMetadataByFileIdentifier(String uuid)
           
 String getMetadataById(String id)
           
 ArrayList<String> getOrderedListOfGeoserver(GeonetworkCommonResourceInterface.GeoserverMethodResearch method, GeonetworkCommonResourceInterface.GeoserverType serverType)
          Function return a list of Geoserver url ordered through the choice strategy (param method in input)
 String getPassword()
           
 String getUsername()
           
 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)
           
 String insertMetadataByFeatureType(FeatureTypeRest featureTypeRest, GeonetworkCommonResourceInterface.GeonetworkCategory category, String geoServerWmsUrl)
           
 void loadGeoserverDiscovery()
           
 String logoutGeonetwork()
           
 String searchLayerByAnyText(String anyText, int maxRecords)
           
 String searchLayerByTitleIsEqualTo(String title)
           
 String searchLayerByTitleIsLike(String title)
           
 String updateHarvesting(String id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeonetworkCaller

public GeonetworkCaller(String geonetworkUrl,
                        String user,
                        String password)
This Constructor use only Geonetwork

Parameters:
geonetworkUrl -
user -
password -
Method Detail

loadGeoserverDiscovery

public void loadGeoserverDiscovery()

getGeonetworkGetMethods

public GeonetworkGetMethods getGeonetworkGetMethods()
Returns:

getGeonetworkPutMethods

public GeonetworkPutMethods getGeonetworkPutMethods()
Returns:

logoutGeonetwork

public String logoutGeonetwork()

getUsername

public String getUsername()
Returns:

getPassword

public String getPassword()
Returns:

getIsLogged

public Boolean getIsLogged()

getOrderedListOfGeoserver

public ArrayList<String> getOrderedListOfGeoserver(GeonetworkCommonResourceInterface.GeoserverMethodResearch method,
                                                   GeonetworkCommonResourceInterface.GeoserverType serverType)
Function return a list of Geoserver url ordered through the choice strategy (param method in input)

Parameters:
method - (mandatory) type enum GeoserverMethodResearch
serverType - (mandatory) type enum GeoserverType
Returns:

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

searchLayerByAnyText

public String searchLayerByAnyText(String anyText,
                                   int maxRecords)
                            throws Exception
Parameters:
anyText -
maxRecords - = 0 return all records also return max record as specified in input
Returns:
Throws:
Exception

getCswRecordsBySearch

public ArrayList<CswRecord> getCswRecordsBySearch(String anyText,
                                                  int maxRecords)
                                           throws Exception
Parameters:
anyText -
maxRecords - = 0 return all records also return max record as specified in input
Returns:
Throws:
Exception

searchLayerByTitleIsEqualTo

public String searchLayerByTitleIsEqualTo(String title)
                                   throws Exception
Throws:
Exception

getHarvestingById

public String getHarvestingById(String id)
                         throws Exception
Throws:
Exception

getGeonetInfoBySearchService

public String getGeonetInfoBySearchService(String title,
                                           GeonetworkCommonResourceInterface.GeonetworkCategory category,
                                           Boolean similarity)
                                    throws Exception
Parameters:
title - - (mandatory) string or null
category - - (mandatory) string or null
similarity - - (mandatory) true is precise - false is imprecise
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 - - (mandatory) string or null
layerTitle - - (mandatory) string
description - - string
category - - (mandatory) A element of GeonetworkCategory Enum
geoServerWmsUrl - - (mandatory) string
Returns:
Throws:
Exception

insertMetadata

public String insertMetadata(MetadataInfo metadataInfo)
                      throws Exception
Parameters:
metadataInfo - type MetadataInfo
Returns:
Throws:
Exception

insertMetadataByFeatureType

public String insertMetadataByFeatureType(FeatureTypeRest featureTypeRest,
                                          GeonetworkCommonResourceInterface.GeonetworkCategory category,
                                          String geoServerWmsUrl)
                                   throws Exception
Parameters:
featureTypeRest -
category -
geoServerWmsUrl -
Returns:
Throws:
Exception

insertMetadataByCswTransaction

public String insertMetadataByCswTransaction(String fileIdentifier,
                                             String workspace,
                                             String layerTitle,
                                             String layerName,
                                             String description,
                                             String geoServerWmsUrl)
                                      throws Exception
Parameters:
fileIdentifier - - (mandatory) string or null
layerTitle - - (mandatory) string
description - - string
geoServerWmsUrl - - (mandatory) string
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

getLayersFromCsw

public CswLayersResult getLayersFromCsw(String referredWorkspace,
                                        int startPosition,
                                        int maxRecords,
                                        boolean sortByTitle,
                                        boolean sortAscendent,
                                        GeoCaller.FILTER_TYPE filter,
                                        String textToSearch)
Parameters:
referredWorkspace -
startPosition -
maxRecords -
sortByTiyle -
sortAscendent -
filter -
textToSearch -
Returns:

getLayersUrlInformation

public String getLayersUrlInformation(GeoCaller.FILTER_TYPE filter,
                                      String textToSearch)

getLayersInformation

public LayerCsw getLayersInformation(GeoCaller.FILTER_TYPE filter,
                                     String textToSearch)


Copyright © 2012. All Rights Reserved.