Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Classes and important methods are in bold, events are in italics.

 

(Task|Import)Controller → depending on the project

creates a DataProvider, depending from where the data comes (Zip, Directory, SingleFile)

creates and calls editor_Models_Import::import(DataProvider)

uses the DataProvider to get and check the import data

sets several data in task and in editor_Models_Import_Configuration

prepares the import worker editor_Models_Import_Worker

prepares the import end worker editor_Models_Import_Worker_SetTaskToOpen

run the workers


editor_Models_Import_Worker

checks the serialized parameters

calls editor_Models_Import_Worker_Import::import

instances a editor_Models_Import_FileList

uses editor_Models_Import_DirectoryParser_WorkingFiles

uses editor_Models_Foldertree

uses editor_Models_Foldertree_SyncToFiles

does the import by calling importWithCollectableErrors

importMetaData → creates and uses editor_Models_Import_MetaData

imports the task template (FIXME should be in own editor_Models_Import_IMetaDataImporter extending class)

fires importMetaData to enable other code to addImporters

imports each configured Importer (added with addImporter)

editor_Models_Import_QmSubsegments is hardcoded (imports MQM XML file)

editor_Models_Import_TermListParser_Tbx is called when TermTagger Plugin is active (imports TBX)

fires beforeDirectoryParsing currently used by transit plugin to create the needed import files

importFiles

fetch files by calling FileList::processProofreadAndReferenceFiles 

 uses editor_Models_Import_DirectoryParser_WorkingFiles

uses editor_Models_Foldertree

uses editor_Models_Foldertree_SyncToFiles

fires afterDirectoryParsing

loops over the found files

creates a file type dependent FileParser Instance for each file

creates the segment processors and link them to the fileparsers

editor_Models_Import_SegmentProcessor_MqmParser → stores MQM data

editor_Models_Import_SegmentProcessor_ProofRead → save the segment data

calls FileParser::parseFile

parses the file and use the above created SegmentProcessors

does the file based word counting

syncFileOrder → syncs the order number of the files to the newly created segments

removeMetaDataTmpFiles → triggers meta data tmp clean up methods of each meta data importer

importRelaisFiles

fetch files by calling FileList::processRelaisFiles 

uses editor_Models_RelaisFoldertree

does the same as importFiles, but only with SegmentProcessor_Relais (extends ProofRead)

updateSegmentFieldViews → creates the materialized view for the task

saves the task entity

fires importCleanup

used to trigger internal clean up stuff after import

triggers Transit Plugin Clean Up call

triggers $dataProvider->postImportHandler();

bound in __wakeup call of the dataProvider

weired here, since dataprovider instance is filled for import preparation outside of the worker,
but is needed for clean up after the worker is finished

fires afterImport

used to trigger external / plugin stuff to be invoked when import and clean up are finished.

  • No labels