Package org.dlese.dpc.dds.ndr
Class NDRIndexer
java.lang.Object
org.dlese.dpc.dds.ndr.NDRIndexer
- All Implemented Interfaces:
EventListener,ItemIndexer
Indexes and configures collections from the NSDL Data Repository (NDR).
- Author:
- John Weatherley
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturn a string for the current time and date, sutiable for display in log files and output to standout:voidindexCollections(String collectionKey) Index a collection or all collections.voidindexingActionRequested(IndexingEvent indexingEvent) Perform indexing when requestedvoidindexItemRecords(MetadataProviderReader mdp, String collectionKey, String format) Gets the itemRecords for a given collection starting from the MetadataProvider.voidsetConfigDirectory(File configDir) Sets the configDirectory attribute of the NDRIndexer objectfinal voidsetDebug(boolean db) Sets the debug attribute of the NDRIndexer objectvoidUpdate the collections that are configured in DDS.
-
Constructor Details
-
NDRIndexer
public NDRIndexer()Constructor for the NDRIndexer object
-
-
Method Details
-
setConfigDirectory
Sets the configDirectory attribute of the NDRIndexer object- Specified by:
setConfigDirectoryin interfaceItemIndexer- Parameters:
configDir- The new configDirectory value- Throws:
Exception- If error
-
indexingActionRequested
Perform indexing when requested- Specified by:
indexingActionRequestedin interfaceItemIndexer- Parameters:
indexingEvent- The event fired- Throws:
Exception- If error
-
indexCollections
Index a collection or all collections.- Parameters:
collectionKey- The collection key/id, or null for all- Throws:
Exception- If error
-
updateCollections
Update the collections that are configured in DDS.- Throws:
Exception- If error
-
indexItemRecords
Gets the itemRecords for a given collection starting from the MetadataProvider.- Parameters:
mdp- MetadataProviderReadercollectionKey- The collection keyformat- The format to index for this collection, "canonical_nsdl_dc" for canonical
-
getDateStamp
Return a string for the current time and date, sutiable for display in log files and output to standout:- Returns:
- The dateStamp value
-
setDebug
public final void setDebug(boolean db) Sets the debug attribute of the NDRIndexer object- Parameters:
db- The new debug value
-