gov.nasa.pds.search.core.extractor
Class RegistryExtractor

java.lang.Object
  extended by gov.nasa.pds.search.core.extractor.RegistryExtractor
All Implemented Interfaces:
DataExtractor

public class RegistryExtractor
extends Object
implements DataExtractor

Utilizes XML configuration files to extract data from the Registry Service and create XML files for each Product containing the raw data found in the RegistryService. TODO This should be refactored a bit using a DataExtractor interface to allow for extension to other data sources (i.e. databases)

Author:
jpadams

Constructor Summary
RegistryExtractor(File confDir, List<String> primaryRegistries, List<String> secondaryRegistries)
          Constructor used when an output directory is not specified and needs to be found using the java.class.path
RegistryExtractor(File confDir, List<String> primaryRegistries, List<String> secondaryRegistries, File outputDir)
          Primary Constructor for RegistryExtractor class, including output directory and the registry to query against.
 
Method Summary
 File getConfDir()
           
 List<File> getCoreConfigs(File configDir)
          Return the List of core configuration files
 File getOutputDir()
           
 List<String> getPrimaryRegistries()
           
 int getQueryMax()
           
 List<String> getSecondaryRegistries()
           
 void run()
          Driver method for extraction of data from data source
 void setConfDir(File confDir)
           
 void setOutputDir(File outputDir)
           
 void setPrimaryRegistries(List<String> primaryRegistries)
           
 void setQueryMax(int queryMax)
           
 void setSecondaryRegistries(List<String> secondaryRegistries)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistryExtractor

public RegistryExtractor(File confDir,
                         List<String> primaryRegistries,
                         List<String> secondaryRegistries,
                         File outputDir)
                  throws SearchCoreFatalException
Primary Constructor for RegistryExtractor class, including output directory and the registry to query against.

Parameters:
outDir -
confDir -
primaryRegistries -
secondaryRegistries -
Throws:
SearchCoreFatalException

RegistryExtractor

public RegistryExtractor(File confDir,
                         List<String> primaryRegistries,
                         List<String> secondaryRegistries)
                  throws SearchCoreFatalException
Constructor used when an output directory is not specified and needs to be found using the java.class.path

Parameters:
confDir -
primaryRegistries -
secondaryRegistries -
Throws:
SearchCoreFatalException
Method Detail

run

public void run()
         throws SearchCoreException
Description copied from interface: DataExtractor
Driver method for extraction of data from data source

Specified by:
run in interface DataExtractor
Throws:
SearchCoreException
See Also:
DataExtractor.run()

getCoreConfigs

public List<File> getCoreConfigs(File configDir)
                          throws SearchCoreException
Description copied from interface: DataExtractor
Return the List of core configuration files

Specified by:
getCoreConfigs in interface DataExtractor
Returns:
Throws:
SearchCoreException
See Also:
DataExtractor.getCoreConfigs(File)

getConfDir

public final File getConfDir()
Specified by:
getConfDir in interface DataExtractor
See Also:
DataExtractor.getConfDir()

setConfDir

public final void setConfDir(File confDir)
Specified by:
setConfDir in interface DataExtractor
See Also:
DataExtractor.setConfDir(File)

getQueryMax

public final int getQueryMax()
Specified by:
getQueryMax in interface DataExtractor
See Also:
DataExtractor.getQueryMax()

setQueryMax

public final void setQueryMax(int queryMax)
Specified by:
setQueryMax in interface DataExtractor
See Also:
DataExtractor.setQueryMax(int)

getPrimaryRegistries

public List<String> getPrimaryRegistries()
Returns:
the primaryRegistries

setPrimaryRegistries

public void setPrimaryRegistries(List<String> primaryRegistries)
Parameters:
primaryRegistries - the primaryRegistries to set

getSecondaryRegistries

public List<String> getSecondaryRegistries()
Returns:
the secondaryRegistries

setSecondaryRegistries

public void setSecondaryRegistries(List<String> secondaryRegistries)
Parameters:
secondaryRegistries - the backupRegistries to set

getOutputDir

public File getOutputDir()
Returns:
the outputDir

setOutputDir

public void setOutputDir(File outputDir)
Parameters:
outputDir - the outputDir to set


Copyright © 2010–2014 Planetary Data System. All rights reserved.