deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.ogcwebservices.csw.manager
Class HarvestRepository

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

 class HarvestRepository
extends 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(URI source)
          drops a request from the backend
(package private)  List<String> getAllRecords(URI source)
          returns fileidentifiers of all records assigend to a source from the harvest cache
(package private)  long getHarvestInterval(URI source)
          returns the interval in
(package private) static HarvestRepository getInstance()
          returns an instance of a HarvestRepository
(package private)  Date getLastHarvestingTimestamp(URI source)
          returns the Date a source has been harvested successful the last time
(package private)  Date getNextHarvestingTimestamp(URI source)
          returns the next Date a source shall be harvested
(package private)  HarvestRepository.Record getRecordByID(URI source, String fileIdentifier)
          returns a Record from the harvesters cache.
(package private)  List<HarvestRepository.ResponseHandler> getResponseHandlers(URI source)
          returns a list
(package private)  int getSourceID(URI source)
          returns the row ID of the passed source
(package private)  List<URI> getSources()
          returns all sources registered to a harvest process
(package private)  HarvestRepository.ResourceType getSourceType(URI source)
          returns the type of the passed source
(package private)  boolean getStatus(URI source)
          returns true if last harvesting iteration for the passed source has been successful
(package private)  void setLastHarvestingTimestamp(URI source, Date date)
          sets the timestamp when a source has been harvested successfully for the last time
(package private)  void setNextHarvestingTimestamp(URI source, Date date)
          sets the next date a source shall be harvested
(package private)  boolean shallForceHarvesting(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 IOException
returns an instance of a HarvestRepository

Returns:
an instance of a HarvestRepository
Throws:
IOException

storeRequest

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

Parameters:
request -
Throws:
DBPoolException
SQLException

dropRequest

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

Parameters:
source -
Throws:
DBPoolException
SQLException

getSources

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

Returns:
all sources registered to a harvest process
Throws:
DBPoolException
SQLException
URISyntaxException

getSourceType

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

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

getStatus

boolean getStatus(URI source)
            throws DBPoolException,
                   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
SQLException

getLastHarvestingTimestamp

Date getLastHarvestingTimestamp(URI source)
                          throws DBPoolException,
                                 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
SQLException

setLastHarvestingTimestamp

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

Parameters:
source -
date -
Throws:
DBPoolException
SQLException

getNextHarvestingTimestamp

Date getNextHarvestingTimestamp(URI source)
                          throws DBPoolException,
                                 SQLException
returns the next Date a source shall be harvested

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

setNextHarvestingTimestamp

void setNextHarvestingTimestamp(URI source,
                                Date date)
                          throws DBPoolException,
                                 SQLException
sets the next date a source shall be harvested

Parameters:
source -
date -
Throws:
DBPoolException
SQLException

getHarvestInterval

long getHarvestInterval(URI source)
                  throws DBPoolException,
                         SQLException
returns the interval in

Parameters:
source -
Returns:
the interval
Throws:
DBPoolException
SQLException

getResponseHandlers

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

Parameters:
source -
Returns:
the list
Throws:
DBPoolException
SQLException
URISyntaxException

getRecordByID

HarvestRepository.Record getRecordByID(URI source,
                                       String fileIdentifier)
                                 throws DBPoolException,
                                        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
SQLException

storeRecord

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

Parameters:
record -
Throws:
DBPoolException
SQLException

updateRecord

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

Parameters:
record -
Throws:
DBPoolException
SQLException

dropRecord

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

Parameters:
record -
Throws:
DBPoolException
SQLException

getAllRecords

List<String> getAllRecords(URI source)
                     throws DBPoolException,
                            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
SQLException

getSourceID

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

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

shallForceHarvesting

boolean shallForceHarvesting(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.3 (2010/04/09 10:10 build-4-official)

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