Package gov.nasa.pds.citool.ingestor
Class CatalogDB
- java.lang.Object
-
- gov.nasa.pds.citool.ingestor.CatalogDB
-
public class CatalogDB extends Object
Class to insert the specific catalog data into the corresponding table(s).- Author:
- hyunlee
-
-
Field Summary
Fields Modifier and Type Field Description static int
failCount
static int
newStdValueCount
static int
okCount
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Method to close the database connectionprotected String
collapse(String source)
Method to remove extra spaces from the string specified by the string attributes.protected int
deleteRecords(String query)
Method to delete records in the databaseMap<String,String>
getIngestedStdValues()
Returns a map of standard values found from the most recent ingestion run.protected int
getRowCount(String query)
Method to get the row count from the databaseprotected void
ingestDataSetColObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest DATA_SET_COLLECTION objectprotected void
ingestDataSetObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
Method to ingest DATA_SET objectprotected void
ingestDDCol(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddcol' tableprotected void
ingestDDColD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddcold' tableprotected void
ingestDDFormRule(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddformrule' tableprotected void
ingestDDGenClass(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddgenclass' tableprotected void
ingestDDObjAlias(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddobjhier' tableprotected void
ingestDDObjD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddobjd' tableprotected void
ingestDDObjects(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddobjects' tableprotected void
ingestDDObjElm(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddobjelm' tableprotected void
ingestDDObjHier(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddobjhier' tableprotected void
ingestDDObjStsNote(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddobjstsnote' tableprotected void
ingestDDStdValD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddstdvald' tableprotected void
ingestDDSysClass(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddsysclass' tableprotected void
ingestDSCollAssocDSObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dscollds' tableprotected void
ingestDSCollD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dscolld' tableprotected void
ingestDSCollDoc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dscolldoc' tableprotected void
ingestDSCollInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dscollinfo' tableprotected void
ingestDSCollUsgd(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dscollusgd' tableprotected void
ingestDSConf(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
Method to ingest the data into 'dsconf' tableprotected void
ingestDSD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
Method to ingest the data into 'dsd' tableprotected void
ingestDSHost(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dshost' tableprotected void
ingestDSInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dsinfo' tableprotected void
ingestDSMsn(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
Method to ingest the data into 'dsmsn' tableprotected void
ingestDSRefInfoObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dsdoc' tableprotected void
ingestDSReleaseObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest DATA_SET_RELEASE objectprotected void
ingestDSTarg(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
Method to ingest the data into 'dstarg' tableprotected void
ingestElemDefObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest ELEMENT_DEFINITION objectprotected void
ingestHostD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'hostd' tableprotected void
ingestHostInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'hostinfo' tableprotected void
ingestInstD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'instd' tableprotected void
ingestInstHostObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest INSTRUMENT_HOST objectprotected void
ingestInstHostRefInfoObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'hostdoc' tableprotected void
ingestInstInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'instinfo' tableprotected void
ingestInstObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest INSTRUMENT objectprotected void
ingestInstRefInfoObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'instdoc' tablevoid
ingestInventoryObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest INVENTORY objectprotected void
ingestInvNodeMedia(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'invnodemedia' tableprotected void
ingestInvSpcOrdNt(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'invspcordnt' tableprotected void
ingestMissionObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest MISSION objectprotected void
ingestMsnD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'msnd' tableprotected void
ingestMsnDoc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'msndoc' tableprotected void
ingestMsnHost(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'msnhost' tableprotected void
ingestMsnInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'msninfo' tableprotected void
ingestMsnObjsmy(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'msnobjsmy' tableprotected void
ingestNewStdValues(Map<String,String> stdValues)
Method to ingest new standard values into the ddcolstdval table.protected void
ingestNssdcdsidObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest NSSDCDSID objectprotected void
ingestObjDefObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest OBJECT_DEFINTION objectprotected void
ingestPersElecmail(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'perselecmail' tableprotected void
ingestPersInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'persinfo' tableprotected void
ingestPersMailAddr(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'persmailaddr' tableprotected void
ingestPersonnelObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest PERSONNEL objectvoid
ingestReferenceObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'refd' tableprotected void
ingestResDS(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'resds' tableprotected void
ingestResInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'resinfo' tableprotected void
ingestResourceObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest DATA_SET_HOUSEKEEPING & RESOURCE objectscccprotected void
ingestSoftwareObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest SOFTWARE objectvoid
ingestSoftwareOnlineObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'swonline' tableprotected void
ingestStdValObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddcolstdval' tableprotected void
ingestSWD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'swd' tableprotected void
ingestSWInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'swinfo' tableprotected void
ingestSWPur(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'swpur' tableprotected void
ingestTargetD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'targetd' tableprotected void
ingestTargetDoc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'targetdoc' tableprotected void
ingestTargetInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'targetinfo' tablevoid
ingestTargetObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest TARGET objectprotected void
ingestVolDesc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'voldesc' tableprotected void
ingestVolDS(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'volds' tableprotected void
ingestVolInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'volinfo' tableprotected void
ingestVolOnline(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'volonline' tableprotected void
ingestVolSerInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'volserinfo' tableprotected void
ingestVolSerSet(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'volserset' tableprotected void
ingestVolSetInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'volsetinfo' tablevoid
ingestVolumeObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest VOLUME objectboolean
isConnected()
boolean
isFailed()
protected String
itrim(String source)
Replace multiple whitespaces between words with single blankprotected String
ltrim(String source)
Trim the string of any spaces on the left end (ie., leading spaces removed) Remove leading spaces for each line when there is multiple lines of stringstatic void
main(String[] args)
Main methodprotected String
rtrim(String source)
Trim the string of any spaces on the right end (ie., trailing spaces removed)void
setIsFailed(boolean failed)
void
setLabel(gov.nasa.pds.tools.label.Label label)
void
setReport(IngestReport report)
-
-
-
Constructor Detail
-
CatalogDB
public CatalogDB(String user, String pass, String server, String dbname, Target target, IngestReport report) throws SQLException, Exception
Constructor- Parameters:
user
- Name of the database userpass
- Password of the database connectionserver
- Server name of the databasedbname
- Name of the database- Throws:
SQLException
Exception
-
-
Method Detail
-
setReport
public void setReport(IngestReport report)
-
setLabel
public void setLabel(gov.nasa.pds.tools.label.Label label)
-
close
public void close() throws SQLException
Method to close the database connection- Throws:
SQLException
-
isConnected
public boolean isConnected()
-
isFailed
public boolean isFailed()
-
setIsFailed
public void setIsFailed(boolean failed)
-
ingestMissionObject
protected void ingestMissionObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest MISSION object- Parameters:
lblMap
- Hashmap of the PDS label(s)
-
ingestMsnD
protected void ingestMsnD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'msnd' table- Parameters:
lblMap
- Hashmap of the PDS label(s)
-
ingestMsnObjsmy
protected void ingestMsnObjsmy(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'msnobjsmy' table
-
ingestMsnHost
protected void ingestMsnHost(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'msnhost' table
-
ingestMsnInfo
protected void ingestMsnInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'msninfo' table
-
ingestMsnDoc
protected void ingestMsnDoc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'msndoc' table
-
ingestInstHostObject
protected void ingestInstHostObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest INSTRUMENT_HOST object
-
ingestHostD
protected void ingestHostD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'hostd' table
-
ingestHostInfo
protected void ingestHostInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'hostinfo' table
-
ingestInstHostRefInfoObject
protected void ingestInstHostRefInfoObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'hostdoc' table
-
ingestInstObject
protected void ingestInstObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest INSTRUMENT object
-
ingestInstD
protected void ingestInstD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'instd' table
-
ingestInstInfo
protected void ingestInstInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'instinfo' table
-
ingestInstRefInfoObject
protected void ingestInstRefInfoObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'instdoc' table
-
ingestDataSetObject
protected void ingestDataSetObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
Method to ingest DATA_SET object
-
ingestDSMsn
protected void ingestDSMsn(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
Method to ingest the data into 'dsmsn' table
-
ingestDSD
protected void ingestDSD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
Method to ingest the data into 'dsd' table
-
ingestDSConf
protected void ingestDSConf(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
Method to ingest the data into 'dsconf' table
-
ingestDSTarg
protected void ingestDSTarg(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
Method to ingest the data into 'dstarg' table
-
ingestDSHost
protected void ingestDSHost(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dshost' table
-
ingestDSInfo
protected void ingestDSInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dsinfo' table
-
ingestDSRefInfoObject
protected void ingestDSRefInfoObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dsdoc' table
-
ingestReferenceObject
public void ingestReferenceObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'refd' table
-
ingestPersonnelObject
protected void ingestPersonnelObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest PERSONNEL object
-
ingestPersMailAddr
protected void ingestPersMailAddr(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'persmailaddr' table
-
ingestPersInfo
protected void ingestPersInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'persinfo' table
-
ingestPersElecmail
protected void ingestPersElecmail(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'perselecmail' table
-
ingestDSCollAssocDSObject
protected void ingestDSCollAssocDSObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dscollds' table
-
ingestDataSetColObject
protected void ingestDataSetColObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest DATA_SET_COLLECTION object
-
ingestDSCollUsgd
protected void ingestDSCollUsgd(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dscollusgd' table
-
ingestDSCollInfo
protected void ingestDSCollInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dscollinfo' table
-
ingestDSCollD
protected void ingestDSCollD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dscolld' table
-
ingestDSCollDoc
protected void ingestDSCollDoc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dscolldoc' table
-
ingestInventoryObject
public void ingestInventoryObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest INVENTORY object
-
ingestInvSpcOrdNt
protected void ingestInvSpcOrdNt(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'invspcordnt' table
-
ingestInvNodeMedia
protected void ingestInvNodeMedia(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'invnodemedia' table
-
ingestSoftwareObject
protected void ingestSoftwareObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest SOFTWARE object
-
ingestSWD
protected void ingestSWD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'swd' table
-
ingestSWInfo
protected void ingestSWInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'swinfo' table
-
ingestSWPur
protected void ingestSWPur(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'swpur' table
-
ingestSoftwareOnlineObject
public void ingestSoftwareOnlineObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'swonline' table
-
ingestTargetObject
public void ingestTargetObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest TARGET object
-
ingestTargetD
protected void ingestTargetD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'targetd' table
-
ingestTargetInfo
protected void ingestTargetInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'targetinfo' table
-
ingestTargetDoc
protected void ingestTargetDoc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'targetdoc' table
-
ingestVolumeObject
public void ingestVolumeObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest VOLUME object
-
ingestVolDS
protected void ingestVolDS(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'volds' table
-
ingestVolDesc
protected void ingestVolDesc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'voldesc' table
-
ingestVolInfo
protected void ingestVolInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'volinfo' table
-
ingestVolSetInfo
protected void ingestVolSetInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'volsetinfo' table
-
ingestVolSerSet
protected void ingestVolSerSet(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'volserset' table
-
ingestVolSerInfo
protected void ingestVolSerInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'volserinfo' table
-
ingestVolOnline
protected void ingestVolOnline(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'volonline' table
-
ingestNssdcdsidObject
protected void ingestNssdcdsidObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest NSSDCDSID object
-
ingestDSReleaseObject
protected void ingestDSReleaseObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest DATA_SET_RELEASE object
-
ingestResourceObject
protected void ingestResourceObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest DATA_SET_HOUSEKEEPING & RESOURCE objectsccc
-
ingestResDS
protected void ingestResDS(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'resds' table
-
ingestResInfo
protected void ingestResInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'resinfo' table
-
ingestElemDefObject
protected void ingestElemDefObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest ELEMENT_DEFINITION object
-
ingestDDCol
protected void ingestDDCol(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddcol' table
-
ingestDDColD
protected void ingestDDColD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddcold' table
-
ingestDDStdValD
protected void ingestDDStdValD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddstdvald' table
-
ingestDDFormRule
protected void ingestDDFormRule(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddformrule' table
-
ingestDDSysClass
protected void ingestDDSysClass(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddsysclass' table
-
ingestDDGenClass
protected void ingestDDGenClass(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddgenclass' table
-
ingestStdValObject
protected void ingestStdValObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddcolstdval' table
-
getIngestedStdValues
public Map<String,String> getIngestedStdValues()
Returns a map of standard values found from the most recent ingestion run.- Returns:
- A map containing standard values and its associated table/column name. Example: instinfo.instid - VG
-
ingestNewStdValues
protected void ingestNewStdValues(Map<String,String> stdValues)
Method to ingest new standard values into the ddcolstdval table. The method first checks to see if the standard value in the given map already exists in the database.- Parameters:
stdValues
- A map containing a list of standard values and its associated table/column name. Example: instinfo.instid - VG
-
ingestObjDefObject
protected void ingestObjDefObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest OBJECT_DEFINTION object
-
ingestDDObjAlias
protected void ingestDDObjAlias(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddobjhier' table
-
ingestDDObjD
protected void ingestDDObjD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddobjd' table
-
ingestDDObjects
protected void ingestDDObjects(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddobjects' table
-
ingestDDObjElm
protected void ingestDDObjElm(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddobjelm' table
-
ingestDDObjHier
protected void ingestDDObjHier(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddobjhier' table
-
ingestDDObjStsNote
protected void ingestDDObjStsNote(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddobjstsnote' table
-
collapse
protected String collapse(String source)
Method to remove extra spaces from the string specified by the string attributes. It returns the collapsed string without any additional spaces at the beginning of the string and '\r\n' characters. Example (orignal line): OBJECT = "THIS LINE IS BAD" (collapsed): OBJECT = "THIS LINE IS BAD"
-
itrim
protected String itrim(String source)
Replace multiple whitespaces between words with single blank
-
ltrim
protected String ltrim(String source)
Trim the string of any spaces on the left end (ie., leading spaces removed) Remove leading spaces for each line when there is multiple lines of string
-
rtrim
protected String rtrim(String source)
Trim the string of any spaces on the right end (ie., trailing spaces removed)
-
getRowCount
protected int getRowCount(String query)
Method to get the row count from the database- Parameters:
query
- SQL query string- Returns:
- Number of rows with given SQL query
-
deleteRecords
protected int deleteRecords(String query)
Method to delete records in the database- Parameters:
query
- SQL query sting- Returns:
- number of deleted records
-
main
public static void main(String[] args)
Main method
-
-