Package gov.nasa.pds.harvest.search.doc
Class SearchDocGenerator
- java.lang.Object
-
- gov.nasa.pds.harvest.search.doc.SearchDocGenerator
-
public class SearchDocGenerator extends Object
Class that generates the Search document files.- Author:
- mcayanan
-
-
Constructor Summary
Constructors Constructor Description SearchDocGenerator(File configDirectory, File outputDirectory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
checkForSubstring(gov.nasa.pds.search.core.schema.OutputString outputString, ExtendedExtrinsicObject extObject, gov.nasa.jpl.oodt.cas.metadata.Metadata metadata)
Extract the attribute/slot/association from the String specified and query the Registry for the value to replace it wit.void
generate(ExtrinsicObject extrinsic, gov.nasa.jpl.oodt.cas.metadata.Metadata metadata, SearchDocState obj)
Generate the Solr document file for the given extrinsic object.
-
-
-
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 configextObject
- 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
-
-