|
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.FrameworkRegistry
public class FrameworkRegistry
A map holding MetaDataFramework
instances,
and keyed by the short name (e.g., "adn") of each particular framework.
The Registry is populated at system startup time. It reads framework config files and instantiates a MetaDataFramework instance for each one.
Constructor Summary | |
---|---|
FrameworkRegistry()
Constructor for the FrameworkRegistry object |
|
FrameworkRegistry(ServletContext servletContext)
FrameworkRegistry constructure with ServletContext |
|
FrameworkRegistry(String configDirPath,
String docRoot)
Constructor for the FrameworkRegistry object for specified configuration directory and docRoot (used for debugging - docRoot is normally calculated from servletContext). |
Method Summary | |
---|---|
void |
clearLoadErrors()
Clear the load errors |
void |
clearLoadWarnings()
Clear the load warnings |
void |
destroy()
Destroys the loaded frameworks |
void |
extractMuiGroups()
Initialize each framework with information about which fields can be formatted using MUI Groups files. |
List |
getAllFormats()
Return a list of formats for registered frameworks. |
File |
getConfigDir()
Gets the directory in which framework config files are located. |
MetaDataFramework |
getFramework(String xmlFormat)
Gets the framework for the specified xmlFormat |
boolean |
getIsLoaded(String xmlFormat)
Returns true if the framework for provided xmlFormat is currently loaded in this FrameworkRegistry |
List |
getItemFormats()
Gets the registered formats that are "item" frameworks (e.g., "adn", "dlese_anno", as opposed to frameworks used internally (e.g., "dcs_data") by the system. |
ErrorLog |
getLoadErrors()
Gets the loadErrors attribute of the FrameworkRegistry object |
ErrorLog |
getLoadWarnings()
Gets the loadWarnings attribute of the FrameworkRegistry object |
List |
getNames()
Return the formats of the registered frameworks, excluding "dlese_collect" |
List |
getOaiFormats()
Gets the formats that are available to oai services, which are the itemFrameworks plus "dlese_collect" |
List |
getUnloadedFrameworks()
Returns a list of xmlFormats corresponding to framework config files that are present in the framework config directory, but are not currently loaded in the FrameworkRegistry object |
void |
load()
Loads the FrameworkRegistry by traversing the framework config files in the config directory. |
void |
loadFramework(String xmlFormat)
Loads the framework for specified xmlformat after finding the framework config file |
static void |
main(String[] args)
NOT YET DOCUMENTED |
void |
metadataVocabReloaded(MetadataVocabReloadEvent event)
Event handler for MetadataVocabReloadEvent registers MUI groups with appropriate frameworks and then re-renders the editors for frameworks that have registered MUI groups. |
void |
register(MetaDataFramework mdf)
Register provided MetaDataFramework. |
int |
size()
The number of registered frameworks |
String |
toString()
Return a string representation of the registry for debugging purposes. |
void |
unregister(String xmlFormat)
Remove the framework for provided xmlFormat from the registry |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FrameworkRegistry()
public FrameworkRegistry(ServletContext servletContext)
servletContext
- the servletContextpublic FrameworkRegistry(String configDirPath, String docRoot)
configDirPath
- path to directory containing framework config filesdocRoot
- path to servlet baseDirMethod Detail |
---|
public File getConfigDir()
public void loadFramework(String xmlFormat) throws Exception
xmlFormat
- the xmlFormat for the framework (e.g., "adn")
Exception
- if the framework could not be loadedpublic void load()
public ErrorLog getLoadErrors()
public void clearLoadErrors()
public ErrorLog getLoadWarnings()
public void clearLoadWarnings()
public void metadataVocabReloaded(MetadataVocabReloadEvent event)
metadataVocabReloaded
in interface MetadataVocabReloadListener
event
- NOT YET DOCUMENTEDpublic void extractMuiGroups()
public void register(MetaDataFramework mdf)
mdf
- the framework to be loadedpublic void unregister(String xmlFormat)
xmlFormat
- format (e.g., "adn") corresponding to a loaded frameworkpublic MetaDataFramework getFramework(String xmlFormat)
xmlFormat
- format (e.g., "adn") corresponding to a loaded framework
public int size()
public boolean getIsLoaded(String xmlFormat)
xmlFormat
- e.g., ("adn")
public List getUnloadedFrameworks()
public String toString()
toString
in class Object
public List getAllFormats()
public List getItemFormats()
public List getOaiFormats()
public List getNames()
public void destroy()
public static void main(String[] args)
args
- NOT YET DOCUMENTED
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |