|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.vocab.DLESEMetadataVocabTracker
public class DLESEMetadataVocabTracker
DLESE metadata vocabulary tracker (Id assignment, tracking of changes). This implementation uses an SQL database.
Constructor Summary | |
---|---|
DLESEMetadataVocabTracker(MetadataVocab vocab,
String sqlDriver,
String sqlURL,
String sqlUser,
String sqlPassword,
String vocabTextFile)
Constructor for the DLESEMetadataVocabTracker object |
Method Summary | |
---|---|
String |
assignNewSystemId(String metadataFieldId,
String metadataValue)
Assign a unique system Id for a new vocabulary value. |
void |
closeConnection()
Close the connection to SQL database |
String |
getId(String metadataFieldId,
String metadataValue)
Does the current fieldId/value pair already exist in the database? If so, return the Id, if not, return "" (empty string). |
boolean |
isUsingDatabase()
Is the system using this tracker connected to a database that handles ensuring Id consistency and UI label changes? |
void |
registerUiLabels(HashMap uiSystems,
HashMap uiLabelOfSystemIds)
Step through all of the current (non-retired) values in the vocab_values table and examine the UI labels, comparing what is in the DB with what was just loaded from the XML |
void |
writeDataAsTextFile()
This method writes a text-based version of the entire vocabulary (even retired values!) that simply lists each field/value system ID, along with the metadataValue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DLESEMetadataVocabTracker(MetadataVocab vocab, String sqlDriver, String sqlURL, String sqlUser, String sqlPassword, String vocabTextFile)
vocab
- MetadataVocab instance using this trackersqlDriver
- driver class for SQL DBsqlURL
- URL of SQL DBsqlUser
- SQL usersqlPassword
- SQL user passwordvocabTextFile
- Method Detail |
---|
public boolean isUsingDatabase()
isUsingDatabase
in interface MetadataVocabTracker
public void closeConnection()
closeConnection
in interface MetadataVocabTracker
public String assignNewSystemId(String metadataFieldId, String metadataValue)
assignNewSystemId
in interface MetadataVocabTracker
metadataFieldId
- field encoded IdmetadataValue
- metadata value name
public String getId(String metadataFieldId, String metadataValue)
getId
in interface MetadataVocabTracker
metadataFieldId
- encoded field IdmetadataValue
- metadata value name
public void registerUiLabels(HashMap uiSystems, HashMap uiLabelOfSystemIds)
registerUiLabels
in interface MetadataVocabTracker
uiSystems
- uiLabelOfSystemIds
- public void writeDataAsTextFile()
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |