public class TextLoaderImpl extends BaseLoader implements Text_Loader
BaseLoader.DoConversion
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DELIMITER_OPTION |
static java.lang.String |
FORCE_FORMAT_B_OPTION |
ASYNC_OPTION, FAIL_ON_ERROR_OPTION, inUse, LOADER_POST_PROCESSOR_OPTION, LOADER_PREFERENCE_FILE_OPTION, MANIFEST_FILE_OPTION, SUPPLEMENT_OPTION
description, name, STD_IN_URI
Constructor and Description |
---|
TextLoaderImpl() |
Modifier and Type | Method and Description |
---|---|
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 source,
java.lang.Character delimiter,
boolean readDoublesAsTriples,
boolean stopOnErrors,
boolean async)
Load content from a candidate resource.
|
static void |
main(java.lang.String[] args) |
void |
validate(java.net.URI uri,
java.lang.Character delimiter,
boolean triplesFormat,
int validationLevel)
Validate content for a candidate resource without performing a load.
|
addBooleanOptionValue, baseLoad, buildRootNode, clearLog, constructVersionPairsFromCodingSchemes, createCachingMessageDirectorIF, createDefaultInserter, createDefaultInserter, doesOptionExist, doIndex, doPostProcessing, doRegister, 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
getExtensionDescription
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clearLog, getCodingSchemeManifest, getCodingSchemeManifestURI, getCodingSchemeReferences, getLoaderPreferences, getLog, getOptions, getStatus, load, setCodingSchemeManifest, setCodingSchemeManifestURI, setLoaderPreferences, setLoaderPreferences
getDescription, getName, getProvider, getVersion
public static final java.lang.String DELIMITER_OPTION
public static java.lang.String FORCE_FORMAT_B_OPTION
public void validate(java.net.URI uri, java.lang.Character delimiter, boolean triplesFormat, int validationLevel) throws LBParameterException
Text_Loader
validate
in interface Text_Loader
uri
- URI corresponding to the text file.delimiter
- Optional - defaults to tab the character used to delimit pair
or triple components and the nesting.triplesFormat
- Force the converter to read a doubles file (name/description)
as a triples file (code/name/description) So it reads codes
and names intead of names and descriptionsvalidationLevel
- Supported levels of validation include: 0 = Verify file syntax
against the indicated format.LBParameterException
public void load(java.net.URI source, java.lang.Character delimiter, boolean readDoublesAsTriples, boolean stopOnErrors, boolean async) throws LBException
Text_Loader
load
in interface Text_Loader
source
- URI corresponding to the text file.delimiter
- Optional - defaults to tab the character used to delimit pair
or triple components and the nesting.readDoublesAsTriples
- Force the converter to read a doubles file (name/description)
as a triples file (code/name/description) So it reads codes
and names instead of names and descriptions.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.LBException
protected URNVersionPair[] doLoad() throws CodingSchemeAlreadyLoadedException
doLoad
in class BaseLoader
CodingSchemeAlreadyLoadedException
public static void main(java.lang.String[] args)
protected OptionHolder declareAllowedOptions(OptionHolder holder)
declareAllowedOptions
in class BaseLoader
protected ExtensionDescription buildExtensionDescription()
AbstractExtendable
buildExtensionDescription
in class AbstractExtendable
public OntologyFormat getOntologyFormat()
Loader
getOntologyFormat
in interface Loader
getOntologyFormat
in class BaseLoader