de.pangaea.metadataportal.harvester
Class ExternalIndexHarvester
java.lang.Object
de.pangaea.metadataportal.harvester.Harvester
de.pangaea.metadataportal.harvester.SingleFileEntitiesHarvester
de.pangaea.metadataportal.harvester.ExternalIndexHarvester
public class ExternalIndexHarvester
- extends SingleFileEntitiesHarvester
This harvester supports replication XML contents from an foreign panFMP installation.
It is possible to replicate indexes with a different XML schema (by applying a transformation on
the harvested XML content) or replicate only sub-sets of other indexes, based on a query string.
This harvester supports the following additional harvester properties:
indexDir: file system directory with foreign index
query: query that matches all documents to harvest (default: all documents)
analyzerClass: class name of Analyzer to use for the above query string (default is the one from panFMP's global config;
stop words are always taken from the global config, for simplicity you should not use any of them in your query string)
queryParserClass: class name of QueryParser to use for the above query string (default: "org.apache.lucene.queryParser.QueryParser")
defaultQueryParserOperator: default operator when parsing above query string (AND/OR) (default: "AND")
identifierPrefix: This prefix is added in front of all identifiers from the foreign index (default: "")
indexVersionCompatibility: The Version constant passed to the analyzer and query parser of the foreign
index (default is the one from panFMP's global config)
- Author:
- Uwe Schindler
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExternalIndexHarvester
public ExternalIndexHarvester()
open
public void open(SingleIndexConfig iconfig)
throws Exception
- Description copied from class:
Harvester
- Opens harvester for harvesting documents into the index described by the given
SingleIndexConfig.
Opens Harvester.index for usage in Harvester.harvest() method.
- Overrides:
open in class SingleFileEntitiesHarvester
- Throws:
Exception - if an exception occurs during opening (various types of exceptions can be thrown).
close
public void close(boolean cleanShutdown)
throws Exception
- Description copied from class:
Harvester
- Closes harvester. All ressources are freed and the
Harvester.index is closed.
- Overrides:
close in class SingleFileEntitiesHarvester
- Parameters:
cleanShutdown - enables writing of status information to the index for the next harvesting. If an error occured during harvesting this should not be done.
- Throws:
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.
harvest
public void harvest()
throws Exception
- Description copied from class:
Harvester
- This method is called by the harvester after
Harvester.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).
- Specified by:
harvest in class Harvester
- Throws:
Exception - of any type.
enumerateValidHarvesterPropertyNames
protected void enumerateValidHarvesterPropertyNames(Set<String> props)
- Description copied from class:
Harvester
- This method is used by subclasses to enumerate all available harvester properties that are implemented by them.
Overwrite this method in your own implementation and append all harvester names to the supplied
Set.
The public API for client code requesting property names is Harvester.getValidHarvesterPropertyNames().
- Overrides:
enumerateValidHarvesterPropertyNames in class SingleFileEntitiesHarvester
- See Also:
Harvester.getValidHarvesterPropertyNames()
Copyright ©2007-2011 panFMP Developers c/o Uwe Schindler