|
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.schemedit.dcs.DcsDataManager
public class DcsDataManager
Provides access to, and caching of DcsDataRecord
instances that house workflow status associated with each metadata record
managed by the DCS.
Dcs-data is stored on disk as xml files and read into DcsDataRecord
instances which are subsequently accessed via the cache.
DcsDataRecords are removed from cache via the revertToSaved(String)
method, which forces the DcsDataRecord to be read from disk the next time it
is requested.
Constructor Summary | |
---|---|
DcsDataManager(RepositoryManager rm,
MetaDataFramework dcsDataFramework,
CollectionRegistry collectionRegistry)
Create a DcsDataManager. |
Method Summary | |
---|---|
void |
addListener(WorkFlowServices listener)
Adds a feature to the Listener attribute of the DcsDataRecord object |
void |
cacheRecord(DcsDataRecord dcsDataRecord)
Description of the Method |
void |
destroy()
This method is called at the conclusion of processing and may be used for tear-down. |
void |
flushCache()
Write all cached DcsDataRecords to disk and then clear the cache |
File |
getCollectionDir(String collection,
String xmlFormat)
Get the directory in which dcs_data records are stored for the given collection and metadataFormat. |
static File |
getDcsDataDir(RepositoryManager rm)
Gets the dcsDataDir attribute of the DcsDataManager object |
static File |
getDcsDataDir(String metadataRecordsLocation)
Gets the dcsDataDir attribute of the DcsDataManager class |
DcsDataRecord |
getDcsDataRecord(String id,
RepositoryManager rm)
Retrieve the DcsDataRecord correponding to the given record ID |
DcsDataRecord |
getDcsDataRecord(String collection,
String xmlFormat,
String fileName)
Gets a dcsDataRecord without specifying an id. |
DcsDataRecord |
getDcsDataRecord(String collection,
String xmlFormat,
String fileName,
String id)
Returns an empty dcsDataRecord corresponding to an indexed source record. |
List |
getDcsStatusOptions()
Gets the dcsStatusOptions attribute of the DcsDataManager object |
void |
normalizeStatuses()
NOT YET DOCUMENTED |
void |
normalizeStatuses(String collection)
NOT YET DOCUMENTED |
boolean |
removeFromCache(String id)
NOT YET DOCUMENTED |
void |
removeListener(WorkFlowServices listener)
Description of the Method |
boolean |
revertToSaved(String id)
Remove the cashed DcsDataRecord, in effect reverting to the last saved version of the record, since it will be read from disk next time it is accessed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DcsDataManager(RepositoryManager rm, MetaDataFramework dcsDataFramework, CollectionRegistry collectionRegistry)
rm
- Description of the ParameterdcsDataFramework
- MetaDataFramework for the dcs_data formatcollectionRegistry
- NOT YET DOCUMENTEDMethod Detail |
---|
public static File getDcsDataDir(RepositoryManager rm)
rm
- Description of the Parameter
public static File getDcsDataDir(String metadataRecordsLocation)
metadataRecordsLocation
- NOT YET DOCUMENTED
public File getCollectionDir(String collection, String xmlFormat)
collection
- Description of the ParameterxmlFormat
- Description of the Parameter
public List getDcsStatusOptions()
public void normalizeStatuses()
public void normalizeStatuses(String collection)
collection
- NOT YET DOCUMENTEDpublic DcsDataRecord getDcsDataRecord(String id, RepositoryManager rm)
id
- Description of the Parameterrm
- Description of the Parameter
public DcsDataRecord getDcsDataRecord(String collection, String xmlFormat, String fileName)
DcsDataFileIndexingPlugin
where the ID is not known or easily obtainable.
collection
- Description of the ParameterxmlFormat
- Description of the ParameterfileName
- Description of the Parameter
public DcsDataRecord getDcsDataRecord(String collection, String xmlFormat, String fileName, String id)
collection
- The collection of the source recordxmlFormat
- Description of the ParameterfileName
- file name of the metadata fileid
- Description of the Parameter
public boolean revertToSaved(String id)
id
- Description of the Parameter
public boolean removeFromCache(String id)
id
- NOT YET DOCUMENTED
public void cacheRecord(DcsDataRecord dcsDataRecord)
dcsDataRecord
- Description of the Parameterpublic void flushCache()
public void destroy()
We don't need to flush on destroy if we are writing dcsDataRecords to disk after each change.
public void addListener(WorkFlowServices listener)
listener
- The feature to be added to the Listener attributepublic void removeListener(WorkFlowServices listener)
listener
- Description of the Parameter
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |