org.lexgrid.loader
Class AbstractSpringBatchLoader

java.lang.Object
  extended by org.LexGrid.LexBIG.Impl.Extensions.AbstractExtendable
      extended by org.LexGrid.LexBIG.Impl.loaders.BaseLoader
          extended by org.lexgrid.loader.AbstractSpringBatchLoader
All Implemented Interfaces:
java.io.Serializable, Extendable, Loader, StatusReporter
Direct Known Subclasses:
MetaBatchLoaderImpl, UmlsBatchLoaderImpl

public abstract class AbstractSpringBatchLoader
extends BaseLoader
implements Loader

The Class AbstractSpringBatchLoader.

Author:
Kevin Peterson
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.LexGrid.LexBIG.Impl.loaders.BaseLoader
BaseLoader.DoConversion
 
Field Summary
 
Fields inherited from class org.LexGrid.LexBIG.Impl.loaders.BaseLoader
ASYNC_OPTION, FAIL_ON_ERROR_OPTION, inUse, LOADER_POST_PROCESSOR_OPTION, LOADER_PREFERENCE_FILE_OPTION, MANIFEST_FILE_OPTION, SUPPLEMENT_OPTION
 
Constructor Summary
protected AbstractSpringBatchLoader()
           
 
Method Summary
protected  org.springframework.batch.core.JobParameters buildJobParameters(java.util.Properties props)
          Builds the job parameters.
 org.springframework.batch.core.JobExecution getJobExecution()
           
 URNVersionPair[] getLoadedCodingSchemes()
           
protected abstract  URNVersionPair[] getLoadedCodingSchemes(org.springframework.context.ApplicationContext context)
           
static java.net.URI getURIFromPath(java.lang.String path)
           
protected  void launchJob(java.util.Properties connectionProperties, java.lang.String jobConfigFile, java.lang.String jobName)
          Launch job.
protected  void printJobProperties(java.util.Properties jobProperties)
           
protected  void printStartLogInfo(java.util.Properties connectionProperties, java.lang.String jobConfigFile, java.lang.String jobName)
           
protected  ProcessState processStateConverter(org.springframework.batch.core.BatchStatus status)
           
 void setLoadedCodingSchemes(URNVersionPair[] loadedCodingSchemes)
           
 
Methods inherited from class org.LexGrid.LexBIG.Impl.loaders.BaseLoader
addBooleanOptionValue, baseLoad, buildRootNode, clearLog, constructVersionPairsFromCodingSchemes, createCachingMessageDirectorIF, createDefaultInserter, createDefaultInserter, declareAllowedOptions, doesOptionExist, doIndex, doLoad, doPostProcessing, doTransitiveAndIndex, doTransitiveTable, getAbsoluteCodingSchemeVersionReferenceFromOptionString, getCodingSchemeManifest, getCodingSchemeManifestURI, getCodingSchemeReferences, getDescription, getLoaderPreferences, getLog, getLogger, getManifestUtil, getMessageDirector, getName, getOntologyFormat, getOptions, getPostProcessor, getProvider, getResourceUri, getStatus, getStringFromURI, getVersion, isDoApplyPostLoadManifest, isDoComputeTransitiveClosure, isDoIndexing, isDoRegister, isDoRemoveOnFailure, isInUse, load, lock, persistCodingSchemeToDatabase, persistCodingSchemeToDatabase, register, register, setCachingMessageDirectorIF, setCodingSchemeManifest, setCodingSchemeManifestURI, setCodingSchemeReferences, setDoApplyPostLoadManifest, setDoComputeTransitiveClosure, setDoIndexing, setDoRegister, setDoRemoveOnFailure, setInUse, setLoaderPreferences, setLoaderPreferences, setManifestUtil, setOptions, setResourceUri, setStatus, unlock, urnVersionPairToAbsoluteCodingSchemeVersionReference
 
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
 
Methods inherited from interface org.LexGrid.LexBIG.Extensions.Load.Loader
clearLog, getCodingSchemeManifest, getCodingSchemeManifestURI, getCodingSchemeReferences, getLoaderPreferences, getLog, getOntologyFormat, getOptions, getStatus, load, setCodingSchemeManifest, setCodingSchemeManifestURI, setLoaderPreferences, setLoaderPreferences
 
Methods inherited from interface org.LexGrid.LexBIG.Extensions.Extendable
getDescription, getName, getProvider, getVersion
 

Constructor Detail

AbstractSpringBatchLoader

protected AbstractSpringBatchLoader()
Method Detail

launchJob

protected void launchJob(java.util.Properties connectionProperties,
                         java.lang.String jobConfigFile,
                         java.lang.String jobName)
                  throws java.lang.Exception
Launch job. NOT THREAD SAFE! ONLY ONE Load is allowed at a time.

Parameters:
connectionProperties - the connection properties
jobConfigFile - the job config file
jobName - the job name
Throws:
java.lang.Exception - the exception

getLoadedCodingSchemes

protected abstract URNVersionPair[] getLoadedCodingSchemes(org.springframework.context.ApplicationContext context)

printStartLogInfo

protected void printStartLogInfo(java.util.Properties connectionProperties,
                                 java.lang.String jobConfigFile,
                                 java.lang.String jobName)

printJobProperties

protected void printJobProperties(java.util.Properties jobProperties)

buildJobParameters

protected org.springframework.batch.core.JobParameters buildJobParameters(java.util.Properties props)
Builds the job parameters.

Parameters:
props - the props
Returns:
the job parameters

processStateConverter

protected ProcessState processStateConverter(org.springframework.batch.core.BatchStatus status)

getJobExecution

public org.springframework.batch.core.JobExecution getJobExecution()

getURIFromPath

public static java.net.URI getURIFromPath(java.lang.String path)

setLoadedCodingSchemes

public void setLoadedCodingSchemes(URNVersionPair[] loadedCodingSchemes)

getLoadedCodingSchemes

public URNVersionPair[] getLoadedCodingSchemes()

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.