|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.pangaea.metadataportal.harvester.Harvester
de.pangaea.metadataportal.harvester.OAIHarvesterBase
de.pangaea.metadataportal.harvester.OAIStaticRepositoryHarvester
public class OAIStaticRepositoryHarvester
Harvester for OAI static repositories.
This harvester supports the following additional harvester properties (please look into OAIHarvesterBase for further OAI-specific properties):
url: URL of static repository
| Field Summary |
|---|
| Fields inherited from class de.pangaea.metadataportal.harvester.OAIHarvesterBase |
|---|
DEFAULT_RETRY_COUNT, DEFAULT_RETRY_TIME, DEFAULT_TIMEOUT, metadataPrefix, OAI_NS, OAI_STATICREPOSITORY_NS, retryCount, retryTime, sets, timeout |
| Fields inherited from class de.pangaea.metadataportal.harvester.Harvester |
|---|
fromDateReference, harvestCount, harvestMessageStep, iconfig, index, log |
| Constructor Summary | |
|---|---|
OAIStaticRepositoryHarvester()
|
|
| Method Summary | |
|---|---|
void |
addDocument(MetadataDocument mdoc)
Adds a document to the Harvester.index working in the background. |
void |
close(boolean cleanShutdown)
Closes harvester. |
protected void |
enumerateValidHarvesterPropertyNames(Set<String> props)
This method is used by subclasses to enumerate all available harvester properties that are implemented by them. |
void |
harvest()
This method is called by the harvester after Harvester.open(de.pangaea.metadataportal.config.SingleIndexConfig)'ing it. |
void |
open(SingleIndexConfig iconfig)
Opens harvester for harvesting documents into the index described by the given SingleIndexConfig. |
| Methods inherited from class de.pangaea.metadataportal.harvester.OAIHarvesterBase |
|---|
createMetadataDocumentInstance, doParse, getEntityResolver, getInputSource, getMetadataDocumentFactory, reset |
| Methods inherited from class de.pangaea.metadataportal.harvester.Harvester |
|---|
getValidHarvesterPropertyNames, isClosed, isDocumentOutdated, isDocumentOutdated, main, runHarvester, runHarvester, setHarvestingDateReference |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OAIStaticRepositoryHarvester()
| Method Detail |
|---|
public void open(SingleIndexConfig iconfig)
throws Exception
HarvesterSingleIndexConfig.
Opens Harvester.index for usage in Harvester.harvest() method.
open in class OAIHarvesterBaseException - if an exception occurs during opening (various types of exceptions can be thrown).
public void addDocument(MetadataDocument mdoc)
throws IndexBuilderBackgroundFailure,
InterruptedException
HarvesterHarvester.index working in the background.
addDocument in class OAIHarvesterBaseIndexBuilderBackgroundFailure - if an error occurred in background thread.
Exceptions can be thrown asynchronous and may not affect the currect document.
The real exception is thrown again in Harvester.close(boolean).
InterruptedException - if wait operation was interrupted.
public void close(boolean cleanShutdown)
throws Exception
HarvesterHarvester.index is closed.
close in class OAIHarvesterBasecleanShutdown - enables writing of status information to the index for the next harvesting. If an error occured during harvesting this should not be done.
Exception - if an exception occurs during closing (various types of exceptions can be thrown).
Exceptions can be thrown asynchronous and may not affect the currect document.
public void harvest()
throws Exception
HarvesterHarvester.open(de.pangaea.metadataportal.config.SingleIndexConfig)'ing it. Overwrite this
method in your harvester class.
This method should harvest files from somewhere, generate MetadataDocuments and add
them with Harvester.addDocument(de.pangaea.metadataportal.harvester.MetadataDocument).
harvest in class HarvesterException - of any type.protected void enumerateValidHarvesterPropertyNames(Set<String> props)
HarvesterSet.
The public API for client code requesting property names is Harvester.getValidHarvesterPropertyNames().
enumerateValidHarvesterPropertyNames in class OAIHarvesterBaseHarvester.getValidHarvesterPropertyNames()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||