Interface IFileExtractor
Represents a native parser with native components (or a bilingual parser) and bilingual content processors used when reading native or bilingual file.
Inherited Members
Namespace: Sdl.FileTypeSupport.Framework.IntegrationApi
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public interface IFileExtractor : IBilingualProcessorContainer, IFileTypeDefinitionAware
Remarks
The output from the reading operation consists of calls that are generated on
the IBilingual
Properties
AllComponents
Called by the framework during component initialization to detect and initialize
parser components that implement special interfaces such as IShared
Declaration
IEnumerable<object> AllComponents { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Object> | All native and bilingual file type components |
Remarks
The output from the reading operation consists of calls that are generated on
the IBilingual
BilingualParser
Parser for reading a bilingual input file, or null
to read native input files.
Declaration
IBilingualParser BilingualParser { get; set; }
Property Value
Type | Description |
---|---|
IBilingual |
Remarks
If set, the Native
DocumentInfo
Common document properties communicated to all bilingual file type components
Declaration
IDocumentProperties DocumentInfo { get; set; }
Property Value
Type | Description |
---|---|
IDocument |
Remarks
The output from the reading operation consists of calls that are generated on
the IBilingual
FileConversionProperties
This object will be passed to each of the file type components during initialization. Ensure that this property is configured properly before calling Parse(). File type components may change these properties, e.g. to store dynamic settings. To ensure that such settings are preserved for future conversion operations, these properties should be retrieved after successful parsing, and stored for re-use e.g. by persisting them to the bilingual file format.
Declaration
IPersistentFileConversionProperties FileConversionProperties { get; set; }
Property Value
Type | Description |
---|---|
IPersistent |
Remarks
The output from the reading operation consists of calls that are generated on
the IBilingual
FileTweakers
The file tweakers that are currently used by the extractor, in the order in which they will be invoked.
Declaration
IEnumerable<IFilePreTweaker> FileTweakers { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IFile |
An iterator for file tweaker objects |
Remarks
File tweakers can be added or removed using Add
ItemFactory
The framework will set this property as part of the initialization.
Bilingual components should use this factory to create any items that are inserted in the bilingual content model.
Declaration
IDocumentItemFactory ItemFactory { get; set; }
Property Value
Type | Description |
---|---|
IDocument |
Remarks
The output from the reading operation consists of calls that are generated on
the IBilingual
NativeExtractor
Used for reading a native input file.
Declaration
INativeExtractor NativeExtractor { get; set; }
Property Value
Type | Description |
---|---|
INative |
Remarks
Not used if a Bilingual
Output
This object (if not null) receives calls that represent the output from the file reading process.
Declaration
IBilingualContentHandler Output { get; set; }
Property Value
Type | Description |
---|---|
IBilingual |
Remarks
The output from the reading operation consists of calls that are generated on
the IBilingual
SettingsBundle
Settings used by processing components in the extractor
Declaration
ISettingsBundle SettingsBundle { get; set; }
Property Value
Type | Description |
---|---|
ISettings |
Remarks
The output from the reading operation consists of calls that are generated on
the IBilingual
ToBilingualConverter
The component used to convert native input to bilingual content
Declaration
INativeToBilingualConverter ToBilingualConverter { get; set; }
Property Value
Type | Description |
---|---|
INative |
Remarks
Not used if a Bilingual
Methods
AddFileTweaker(IFilePreTweaker)
Append a file tweaker to modify the input file before parsing.
Declaration
void AddFileTweaker(IFilePreTweaker tweaker)
Parameters
Type | Name | Description |
---|---|---|
IFile |
tweaker |
Remarks
File tweakers can be removed using Remove
Parse()
Reads the entire content of the input file.
Declaration
void Parse()
Remarks
The output from the reading operation consists of calls that are generated on
the IBilingual
ParseNext()
Reads the next piece of content from the input file.
Declaration
bool ParseNext()
Returns
Type | Description |
---|---|
Boolean | True if there is more content in the file to be processed, false if not. |
Remarks
The output from the reading operation consists of calls that are generated on
the IBilingual
RemoveFileTweaker(IFilePreTweaker)
Remove the specified file tweaker from the extractor.
Declaration
void RemoveFileTweaker(IFilePreTweaker tweakerToRemove)
Parameters
Type | Name | Description |
---|---|---|
IFile |
tweakerToRemove | The tweaker to remove |
Remarks
File tweakers can be added using Add
Events
Message
Raised when a message is reported from a file type component.
Declaration
event EventHandler<MessageEventArgs> Message
Event Type
Type | Description |
---|---|
Event |
Remarks
The file path property does not need to be set in the event args.
Progress
Fired when progress is reported from the parser.
Declaration
event EventHandler<ProgressEventArgs> Progress
Event Type
Type | Description |
---|---|
Event |
Remarks
The output from the reading operation consists of calls that are generated on
the IBilingual