Class SearchDocGenerator


  • public class SearchDocGenerator
    extends Object
    Class that generates the Search document files.
    Author:
    mcayanan
    • Constructor Detail

      • SearchDocGenerator

        public SearchDocGenerator​(File configDirectory,
                                  File outputDirectory)
                           throws gov.nasa.pds.search.core.exception.SearchCoreException,
                                  gov.nasa.pds.search.core.exception.SearchCoreFatalException
        Throws:
        gov.nasa.pds.search.core.exception.SearchCoreException
        gov.nasa.pds.search.core.exception.SearchCoreFatalException
    • Method Detail

      • generate

        public void generate​(ExtrinsicObject extrinsic,
                             gov.nasa.jpl.oodt.cas.metadata.Metadata metadata,
                             SearchDocState obj)
                      throws Exception
        Generate the Solr document file for the given extrinsic object.
        Parameters:
        extrinsic - Extrinsic object.
        metadata - Metadata associated with the given extrinsic object.
        obj - SearchDocState object.
        Throws:
        Exception - If an error occurred while generating the document file.
      • checkForSubstring

        protected String checkForSubstring​(gov.nasa.pds.search.core.schema.OutputString outputString,
                                           ExtendedExtrinsicObject extObject,
                                           gov.nasa.jpl.oodt.cas.metadata.Metadata metadata)
                                    throws Exception
        Extract the attribute/slot/association from the String specified and query the Registry for the value to replace it wit.
        Parameters:
        outputString - input string from config
        extObject - extrinsic object.
        metadata - metadata associated with the given extrinsic object.
        Returns:
        the string with the embedded attribute/slot/association to be queried, replaced with the value from the Registry
        Throws:
        Exception