org.lexevs.cts2.admin.load
Class CodeSystemLoadOperationImpl

java.lang.Object
  extended by org.lexevs.cts2.LexEvsBasedService
      extended by org.lexevs.cts2.BaseService
          extended by org.lexevs.cts2.author.AuthoringCore
              extended by org.lexevs.cts2.admin.load.CodeSystemLoadOperationImpl
All Implemented Interfaces:
CodeSystemLoadOperation

public class CodeSystemLoadOperationImpl
extends AuthoringCore
implements CodeSystemLoadOperation

Implementation of LexEVS CTS 2 Code System Load Operation.

Author:
Sridhar Dwarkanath

Nested Class Summary
 
Nested classes/interfaces inherited from class org.lexevs.cts2.BaseService
BaseService.KnownTags, BaseService.SortableProperties
 
Constructor Summary
CodeSystemLoadOperationImpl()
           
 
Method Summary
 boolean activateCodeSystem(java.lang.String codeSystemURI, java.lang.String codeSyatemVersion)
          Activates the loaded code system version.
 URNVersionPair applyMetadataToCodeSystem(java.lang.String codeSystemNameOrURI, CodingSchemeVersionOrTag codeSystemVersionOrTag, java.net.URI metadata, java.lang.Boolean stopOnErrors, java.lang.Boolean async, java.lang.Boolean overwriteMetadata)
          Loads custom code system meta data.
 boolean deactivateCodeSystem(java.lang.String codeSystemURI, java.lang.String codeSyatemVersion)
          Deactivates the loaded code system version.
 java.util.List<java.lang.String> getSupportedLoaderNames()
          Returns list of Loader names supported by this LexEVS instance.
 URNVersionPair[] load(CodingScheme codeSystem, java.net.URI metadata, java.lang.Boolean stopOnErrors, java.lang.Boolean async, java.lang.Boolean overwriteMetadata, java.lang.String versionTag, java.lang.Boolean activate)
          Installs a code system (aka terminology) into the terminology service for subsequent access by other service functions.
 URNVersionPair[] load(java.net.URI source, java.net.URI metadata, java.net.URI manifest, java.lang.String loaderName, java.lang.Boolean stopOnErrors, java.lang.Boolean async, java.lang.Boolean overwriteMetadata, java.lang.String versionTag, java.lang.Boolean activate)
          Installs a code system (aka terminology) into the terminology service for subsequent access by other service functions.
 void loadCodeSystemRevsion(CodingScheme codingScheme, RevisionInfo revisionInfo)
          Installs either an entire new version or the necessary revision updates for an already loaded code system (terminology) into the terminology server repository (content included by value or by reference to a location).
static void main(java.lang.String[] args)
           
 
Methods inherited from class org.lexevs.cts2.author.AuthoringCore
addEntryState, createSystemRelease, getCodeSystemShell, getCodeSystemURI, getEntityShell, getLexGridRevisionObject, getSystemReleaseInfoByReleaseId, getSystemReleaseInfoByReleaseURI, populateEntryState, populateRevisionShell, populateRevisionShell, populateRevisionShell, validatedCodingScheme, validateRevisionInfo
 
Methods inherited from class org.lexevs.cts2.BaseService
createUniqueId, getLexEvsCTS2, getServiceInfo
 
Methods inherited from class org.lexevs.cts2.LexEvsBasedService
getDatabaseServiceManager, getIndexServiceManager, getLexBIGService, getLexBIGServiceManager, getLexBIGServiceManagerCredentials, getSystemResourceService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeSystemLoadOperationImpl

public CodeSystemLoadOperationImpl()
Method Detail

loadCodeSystemRevsion

public void loadCodeSystemRevsion(CodingScheme codingScheme,
                                  RevisionInfo revisionInfo)
                           throws LBException
Description copied from interface: CodeSystemLoadOperation
Installs either an entire new version or the necessary revision updates for an already loaded code system (terminology) into the terminology server repository (content included by value or by reference to a location). Includes indicator as to whether intent is to replace whole code system or just replace some elements (codes, associations etc).

Specified by:
loadCodeSystemRevsion in interface CodeSystemLoadOperation
Throws:
LBException

load

public URNVersionPair[] load(CodingScheme codeSystem,
                             java.net.URI metadata,
                             java.lang.Boolean stopOnErrors,
                             java.lang.Boolean async,
                             java.lang.Boolean overwriteMetadata,
                             java.lang.String versionTag,
                             java.lang.Boolean activate)
                      throws LBException
Description copied from interface: CodeSystemLoadOperation
Installs a code system (aka terminology) into the terminology service for subsequent access by other service functions. This operation is used for the initial install of the overall terminology structure itself. This may include the full set of concepts, relationships and so on, or some of these elements may be loaded using the Import Code System Revision operation.

Specified by:
load in interface CodeSystemLoadOperation
Parameters:
codeSystem - code system object to be loaded into the terminology service.
metadata - (Optional) URI of the XML file containing custom code system meta data. loads additional data to be maintained and queried as terminology meta-information within the system. All tags and values are interpreted as simple text-based key/value pairs.
stopOnErrors - True means stop if any load error is detected. False means attempt to load what can be loaded if recoverable errors are encountered.
async - Flag controlling whether load occurs in the calling thread. If true, the load will occur in a separate asynchronous process. If false, this method blocks until the load operation completes or fails. Regardless of setting, the getStatus and getLog calls are used to fetch results.
overwriteMetadata - If true, existing meta data for the code system will be erased. If false, new meta data will be appended to existing meta data.
versionTag - The tag (e.g "devel", "production", ...) to be set for the this code system
activate - True: activates the code system after the load.
Returns:
URN and Version of the loaded code system
Throws:
LBException

