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 intfailCountstatic intnewStdValueCountstatic intokCount
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Method to close the database connectionprotected Stringcollapse(String source)Method to remove extra spaces from the string specified by the string attributes.protected intdeleteRecords(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 intgetRowCount(String query)Method to get the row count from the databaseprotected voidingestDataSetColObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest DATA_SET_COLLECTION objectprotected voidingestDataSetObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)Method to ingest DATA_SET objectprotected voidingestDDCol(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'ddcol' tableprotected voidingestDDColD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'ddcold' tableprotected voidingestDDFormRule(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'ddformrule' tableprotected voidingestDDGenClass(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'ddgenclass' tableprotected voidingestDDObjAlias(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'ddobjhier' tableprotected voidingestDDObjD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'ddobjd' tableprotected voidingestDDObjects(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'ddobjects' tableprotected voidingestDDObjElm(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'ddobjelm' tableprotected voidingestDDObjHier(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'ddobjhier' tableprotected voidingestDDObjStsNote(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'ddobjstsnote' tableprotected voidingestDDStdValD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'ddstdvald' tableprotected voidingestDDSysClass(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'ddsysclass' tableprotected voidingestDSCollAssocDSObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'dscollds' tableprotected voidingestDSCollD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'dscolld' tableprotected voidingestDSCollDoc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'dscolldoc' tableprotected voidingestDSCollInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'dscollinfo' tableprotected voidingestDSCollUsgd(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'dscollusgd' tableprotected voidingestDSConf(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)Method to ingest the data into 'dsconf' tableprotected voidingestDSD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)Method to ingest the data into 'dsd' tableprotected voidingestDSHost(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'dshost' tableprotected voidingestDSInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'dsinfo' tableprotected voidingestDSMsn(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)Method to ingest the data into 'dsmsn' tableprotected voidingestDSRefInfoObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'dsdoc' tableprotected voidingestDSReleaseObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest DATA_SET_RELEASE objectprotected voidingestDSTarg(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)Method to ingest the data into 'dstarg' tableprotected voidingestElemDefObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest ELEMENT_DEFINITION objectprotected voidingestHostD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'hostd' tableprotected voidingestHostInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'hostinfo' tableprotected voidingestInstD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'instd' tableprotected voidingestInstHostObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest INSTRUMENT_HOST objectprotected voidingestInstHostRefInfoObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'hostdoc' tableprotected voidingestInstInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'instinfo' tableprotected voidingestInstObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest INSTRUMENT objectprotected voidingestInstRefInfoObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'instdoc' tablevoidingestInventoryObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest INVENTORY objectprotected voidingestInvNodeMedia(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'invnodemedia' tableprotected voidingestInvSpcOrdNt(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'invspcordnt' tableprotected voidingestMissionObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest MISSION objectprotected voidingestMsnD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'msnd' tableprotected voidingestMsnDoc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'msndoc' tableprotected voidingestMsnHost(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'msnhost' tableprotected voidingestMsnInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'msninfo' tableprotected voidingestMsnObjsmy(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'msnobjsmy' tableprotected voidingestNewStdValues(Map<String,String> stdValues)Method to ingest new standard values into the ddcolstdval table.protected voidingestNssdcdsidObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest NSSDCDSID objectprotected voidingestObjDefObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest OBJECT_DEFINTION objectprotected voidingestPersElecmail(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'perselecmail' tableprotected voidingestPersInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'persinfo' tableprotected voidingestPersMailAddr(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'persmailaddr' tableprotected voidingestPersonnelObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest PERSONNEL objectvoidingestReferenceObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'refd' tableprotected voidingestResDS(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'resds' tableprotected voidingestResInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'resinfo' tableprotected voidingestResourceObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest DATA_SET_HOUSEKEEPING & RESOURCE objectscccprotected voidingestSoftwareObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest SOFTWARE objectvoidingestSoftwareOnlineObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'swonline' tableprotected voidingestStdValObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'ddcolstdval' tableprotected voidingestSWD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'swd' tableprotected voidingestSWInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'swinfo' tableprotected voidingestSWPur(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'swpur' tableprotected voidingestTargetD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'targetd' tableprotected voidingestTargetDoc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'targetdoc' tableprotected voidingestTargetInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'targetinfo' tablevoidingestTargetObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest TARGET objectprotected voidingestVolDesc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'voldesc' tableprotected voidingestVolDS(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'volds' tableprotected voidingestVolInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'volinfo' tableprotected voidingestVolOnline(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'volonline' tableprotected voidingestVolSerInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'volserinfo' tableprotected voidingestVolSerSet(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'volserset' tableprotected voidingestVolSetInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest the data into 'volsetinfo' tablevoidingestVolumeObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)Method to ingest VOLUME objectbooleanisConnected()booleanisFailed()protected Stringitrim(String source)Replace multiple whitespaces between words with single blankprotected Stringltrim(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 voidmain(String[] args)Main methodprotected Stringrtrim(String source)Trim the string of any spaces on the right end (ie., trailing spaces removed)voidsetIsFailed(boolean failed)voidsetLabel(gov.nasa.pds.tools.label.Label label)voidsetReport(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:
SQLExceptionException
-
-
Method Detail
-
setReport
public void setReport(IngestReport report)
-
setLabel
public void setLabel(gov.nasa.pds.tools.label.Label label)
-
close
public void close() throws SQLExceptionMethod 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
-
-