Search Results for

    Show / Hide Table of Contents

    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
    IBilingualProcessorContainer.AddBilingualProcessor(IBilingualContentProcessor)
    IBilingualProcessorContainer.InsertBilingualProcessor(int, IBilingualContentProcessor)
    IBilingualProcessorContainer.RemoveBilingualProcessor(IBilingualContentProcessor)
    IBilingualProcessorContainer.GetBilingualProcessors()
    IBilingualProcessorContainer.FileRestriction
    IBilingualProcessorContainer.ParagraphUnitRestriction
    IFileTypeDefinitionAware.FileTypeDefinition
    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 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
    IEnumerable<object>

    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 NativeExtractor 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

    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<IFilePreTweaker>

    An iterator for file tweaker objects

    Remarks

    File tweakers can be added or removed using AddFileTweaker(IFilePreTweaker) and RemoveFileTweaker(IFilePreTweaker).

    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

    NativeExtractor

    Used for reading a native input file.

    Declaration
    INativeExtractor NativeExtractor { get; set; }
    Property Value
    Type Description
    INativeExtractor
    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

    AddFileTweaker(IFilePreTweaker)

    Append a file tweaker to modify the input file before parsing.

    Declaration
    void AddFileTweaker(IFilePreTweaker tweaker)
    Parameters
    Type Name Description
    IFilePreTweaker tweaker
    Remarks

    File tweakers can be removed using RemoveFileTweaker(IFilePreTweaker).

    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.

    RemoveFileTweaker(IFilePreTweaker)

    Remove the specified file tweaker from the extractor.

    Declaration
    void RemoveFileTweaker(IFilePreTweaker tweakerToRemove)
    Parameters
    Type Name Description
    IFilePreTweaker tweakerToRemove

    The tweaker to remove

    Remarks

    File tweakers can be added using AddFileTweaker(IFilePreTweaker).

    Events

    Message

    Raised when a message is reported from a file type component.

    Declaration
    event EventHandler<MessageEventArgs> Message
    Event Type
    Type Description
    EventHandler<MessageEventArgs>
    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
    EventHandler<ProgressEventArgs>
    In this article
    • Properties
      • AllComponents
      • BilingualParser
      • DocumentInfo
      • FileConversionProperties
      • FileTweakers
      • ItemFactory
      • NativeExtractor
      • Output
      • SettingsBundle
      • ToBilingualConverter
    • Methods
      • AddFileTweaker(IFilePreTweaker)
      • Parse()
      • ParseNext()
      • RemoveFileTweaker(IFilePreTweaker)
    • Events
      • Message
      • Progress
    Back to top Generated by DocFX