org.LexGrid.LexBIG.Impl.loaders
Class MrmapRRFLoader
java.lang.Object
org.LexGrid.LexBIG.Impl.Extensions.AbstractExtendable
org.LexGrid.LexBIG.Impl.loaders.BaseLoader
org.LexGrid.LexBIG.Impl.loaders.MrmapRRFLoader
- All Implemented Interfaces:
- java.io.Serializable, Extendable, Loader, MrMap_Loader, StatusReporter
public class MrmapRRFLoader
- extends BaseLoader
- implements MrMap_Loader
Loader class for MrMap and MrSat RRF files resulting in a
mapping coding scheme or schemes depending on the content of these files.
- Author:
- Scott Bauer
- See Also:
- Serialized Form
Method Summary |
protected ExtensionDescription |
buildExtensionDescription()
Builds the extension description. |
protected OptionHolder |
declareAllowedOptions(OptionHolder holder)
|
protected URNVersionPair[] |
doLoad()
|
OntologyFormat |
getOntologyFormat()
Return the ontology format the loader can handle |
void |
load(java.net.URI mrMapsource,
java.net.URI mrSatSource,
java.lang.String nameForMappingScheme,
java.lang.String nameForMappingVersion,
java.lang.String nameforMappingURI,
boolean stopOnErrors,
boolean async)
|
void |
load(java.net.URI mrMapsource,
java.net.URI mrSatSource,
java.lang.String nameForMappingScheme,
java.lang.String nameForMappingVersion,
java.lang.String nameforMappingURI,
java.lang.String sourceScheme,
java.lang.String sourceVersion,
java.lang.String sourceURI,
java.lang.String targetScheme,
java.lang.String targetVersion,
java.lang.String targetURI,
boolean stopOnErrors,
boolean async)
User designated target Scheme URI. |
static void |
main(java.lang.String[] args)
|
void |
validate(java.lang.String source,
int validationLevel)
Validate content for a candidate resource without performing a load. |
Methods inherited from class org.LexGrid.LexBIG.Impl.loaders.BaseLoader |
addBooleanOptionValue, baseLoad, buildRootNode, clearLog, constructVersionPairsFromCodingSchemes, createCachingMessageDirectorIF, createDefaultInserter, createDefaultInserter, doesOptionExist, doIndex, doPostProcessing, doTransitiveAndIndex, doTransitiveTable, getAbsoluteCodingSchemeVersionReferenceFromOptionString, getCodingSchemeManifest, getCodingSchemeManifestURI, getCodingSchemeReferences, getDescription, getLoaderPreferences, getLog, getLogger, getManifestUtil, getMessageDirector, getName, 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 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, getOptions, getStatus, load, setCodingSchemeManifest, setCodingSchemeManifestURI, setLoaderPreferences, setLoaderPreferences |
VALIDATE
public static final java.lang.String VALIDATE
- See Also:
- Constant Field Values
MRSAT_URI
public static final java.lang.String MRSAT_URI
- See Also:
- Constant Field Values
MANIFEST_URI
public static final java.lang.String MANIFEST_URI
- See Also:
- Constant Field Values
MrmapRRFLoader
public MrmapRRFLoader()
declareAllowedOptions
protected OptionHolder declareAllowedOptions(OptionHolder holder)
- Specified by:
declareAllowedOptions
in class BaseLoader
doLoad
protected URNVersionPair[] doLoad()
throws java.lang.Exception
- Specified by:
doLoad
in class BaseLoader
- Throws:
java.lang.Exception
buildExtensionDescription
protected ExtensionDescription buildExtensionDescription()
- Description copied from class:
AbstractExtendable
- Builds the extension description.
- Specified by:
buildExtensionDescription
in class AbstractExtendable
- Returns:
- the extension description
main
public static void main(java.lang.String[] args)
- Parameters:
args
-
load
public void load(java.net.URI mrMapsource,
java.net.URI mrSatSource,
java.lang.String nameForMappingScheme,
java.lang.String nameForMappingVersion,
java.lang.String nameforMappingURI,
boolean stopOnErrors,
boolean async)
throws LBException
- Throws:
LBException
load
public void load(java.net.URI mrMapsource,
java.net.URI mrSatSource,
java.lang.String nameForMappingScheme,
java.lang.String nameForMappingVersion,
java.lang.String nameforMappingURI,
java.lang.String sourceScheme,
java.lang.String sourceVersion,
java.lang.String sourceURI,
java.lang.String targetScheme,
java.lang.String targetVersion,
java.lang.String targetURI,
boolean stopOnErrors,
boolean async)
throws LBException
- Description copied from interface:
MrMap_Loader
- User designated target Scheme URI. Non-resolving default used if null.
Load content from a candidate resource. This will also result in implicit
generation of standard indices required by the LexBIG runtime.
An exception is raised if resources cannot be accessed or another load
operation is already in progress.
- Specified by:
load
in interface MrMap_Loader
- Parameters:
mrMapsource
- String representation of the path to corresponding to the RRF
file.mrSatSource
- String representation of the path to corresponding to the RRF
file.nameForMappingScheme
- User designated Mapping Scheme identifier. Default used if
null.nameForMappingVersion
- User designated Mapping Scheme Version. Default used if null.nameforMappingURI
- User designated Mapping Scheme URI. Non-resolving default used
if null.sourceScheme
- User designated source scheme identifier which can a local
scheme to to which mappings resolve. Non resolving default
created if null.sourceVersion
- User designated source scheme Version. Default used if null.
Dependent on valid user defined source scheme identifiersourceURI
- User designated source scheme URI. Non-resolving default used
if null.targetScheme
- User designated target scheme identifier which can a local
scheme to to which mappings resolve. Non resolving default
created if null. Dependent on valid user defined source scheme
identifier.targetVersion
- User designated target scheme Version. Default used if null.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.lang.String source,
int validationLevel)
throws LBException
- Description copied from interface:
MrMap_Loader
- Validate content for a candidate resource without performing a load.
Returns without exception if validation succeeds.
- Specified by:
validate
in interface MrMap_Loader
- Parameters:
source
- URI corresponding to the XML file.validationLevel
- Supported levels of validation include: 0 = Verify XML is well
formed. 1 = Verify XML is valid.
- Throws:
LBException
getOntologyFormat
public OntologyFormat getOntologyFormat()
- Description copied from interface:
Loader
- Return the ontology format the loader can handle
- Specified by:
getOntologyFormat
in interface Loader
- Overrides:
getOntologyFormat
in class BaseLoader