org.LexGrid.LexBIG.Impl.loaders
Class UMLSHistoryLoaderImpl

java.lang.Object
  extended by org.LexGrid.LexBIG.Impl.Extensions.AbstractExtendable
      extended by org.LexGrid.LexBIG.Impl.loaders.UMLSHistoryLoaderImpl
All Implemented Interfaces:
java.io.Serializable, Extendable, Loader, UMLSHistoryLoader, StatusReporter

public class UMLSHistoryLoaderImpl
extends AbstractExtendable
implements UMLSHistoryLoader

See Also:
Serialized Form

Field Summary
static java.lang.String ASYNC_OPTION
           
static java.lang.String name
          Holds the loader name String Constant
 
Constructor Summary
UMLSHistoryLoaderImpl()
           
 
Method Summary
protected  ExtensionDescription buildExtensionDescription()
          Builds the extension description.
 void clearLog()
          Clears any associated log entries.
protected  OptionHolder declareAllowedOptions(OptionHolder holder)
           
 CodingSchemeManifest getCodingSchemeManifest()
          Get the CodingSchemeManifest that would be used to modify the ontology content.
 java.net.URI getCodingSchemeManifestURI()
          Get the URI of the codingSchemeManifest that would be used to modify the ontology content.
 AbsoluteCodingSchemeVersionReference[] getCodingSchemeReferences()
          Returns absolute references for coding schemes loaded or used by the most recent operation; empty if not applicable.
 LoaderPreferences getLoaderPreferences()
          Returns the current LoaderPreferences object.
 LogEntry[] getLog(LogLevel level)
          Returns log entries for the current or most recent load operation that match a particular status; null if no operation has been attempted.
protected  LgLoggerIF getLogger()
           
 OntologyFormat getOntologyFormat()
          Return the ontology format the loader can handle
 OptionHolder getOptions()
           
 java.net.URI getResourceUri()
           
 LoadStatus getStatus()
          Returns status of the current or most recent load or validate operation; null if no operation has been attempted.
 void load(java.net.URI resource)
           
 void load(java.net.URI source, boolean append, boolean stopOnErrors, boolean async)
          Load history from a candidate resource.
 void load(java.net.URI source, java.net.URI versions, boolean append, boolean stopOnErrors, boolean async)
           
static void register()
           
 void setCodingSchemeManifest(CodingSchemeManifest codingSchemeManifest)
          Set the CodingSchemeManifest that would be used to modify the ontology content.
 void setCodingSchemeManifestURI(java.net.URI codingSchemeManifestUri)
          Set the URI of the codingSchemeManifest that would be used to modify the ontology content.
 void setLoaderPreferences(LoaderPreferences loaderPreferences)
          Sets the Loader's LoaderPreferences.
 void setLoaderPreferences(java.net.URI loaderPreferencesURI)
          Sets the Loader's LoaderPreferences URI.
 void setOptions(OptionHolder options)
           
 void setResourceUri(java.net.URI resourceUri)
           
 void validate(java.net.URI source, int validationLevel)
          Validate history for a candidate resource without performing a load.
 void validate(java.net.URI source, java.net.URI versions, int validationLevel)
           
 
Methods inherited from class org.LexGrid.LexBIG.Impl.Extensions.AbstractExtendable
getDescription, getExtensionDescription, getName, getProvider, getVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.LexGrid.LexBIG.Extensions.Extendable
getDescription, getName, getProvider, getVersion
 

Field Detail

name

public static final java.lang.String name
Holds the loader name String Constant

See Also:
Constant Field Values

ASYNC_OPTION

public static java.lang.String ASYNC_OPTION
Constructor Detail

UMLSHistoryLoaderImpl

public UMLSHistoryLoaderImpl()
Method Detail

getLogger

protected LgLoggerIF getLogger()

buildExtensionDescription

protected ExtensionDescription buildExtensionDescription()
Description copied from class: AbstractExtendable
Builds the extension description.

Specified by:
buildExtensionDescription in class AbstractExtendable
Returns:
the extension description

load

public void load(java.net.URI source,
                 java.net.URI versions,
                 boolean append,
                 boolean stopOnErrors,
                 boolean async)
          throws LBException
Throws:
LBException

validate

public void validate(java.net.URI source,
                     java.net.URI versions,
                     int validationLevel)
              throws LBException
Throws:
LBException

declareAllowedOptions

protected OptionHolder declareAllowedOptions(OptionHolder holder)

load

public void load(java.net.URI resource)
Specified by:
load in interface Loader

load

public void load(java.net.URI source,
                 boolean append,
                 boolean stopOnErrors,
                 boolean async)
          throws LBException
Description copied from interface: UMLSHistoryLoader
Load history from a candidate resource. An exception is raised if resources cannot be accessed or another load operation is already in progress.

Specified by:
load in interface UMLSHistoryLoader
Parameters:
source - URI specifying location of the history file.
append - True means that the provided history file will be added into the current history database (a new db will be created if none exist) False means that the current database will be replaced by the new content.
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.
Throws:
LBException

validate

public void validate(java.net.URI source,
                     int validationLevel)
              throws LBException
Description copied from interface: UMLSHistoryLoader
Validate history for a candidate resource without performing a load. Returns without exception if validation succeeds.

Specified by:
validate in interface UMLSHistoryLoader
Parameters:
source - URI corresponding to the history file.
validationLevel - Supported levels of validation include: 0 = Verify top 10 lines are correct format. 1 = Verify entire file.
Throws:
LBException

setOptions

public void setOptions(OptionHolder options)

getOptions

public OptionHolder getOptions()
Specified by:
getOptions in interface Loader

setResourceUri

public void setResourceUri(java.net.URI resourceUri)

getResourceUri

public java.net.URI getResourceUri()

clearLog

public void clearLog()
Description copied from interface: Loader
Clears any associated log entries.

Specified by:
clearLog in interface Loader

getCodingSchemeManifest

public CodingSchemeManifest getCodingSchemeManifest()
Description copied from interface: Loader
Get the CodingSchemeManifest that would be used to modify the ontology content. Once the ontology is loaded from the source, the manifest would then be applied to modify the loaded content.

Specified by:
getCodingSchemeManifest in interface Loader

getCodingSchemeManifestURI

public java.net.URI getCodingSchemeManifestURI()
Description copied from interface: Loader
Get the URI of the codingSchemeManifest that would be used to modify the ontology content. Once the ontology is loaded from the source, the manifest would then be applied to modify the loaded content.

Specified by:
getCodingSchemeManifestURI in interface Loader

getCodingSchemeReferences

public AbsoluteCodingSchemeVersionReference[] getCodingSchemeReferences()
Description copied from interface: Loader
Returns absolute references for coding schemes loaded or used by the most recent operation; empty if not applicable.

Specified by:
getCodingSchemeReferences in interface Loader

getLoaderPreferences

public LoaderPreferences getLoaderPreferences()
Description copied from interface: Loader
Returns the current LoaderPreferences object.

Specified by:
getLoaderPreferences in interface Loader
Returns:
The current LoaderPreferences

getLog

public LogEntry[] getLog(LogLevel level)
Description copied from interface: Loader
Returns log entries for the current or most recent load operation that match a particular status; null if no operation has been attempted.

Specified by:
getLog in interface Loader
Specified by:
getLog in interface StatusReporter

getStatus

public LoadStatus getStatus()
Description copied from interface: Loader
Returns status of the current or most recent load or validate operation; null if no operation has been attempted.

Specified by:
getStatus in interface Loader
Specified by:
getStatus in interface StatusReporter

setCodingSchemeManifest

public void setCodingSchemeManifest(CodingSchemeManifest codingSchemeManifest)
Description copied from interface: Loader
Set the CodingSchemeManifest that would be used to modify the ontology content. Once the ontology is loaded from the source, the manifest would then be applied to modify the loaded content.

Specified by:
setCodingSchemeManifest in interface Loader

setCodingSchemeManifestURI

public void setCodingSchemeManifestURI(java.net.URI codingSchemeManifestUri)
                                throws LBException
Description copied from interface: Loader
Set the URI of the codingSchemeManifest that would be used to modify the ontology content. The CodingSchemeManifest object referenced by the URI is used to set the codingSchemeManifest as well. Once the ontology is loaded from the source, the manifest would then be applied to modify the loaded content.

Specified by:
setCodingSchemeManifestURI in interface Loader
Throws:
LBException

setLoaderPreferences

public void setLoaderPreferences(LoaderPreferences loaderPreferences)
                          throws LBParameterException
Description copied from interface: Loader
Sets the Loader's LoaderPreferences.

Specified by:
setLoaderPreferences in interface Loader
Parameters:
loaderPreferences - The LoaderPreference object to be loaded. It is recommended that all implementing classes check if the LoaderPreferences object is valid for the loader.
Throws:
LBParameterException

setLoaderPreferences

public void setLoaderPreferences(java.net.URI loaderPreferencesURI)
                          throws LBParameterException
Description copied from interface: Loader
Sets the Loader's LoaderPreferences URI.

Specified by:
setLoaderPreferences in interface Loader
Throws:
LBParameterException

register

public static void register()

getOntologyFormat

public OntologyFormat getOntologyFormat()
Description copied from interface: Loader
Return the ontology format the loader can handle

Specified by:
getOntologyFormat in interface Loader

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.