deegree 2.5 (2011/06/29 09:44 build-8-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:
java.lang.Runnable
Direct Known Subclasses:
CatalogueHarvester.HarvestProcessor, CSWProfileHarvester.HarvestProcessor, ServiceHarvester.HarvestProcessor
Enclosing class:
AbstractHarvester

protected abstract class AbstractHarvester.AbstractHarvestProcessor
extends java.lang.Thread

abstract super class for all harvest processores

Since:
2.0
Version:
$Revision: 21672 $, 1.0. $Revision: 21672 $, $Date: 2009-12-29 09:44:20 +0100 (Di, 29 Dez 2009) $
Author:
Andreas Poth, last edited by: $Author: apoth $

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  AbstractHarvester owner
           
protected  java.net.URI source
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
protected AbstractHarvester.AbstractHarvestProcessor(AbstractHarvester owner, java.net.URI source)
           
 
Method Summary
protected abstract  java.lang.String createConstraint(java.lang.String fileIdentifier, java.lang.String xpath)
          a constraint for delete und update operation depends on concrete metadata format.
protected  java.lang.String createDeleteRequest(java.lang.String identifier)
          creates a transaction request including a delete operation to remove the metadata record with the passed fileIdentifier from the catalogue
protected  java.lang.String createInsertRequest(XMLFragment metaData)
          creates a CSW Transaction including an Update operation for the passed meta data
protected  java.lang.String createUpdateRequest(java.lang.String identifier, java.lang.String xpath, XMLFragment metaData)
          creates a CSW Transaction including an Update operation for the passed meta data.
protected  void performTransaction(java.lang.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(java.net.URI source, java.util.Date date)
          actualizes the source in the repository with timestamp of last harvesting
protected  void writeNextHarvestingTimestamp(java.net.URI source, java.util.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, clone, 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
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

source

protected java.net.URI source

owner

protected AbstractHarvester owner
Constructor Detail

AbstractHarvester.AbstractHarvestProcessor

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

performTransaction

protected void performTransaction(java.lang.String trans)
                           throws org.xml.sax.SAXException,
                                  java.io.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:
org.xml.sax.SAXException
java.io.IOException
OGCWebServiceException

createUpdateRequest

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

Parameters:
identifier -
xpath -
metaData -
Returns:
update request
Throws:
java.io.IOException

createDeleteRequest

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

Parameters:
identifier -
Returns:
delete request
Throws:
java.io.IOException

createConstraint

protected abstract java.lang.String createConstraint(java.lang.String fileIdentifier,
                                                     java.lang.String xpath)
                                              throws java.io.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:
java.io.IOException

createInsertRequest

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

Parameters:
metaData -
Returns:
the request
Throws:
java.io.IOException

writeLastHarvestingTimestamp

protected void writeLastHarvestingTimestamp(java.net.URI source,
                                            java.util.Date date)
                                     throws java.io.IOException,
                                            DBPoolException,
                                            java.sql.SQLException
actualizes the source in the repository with timestamp of last harvesting

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

writeNextHarvestingTimestamp

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

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

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