Pepper 3.7.0
A highly extensible plattform for conversion and
|
This is a PepperImporter
which imports the SaltXML format into a salt model.
More...
Inherits PepperImporterImpl, and org.corpus_tools.pepper.modules.PepperImporter.
Public Member Functions | |
Double | isImportable (URI corpusPath) |
Reads recursively first found file and returns 1.0 if file contains: | |
SelfTestDesc | getSelfTestDesc () |
This method is called by the Pepper framework to run an integration test for module. | |
void | importCorpusStructure (SCorpusGraph corpusGraph) throws PepperModuleException |
Imports the corpus-structure by a call of SaltProject#loadSCorpusStructure(URI) . | |
PepperMapper | createPepperMapper (Identifier id) |
Creates a mapper of type EXMARaLDA2SaltMapper . | |
![]() | |
List< FormatDesc > | getSupportedFormats () |
Returns a list of formats, which are importable by this PepperImporter object. | |
CorpusDesc | getCorpusDesc () |
TODO docu. | |
void | setCorpusDesc (CorpusDesc corpusDesc) |
TODO docu. | |
Map< Identifier, URI > | getIdentifier2ResourceTable () |
Stores Identifier objects corresponding to either a SDocument or a SCorpus object, which has been created during the run of importCorpusStructure(SCorpusGraph) . | |
Collection< String > | getDocumentEndings () |
Returns list containing all format endings for files, which are importable and could be mapped to SDocument or SDocumentGraph objects by this Pepper module. | |
Collection< String > | getCorpusEndings () |
Returns a collection of all file endings for a SCorpus object. | |
Collection< String > | getIgnoreEndings () |
Returns a collection of filenames, not to be imported. | |
SALT_TYPE | setTypeOfResource (URI resource) |
This method is a callback and can be overridden by derived importers. | |
FormatDesc | addSupportedFormat (String formatName, String formatVersion, URI formatReference) |
{@inheritDoc PepperModuleDesc::addSupportedFormat(String, String, URI)} | |
![]() | |
PepperModuleDesc | getFingerprint () |
Returns a PepperModuleDesc object, which is a kind of a fingerprint of this PepperModule . | |
MODULE_TYPE | getModuleType () |
Returns the type of this module. | |
ComponentContext | getComponentContext () |
Returns the ComponentContext of the OSGi environment the bundle was started in. | |
String | getName () |
Returns the name of this module. | |
String | getVersion () |
Returns the version of this module. | |
void | setVersion (String value) |
Sets the version of this module. | |
String | getDesc () |
Returns a short description of this module. | |
void | setDesc (String desc) |
Sets a short description of this module. | |
URI | getSupplierContact () |
Returns a uri where to find more information about this module and where to find some contact information to contact the supplier. | |
void | setSupplierContact (URI eMail) |
Sets a uri where to find more information about this module and where to find some contact information to contact the supplier. | |
URI | getSupplierHomepage () |
Sets the URI to the homepage describing the functionality of the module. | |
void | setSupplierHomepage (URI hp) |
Returns the URI to the homepage describing the functionality of the module. | |
PepperModuleProperties | getProperties () |
Returns a PepperModuleProperties object containing properties to customize the behavior of this PepperModule . | |
void | setProperties (PepperModuleProperties properties) |
Sets thePepperModuleProperties object containing properties to customize the behavior of this PepperModule . | |
ModuleController | getModuleController () |
Returns the container and controller object for the current module. | |
void | setPepperModuleController (ModuleController value) |
Sets the container and controller object for the current module. | |
void | setPepperModuleController_basic (ModuleController value) |
Sets the container and controller object for the current module. | |
SaltProject | getSaltProject () |
Returns the SaltProject object, which is filled, manipulated or exported by the current module. | |
void | setSaltProject (SaltProject value) |
Sets the SaltProject object, which is filled, manipulated or exported by the current module. | |
SCorpusGraph | getCorpusGraph () |
Returns the SCorpusGraph object which is filled, manipulated or exported by the current module. | |
void | setCorpusGraph (SCorpusGraph value) |
Sets the SCorpusGraph object which is filled, manipulated or exported by the current module. | |
URI | getResources () |
Returns the path of the folder which might contain resources for a Pepper module. | |
void | setResources (URI value) |
Sets the resource folder used by getResources() . | |
URI | getTemproraries () |
TODO make docu. | |
void | setTemproraries (URI value) |
TODO make docu. | |
String | getSymbolicName () |
Returns the symbolic name of this OSGi bundle. | |
void | setSymbolicName (String value) |
Sets the symbolic name of this OSGi bundle. | |
Collection< String > | getStartProblems () |
If isReadyToStart() has returned false, this method returns a list of reasons why this module is not ready to start. | |
boolean | isReadyToStart () throws PepperModuleNotReadyException |
This method is called by the pepper framework after initializing this object and directly before start processing. | |
void | setIsMultithreaded (boolean isMultithreaded) |
Sets whether this PepperModule is able to run multithreaded. | |
boolean | isMultithreaded () |
Returns whether this PepperModule is able to run multithreaded. | |
void | start () throws PepperModuleException |
Starts the conversion process. | |
void | start (Identifier sElementId) throws PepperModuleException |
This method is called by the method start() . | |
List< Identifier > | proposeImportOrder (SCorpusGraph sCorpusGraph) |
This method could be overridden, to make a proposal for the import order of SDocument objects. | |
Double | getProgress (String globalId) |
This method is invoked by the Pepper framework, to get the current progress concerning the SDocument object corresponding to the given Identifier in percent. | |
Double | getProgress () |
This method is invoked by the Pepper framework, to get the current total progress of all SDocument objects being processed by this module. | |
void | end () throws PepperModuleException |
This method is called by the pepper framework at the end of a conversion process. | |
void | done (PepperMapperController controller) |
This method is called by a PepperMapperController object to notify the PepperModule object, that the mapping is done. | |
void | done (Identifier identifier, DOCUMENT_STATUS result) |
This method is called by a PepperMapperController object to notify the PepperModule object, that the mapping for this object is done. | |
Static Public Attributes | |
static final String | MODULE_NAME = "SaltXMLImporter" |
static final String | FORMAT_NAME = "SaltXML" |
static final String | FORMAT_VERSION = "1.0" |
![]() | |
static final String | NEGATIVE_FILE_EXTENSION_MARKER = "-" |
A character or character sequence to mark a file extension as not to be one of the imported ones. | |
![]() | |
static final String | ENDING_FOLDER = "FOLDER" |
A string specifying a value for a folder as ending. | |
static final String | ENDING_LEAF_FOLDER = "LEAF_FOLDER" |
A string specifying a value for a leaf folder as ending. | |
static final String | ENDING_XML = "xml" |
Ending for an xml file. | |
static final String | ENDING_TXT = "txt" |
Ending for an txt file. | |
static final String | ENDING_TAB = "tab" |
Ending for an tab file. | |
static final String | ENDING_ALL_FILES = "ALL_FILES" |
All kinds of file endings. | |
This is a PepperImporter
which imports the SaltXML format into a salt model.
This module assumes, that each document is stored in a separate file. Such a file must contain the document structure. The corpus structure is stored in a single file called saltProject + {@value SaltFactory::FILE_ENDING_SALT}. The value {@value SaltFactory::FILE_ENDING_SALT} can be got by method getSaltFileEnding().
PepperMapper org.corpus_tools.pepper.modules.coreModules.SaltXMLImporter.createPepperMapper | ( | Identifier | id | ) |
Creates a mapper of type EXMARaLDA2SaltMapper
.
{@inheritDoc PepperModule::createPepperMapper(Identifier)}
Implements org.corpus_tools.pepper.modules.PepperModule.
SelfTestDesc org.corpus_tools.pepper.modules.coreModules.SaltXMLImporter.getSelfTestDesc | ( | ) |
This method is called by the Pepper framework to run an integration test for module.
When the method returns null, it means that no integration test is supported. Otherwise, the 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. The simplest way to create a test description is:
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.
Implements org.corpus_tools.pepper.modules.PepperModule.
void org.corpus_tools.pepper.modules.coreModules.SaltXMLImporter.importCorpusStructure | ( | SCorpusGraph | corpusGraph | ) | throws PepperModuleException |
Imports the corpus-structure by a call of SaltProject#loadSCorpusStructure(URI)
.
Implements org.corpus_tools.pepper.modules.PepperImporter.
Double org.corpus_tools.pepper.modules.coreModules.SaltXMLImporter.isImportable | ( | URI | corpusPath | ) |
Reads recursively first found file and returns 1.0 if file contains:
Implements org.corpus_tools.pepper.modules.PepperImporter.