|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.LexGrid.LexBIG.Impl.Extensions.AbstractExtendable
org.LexGrid.LexBIG.Impl.loaders.BaseLoader
public abstract class BaseLoader
Common loader code.
Nested Class Summary | |
---|---|
protected class |
BaseLoader.DoConversion
|
Field Summary | |
---|---|
static java.lang.String |
ASYNC_OPTION
|
static java.lang.String |
FAIL_ON_ERROR_OPTION
|
protected boolean |
inUse
|
static java.lang.String |
LOADER_POST_PROCESSOR_OPTION
|
static java.lang.String |
LOADER_PREFERENCE_FILE_OPTION
|
static java.lang.String |
MANIFEST_FILE_OPTION
|
static java.lang.String |
SUPPLEMENT_OPTION
|
Constructor Summary | |
---|---|
BaseLoader()
|
Method Summary | |
---|---|
void |
addBooleanOptionValue(java.lang.String optionName,
java.lang.Boolean value)
|
protected void |
baseLoad(boolean async)
|
protected void |
buildRootNode(AbsoluteCodingSchemeVersionReference reference,
java.util.List<java.lang.String> associationNames,
java.lang.String relationContainerName,
LexEvsDatabaseOperations.RootOrTail rootOrTail,
LexEvsDatabaseOperations.TraverseAssociations traverse)
Build root (or tail) nodes. |
void |
clearLog()
Clears any associated log entries. |
protected URNVersionPair[] |
constructVersionPairsFromCodingSchemes(java.lang.Object... loadedObject)
|
protected CachingMessageDirectorIF |
createCachingMessageDirectorIF()
|
protected CodingSchemeInserter |
createDefaultInserter()
|
protected CodingSchemeInserter |
createDefaultInserter(CodingScheme codingScheme)
|
protected abstract OptionHolder |
declareAllowedOptions(OptionHolder holder)
|
protected boolean |
doesOptionExist(java.util.List<? extends BaseOption<?>> options,
java.lang.String optionName)
|
protected void |
doIndex(AbsoluteCodingSchemeVersionReference[] references)
|
protected abstract URNVersionPair[] |
doLoad()
|
protected void |
doPostProcessing(OptionHolder options,
AbsoluteCodingSchemeVersionReference[] references)
|
protected void |
doTransitiveAndIndex(AbsoluteCodingSchemeVersionReference[] references)
|
protected void |
doTransitiveTable(AbsoluteCodingSchemeVersionReference[] references)
|
protected AbsoluteCodingSchemeVersionReference |
getAbsoluteCodingSchemeVersionReferenceFromOptionString(java.lang.String optionString)
|
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. |
java.lang.String |
getDescription()
Return a description of the extension. |
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()
|
ManifestUtil |
getManifestUtil()
|
CachingMessageDirectorIF |
getMessageDirector()
|
java.lang.String |
getName()
Return the name assigned to this service extension. |
OntologyFormat |
getOntologyFormat()
Return the ontology format the loader can handle |
OptionHolder |
getOptions()
|
protected LoaderPostProcessor |
getPostProcessor(java.lang.String postProcessorName)
|
java.lang.String |
getProvider()
Return an identifier for the extension provider. |
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. |
java.lang.String |
getStringFromURI(java.net.URI uri)
|
java.lang.String |
getVersion()
Return version information about the extension. |
boolean |
isDoApplyPostLoadManifest()
|
boolean |
isDoComputeTransitiveClosure()
|
boolean |
isDoIndexing()
|
boolean |
isDoRegister()
|
boolean |
isDoRemoveOnFailure()
|
boolean |
isInUse()
|
void |
load(java.net.URI resource)
|
protected void |
lock(URNVersionPair lockInfo)
|
protected void |
persistCodingSchemeToDatabase(CodingScheme codingScheme)
|
protected void |
persistCodingSchemeToDatabase(CodingSchemeInserter inserter,
CodingScheme codingScheme)
|
void |
register()
|
protected void |
register(URNVersionPair[] loadedCodingSchemes)
|
protected void |
setCachingMessageDirectorIF(CachingMessageDirectorIF md)
|
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 |
setCodingSchemeReferences(AbsoluteCodingSchemeVersionReference[] codingSchemeReferences)
|
void |
setDoApplyPostLoadManifest(boolean doApplyPostLoadManifest)
|
void |
setDoComputeTransitiveClosure(boolean doComputeTransitiveClosure)
|
void |
setDoIndexing(boolean doIndexing)
|
void |
setDoRegister(boolean doRegister)
|
void |
setDoRemoveOnFailure(boolean doRemoveOnFailure)
|
protected void |
setInUse()
|
void |
setLoaderPreferences(LoaderPreferences loaderPreferences)
Sets the Loader's LoaderPreferences. |
void |
setLoaderPreferences(java.net.URI loaderPreferences)
Sets the Loader's LoaderPreferences. |
void |
setManifestUtil(ManifestUtil manifestUtil)
|
void |
setOptions(OptionHolder options)
|
void |
setResourceUri(java.net.URI resourceUri)
|
void |
setStatus(LoadStatus status)
|
protected void |
unlock(URNVersionPair lockInfo)
|
protected AbsoluteCodingSchemeVersionReference[] |
urnVersionPairToAbsoluteCodingSchemeVersionReference(URNVersionPair[] versionPairs)
|
Methods inherited from class org.LexGrid.LexBIG.Impl.Extensions.AbstractExtendable |
---|
buildExtensionDescription, getExtensionDescription |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String LOADER_POST_PROCESSOR_OPTION
public static java.lang.String SUPPLEMENT_OPTION
public static java.lang.String MANIFEST_FILE_OPTION
public static java.lang.String LOADER_PREFERENCE_FILE_OPTION
public static java.lang.String ASYNC_OPTION
public static java.lang.String FAIL_ON_ERROR_OPTION
protected boolean inUse
Constructor Detail |
---|
public BaseLoader()
Method Detail |
---|
protected void baseLoad(boolean async) throws LBInvocationException
LBInvocationException
protected CachingMessageDirectorIF createCachingMessageDirectorIF()
public boolean isInUse()
public void setManifestUtil(ManifestUtil manifestUtil)
public void setCodingSchemeReferences(AbsoluteCodingSchemeVersionReference[] codingSchemeReferences)
protected LgLoggerIF getLogger()
protected void setInUse() throws LBInvocationException
LBInvocationException
protected AbsoluteCodingSchemeVersionReference[] urnVersionPairToAbsoluteCodingSchemeVersionReference(URNVersionPair[] versionPairs)
protected AbsoluteCodingSchemeVersionReference getAbsoluteCodingSchemeVersionReferenceFromOptionString(java.lang.String optionString) throws LBParameterException, LBInvocationException
LBParameterException
LBInvocationException
protected void doPostProcessing(OptionHolder options, AbsoluteCodingSchemeVersionReference[] references) throws LBParameterException
LBParameterException
protected void doTransitiveAndIndex(AbsoluteCodingSchemeVersionReference[] references) throws java.lang.Exception
java.lang.Exception
protected void buildRootNode(AbsoluteCodingSchemeVersionReference reference, java.util.List<java.lang.String> associationNames, java.lang.String relationContainerName, LexEvsDatabaseOperations.RootOrTail rootOrTail, LexEvsDatabaseOperations.TraverseAssociations traverse) throws java.lang.Exception
codingSchemes
- associations
- sci
- root
- - true for root nodes, false for tail nodes.
java.lang.Exception
protected void doIndex(AbsoluteCodingSchemeVersionReference[] references) throws java.lang.Exception
java.lang.Exception
protected void doTransitiveTable(AbsoluteCodingSchemeVersionReference[] references) throws java.lang.Exception
java.lang.Exception
protected void register(URNVersionPair[] loadedCodingSchemes) throws java.lang.Exception
java.lang.Exception
protected void persistCodingSchemeToDatabase(CodingScheme codingScheme) throws CodingSchemeAlreadyLoadedException
CodingSchemeAlreadyLoadedException
protected void persistCodingSchemeToDatabase(CodingSchemeInserter inserter, CodingScheme codingScheme) throws CodingSchemeAlreadyLoadedException
CodingSchemeAlreadyLoadedException
protected CodingSchemeInserter createDefaultInserter()
protected CodingSchemeInserter createDefaultInserter(CodingScheme codingScheme)
public LoadStatus getStatus()
Loader
getStatus
in interface Loader
getStatus
in interface StatusReporter
public void setStatus(LoadStatus status)
public LogEntry[] getLog(LogLevel level)
Loader
getLog
in interface Loader
getLog
in interface StatusReporter
public void clearLog()
Loader
clearLog
in interface Loader
public java.lang.String getName()
Extendable
getName
in interface Extendable
getName
in class AbstractExtendable
public java.lang.String getDescription()
Extendable
getDescription
in interface Extendable
getDescription
in class AbstractExtendable
public java.lang.String getVersion()
Extendable
getVersion
in interface Extendable
getVersion
in class AbstractExtendable
public java.lang.String getProvider()
Extendable
getProvider
in interface Extendable
getProvider
in class AbstractExtendable
protected void lock(URNVersionPair lockInfo) throws LBInvocationException, LBParameterException
LBInvocationException
LBParameterException
protected void unlock(URNVersionPair lockInfo) throws LBInvocationException, LBParameterException
LBInvocationException
LBParameterException
public java.lang.String getStringFromURI(java.net.URI uri) throws LBParameterException
LBParameterException
public void setCodingSchemeManifest(CodingSchemeManifest codingSchemeManifest)
setCodingSchemeManifest
in interface Loader
csm
- public CodingSchemeManifest getCodingSchemeManifest()
getCodingSchemeManifest
in interface Loader
csm
- public void setCodingSchemeManifestURI(java.net.URI codingSchemeManifestURI)
setCodingSchemeManifestURI
in interface Loader
csm
- public java.net.URI getCodingSchemeManifestURI()
getCodingSchemeManifestURI
in interface Loader
csm
- public LoaderPreferences getLoaderPreferences()
getLoaderPreferences
in interface Loader
public void setLoaderPreferences(LoaderPreferences loaderPreferences) throws LBParameterException
setLoaderPreferences
in interface Loader
loaderPreferences
- The LoaderPreference object to be loaded. It is recommended
that all subclasses override and check if the
LoaderPreferences object is valid for the particular loader.
LBParameterException
public void setLoaderPreferences(java.net.URI loaderPreferences) throws LBParameterException
setLoaderPreferences
in interface Loader
loaderPreferences
- The LoaderPreference XML URI to be loaded.
LBParameterException
protected abstract URNVersionPair[] doLoad() throws java.lang.Exception
java.lang.Exception
public void load(java.net.URI resource)
load
in interface Loader
protected boolean doesOptionExist(java.util.List<? extends BaseOption<?>> options, java.lang.String optionName)
protected abstract OptionHolder declareAllowedOptions(OptionHolder holder)
public void register() throws LBParameterException, LBException
LBParameterException
LBException
protected URNVersionPair[] constructVersionPairsFromCodingSchemes(java.lang.Object... loadedObject)
protected LoaderPostProcessor getPostProcessor(java.lang.String postProcessorName) throws LBParameterException
LBParameterException
public void addBooleanOptionValue(java.lang.String optionName, java.lang.Boolean value)
public AbsoluteCodingSchemeVersionReference[] getCodingSchemeReferences()
Loader
getCodingSchemeReferences
in interface Loader
public OptionHolder getOptions()
getOptions
in interface Loader
public void setOptions(OptionHolder options)
public java.net.URI getResourceUri()
public void setResourceUri(java.net.URI resourceUri)
public boolean isDoIndexing()
public void setDoIndexing(boolean doIndexing)
public boolean isDoComputeTransitiveClosure()
public void setDoComputeTransitiveClosure(boolean doComputeTransitiveClosure)
public boolean isDoRegister()
public void setDoRegister(boolean doRegister)
public boolean isDoApplyPostLoadManifest()
public void setDoApplyPostLoadManifest(boolean doApplyPostLoadManifest)
public CachingMessageDirectorIF getMessageDirector()
protected void setCachingMessageDirectorIF(CachingMessageDirectorIF md)
public ManifestUtil getManifestUtil()
public void setDoRemoveOnFailure(boolean doRemoveOnFailure)
public boolean isDoRemoveOnFailure()
public OntologyFormat getOntologyFormat()
Loader
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. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |