|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.lexevs.registry.service.XmlRegistry
public class XmlRegistry
This class stores and provides access to information about loaded and tagged terminologies. Locking guidelines - any method that makes changes that are supposed to be written out to the xml file must first - get a lock on the main lock file. check for changes. read in the latest changes, if there are any. Then, make the changes, write out the xml file, and finally, release the lock on the lock file.
Nested Class Summary | |
---|---|
static class |
XmlRegistry.DBEntry
The Class DBEntry. |
static class |
XmlRegistry.HistoryEntry
The Class HistoryEntry. |
Nested classes/interfaces inherited from interface org.lexevs.registry.service.Registry |
---|
Registry.KnownTags, Registry.ResourceType |
Constructor Summary | |
---|---|
XmlRegistry(java.lang.String pathToRegistryFile)
Instantiates a new xml registry. |
|
XmlRegistry(SystemVariables systemVariables)
Instantiates a new xml registry. |
Method Summary | |
---|---|
void |
activate(AbsoluteCodingSchemeVersionReference codingScheme)
Activate a code system. |
XmlRegistry.HistoryEntry |
addNewHistory(java.lang.String urn,
java.lang.String dbURL,
java.lang.String dbName,
java.lang.String tablePrefix)
Add a new history item to the registry. |
void |
addNewItem(RegistryEntry entry)
Adds the new item. |
void |
addNewItem(java.lang.String urn,
java.lang.String version,
java.lang.String status,
java.lang.String dbURL,
java.lang.String tag,
java.lang.String dbName,
java.lang.String tablePrefix)
Adds the new item. |
boolean |
containsCodingSchemeEntry(AbsoluteCodingSchemeVersionReference codingScheme)
Contains coding scheme entry. |
boolean |
containsNonCodingSchemeEntry(java.lang.String uri)
Contains non coding scheme entry. |
void |
deactivate(XmlRegistry.DBEntry entry)
Deactivate. |
java.util.List<RegistryEntry> |
getAllRegistryEntries()
Gets the all registry entries. |
java.util.List<RegistryEntry> |
getAllRegistryEntriesOfType(Registry.ResourceType type)
Gets the all registry entries of type. |
java.util.List<RegistryEntry> |
getAllRegistryEntriesOfTypeAndURI(Registry.ResourceType type,
java.lang.String uri)
Gets the all registry entries of type and URI. |
java.util.List<RegistryEntry> |
getAllRegistryEntriesOfTypeURIAndVersion(Registry.ResourceType type,
java.lang.String uri,
java.lang.String version)
Gets the all registry entries of type, URI and version. |
RegistryEntry |
getCodingSchemeEntry(AbsoluteCodingSchemeVersionReference codingScheme)
Gets the coding scheme entry. |
javax.sql.DataSource |
getDataSource()
Gets the data source. |
XmlRegistry.DBEntry |
getDBCodingSchemeEntry(AbsoluteCodingSchemeVersionReference codingScheme)
Gets the dB coding scheme entry. |
XmlRegistry.DBEntry[] |
getDBEntries()
Gets the db entries. |
java.util.Date |
getDeactivateDate(java.lang.String codingSchemeURN,
java.lang.String version)
Gets the deactivate date. |
java.util.List<RegistryEntry> |
getEntriesForUri(java.lang.String uri)
Gets the entries for uri. |
XmlRegistry.DBEntry |
getEntry(java.lang.String codingSchemeURN,
java.lang.String version)
Gets the entry. |
XmlRegistry.HistoryEntry[] |
getHistoryEntries()
Gets the history entries. |
XmlRegistry.HistoryEntry |
getHistoryEntry(java.lang.String urn)
Gets the history entry. |
java.util.Date |
getLastUpdateDate(java.lang.String codingSchemeURN,
java.lang.String version)
Gets the last update date. |
java.util.Date |
getLastUpdateTime()
Gets the last update time. |
protected LgLoggerIF |
getLogger()
Gets the logger. |
java.lang.String |
getNextDBIdentifier()
Gets the next db identifier. |
java.lang.String |
getNextHistoryIdentifier()
Gets the next history identifier. |
RegistryEntry |
getNonCodingSchemeEntry(java.lang.String uri)
Gets the non coding scheme entry. |
protected java.io.File |
getRegistryFile()
Gets the registry file. |
SQLConnectionInfo |
getSQLConnectionInfoForCodeSystem(AbsoluteCodingSchemeVersionReference codingSchemeVersion)
Gets the sQL connection info for code system. |
SQLConnectionInfo[] |
getSQLConnectionInfoForHistory(java.lang.String urn)
Gets the sQL connection info for history. |
CodingSchemeVersionStatus |
getStatus(java.lang.String codingSchemeURN,
java.lang.String version)
Gets the status. |
protected java.lang.String |
getSupportedLexGridSchemaVersionForCodingScheme(AbsoluteCodingSchemeVersionReference ref)
Gets the supported lex grid schema version for coding scheme. |
protected java.lang.String |
getSupportedLexGridSchemaVersionForHistory(java.lang.String uri)
Gets the supported lex grid schema version for history. |
java.lang.String |
getTag(java.lang.String codingSchemeURN,
java.lang.String version)
Gets the tag. |
java.lang.String |
getVersionForTag(java.lang.String urn,
java.lang.String tag)
Gets the version for tag. |
boolean |
isActive(java.lang.String codingSchemeURN,
java.lang.String version)
Checks if is active. |
void |
remove(AbsoluteCodingSchemeVersionReference codingSchemeVersion)
Removes the. |
void |
removeEntry(RegistryEntry entry)
Removes the entry. |
void |
removeHistoryEntry(java.lang.String urn)
Removes the history entry. |
void |
setDataSource(javax.sql.DataSource dataSource)
Sets the data source. |
void |
setDeactivateDate(AbsoluteCodingSchemeVersionReference acsvr,
java.util.Date date)
Sets the deactivate date. |
void |
setDeactivateDateInternal(AbsoluteCodingSchemeVersionReference acsvr,
java.util.Date date)
Sets the deactivate date internal. |
void |
setStatusPending(XmlRegistry.DBEntry entry)
Sets the status pending. |
void |
updateCodingSchemeEntryTag(AbsoluteCodingSchemeVersionReference codingScheme,
java.lang.String newTag)
Update coding scheme entry tag. |
void |
updateEntry(RegistryEntry entry)
Update entry. |
void |
updateTag(AbsoluteCodingSchemeVersionReference codingScheme,
java.lang.String newTag)
Update tag. |
void |
updateURNVersion(AbsoluteCodingSchemeVersionReference oldURNVerison,
AbsoluteCodingSchemeVersionReference newURNVerison)
Activate a code system. |
void |
updateVersion(AbsoluteCodingSchemeVersionReference codingScheme,
java.lang.String newVersion)
Update version. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlRegistry(SystemVariables systemVariables) throws java.lang.Exception
systemVariables
- the system variables
java.lang.Exception
- the exceptionpublic XmlRegistry(java.lang.String pathToRegistryFile) throws java.lang.Exception
pathToRegistryFile
- the path to registry file
java.lang.Exception
- the exceptionMethod Detail |
---|
protected LgLoggerIF getLogger()
protected java.io.File getRegistryFile()
public CodingSchemeVersionStatus getStatus(java.lang.String codingSchemeURN, java.lang.String version)
codingSchemeURN
- the coding scheme urnversion
- the version
public boolean isActive(java.lang.String codingSchemeURN, java.lang.String version)
codingSchemeURN
- the coding scheme urnversion
- the version
public SQLConnectionInfo getSQLConnectionInfoForCodeSystem(AbsoluteCodingSchemeVersionReference codingSchemeVersion)
codingSchemeVersion
- the coding scheme version
public SQLConnectionInfo[] getSQLConnectionInfoForHistory(java.lang.String urn)
urn
- the urn
public java.lang.String getTag(java.lang.String codingSchemeURN, java.lang.String version)
codingSchemeURN
- the coding scheme urnversion
- the version
public java.util.Date getDeactivateDate(java.lang.String codingSchemeURN, java.lang.String version)
codingSchemeURN
- the coding scheme urnversion
- the version
public void setDeactivateDate(AbsoluteCodingSchemeVersionReference acsvr, java.util.Date date) throws LBParameterException, LBInvocationException
acsvr
- the acsvrdate
- the date
LBParameterException
- the LB parameter exception
LBInvocationException
- the LB invocation exceptionpublic void setDeactivateDateInternal(AbsoluteCodingSchemeVersionReference acsvr, java.util.Date date) throws LBParameterException, LBInvocationException
acsvr
- the acsvrdate
- the date
LBParameterException
- the LB parameter exception
LBInvocationException
- the LB invocation exceptionpublic java.util.Date getLastUpdateDate(java.lang.String codingSchemeURN, java.lang.String version)
codingSchemeURN
- the coding scheme urnversion
- the version
public void deactivate(XmlRegistry.DBEntry entry) throws LBInvocationException, LBParameterException
entry
- the entry
LBInvocationException
- the LB invocation exception
LBParameterException
- the LB parameter exceptionpublic void setStatusPending(XmlRegistry.DBEntry entry) throws LBInvocationException, LBParameterException
entry
- the new status pending
LBInvocationException
- the LB invocation exception
LBParameterException
- the LB parameter exceptionpublic void activate(AbsoluteCodingSchemeVersionReference codingScheme) throws LBInvocationException, LBParameterException
codingScheme
- the coding scheme
LBInvocationException
- the LB invocation exception
LBParameterException
- the LB parameter exceptionpublic void updateTag(AbsoluteCodingSchemeVersionReference codingScheme, java.lang.String newTag) throws LBInvocationException, LBParameterException
codingScheme
- the coding schemenewTag
- the new tag
LBInvocationException
- the LB invocation exception
LBParameterException
- the LB parameter exceptionpublic void updateVersion(AbsoluteCodingSchemeVersionReference codingScheme, java.lang.String newVersion) throws LBInvocationException, LBParameterException
codingScheme
- the coding schemenewVersion
- the new version
LBInvocationException
- the LB invocation exception
LBParameterException
- the LB parameter exceptionpublic XmlRegistry.DBEntry getEntry(java.lang.String codingSchemeURN, java.lang.String version) throws LBParameterException
codingSchemeURN
- the coding scheme urnversion
- the version
LBParameterException
- the LB parameter exceptionpublic XmlRegistry.DBEntry getDBCodingSchemeEntry(AbsoluteCodingSchemeVersionReference codingScheme) throws LBParameterException
codingScheme
- the coding scheme
LBParameterException
- the LB parameter exceptionpublic void addNewItem(java.lang.String urn, java.lang.String version, java.lang.String status, java.lang.String dbURL, java.lang.String tag, java.lang.String dbName, java.lang.String tablePrefix) throws java.lang.Exception
urn
- the urnversion
- the versionstatus
- the statusdbURL
- the db urltag
- the tagdbName
- the db nametablePrefix
- the table prefix
java.lang.Exception
- the exceptionpublic XmlRegistry.HistoryEntry addNewHistory(java.lang.String urn, java.lang.String dbURL, java.lang.String dbName, java.lang.String tablePrefix) throws java.lang.Exception
urn
- the urndbURL
- the db urldbName
- the db nametablePrefix
- the table prefix
java.lang.Exception
- the exceptionpublic java.lang.String getVersionForTag(java.lang.String urn, java.lang.String tag)
urn
- the urntag
- the tag
public XmlRegistry.DBEntry[] getDBEntries()
public XmlRegistry.HistoryEntry[] getHistoryEntries()
public java.util.Date getLastUpdateTime()
getLastUpdateTime
in interface Registry
public void remove(AbsoluteCodingSchemeVersionReference codingSchemeVersion) throws InternalException, LBInvocationException, LBParameterException
codingSchemeVersion
- the coding scheme version
InternalException
- the internal exception
LBInvocationException
- the LB invocation exception
LBParameterException
- the LB parameter exceptionpublic XmlRegistry.HistoryEntry getHistoryEntry(java.lang.String urn) throws LBParameterException
urn
- the urn
LBParameterException
- the LB parameter exceptionpublic void removeHistoryEntry(java.lang.String urn) throws InternalException, LBInvocationException, LBParameterException
urn
- the urn
InternalException
- the internal exception
LBInvocationException
- the LB invocation exception
LBParameterException
- the LB parameter exceptionpublic java.lang.String getNextDBIdentifier() throws LBInvocationException
getNextDBIdentifier
in interface Registry
LBInvocationException
- the LB invocation exception
UnexpectedInternalError
public java.lang.String getNextHistoryIdentifier() throws LBInvocationException
getNextHistoryIdentifier
in interface Registry
LBInvocationException
- the LB invocation exception
UnexpectedInternalError
public void updateURNVersion(AbsoluteCodingSchemeVersionReference oldURNVerison, AbsoluteCodingSchemeVersionReference newURNVerison) throws LBInvocationException, LBParameterException
oldURNVerison
- the old urn verisonnewURNVerison
- the new urn verison
LBInvocationException
- the LB invocation exception
LBParameterException
- the LB parameter exceptionpublic void addNewItem(RegistryEntry entry) throws java.lang.Exception
Registry
addNewItem
in interface Registry
entry
- the entry
java.lang.Exception
- the exceptionpublic java.util.List<RegistryEntry> getAllRegistryEntries()
Registry
getAllRegistryEntries
in interface Registry
public java.util.List<RegistryEntry> getAllRegistryEntriesOfType(Registry.ResourceType type)
Registry
getAllRegistryEntriesOfType
in interface Registry
type
- the type
public java.util.List<RegistryEntry> getAllRegistryEntriesOfTypeAndURI(Registry.ResourceType type, java.lang.String uri)
Registry
getAllRegistryEntriesOfTypeAndURI
in interface Registry
type
- the resource typeuri
- the resource uri
public java.util.List<RegistryEntry> getAllRegistryEntriesOfTypeURIAndVersion(Registry.ResourceType type, java.lang.String uri, java.lang.String version)
Registry
getAllRegistryEntriesOfTypeURIAndVersion
in interface Registry
type
- the resource typeuri
- the resource uriversion
- the verion
public java.util.List<RegistryEntry> getEntriesForUri(java.lang.String uri) throws LBParameterException
Registry
getEntriesForUri
in interface Registry
uri
- the uri
LBParameterException
- the LB parameter exceptionpublic RegistryEntry getNonCodingSchemeEntry(java.lang.String uri) throws LBParameterException
Registry
getNonCodingSchemeEntry
in interface Registry
uri
- the uri
LBParameterException
- the LB parameter exceptionpublic boolean containsCodingSchemeEntry(AbsoluteCodingSchemeVersionReference codingScheme)
Registry
containsCodingSchemeEntry
in interface Registry
codingScheme
- the coding scheme
public RegistryEntry getCodingSchemeEntry(AbsoluteCodingSchemeVersionReference codingScheme) throws LBParameterException
Registry
getCodingSchemeEntry
in interface Registry
codingScheme
- the coding scheme
LBParameterException
- the LB parameter exceptionpublic void removeEntry(RegistryEntry entry) throws LBParameterException
Registry
removeEntry
in interface Registry
entry
- the entry
LBParameterException
- the LB parameter exceptionpublic void updateEntry(RegistryEntry entry)
Registry
updateEntry
in interface Registry
entry
- the entrypublic boolean containsNonCodingSchemeEntry(java.lang.String uri)
Registry
containsNonCodingSchemeEntry
in interface Registry
uri
- the uri
protected java.lang.String getSupportedLexGridSchemaVersionForCodingScheme(AbsoluteCodingSchemeVersionReference ref) throws LBInvocationException
ref
- the ref
LBInvocationException
- the LB invocation exceptionprotected java.lang.String getSupportedLexGridSchemaVersionForHistory(java.lang.String uri) throws LBInvocationException
uri
- the uri
LBInvocationException
- the LB invocation exceptionpublic javax.sql.DataSource getDataSource()
public void setDataSource(javax.sql.DataSource dataSource)
dataSource
- the new data sourcepublic void updateCodingSchemeEntryTag(AbsoluteCodingSchemeVersionReference codingScheme, java.lang.String newTag) throws LBParameterException
codingScheme
- the coding schemenewTag
- the new tag
LBParameterException
- the LB parameter exception
|
Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |