it.geosolutions.geonetwork
Class GNClient

java.lang.Object
  extended by it.geosolutions.geonetwork.GNClient

public class GNClient
extends Object

Facade for the various GN operations

Author:
ETj (etj at geo-solutions.it)

Constructor Summary
GNClient(String serviceURL)
           
 
Method Summary
 void deleteMetadata(long id)
           
 Element get(Long id)
           
 Element get(String uuid)
           
protected  HTTPUtils getConnection()
           
 long insertMetadata(GNInsertConfiguration cfg, File metadataFile)
          Facade for GNMetadataInsert.insertMetadata(HTTPUtils, String, File, GNInsertConfiguration)
 long insertRequest(File requestFile)
          Facade for GNMetadataInsert.insertRequest((HTTPUtils connection, String gnServiceURL, File inputFile))
 boolean login(String username, String password)
          Facade for GNLogin.login(it.geosolutions.geonetwork.util.HTTPUtils, java.lang.String, java.lang.String, java.lang.String)
 GNSearchResponse search(File fileRequest)
           
 GNSearchResponse search(GNSearchRequest searchRequest)
           
 void setPrivileges(long metadataId, GNPrivConfiguration cfg)
          Facade for GNMetadataAdmin.setPriv(it.geosolutions.geonetwork.util.HTTPUtils, java.lang.String, long, it.geosolutions.geonetwork.util.GNPrivConfiguration)
 void updateMetadata(long id, File metadataFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GNClient

public GNClient(String serviceURL)
Method Detail

login

public boolean login(String username,
                     String password)
Facade for GNLogin.login(it.geosolutions.geonetwork.util.HTTPUtils, java.lang.String, java.lang.String, java.lang.String)


insertMetadata

public long insertMetadata(GNInsertConfiguration cfg,
                           File metadataFile)
                    throws GNLibException,
                           GNServerException
Facade for GNMetadataInsert.insertMetadata(HTTPUtils, String, File, GNInsertConfiguration)

Throws:
GNLibException
GNServerException

insertRequest

public long insertRequest(File requestFile)
                   throws GNLibException,
                          GNServerException
Facade for GNMetadataInsert.insertRequest((HTTPUtils connection, String gnServiceURL, File inputFile))

Throws:
GNLibException
GNServerException

setPrivileges

public void setPrivileges(long metadataId,
                          GNPrivConfiguration cfg)
                   throws GNLibException,
                          GNServerException
Facade for GNMetadataAdmin.setPriv(it.geosolutions.geonetwork.util.HTTPUtils, java.lang.String, long, it.geosolutions.geonetwork.util.GNPrivConfiguration)

Throws:
GNLibException
GNServerException

search

public GNSearchResponse search(GNSearchRequest searchRequest)
                        throws GNLibException,
                               GNServerException
Throws:
GNLibException
GNServerException

search

public GNSearchResponse search(File fileRequest)
                        throws GNLibException,
                               GNServerException
Throws:
GNLibException
GNServerException

get

public Element get(Long id)
            throws GNLibException,
                   GNServerException
Throws:
GNLibException
GNServerException

get

public Element get(String uuid)
            throws GNLibException,
                   GNServerException
Throws:
GNLibException
GNServerException

deleteMetadata

public void deleteMetadata(long id)
                    throws GNLibException,
                           GNServerException
Throws:
GNLibException
GNServerException

updateMetadata

public void updateMetadata(long id,
                           File metadataFile)
                    throws GNLibException,
                           GNServerException
Throws:
GNLibException
GNServerException

getConnection

protected HTTPUtils getConnection()


Copyright © 2011-2012 GeoSolutions. All Rights Reserved.