public class DoNothingImporter extends PepperImporterImpl implements PepperImporter
Modifier and Type | Field and Description |
---|---|
static String |
FORMAT_NAME |
static String |
FORMAT_VERSION |
static String |
MODULE_NAME |
corpusDesc
isMultithreaded, logger, moduleController, resources, saltProject, sCorpusGraph, symbolicName, temproraries
NEGATIVE_FILE_EXTENSION_MARKER
ENDING_ALL_FILES, ENDING_FOLDER, ENDING_LEAF_FOLDER, ENDING_TAB, ENDING_TXT, ENDING_XML
Constructor and Description |
---|
DoNothingImporter()
Specifies the separator, which has to be set between to the texts of two
token.
|
Modifier and Type | Method and Description |
---|---|
PepperMapper |
createPepperMapper(org.corpus_tools.salt.graph.Identifier sElementId)
Creates a mapper of type
EXMARaLDA2SaltMapper . |
SelfTestDesc |
getSelfTestDesc()
This method is called by the Pepper framework to run an integration test
for module.
|
void |
importCorpusStructure(org.corpus_tools.salt.common.SCorpusGraph corpusGraph)
This method is called by Pepper at the start of a conversion process to
create the corpus-structure.
|
Double |
isImportable(org.eclipse.emf.common.util.URI corpusPath)
This method is called by Pepper and returns if a corpus located at the
given
URI is importable by this importer. |
addSupportedFormat, getCorpusDesc, getCorpusEndings, getDocumentEndings, getIdentifier2ResourceTable, getIgnoreEndings, getSupportedFormats, importCorpusStructureRec, readXMLResource, sampleFileContent, setCorpusDesc, setCorpusPathResolver, setTypeOfResource, start
activate, done, done, end, getComponentContext, getCorpusGraph, getDesc, getDocumentId2DC, getFingerprint, getMapperControllers, getMapperThreadGroup, getModuleController, getModuleType, getName, getProgress, getProgress, getProperties, getResources, getSaltProject, getStartProblems, getSupplierContact, getSupplierHomepage, getSymbolicName, getTemproraries, getVersion, isMultithreaded, isReadyToStart, proposeImportOrder, setCorpusGraph, setDesc, setIsMultithreaded, setMapperThreadGroup, setName, setPepperModuleController_basic, setPepperModuleController, setProperties, setResources, setSaltProject, setSupplierContact, setSupplierHomepage, setSymbolicName, setTemproraries, setVersion, start, toString, uncaughtException
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addSupportedFormat, getCorpusDesc, getCorpusEndings, getDocumentEndings, getIdentifier2ResourceTable, getIgnoreEndings, getSupportedFormats, setCorpusDesc, setTypeOfResource
done, done, end, getComponentContext, getCorpusGraph, getDesc, getFingerprint, getModuleController, getModuleType, getName, getProgress, getProgress, getProperties, getResources, getSaltProject, getStartProblems, getSupplierContact, getSupplierHomepage, getSymbolicName, getTemproraries, getVersion, isMultithreaded, isReadyToStart, proposeImportOrder, setCorpusGraph, setDesc, setIsMultithreaded, setPepperModuleController_basic, setPepperModuleController, setProperties, setResources, setSaltProject, setSupplierContact, setSupplierHomepage, setSymbolicName, setTemproraries, setVersion, start, start
public static final String MODULE_NAME
public static final String FORMAT_NAME
public static final String FORMAT_VERSION
public DoNothingImporter()
public void importCorpusStructure(org.corpus_tools.salt.common.SCorpusGraph corpusGraph) throws PepperModuleException
PepperImporterImpl
SCorpus
), documents
(represented represented via the Salt element SDocument
) and a
linking between corpora and a corpus and a document (represented via the
Salt element SCorpusRelation
and SCorpusDocumentRelation
). Each corpus corpus can contain 0..* subcorpus and 0..* documents, but
a corpus cannot contain both document and corpus. PepperImporter.setTypeOfResource(URI)
is called to set the type of the
resource. If the type is a SALT_TYPE.SDOCUMENT
a
SDocument
object is created for the resource, if the type is a
SALT_TYPE.SCORPUS
a SCorpus
object is created, if the
type is null, the resource is ignored.importCorpusStructure
in interface PepperImporter
importCorpusStructure
in class PepperImporterImpl
corpusGraph
- an empty graph given by Pepper, which shall contains the
corpus structurePepperModuleException
public Double isImportable(org.eclipse.emf.common.util.URI corpusPath)
PepperImporterImpl
URI
is importable by this importer. If yes, 1 must be
returned, if no 0 must be returned. If it is not quite sure, if the given
corpus is importable by this importer any value between 0 and 1 can be
returned. If this method is not overridden, null is returned.isImportable
in interface PepperImporter
isImportable
in class PepperImporterImpl
public SelfTestDesc getSelfTestDesc()
PepperModule
SelfTestDesc
object needs to
provide an input corpus path and an output corpus path.
When this module is:
SelfTestDesc.getInputCorpusPath()
should contain
the format to be imported. SelfTestDesc.getExpectedCorpusPath()
should contain the expected salt project (for control).SelfTestDesc.getInputCorpusPath()
should
contain a salt project which is the module's input.
SelfTestDesc.getExpectedCorpusPath()
should contain the expected
salt project (for control).SelfTestDesc.getInputCorpusPath()
should contain
a salt project which is the module's input.
SelfTestDesc.getExpectedCorpusPath()
should contain the expected
corpus in output format.return new IntegrationTestDesc(inputPath, outputPath);When this module is an importer or a manipulator the method
SelfTestDesc.compare(SaltProject, SaltProject)
is called to
compare output salt project with expected salt project. When the module
is an exporter the method SelfTestDesc.compare(URI, URI)
is
called to compare the created output folder with an expected one. By
default this method checks whether the file structure and each file is
equal.getSelfTestDesc
in interface PepperModule
getSelfTestDesc
in class PepperModuleImpl
public PepperMapper createPepperMapper(org.corpus_tools.salt.graph.Identifier sElementId)
EXMARaLDA2SaltMapper
.
OVERRIDE THIS METHOD FOR CUSTOMIZED MAPPING.
This method creates a customized PepperMapper
object and returns
it. You can here do some additional initialisations. Thinks like setting
the Identifier
of the SDocument
or SCorpus
object
and the URI
resource is done by the framework (or more in detail
in method PepperModule.start()
). The parameter sElementId
, if a
PepperMapper
object should be created in case of the object to
map is either an SDocument
object or an SCorpus
object of
the mapper should be initialized differently. createPepperMapper
in interface PepperModule
createPepperMapper
in class PepperModuleImpl
sElementId
- Identifier
of the SCorpus
or SDocument
to be processed.PepperMapper
object to do the mapping task for object
connected to given Identifier
Copyright © 2009–2019 Humboldt-Universität zu Berlin, INRIA. All rights reserved.