Class NDRIndexer

java.lang.Object
org.dlese.dpc.dds.ndr.NDRIndexer
All Implemented Interfaces:
EventListener, ItemIndexer

public class NDRIndexer extends Object implements ItemIndexer
Indexes and configures collections from the NSDL Data Repository (NDR).
Author:
John Weatherley
  • Constructor Details

    • NDRIndexer

      public NDRIndexer()
      Constructor for the NDRIndexer object
  • Method Details

    • setConfigDirectory

      public void setConfigDirectory(File configDir) throws Exception
      Sets the configDirectory attribute of the NDRIndexer object
      Specified by:
      setConfigDirectory in interface ItemIndexer
      Parameters:
      configDir - The new configDirectory value
      Throws:
      Exception - If error
    • indexingActionRequested

      public void indexingActionRequested(IndexingEvent indexingEvent) throws Exception
      Perform indexing when requested
      Specified by:
      indexingActionRequested in interface ItemIndexer
      Parameters:
      indexingEvent - The event fired
      Throws:
      Exception - If error
    • indexCollections

      public void indexCollections(String collectionKey) throws Exception
      Index a collection or all collections.
      Parameters:
      collectionKey - The collection key/id, or null for all
      Throws:
      Exception - If error
    • updateCollections

      public void updateCollections() throws Exception
      Update the collections that are configured in DDS.
      Throws:
      Exception - If error
    • indexItemRecords

      public void indexItemRecords(MetadataProviderReader mdp, String collectionKey, String format)
      Gets the itemRecords for a given collection starting from the MetadataProvider.
      Parameters:
      mdp - MetadataProviderReader
      collectionKey - The collection key
      format - The format to index for this collection, "canonical_nsdl_dc" for canonical
    • getDateStamp

      public static String 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