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

org.deegree.ogcwebservices.csw.manager
Class AbstractHarvester.AbstractHarvestProcessor

java.lang.Object
  extended by java.lang.Thread
      extended by org.deegree.ogcwebservices.csw.manager.AbstractHarvester.AbstractHarvestProcessor
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
CatalogueHarvester.HarvestProcessor, CSWProfileHarvester.HarvestProcessor, ServiceHarvester.HarvestProcessor
Enclosing class:
AbstractHarvester

protected abstract class AbstractHarvester.AbstractHarvestProcessor
extends Thread

abstract super class for all harvest processores

Since:
2.0
Version:
$Revision: 19475 $, 1.0. $Revision: 19475 $, $Date: 2009-09-02 14:51:48 +0200 (Mi, 02. Sep 2009) $
Author:
Andreas Poth, last edited by: $Author: lbuesching $

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  AbstractHarvester owner
           
protected  URI source
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
protected AbstractHarvester.AbstractHarvestProcessor(AbstractHarvester owner, URI source)
           
 
Method Summary
protected abstract  String createConstraint(String fileIdentifier, String xpath)
          a constraint for delete und update operation depends on concrete metadata format.
protected  String createDeleteRequest(String identifier)
          creates a transaction request including a delete operation to remove the metadata record with the passed fileIdentifier from the catalogue
protected  String createInsertRequest(XMLFragment metaData)
          creates a CSW Transaction including an Update operation for the passed meta data
protected  String createUpdateRequest(String identifier, String xpath, XMLFragment metaData)
          creates a CSW Transaction including an Update operation for the passed meta data.
protected  void performTransaction(String trans)
          performs a transaction for inserting or updating a service meta data record in the catalogue a harvester instance belongs too
protected  void writeLastHarvestingTimestamp(URI source, Date date)
          actualizes the source in the repository with timestamp of last harvesting
protected  void writeNextHarvestingTimestamp(URI source, Date date)
          actualizes the source in the repository with timestamp when next harvesting shall be performed
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

source

protected URI source

owner

protected AbstractHarvester owner
Constructor Detail

AbstractHarvester.AbstractHarvestProcessor

protected AbstractHarvester.AbstractHarvestProcessor(AbstractHarvester owner,
                                                     URI source)
Method Detail

performTransaction

protected void performTransaction(String trans)
                           throws SAXException,
                                  IOException,
                                  OGCWebServiceException
performs a transaction for inserting or updating a service meta data record in the catalogue a harvester instance belongs too

Parameters:
trans -
Throws:
SAXException
IOException
OGCWebServiceException

createUpdateRequest

protected String createUpdateRequest(String identifier,
                                     String xpath,
                                     XMLFragment metaData)
                              throws IOException
creates a CSW Transaction including an Update operation for the passed meta data.

Parameters:
identifier -
xpath -
metaData -
Returns:
update request
Throws:
IOException

createDeleteRequest

protected String createDeleteRequest(String identifier)
                              throws IOException
creates a transaction request including a delete operation to remove the metadata record with the passed fileIdentifier from the catalogue

Parameters:
identifier -
xpath -
Returns:
delete request
Throws:
IOException

createConstraint

protected abstract String createConstraint(String fileIdentifier,
                                           String xpath)
                                    throws IOException
a constraint for delete und update operation depends on concrete metadata format. An implementing class must consider this.

Parameters:
fileIdentifier - value to be compared
xpath - comparable property
Returns:
the constraint
Throws:
IOException

createInsertRequest

protected String createInsertRequest(XMLFragment metaData)
                              throws IOException
creates a CSW Transaction including an Update operation for the passed meta data

Parameters:
metaData -
Returns:
the request
Throws:
IOException

writeLastHarvestingTimestamp

protected void writeLastHarvestingTimestamp(URI source,
                                            Date date)
                                     throws IOException,
                                            DBPoolException,
                                            SQLException
actualizes the source in the repository with timestamp of last harvesting

Parameters:
source -
date -
Throws:
SQLException
DBPoolException
IOException

writeNextHarvestingTimestamp

protected void writeNextHarvestingTimestamp(URI source,
                                            Date date)
                                     throws IOException,
                                            DBPoolException,
                                            SQLException
actualizes the source in the repository with timestamp when next harvesting shall be performed

Parameters:
source -
date -
Throws:
SQLException
DBPoolException
IOException

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