Package org.dlese.dpc.schemedit.config
Class CollectionConfig
java.lang.Object
org.dlese.dpc.schemedit.config.CollectionConfig
Holds information about a collection that is accessed via a
CollectionConfigReader.CollectionConfig supports getting and setting of workflow status flags, default export directory path, etc. Existing collection configuration files are read at system startup time, but there need not be a config file for each collection. Config files are created by copying a default.xml file and modifying it as settings are edited.
CollectionConfig instances are registered in a CollectionRegistry
instance.
- Version:
- $Id: CollectionConfig.java,v 1.12 2009/03/20 23:33:56 jweather Exp $
- Author:
- ostwald
$Id $
-
Constructor Summary
ConstructorsConstructorDescriptionCollectionConfig(File configFile, CollectionRegistry collectionRegistry) Constructor for the CollectionConfig objectCollectionConfig(CollectionConfigReader configReader) Constructor for the CollectionConfig object -
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves all content from the NDR info element.voiddestroy()Description of the Methodbooleanflush()Writes config file to disk and re-initializes data structures based on config.Gets the handle of the NDR agent object for this collection.Gets the handle of the NDR aggregator object for this collection.Return a list ofStatusFlagbeans that describe the statuses that can be assigned to a record of this collection.Gets the authority attribute of the CollectionConfig objectGets the configReader attribute of the CollectionConfig objectGets the exportDirectory attribute of the CollectionConfig objectGets the finalStatusFlag for this collection.Gets the finalStatusLabel (display string) for this collection.Convenience method to retrieve the FinalStatusFlagValue for this collection from StatusFlags.getId()Gets the id attribute of the CollectionConfig objectGets the iDGenerator attribute of the CollectionConfig objectGets the idPrefix for this collection.Gets the handle of this collections metadataProvider object in the NDR.Gets the ndrOaiLink for this collection, which is the "itemId" of Collection Metadata records stored in the NDR, and which is inserted in the InfoStream of item-level metadata records when they are written to the NDR.Returns a list of StatusFlags defined by this collection that can be selected for searching.Gets the setInfo for this collection from the RepositoryManager.getStatusFlagLabel(String statusFlagValue) Return the status flag label (the readable version) for the given status flag value (which must be decoded if it is a final status flag).Get sorted list of statusFlags defined in this collection for use in jsp, where we need the StatusFlag object, not just the label.Returns a sorted list of StatusFlag labels defined by this collection.The StatusMap holds mappings from the StatusFlag values defined by this collection to their corresponding StatusFlag instances.booleanGets the tupleMap for this collection.getTupleValue(String name) Get the value of the named tuple.Gets the xmlFormat attribute of the CollectionConfig objectbooleanConvenience method to determine whether this collection is managed in the NDR.nextID()Get the next ID to be assigned for this collection.voidrefresh()Causes all values to be re-read from config file on disk.voidsetAgentHandle(String agentHandle) Sets the handle of the NDR agent object for this collection.voidsetAggregatorHandle(String aggregatorHandle) Sets the handle of the NDR aggregator object for this collection.voidsetAuthority(String authority) Sets the authority attribute for this collection, which is used to determine whether the collection is managed in the NDR.voidSets the exportDirectory attribute of the CollectionConfig objectvoidSets the finalStatusLabel (the display label) for this collection's final Status.voidSets the id attribute of the CollectionConfig objectvoidsetIdPrefix(String idPrefix) Sets the idPrefix for this collection that is used to construct record IDs.voidsetMetadataProviderHandle(String metadataProviderHandle) Sets the handle of this collections metadataProvider object in the NDR.voidsetNdrOaiLink(String link) Sets the ndrOaiLink attribute of the CollectionConfig objectvoidsetNdrServer(String server) Sets the ndrServer attribute of the CollectionConfig objectvoidsetStatusMap(Map statusMap) Write the contents of this collection's StatusMap to the collection-config file.voidsetSuggestionsAllowedd(boolean allowed) voidsetTupleMap(Map tupleMap) Sets the tupleMap for this collection, which contains name, value pairs that are automatically inserted into new metadata records.voidsetTupleValue(String name, String value) Adds tuple entry to the tupleMap.voidsetXmlFormat(String xmlFormat) Sets the xmlFormat attribute for this collection.toString()Description of the MethodvoidupdateTuples(MetaDataFramework framework) Ensure there is an element in the config file for each tuple defined in the metaDataFramework for this collection.
-
Constructor Details
-
CollectionConfig
Constructor for the CollectionConfig object- Parameters:
configFile- Description of the ParametercollectionRegistry- NOT YET DOCUMENTED
-
CollectionConfig
Constructor for the CollectionConfig object- Parameters:
configReader- Description of the Parameter
-
-
Method Details
-
getIDGenerator
Gets the iDGenerator attribute of the CollectionConfig object- Returns:
- The iDGenerator value
-
nextID
Get the next ID to be assigned for this collection.- Returns:
- NOT YET DOCUMENTED
-
setIdPrefix
Sets the idPrefix for this collection that is used to construct record IDs.- Parameters:
idPrefix- The new idPrefix value
-
getIdPrefix
Gets the idPrefix for this collection.- Returns:
- The idPrefix value
-
getConfigReader
Gets the configReader attribute of the CollectionConfig object- Returns:
- The configReader value
-
updateTuples
Ensure there is an element in the config file for each tuple defined in the metaDataFramework for this collection.- Parameters:
framework- NOT YET DOCUMENTED- Throws:
Exception- NOT YET DOCUMENTED
-
getId
Gets the id attribute of the CollectionConfig object- Returns:
- The id value
-
setId
Sets the id attribute of the CollectionConfig object- Parameters:
id- The new id value
-
getXmlFormat
Gets the xmlFormat attribute of the CollectionConfig object- Returns:
- The xmlFormat value
-
setXmlFormat
Sets the xmlFormat attribute for this collection.- Parameters:
xmlFormat- The new xmlFormat value
-
getSuggestionsAllowed
public boolean getSuggestionsAllowed() -
setSuggestionsAllowedd
public void setSuggestionsAllowedd(boolean allowed) -
clearNdrInfo
public void clearNdrInfo()Removes all content from the NDR info element. -
getAuthority
Gets the authority attribute of the CollectionConfig object- Returns:
- The authority value
-
isNDRCollection
public boolean isNDRCollection()Convenience method to determine whether this collection is managed in the NDR.- Returns:
- true if the collection is managed in the NDR.
-
setAuthority
Sets the authority attribute for this collection, which is used to determine whether the collection is managed in the NDR.- Parameters:
authority- The new authority value
-
getMetadataProviderHandle
Gets the handle of this collections metadataProvider object in the NDR.- Returns:
- The metadataProviderHandle value
-
setMetadataProviderHandle
Sets the handle of this collections metadataProvider object in the NDR.- Parameters:
metadataProviderHandle- The new metadataProviderHandle value
-
getAggregatorHandle
Gets the handle of the NDR aggregator object for this collection.- Returns:
- The aggregatorHandle value
-
setAggregatorHandle
Sets the handle of the NDR aggregator object for this collection.- Parameters:
aggregatorHandle- The new aggregatorHandle value
-
getAgentHandle
Gets the handle of the NDR agent object for this collection.- Returns:
- The agentHandle value
-
setAgentHandle
Sets the handle of the NDR agent object for this collection.- Parameters:
agentHandle- The new agentHandle value
-
getNdrOaiLink
Gets the ndrOaiLink for this collection, which is the "itemId" of Collection Metadata records stored in the NDR, and which is inserted in the InfoStream of item-level metadata records when they are written to the NDR.- Returns:
- The ndrOaiLink value
-
setNdrOaiLink
Sets the ndrOaiLink attribute of the CollectionConfig object- Parameters:
link- The new ndrOaiLink value
-
getNdrServer
-
setNdrServer
Sets the ndrServer attribute of the CollectionConfig object- Parameters:
link- The new ndrServer value
-
getStatusMap
The StatusMap holds mappings from the StatusFlag values defined by this collection to their corresponding StatusFlag instances.- Returns:
- The statusMap value
-
getTupleMap
Gets the tupleMap for this collection. The tupleMap contains name/value pairs that are written into new metadata records.- Returns:
- The tupleMap value
-
getSetInfo
Gets the setInfo for this collection from the RepositoryManager.- Parameters:
rm- Description of the Parameter- Returns:
- The setInfo value
-
setStatusMap
Write the contents of this collection's StatusMap to the collection-config file.- Parameters:
statusMap- The new statusMap value
-
setTupleMap
Sets the tupleMap for this collection, which contains name, value pairs that are automatically inserted into new metadata records.- Parameters:
tupleMap- The new tupleMap value
-
getStatusLabels
Returns a sorted list of StatusFlag labels defined by this collection.- Returns:
- The statuses value
-
getTupleValue
Get the value of the named tuple.- Parameters:
name- NOT YET DOCUMENTED- Returns:
- The tupleValue value
-
setTupleValue
Adds tuple entry to the tupleMap.- Parameters:
name- The new tupleValue valuevalue- The new tupleValue value
-
getStatusFlagLabel
Return the status flag label (the readable version) for the given status flag value (which must be decoded if it is a final status flag).- Parameters:
statusFlagValue- NOT YET DOCUMENTED- Returns:
- The statusFlagLabel value
-
getStatusFlags
Get sorted list of statusFlags defined in this collection for use in jsp, where we need the StatusFlag object, not just the label.- Returns:
- The statusFlags value
-
getAssignableStatusFlags
Return a list ofStatusFlagbeans that describe the statuses that can be assigned to a record of this collection. The selectableStatusFlags list is composed of the UNKNOWN_status plus those statuses that are defined for the collection. The IMPORT status is not selectable, since it is only assigned by the system.- Returns:
- The assignableStatusFlags value
-
getSelectableStatusFlags
Returns a list of StatusFlags defined by this collection that can be selected for searching. The selectable flags includes the assignable flags plus the reserved IMPORTED_STATUS_FLAG.- Returns:
- The selectableStatusFlags value
-
getExportDirectory
Gets the exportDirectory attribute of the CollectionConfig object- Returns:
- The exportDirectory value
-
setExportDirectory
Sets the exportDirectory attribute of the CollectionConfig object- Parameters:
s- The new exportDirectory value
-
getFinalStatusValue
Convenience method to retrieve the FinalStatusFlagValue for this collection from StatusFlags.- Returns:
- The finalStatusValue value
-
getFinalStatusLabel
Gets the finalStatusLabel (display string) for this collection.- Returns:
- The finalStatusLabel value
-
getFinalStatusFlag
Gets the finalStatusFlag for this collection.- Returns:
- The finalStatusFlag value
-
setFinalStatusLabel
Sets the finalStatusLabel (the display label) for this collection's final Status.- Parameters:
s- The new finalStatusLabel value
-
flush
public boolean flush()Writes config file to disk and re-initializes data structures based on config.- Returns:
- Description of the Return Value
-
refresh
public void refresh()Causes all values to be re-read from config file on disk. -
toString
Description of the Method -
destroy
public void destroy()Description of the Method
-