deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.ogcwebservices.csw.manager
Class HarvestRepository

java.lang.Object
  extended by org.deegree.ogcwebservices.csw.manager.HarvestRepository

 class HarvestRepository
extends java.lang.Object

A harvest repository is a database that stores harvest requests and that caches basic record informations to optimizes harvesting of large sources (e.g. other catalogues). This class encapsulates access to this database.

Version:
$Revision: 19482 $, $Revision: 19482 $, $Date: 2009-09-03 10:06:22 +0200 (Do, 03 Sep 2009) $
Author:
Andreas Poth, last edited by: $Author: lbuesching $

Nested Class Summary
 class HarvestRepository.Record
           
(package private) static class HarvestRepository.ResourceType
           
(package private)  class HarvestRepository.ResponseHandler
          inner class for encapsulating response handler informations
 
Method Summary
(package private)  void dropRecord(HarvestRepository.Record record)
          drops a record from the cache table used by the harvester
(package private)  void dropRequest(java.net.URI source)
          drops a request from the backend
(package private)  java.util.List<java.lang.String> getAllRecords(java.net.URI source)
          returns fileidentifiers of all records assigend to a source from the harvest cache
(package private)  long getHarvestInterval(java.net.URI source)
          returns the interval in
(package private) static HarvestRepository getInstance()
          returns an instance of a HarvestRepository
(package private)  java.util.Date getLastHarvestingTimestamp(java.net.URI source)
          returns the Date a source has been harvested successful the last time
(package private)  java.util.Date getNextHarvestingTimestamp(java.net.URI source)
          returns the next Date a source shall be harvested
(package private)  HarvestRepository.Record getRecordByID(java.net.URI source, java.lang.String fileIdentifier)
          returns a Record from the harvesters cache.
(package private)  java.util.List<HarvestRepository.ResponseHandler> getResponseHandlers(java.net.URI source)
          returns a list
(package private)  int getSourceID(java.net.URI source)
          returns the row ID of the passed source
(package private)  java.util.List<java.net.URI> getSources()
          returns all sources registered to a harvest process
(package private)  HarvestRepository.ResourceType getSourceType(java.net.URI source)
          returns the type of the passed source
(package private)  boolean getStatus(java.net.URI source)
          returns true if last harvesting iteration for the passed source has been successful
(package private)  void setLastHarvestingTimestamp(java.net.URI source, java.util.Date date)
          sets the timestamp when a source has been harvested successfully for the last time
(package private)  void setNextHarvestingTimestamp(java.net.URI source, java.util.Date date)
          sets the next date a source shall be harvested
(package private)  boolean shallForceHarvesting(java.net.URI source)
          returs true is a harvesting shall be forced outside the regular harvesting interval
(package private)  void storeRecord(HarvestRepository.Record record)
          stores a record into the cache table used by the harvester
(package private)  void storeRequest(Harvest request)
          stores a harvest request
(package private)  void updateRecord(HarvestRepository.Record record)
          updates a record within the cache table used by the harvester
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

static HarvestRepository getInstance()
                              throws java.io.IOException
returns an instance of a HarvestRepository

Returns:
an instance of a HarvestRepository
Throws:
java.io.IOException

storeRequest

void storeRequest(Harvest request)
            throws DBPoolException,
                   java.sql.SQLException
stores a harvest request

Parameters:
request -
Throws:
DBPoolException
java.sql.SQLException

dropRequest

void dropRequest(java.net.URI source)
           throws DBPoolException,
                  java.sql.SQLException
drops a request from the backend

Parameters:
source -
Throws:
DBPoolException
java.sql.SQLException

getSources

java.util.List<java.net.URI> getSources()
                                  throws DBPoolException,
                                         java.sql.SQLException,
                                         java.net.URISyntaxException
returns all sources registered to a harvest process

Returns:
all sources registered to a harvest process
Throws:
DBPoolException
java.sql.SQLException
java.net.URISyntaxException

getSourceType

HarvestRepository.ResourceType getSourceType(java.net.URI source)
                                       throws DBPoolException,
                                              java.sql.SQLException
returns the type of the passed source

Parameters:
source -
Returns:
the type of the passed source
Throws:
DBPoolException
java.sql.SQLException

getStatus

boolean getStatus(java.net.URI source)
            throws DBPoolException,
                   java.sql.SQLException
returns true if last harvesting iteration for the passed source has been successful

Parameters:
source -
Returns:
true if last harvesting iteration for the passed source has been successful
Throws:
DBPoolException
java.sql.SQLException

getLastHarvestingTimestamp

java.util.Date getLastHarvestingTimestamp(java.net.URI source)
                                    throws DBPoolException,
                                           java.sql.SQLException
returns the Date a source has been harvested successful the last time

Parameters:
source -
Returns:
the Date a source has been harvested successful the last time
Throws:
DBPoolException
java.sql.SQLException

setLastHarvestingTimestamp

void setLastHarvestingTimestamp(java.net.URI source,
                                java.util.Date date)
                          throws DBPoolException,
                                 java.sql.SQLException
sets the timestamp when a source has been harvested successfully for the last time

Parameters:
source -
date -
Throws:
DBPoolException
java.sql.SQLException

getNextHarvestingTimestamp

java.util.Date getNextHarvestingTimestamp(java.net.URI source)
                                    throws DBPoolException,
                                           java.sql.SQLException
returns the next Date a source shall be harvested

Parameters:
source -
Returns:
the next Date a source shall be harvested
Throws:
DBPoolException
java.sql.SQLException

setNextHarvestingTimestamp

void setNextHarvestingTimestamp(java.net.URI source,
                                java.util.Date date)
                          throws DBPoolException,
                                 java.sql.SQLException
sets the next date a source shall be harvested

Parameters:
source -
date -
Throws:
DBPoolException
java.sql.SQLException

getHarvestInterval

long getHarvestInterval(java.net.URI source)
                  throws DBPoolException,
                         java.sql.SQLException
returns the interval in

Parameters:
source -
Returns:
the interval
Throws:
DBPoolException
java.sql.SQLException

getResponseHandlers

java.util.List<HarvestRepository.ResponseHandler> getResponseHandlers(java.net.URI source)
                                                                throws DBPoolException,
                                                                       java.sql.SQLException,
                                                                       java.net.URISyntaxException
returns a list

Parameters:
source -
Returns:
the list
Throws:
DBPoolException
java.sql.SQLException
java.net.URISyntaxException

getRecordByID

HarvestRepository.Record getRecordByID(java.net.URI source,
                                       java.lang.String fileIdentifier)
                                 throws DBPoolException,
                                        java.sql.SQLException
returns a Record from the harvesters cache. A instance of a Record includes its fileIdentifier,the datestamp when it has been changed for the last time and the source it belongs too.

Parameters:
source -
fileIdentifier -
Returns:
a Record from the harvesters cache
Throws:
DBPoolException
java.sql.SQLException

storeRecord

void storeRecord(HarvestRepository.Record record)
           throws DBPoolException,
                  java.sql.SQLException
stores a record into the cache table used by the harvester

Parameters:
record -
Throws:
DBPoolException
java.sql.SQLException

updateRecord

void updateRecord(HarvestRepository.Record record)
            throws DBPoolException,
                   java.sql.SQLException
updates a record within the cache table used by the harvester

Parameters:
record -
Throws:
DBPoolException
java.sql.SQLException

dropRecord

void dropRecord(HarvestRepository.Record record)
          throws DBPoolException,
                 java.sql.SQLException
drops a record from the cache table used by the harvester

Parameters:
record -
Throws:
DBPoolException
java.sql.SQLException

getAllRecords

java.util.List<java.lang.String> getAllRecords(java.net.URI source)
                                         throws DBPoolException,
                                                java.sql.SQLException
returns fileidentifiers of all records assigend to a source from the harvest cache

Parameters:
source -
Returns:
fileidentifiers of all records assigend to a source from the harvest cache
Throws:
DBPoolException
java.sql.SQLException

getSourceID

int getSourceID(java.net.URI source)
          throws DBPoolException,
                 java.sql.SQLException
returns the row ID of the passed source

Parameters:
source -
Returns:
the row ID of the passed source
Throws:
DBPoolException
java.sql.SQLException

shallForceHarvesting

boolean shallForceHarvesting(java.net.URI source)
                       throws DBPoolException
returs true is a harvesting shall be forced outside the regular harvesting interval

Parameters:
source -
Returns:
true if a CSW shall be harvested outside the regular harvesting interval
Throws:
DBPoolException

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org