applyMetadataToCodeSystem

public URNVersionPair applyMetadataToCodeSystem(java.lang.String codeSystemNameOrURI,
                                                CodingSchemeVersionOrTag codeSystemVersionOrTag,
                                                java.net.URI metadata,
                                                java.lang.Boolean stopOnErrors,
                                                java.lang.Boolean async,
                                                java.lang.Boolean overwriteMetadata)
                                         throws LBException
Description copied from interface: CodeSystemLoadOperation
Loads custom code system meta data. This is to load additional data to be maintained and queried as terminology meta-information within the system.

Specified by:
applyMetadataToCodeSystem in interface CodeSystemLoadOperation
Parameters:
codeSystemNameOrURI - Code system name or URI.
codeSystemVersionOrTag - Code system version or tag.
metadata - URI of the XML file containing custom code system meta data. loads additional data to be maintained and queried as terminology meta-information within the system. All tags and values are interpreted as simple text-based key/value pairs.
stopOnErrors - True means stop if any load error is detected. False means attempt to load what can be loaded if recoverable errors are encountered.
async - Flag controlling whether load occurs in the calling thread. If true, the load will occur in a separate asynchronous process. If false, this method blocks until the load operation completes or fails. Regardless of setting, the getStatus and getLog calls are used to fetch results.
overwriteMetadata - If true, existing meta data for the code system will be erased. If false, new meta data will be appended to existing meta data.
Returns:
URN and Version of the code system
Throws:
LBException

load

public URNVersionPair[] load(java.net.URI source,
                             java.net.URI metadata,
                             java.net.URI manifest,
                             java.lang.String loaderName,
                             java.lang.Boolean stopOnErrors,
                             java.lang.Boolean async,
                             java.lang.Boolean overwriteMetadata,
                             java.lang.String versionTag,
                             java.lang.Boolean activate)
                      throws LBException
Description copied from interface: CodeSystemLoadOperation
Installs a code system (aka terminology) into the terminology service for subsequent access by other service functions. This operation is used for the initial install of the overall terminology structure itself. This may include the full set of concepts, relationships and so on, or some of these elements may be loaded using the Import Code System Revision operation.

Specified by:
load in interface CodeSystemLoadOperation
Parameters:
source - URI corresponding to the code system file.
metadata - (Optional) URI of the XML file containing custom code system meta data. loads additional data to be maintained and queried as terminology meta-information within the system. All tags and values are interpreted as simple text-based key/value pairs.
manifest - (Optional) URI corresponding to the manifest file. The LexGrid Manifest accommodates the need to supplement or override default information provided by the source. More specifically, the manifest provides a means to customize the same code system metadata defined by the LexGrid model, since each element of the manifest extends directly from an element used to define the LexGrid coding scheme(aka code system) object. Each extended element allows for the administrator to specify whether the manifest definition replaces or supplements original values provided in the terminology source. Like the LexGrid Terminology model, the manifest is defined by a formal model mastered as XML Schema.
loaderName - Loader to use for loading the code system. LexEvsCTS2.getSupportedLoaders method returns all the loaders supported by the service. For example, 'OBOLoader' could be used to load code system source that is in OBO format, 'OWLLoader' for code system source in OWL format, etc.
stopOnErrors - True means stop if any load error is detected. False means attempt to load what can be loaded if recoverable errors are encountered.
async - Flag controlling whether load occurs in the calling thread. If true, the load will occur in a separate asynchronous process. If false, this method blocks until the load operation completes or fails. Regardless of setting, the getStatus and getLog calls are used to fetch results.
overwriteMetadata - If true, existing meta data for the code system will be erased. If false, new meta data will be appended to existing meta data.
versionTag - - The tag (e.g "devel", "production", ...) to be set for the this code system
activate - True: activates the code system after the load.
Returns:
URN and Version of the loaded code system
Throws:
LBException

activateCodeSystem

public boolean activateCodeSystem(java.lang.String codeSystemURI,
                                  java.lang.String codeSyatemVersion)
                           throws LBException
Description copied from interface: CodeSystemLoadOperation
Activates the loaded code system version. Only activated code system version will be available for access by other other terminology service functions.

Specified by:
activateCodeSystem in interface CodeSystemLoadOperation
Parameters:
codeSystemURI - URI corresponding to the code system.
codeSyatemVersion - version of the code system.
Returns:
true if activated
Throws:
LBException

deactivateCodeSystem

public boolean deactivateCodeSystem(java.lang.String codeSystemURI,
                                    java.lang.String codeSyatemVersion)
                             throws LBException
Description copied from interface: CodeSystemLoadOperation
Deactivates the loaded code system version. Deactivated code system version will not be available for access by other other terminology service functions.

Specified by:
deactivateCodeSystem in interface CodeSystemLoadOperation
Parameters:
codeSystemURI - URI corresponding to the code system.
codeSyatemVersion - version of the code system.
Returns:
true if deactivated
Throws:
LBException

getSupportedLoaderNames

public java.util.List<java.lang.String> getSupportedLoaderNames()
                                                         throws LBException
Description copied from interface: CodeSystemLoadOperation
Returns list of Loader names supported by this LexEVS instance.

Specified by:
getSupportedLoaderNames in interface CodeSystemLoadOperation
Returns:
List of supported Loader names
Throws:
LBException

main

public static void main(java.lang.String[] args)

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.