de.pangaea.metadataportal.harvester
Class Rebuilder
java.lang.Object
de.pangaea.metadataportal.harvester.Harvester
de.pangaea.metadataportal.harvester.Rebuilder
public class Rebuilder
- extends Harvester
Index rebuilder implemented as harvester that reads all documents from an index and pushes them back into the index.
Only the XML blobs and control fields are read, all other info is rebuild like in the normal harvester.
This helps during restructuring the index fields. This can be done without re-harvesting from the original metadata providers.
This class is called from command line or using Harvester.runHarvester(de.pangaea.metadataportal.config.Config, java.lang.String) with this class as harvester class parameter.
- Author:
- Uwe Schindler
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Rebuilder
public Rebuilder()
main
public static void main(String[] args)
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 Harvester
- 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 Harvester
- 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.
createMetadataDocumentInstance
protected MetadataDocument createMetadataDocumentInstance()
- Description copied from class:
Harvester
- Creates an instance of MetadataDocument and initializes it with the index config.
This method should be overwritten, if a harvester uses another class.
- Overrides:
createMetadataDocumentInstance in class Harvester
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.
Copyright ©2007-2009 panFMP Developers c/o Uwe Schindler