Interface ISubContentExtractor
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: SdlSdl.FileTypeSupportFrameworkIntegrationApi
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public interface ISubContentExtractor : IBilingualProcessorContainer, IFileTypeDefinitionAware
Remarks
The output from the reading operation consists of calls that are generated on the IBilingualContentHandler instance specified by setting the Output property.
Properties
AllComponents
Called by the framework during component initialization to detect and initialize parser components that implement special interfaces such as ISharedObjectsAware.
Declaration
IEnumerable<object> AllComponents { get; }
Property Value
Type | Description |
---|---|
IEnumerableobject | All native and bilingual file type components |
BilingualParser
Parser for reading a bilingual input file, or null
to read native input files.
Declaration
IBilingualParser BilingualParser { get; set; }
Property Value
Type | Description |
---|---|
IBilingualParser |
Remarks
If set, the NativeSubContentExtractor and the ToBilingualConverter are not used.
DocumentInfo
Common document properties communicated to all bilingual file type components
Declaration
IDocumentProperties DocumentInfo { get; set; }
Property Value
Type | Description |
---|---|
IDocumentProperties |
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 |
---|---|
IPersistentFileConversionProperties |
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 |
---|---|
IDocumentItemFactory |
NativeSubContentExtractor
Used for reading a native input file.
Declaration
INativeSubContentExtractor NativeSubContentExtractor { get; set; }
Property Value
Type | Description |
---|---|
INativeSubContentExtractor |
Remarks
Not used if a BilingualParser has been set.
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 |
---|---|
IBilingualContentHandler |
SettingsBundle
Settings used by processing components in the extractor
Declaration
ISettingsBundle SettingsBundle { get; set; }
Property Value
Type | Description |
---|---|
ISettingsBundle |
ToBilingualConverter
The component used to convert native input to bilingual content
Declaration
INativeToBilingualConverter ToBilingualConverter { get; set; }
Property Value
Type | Description |
---|---|
INativeToBilingualConverter |
Remarks
Not used if a BilingualParser has been set.
Methods
GetParser()
Gets the native or bilingual parser
Declaration
IParser GetParser()
Returns
Type | Description |
---|---|
IParser |
Parse()
Reads the entire content of the input file.
Declaration
void Parse()
ParseNext()
Reads the next piece of content from the input file.
Declaration
bool ParseNext()
Returns
Type | Description |
---|---|
bool | True if there is more content in the file to be processed, false if not. |
Events
Message
Raised when a message is reported from a file type component.
Declaration
event EventHandler<MessageEventArgs> Message
Event Type
Type | Description |
---|---|
EventHandlerMessageEventArgs |
Remarks
The file path property does not need to be set in the event args.
ProcessSubContent
Fired when sub-content needs to be processed
Declaration
event EventHandler<ProcessSubContentEventArgs> ProcessSubContent
Event Type
Type | Description |
---|---|
EventHandlerProcessSubContentEventArgs |
Progress
Fired when progress is reported from the parser.
Declaration
event EventHandler<ProgressEventArgs> Progress
Event Type
Type | Description |
---|---|
EventHandlerProgressEventArgs |