gov.nasa.pds.citool.ingestor
Class CatalogObject

java.lang.Object
  extended by gov.nasa.pds.citool.ingestor.CatalogObject

public class CatalogObject
extends java.lang.Object

Class to parse a PDS catalog file and to call a CatalogDB class to ingest the data into DB.

Author:
hlee

Constructor Summary
CatalogObject()
           
 
Method Summary
protected  void getCatalogObj(java.util.List<gov.nasa.pds.tools.label.ObjectStatement> objList, java.util.Map<java.lang.String,gov.nasa.pds.tools.label.AttributeStatement> pdsLabelMap)
          Gets the catalog object from the LIST, sets to hash map, and calls CatalogDB object to ingest the data into the database.
 void ingest(gov.nasa.pds.tools.label.Label label)
          Method to convert top level attribute into the hashmap object and calls a method to convert the rest of the attributes (nested object statement)
protected  java.util.List<gov.nasa.pds.tools.label.ObjectStatement> object2List(gov.nasa.pds.tools.label.Label label)
          Converts a label object to List type
 gov.nasa.pds.tools.label.Label parse(java.lang.String catFilename)
          Method to parse the PDS catalog file.
 void setCatalogDB(CatalogDB catDb)
          Sets CatalogDB object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatalogObject

public CatalogObject()
Method Detail

parse

public gov.nasa.pds.tools.label.Label parse(java.lang.String catFilename)
Method to parse the PDS catalog file. This method is only used in standalone mode.

Parameters:
catFilename - Name of the catalog file
Returns:
Label object

setCatalogDB

public void setCatalogDB(CatalogDB catDb)
Sets CatalogDB object

Parameters:
catDb - A CatalogDB object

getCatalogObj

protected void getCatalogObj(java.util.List<gov.nasa.pds.tools.label.ObjectStatement> objList,
                             java.util.Map<java.lang.String,gov.nasa.pds.tools.label.AttributeStatement> pdsLabelMap)
Gets the catalog object from the LIST, sets to hash map, and calls CatalogDB object to ingest the data into the database.

Parameters:
objList - List of the catalog object statement(s)
pdsLabelMap - Hashmap of the PDS label keyword and value for all ATTRIBUTE

object2List

protected java.util.List<gov.nasa.pds.tools.label.ObjectStatement> object2List(gov.nasa.pds.tools.label.Label label)
Converts a label object to List type

Parameters:
label - Label object

ingest

public void ingest(gov.nasa.pds.tools.label.Label label)
Method to convert top level attribute into the hashmap object and calls a method to convert the rest of the attributes (nested object statement)



Copyright © 2005-2010 Planetary Data System. All Rights Reserved.