|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.pds.citool.ingestor.CatalogDB
public class CatalogDB
Class to insert the specific catalog data into the corresponding table(s).
Field Summary | |
---|---|
static int |
failCount
|
static int |
newStdValueCount
|
static int |
okCount
|
Constructor Summary | |
---|---|
CatalogDB(String user,
String pass,
String server,
String dbname,
Target target,
IngestReport report)
Constructor |
Method Summary | |
---|---|
void |
close()
Method to close the database connection |
protected 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 database |
Map<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 database |
protected void |
ingestDataSetColObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest DATA_SET_COLLECTION object |
protected void |
ingestDataSetObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
Method to ingest DATA_SET object |
protected void |
ingestDDCol(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddcol' table |
protected void |
ingestDDColD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddcold' table |
protected void |
ingestDDFormRule(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddformrule' table |
protected void |
ingestDDGenClass(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddgenclass' table |
protected void |
ingestDDObjAlias(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddobjhier' table |
protected void |
ingestDDObjD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddobjd' table |
protected void |
ingestDDObjects(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddobjects' table |
protected void |
ingestDDObjElm(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddobjelm' table |
protected void |
ingestDDObjHier(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddobjhier' table |
protected void |
ingestDDObjStsNote(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddobjstsnote' table |
protected void |
ingestDDStdValD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddstdvald' table |
protected void |
ingestDDSysClass(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddsysclass' table |
protected void |
ingestDSCollAssocDSObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dscollds' table |
protected void |
ingestDSCollD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dscolld' table |
protected void |
ingestDSCollDoc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dscolldoc' table |
protected void |
ingestDSCollInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dscollinfo' table |
protected void |
ingestDSCollUsgd(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dscollusgd' table |
protected void |
ingestDSConf(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
Method to ingest the data into 'dsconf' table |
protected void |
ingestDSD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
Method to ingest the data into 'dsd' table |
protected void |
ingestDSHost(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dshost' table |
protected void |
ingestDSInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dsinfo' table |
protected void |
ingestDSMsn(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
Method to ingest the data into 'dsmsn' table |
protected void |
ingestDSRefInfoObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'dsdoc' table |
protected void |
ingestDSReleaseObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest DATA_SET_RELEASE object |
protected void |
ingestDSTarg(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
Method to ingest the data into 'dstarg' table |
protected void |
ingestElemDefObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest ELEMENT_DEFINITION object |
protected void |
ingestHostD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'hostd' table |
protected void |
ingestHostInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'hostinfo' table |
protected void |
ingestInstD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'instd' table |
protected void |
ingestInstHostObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest INSTRUMENT_HOST object |
protected void |
ingestInstHostRefInfoObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'hostdoc' table |
protected void |
ingestInstInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'instinfo' table |
protected void |
ingestInstObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest INSTRUMENT object |
protected void |
ingestInstRefInfoObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'instdoc' table |
void |
ingestInventoryObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest INVENTORY object |
protected void |
ingestInvNodeMedia(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'invnodemedia' table |
protected void |
ingestInvSpcOrdNt(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'invspcordnt' table |
protected void |
ingestMissionObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest MISSION object |
protected void |
ingestMsnD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'msnd' table |
protected void |
ingestMsnDoc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'msndoc' table |
protected void |
ingestMsnHost(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'msnhost' table |
protected void |
ingestMsnInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'msninfo' table |
protected void |
ingestMsnObjsmy(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'msnobjsmy' table |
protected 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 object |
protected void |
ingestObjDefObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest OBJECT_DEFINTION object |
protected void |
ingestPersElecmail(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'perselecmail' table |
protected void |
ingestPersInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'persinfo' table |
protected void |
ingestPersMailAddr(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'persmailaddr' table |
protected void |
ingestPersonnelObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest PERSONNEL object |
void |
ingestReferenceObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'refd' table |
protected void |
ingestResDS(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'resds' table |
protected void |
ingestResInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'resinfo' table |
protected void |
ingestResourceObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest DATA_SET_HOUSEKEEPING & RESOURCE objectsccc |
protected void |
ingestSoftwareObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest SOFTWARE object |
void |
ingestSoftwareOnlineObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'swonline' table |
protected void |
ingestStdValObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'ddcolstdval' table |
protected void |
ingestSWD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'swd' table |
protected void |
ingestSWInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'swinfo' table |
protected void |
ingestSWPur(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'swpur' table |
protected void |
ingestTargetD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'targetd' table |
protected void |
ingestTargetDoc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'targetdoc' table |
protected void |
ingestTargetInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'targetinfo' table |
void |
ingestTargetObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest TARGET object |
protected void |
ingestVolDesc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'voldesc' table |
protected void |
ingestVolDS(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'volds' table |
protected void |
ingestVolInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'volinfo' table |
protected void |
ingestVolOnline(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'volonline' table |
protected void |
ingestVolSerInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'volserinfo' table |
protected void |
ingestVolSerSet(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'volserset' table |
protected void |
ingestVolSetInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest the data into 'volsetinfo' table |
void |
ingestVolumeObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
Method to ingest VOLUME object |
boolean |
isConnected()
|
boolean |
isFailed()
|
protected String |
itrim(String source)
Replace multiple whitespaces between words with single blank |
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 |
static void |
main(String[] args)
Main method |
protected 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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int okCount
public static int failCount
public static int newStdValueCount
Constructor Detail |
---|
public CatalogDB(String user, String pass, String server, String dbname, Target target, IngestReport report) throws SQLException, Exception
user
- Name of the database userpass
- Password of the database connectionserver
- Server name of the databasedbname
- Name of the database
SQLException
Exception
Method Detail |
---|
public void setReport(IngestReport report)
public void setLabel(gov.nasa.pds.tools.label.Label label)
public void close() throws SQLException
SQLException
public boolean isConnected()
public boolean isFailed()
public void setIsFailed(boolean failed)
protected void ingestMissionObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
lblMap
- Hashmap of the PDS label(s)protected void ingestMsnD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
lblMap
- Hashmap of the PDS label(s)protected void ingestMsnObjsmy(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestMsnHost(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestMsnInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestMsnDoc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestInstHostObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestHostD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestHostInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestInstHostRefInfoObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestInstObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestInstD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestInstInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestInstRefInfoObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDataSetObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
protected void ingestDSMsn(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
protected void ingestDSD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
protected void ingestDSConf(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
protected void ingestDSTarg(Map<String,gov.nasa.pds.tools.label.AttributeStatement> attrSmts)
protected void ingestDSHost(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDSInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDSRefInfoObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
public void ingestReferenceObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestPersonnelObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestPersMailAddr(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestPersInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestPersElecmail(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDSCollAssocDSObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDataSetColObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDSCollUsgd(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDSCollInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDSCollD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDSCollDoc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
public void ingestInventoryObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestInvSpcOrdNt(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestInvNodeMedia(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestSoftwareObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestSWD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestSWInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestSWPur(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
public void ingestSoftwareOnlineObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
public void ingestTargetObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestTargetD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestTargetInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestTargetDoc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
public void ingestVolumeObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestVolDS(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestVolDesc(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestVolInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestVolSetInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestVolSerSet(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestVolSerInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestVolOnline(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestNssdcdsidObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDSReleaseObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestResourceObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestResDS(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestResInfo(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestElemDefObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDDCol(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDDColD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDDStdValD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDDFormRule(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDDSysClass(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDDGenClass(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestStdValObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
public Map<String,String> getIngestedStdValues()
protected void ingestNewStdValues(Map<String,String> stdValues)
stdValues
- A map containing a list of standard values and its
associated table/column name. Example: instinfo.instid - VGprotected void ingestObjDefObject(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDDObjAlias(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDDObjD(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDDObjects(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDDObjElm(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDDObjHier(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected void ingestDDObjStsNote(Map<String,gov.nasa.pds.tools.label.AttributeStatement> lblMap)
protected String collapse(String source)
protected String itrim(String source)
protected String ltrim(String source)
protected String rtrim(String source)
protected int getRowCount(String query)
query
- SQL query string
protected int deleteRecords(String query)
query
- SQL query sting
public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |