|
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.config.CollectionRegistry
public class CollectionRegistry
Holds CollectionConfig
instances in a
map structure, keyed by collection id (e.g., "dcc"); The registry is
initialized during system startup by reading from a configDir where the
collection config files are located.
$Id: CollectionRegistry.java,v 1.31 2010/07/14 00:18:49 jweather Exp $
Constructor Summary | |
---|---|
CollectionRegistry()
no-argument Constructor for the CollectionRegistry object |
|
CollectionRegistry(File configDir,
String idFilesPath,
String defaultCollConfigPath)
Register collections from configuration directory |
Method Summary | |
---|---|
void |
deleteCollection(CollectionConfig config)
Unregister a collection and delete it's configuration file. |
void |
deleteCollection(String collection)
Unregister a collection and deletes it's configuration file. |
void |
destroy()
Description of the Method |
CollectionConfig |
findCollectionByHandle(String handle)
find collectionConfig having provided handle as its MetadataProviderHandle. |
CollectionConfig |
getCollectionConfig(String collection)
Gets the collectionConfig attribute of the CollectionRegistry object |
CollectionConfig |
getCollectionConfig(String collection,
boolean createIfNotFound)
Gets a CollectionConfig instance
corresponding to the provided collection. |
long |
getCollectionConfigMod()
Gets the collectionConfigMod attribute of the CollectionRegistry object |
List |
getFinalStatusFlags()
Gets a list of the finalStatusFlags defined by each collection. |
String |
getFinalStatusLabel(String collection)
Gets the finalStatusLabel attribute of the CollectionRegistry object |
String |
getIdFilesPath()
|
IDGenerator |
getIDGenerator(String collectionKey)
Obtain IDGenerator instance for specified collection (which must be registered). |
String |
getIdPrefix(String collectionKey)
|
Set |
getIds()
Returns the keys for the registered collections. |
CollectionConfig |
getMasterCollectionConfig()
|
Map |
getMasterStatusLabelMap()
Gets the masterStatusLabelMap attribute of the CollectionRegistry object |
List |
getMasterStatusList()
Returns a list of all status flags defined by all registered collections. |
String |
getNextID(String collectionKey)
Convenience method to obtain a new record ID from specified collection (which must exist) |
void |
initializeIDGenerator(CollectionConfig collectionConfig,
SimpleLuceneIndex index)
|
void |
initializeIDGenerators(SimpleLuceneIndex index)
Initialize the IDGenerator for each collection in the index so that the next ID to be assigned will increment the last assigned ID for that collection. |
boolean |
isDuplicateIdPrefix(String idPrefix)
|
boolean |
isDuplicateIdPrefix(String collectionKey,
String idPrefix)
|
boolean |
isNDRCollection(String collection)
|
boolean |
isRegistered(String collectionKey)
|
void |
register(CollectionConfig config)
Register a collection by placing it's CollectionConfig instance in the map. |
void |
setCollectionConfigMod()
Sets the collectionConfigMod attribute of the CollectionRegistry object |
int |
size()
The number of registered collections |
String |
toString()
Print the items of the mdvMap for debugging purposes. |
void |
unregister(CollectionConfig config)
Remove the CollectionConfig from the registry. |
void |
unregister(String id)
NOT YET DOCUMENTED |
void |
updateMasterStatusList()
NOT YET DOCUMENTED |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CollectionRegistry()
public CollectionRegistry(File configDir, String idFilesPath, String defaultCollConfigPath)
configDir
- NOT YET DOCUMENTEDMethod Detail |
---|
public boolean isNDRCollection(String collection)
public boolean isRegistered(String collectionKey)
public CollectionConfig getMasterCollectionConfig()
public String getIdFilesPath()
public CollectionConfig findCollectionByHandle(String handle)
handle
- NOT YET DOCUMENTED
public CollectionConfig getCollectionConfig(String collection)
collection
- collectionKey (e.g., "dcc")
public CollectionConfig getCollectionConfig(String collection, boolean createIfNotFound)
CollectionConfig
instance
corresponding to the provided collection.
collection
- Description of the ParametercreateIfNotFound
- NOT YET DOCUMENTED
public boolean isDuplicateIdPrefix(String idPrefix)
public boolean isDuplicateIdPrefix(String collectionKey, String idPrefix)
public String getNextID(String collectionKey)
public String getIdPrefix(String collectionKey)
public IDGenerator getIDGenerator(String collectionKey)
public void initializeIDGenerators(SimpleLuceneIndex index)
public void initializeIDGenerator(CollectionConfig collectionConfig, SimpleLuceneIndex index) throws Exception
Exception
public long getCollectionConfigMod()
public void setCollectionConfigMod()
public String getFinalStatusLabel(String collection)
collection
- NOT YET DOCUMENTED
public List getFinalStatusFlags()
public List getMasterStatusList()
public void updateMasterStatusList()
public Map getMasterStatusLabelMap()
public void register(CollectionConfig config) throws Exception
config
- Description of the Parameter
Exception
public void unregister(String id)
id
- NOT YET DOCUMENTEDpublic void unregister(CollectionConfig config)
config
- Description of the Parameterpublic void deleteCollection(String collection)
collection
- Description of the Parameterpublic void deleteCollection(CollectionConfig config)
config
- Description of the Parameterpublic String toString()
toString
in class Object
public Set getIds()
public int size()
public void destroy()
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |