public abstract class PepperExporterImpl extends PepperModuleImpl implements PepperExporter
This class is an abstract implementation of PepperExporter and cannot
be instantiated directly. To implement an exporter for Pepper, the easiest
way is to derive this class. For further information, read the javadoc of
PepperManipulator and the documentation of
u.hu-berlin.de/saltnpepper.
PepperManipulatorPepperExporter.EXPORT_MODE| Modifier and Type | Field and Description |
|---|---|
protected CorpusDesc |
corpusDefinition
TODO make docu
|
isMultithreaded, logger, moduleController, resources, saltProject, sCorpusGraph, symbolicName, temprorariesENDING_ALL_FILES, ENDING_FOLDER, ENDING_LEAF_FOLDER, ENDING_TAB, ENDING_TXT, ENDING_XML| Modifier | Constructor and Description |
|---|---|
protected |
PepperExporterImpl()
Creates a
PepperModule of type MODULE_TYPE.EXPORTER. |
protected |
PepperExporterImpl(String name)
Creates a
PepperModule of type MODULE_TYPE.EXPORTER and
sets is name to the passed one. |
| Modifier and Type | Method and Description |
|---|---|
FormatDesc |
addSupportedFormat(String formatName,
String formatVersion,
org.eclipse.emf.common.util.URI formatReference) |
org.eclipse.emf.common.util.URI |
createFolderStructure(org.corpus_tools.salt.graph.Identifier id)
Deprecated.
|
void |
exportCorpusStructure()
This method is called by
PepperModule.start() to export the corpus-structure
into a folder-structure. |
CorpusDesc |
getCorpusDesc()
TODO docu
|
String |
getDocumentEnding()
Returns the format ending for files to be exported and related to
SDocument objects. |
PepperExporter.EXPORT_MODE |
getExportMode()
Returns how corpus-structure is exported.
|
Map<org.corpus_tools.salt.graph.Identifier,org.eclipse.emf.common.util.URI> |
getIdentifier2ResourceTable()
Returns table correspondence between
Identifier and a resource. |
List<FormatDesc> |
getSupportedFormats()
TODO docu
|
void |
setCorpusDesc(CorpusDesc newCorpusDefinition)
TODO docu
|
void |
setDocumentEnding(String sDocumentEnding)
Sets the format ending for files to be exported and related to
SDocument objects. |
void |
setExportMode(PepperExporter.EXPORT_MODE exportMode)
{@inheritDoc PepperExporter#setExportMode(org.corpus_tools.pepper.modules.
|
void |
start()
Adds the call of method
#exportCorpusStructure(SCorpusGraph),
than calls PepperModule.start(). |
activate, createPepperMapper, done, done, end, getComponentContext, getCorpusGraph, getDesc, getDocumentId2DC, getFingerprint, getMapperControllers, getMapperThreadGroup, getModuleController, getModuleType, getName, getProgress, getProgress, getProperties, getResources, getSaltProject, getSelfTestDesc, 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, uncaughtExceptionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreatePepperMapper, done, done, end, getComponentContext, getCorpusGraph, getDesc, getFingerprint, getModuleController, getModuleType, getName, getProgress, getProgress, getProperties, getResources, getSaltProject, getSelfTestDesc, getStartProblems, getSupplierContact, getSupplierHomepage, getSymbolicName, getTemproraries, getVersion, isMultithreaded, isReadyToStart, proposeImportOrder, setCorpusGraph, setDesc, setIsMultithreaded, setPepperModuleController_basic, setPepperModuleController, setProperties, setResources, setSaltProject, setSupplierContact, setSupplierHomepage, setSymbolicName, setTemproraries, setVersion, startprotected CorpusDesc corpusDefinition
protected PepperExporterImpl()
PepperModule of type MODULE_TYPE.EXPORTER. The
name of this module is set to "MyExporter". PepperExporterImpl(String) and pass a proper
name.protected PepperExporterImpl(String name)
PepperModule of type MODULE_TYPE.EXPORTER and
sets is name to the passed one.public List<FormatDesc> getSupportedFormats()
getSupportedFormats in interface PepperExporterpublic FormatDesc addSupportedFormat(String formatName, String formatVersion, org.eclipse.emf.common.util.URI formatReference)
addSupportedFormat in interface PepperExporterpublic CorpusDesc getCorpusDesc()
getCorpusDesc in interface PepperExporterpublic void setCorpusDesc(CorpusDesc newCorpusDefinition)
setCorpusDesc in interface PepperExporterpublic void start()
throws PepperModuleException
#exportCorpusStructure(SCorpusGraph),
than calls PepperModule.start().start in interface PepperModulestart in class PepperModuleImplPepperModuleExceptionpublic String getDocumentEnding()
SDocument objects.getDocumentEnding in interface PepperExporterSDocument objects to be exported.public void setDocumentEnding(String sDocumentEnding)
SDocument objects.setDocumentEnding in interface PepperExporterpublic PepperExporter.EXPORT_MODE getExportMode()
getExportMode in interface PepperExporterpublic void setExportMode(PepperExporter.EXPORT_MODE exportMode)
SCorpus objects are exported into a
folder structure, but SDocument objects are not exportedSCorpus objects are exported
into a folder structure and SDocument objects are stored in files
having the ending determined by PepperExporter#getDocumentEnding()setExportMode in interface PepperExporterpublic Map<org.corpus_tools.salt.graph.Identifier,org.eclipse.emf.common.util.URI> getIdentifier2ResourceTable()
Identifier and a resource.
Stores Identifier objects corresponding to either a
SDocument or a SCorpus object, which has been created
during the run of #importCorpusStructure(SCorpusGraph).
Corresponding to the Identifier object this table stores the
resource from where the element shall be imported.| corpus_1 | /home/me/corpora/myCorpus |
| corpus_2 | /home/me/corpora/myCorpus/subcorpus |
| doc_1 | /home/me/corpora/myCorpus/subcorpus/document1.xml |
| doc_2 | /home/me/corpora/myCorpus/subcorpus/document2.xml |
getIdentifier2ResourceTable in interface PepperExporterIdentifier and a resource.public void exportCorpusStructure()
PepperModule.start() to export the corpus-structure
into a folder-structure. That means, each Identifier belonging to
a SDocument or SCorpus object is stored
PepperExporter.getIdentifier2ResourceTable() together with thze corresponding
file-structure object (file or folder) located by a URI. The
URI object corresponding to files will get the file ending
determined by #getDocumentEnding(String), which could be set by
PepperExporter.setDocumentEnding(String). URIs set the export mode via
PepperExporter.setExportMode(EXPORT_MODE).exportCorpusStructure in interface PepperExporter@Deprecated public org.eclipse.emf.common.util.URI createFolderStructure(org.corpus_tools.salt.graph.Identifier id)
CorpusDesc.getCorpusPath()). For each segment in
Identifier a folder is created.createFolderStructure in interface PepperExporterIdentifier as file path, which was
created on diskCopyright © 2009–2021 Humboldt-Universität zu Berlin, INRIA. All rights reserved.