Click or drag to resize
IFileTypeManager Methods

The IFileTypeManager type exposes the following members.

Methods
  NameDescription
Public methodAddFileTypeDefinition
Appends a file type definition to the collection.
Public methodBuildAdditionalGeneratorsInfo
Helper method to create additional generator information so that it can be used by filter component builders.
Public methodBuildBilingualGenerator(IBilingualDocumentWriter)
Helper function to create a bilingual generator for a bilingual document writer, so that it can be used with relevant overloads to GetConverter.
Public methodBuildBilingualGenerator(IFileTypeDefinition)
Helper function used by the file type manager implementation and other components that need to instantiate a bilingual generator for a specific file type.
Public methodBuildDefaultBilingualGenerator
Helper function that constructs an instance of a generator for the default bilingual file format, if set.
Public methodBuildExtractor
Helper function used by the file type manager implementation and other components that need to create components that are normally used through the file converters objects.

Determines the best matching file type for the specified file according to the rules described in the documentation of GetConverter(String, CultureInfo, Codepage, EventHandlerMessageEventArgs) and returns an initialized file extractor that can be used to process the file.

Public methodBuildFileExtractor(IBilingualParser, IFileTypeComponentBuilder)
Helper method to create a file extractor so that it can be used by filter component builders.
Public methodBuildFileExtractor(INativeExtractor, IFileTypeComponentBuilder)
Helper method to create a file extractor so that it can be used by filter component builders.
Public methodBuildFileGenerator(IBilingualWriter)
Helper method to create a file generator so that it can be used by filter component builders.
Public methodBuildFileGenerator(INativeGenerator)
Helper method to create a file generator so that it can be used by filter component builders.
Public methodBuildFileTypeInformation
Helper method to create file type information so that it can be used by filter component builders.
Public methodBuildGeneratorInfo
Helper method to create generator information so that it can be used by filter component builders.
Public methodBuildNativeExtractor
Helper method to create a native extractor so that it can be used by filter component builders.
Public methodBuildNativeGenerator(INativeFileWriter)
Helper method to create a native generator so that it can be used by filter component builders.
Public methodBuildNativeGenerator(IPersistentFileConversionProperties)
Helper function used by the file type manager implementation and other components that need to create a file generator component from a specific file type definition.

Creates and initializes a file generator that can be used to write native output files.

Public methodBuildNativeGeneratorWithVerifiers
This is an alternative implementation of the BuildNativeGenerator(IPersistentFileConversionProperties) method, which creates a generator with objects that will perform native verification of the generated file.
Public methodBuildNativeSubContentExtractor
Helper method to create a native sub-content extractor so that it can be used by filter component builders.
Public methodBuildNativeSubContentGenerator
Helper method to create a native sub content generator so that it can be used by filter component builders.
Public methodBuildPreviewSetsFactory
Helper method to create a preview sets factory so that it can be used by filter compnent builders.
Public methodBuildQuickTagsFactory
Helper method to create a QuickTags factory so that it can be used by filter component builders.
Public methodBuildSubContentExtractor(IBilingualParser, IFileTypeComponentBuilder)
Helper method to create a sub-content extractor so that it can be used by filter component builders.
Public methodBuildSubContentExtractor(INativeSubContentExtractor, IFileTypeComponentBuilder)
Helper method to create a sub-content file extractor so that it can be used by filter component builders.
Public methodBuildSubContentGenerator(IBilingualWriter)
Helper method to create a sub content generator so that it can be used by filter component builders.
Public methodBuildSubContentGenerator(INativeSubContentGenerator)
Helper method to create a sub content generator so that it can be used by filter component builders.
Public methodBuildVerifierCollection
Helper method to create a verifier collection so that it can be used by filter component builders.
Public methodClearFileTypeDefinitions
Removes all file type definitions from the collection.
Public methodCreateFileTypeDefinition(String)
Creates a file type definition based on the filter definition ID of component builder which should be used to create this filter.
Public methodCreateFileTypeDefinition(String, FileTypeProfile)
Creates a file type definition based on the Id and a profile override. The FilterManager must discover the actual component builder associated with this definition and create a new definition based on it. If a profileOverride has been supplied, then this should override the FileTypeInformation for that definition.
Public methodCreateFileTypeDefinition(IFileTypeComponentBuilder, FileTypeProfile)
Creates a file type definition based on component builder and overrides the FileTypeInformation with the supplied profile override.
Public methodFindFileTypeDefinition
Locates a file type definition from the collection using ids.
Public methodGetAllMatchingFileTypeDefinitions

Returns the file type definitions that can operate on the specified file.

Each file type definition is evaluated in order to determine if it can process the file, which may involve invoking the corresponding file sniffer.

Only file type definitions that are enabled and not hidden are evaluated.

Public methodGetConverter(IBilingualParser)
Creates and initializes a file converter to use a specific bilingual parser, and not output to anything in particular.
Public methodGetConverter(String, EventHandlerMessageEventArgs)
Creates and initializes a file converter that can be used to read a single bilingual file, without outputting content to anything in particular.
Public methodGetConverter(String, CultureInfo, Codepage, EventHandlerMessageEventArgs)
Creates and initializes a file converter for reading native files, without passing the output to anything.
Public methodGetConverterToBilingual(IBilingualParser, IBilingualDocumentGenerator, BilingualDocumentOutputPropertiesProvider)
Creates and initializes a file converter for an existing bilingual parser and writer.
Public methodGetConverterToBilingual(String, IBilingualDocumentGenerator, BilingualDocumentOutputPropertiesProvider, EventHandlerMessageEventArgs)
Creates and initializes a file converter for a single file, typically of the default bilingual file type. The specified bilingual document generator will be used for output. The file type definitions are tested in order, and the first file type definition that matches the input file is used. The following steps are used to determine if a file type definition matches the file:
  1. The regular expression is evaluated against the name of the file to be converted. If it does not match, the file type definition is not used.
  2. If a file sniffer is defined for the file type definition, it gets applied to the file. If the file sniffer does not indicate that the file is supported, the file type definition is not used.
If no matching file type definition is found, a OneOrMoreFilesNotSupportedException is thrown.
Public methodGetConverterToBilingual(String, IBilingualDocumentGenerator, BilingualDocumentOutputPropertiesProvider, CultureInfo, Codepage, EventHandlerMessageEventArgs)
Creates and initializes a file converter using the filters that best match a set of native files. The file converter can then be used to process all of the files as one document. The specified bilingual writer will be used for output. The file type definitions are tested in sequence, and the first file type definition that matches a file is used for each file. The following steps are used to determine if a file type definition matches a file:
  1. The regular expression is evaluated against the name of the file to be converted. If it does not match, the file type definition is not used.
  2. If a file sniffer is defined for the file type definition, it gets applied to the file. If the file sniffer does not indicate that the file is supported, the file type definition is not used.
If no matching file type definition is found, a OneOrMoreFilesNotSupportedException is thrown.
Public methodGetConverterToDefaultBilingual(IBilingualParser, String)
Creates and initializes a file converter to write a bilingual output file in the default format, reading input from a specified bilingual parser.
Public methodGetConverterToDefaultBilingual(String, String, EventHandlerMessageEventArgs)
Creates and initializes a file converter in order to read a single (typically bilingual) input file and write a bilingual output file in the default format.

The converter will automatically use the file type that best matches the file to be converted.

The file type definitions are each tested in sequence, and the first file type definition that matches the input file is used. The following steps are used to determine if a file type definition matches:

  1. The regular expression is evaluated against the name of the file to be converted. If it does not match, the file type definition is not used.
  2. If a file sniffer is defined for the file type definition, it is applied to the file. If the file sniffer does not indicate that the file is supported, the file type definition is not used.
If no matching file type definition is found, a OneOrMoreFilesNotSupportedException is thrown.
Public methodCode exampleGetConverterToDefaultBilingual(String, String, CultureInfo, Codepage, EventHandlerMessageEventArgs)
Creates and initializes a file converter in order to create a bilingual file in the default format.

The converter will automatically use the filters that best match the native files to be converted. These converters are selected as described below.

The file type definitions are each tested in sequence, and the first file type definition that matches a file is used for each file. The following steps are used to determine if a file type definition matches a file:

  1. The regular expression is evaluated against the name of the file to be converted. If it does not match, the file type definition is not used.
  2. If a file sniffer is defined for the file type definition, it is applied to the file. If the file sniffer does not indicate that the file is supported, the file type definition is not used.
If no matching file type definition is found, a OneOrMoreFilesNotSupportedException is thrown.
Public methodGetConverterToNative(IBilingualParser, OutputPropertiesProvider)
Creates a converter for writing native output files for content read by a specified bilingual parser.
Public methodCode exampleGetConverterToNative(String, OutputPropertiesProvider, EventHandlerMessageEventArgs)
Creates a converter for parsing a single file and writing native output files.

This is intended for bilingual file types, in which the languages and codepage can be deducted automatically from the file content.

This version is typically used for parsing SDL XLIFF documents (where support for these have been installed as another bilingual file type). However, it could also be used for processing individual native files in which source language (and codepage) can be deducted from the file content.

Public methodGetConverterToNative(String, OutputPropertiesProvider, CultureInfo, Codepage, EventHandlerMessageEventArgs)
Creates and initializes a file converter for reading native files, doing processing on them and creating native files as output in one single pass.

The file type definitions are tested in sequence, and the first file type definition that matches a file is used for each file. The following steps are used to determine if a file type definition matches a file:

  1. The regular expression is evaluated against the name of the file to be converted. If it does not match, the file type definition is not used.
  2. If a file sniffer is defined for the file type definition, it is applied to the file. If the file sniffer does not indicate that the file is supported, the file type definition is not used.
If no matching file type definition is found, a OneOrMoreFilesNotSupportedException is thrown.
Public methodInsertFileTypeDefinition
Inserts a file type definition into the collection at a specific priority position.
Public methodRemoveFileTypeDefinition
Removes a file type definition from the collection. If no such file type definition exists in the collection, nothing happens.
Top
See Also
Community
Edit

Be the first to Edit the community content of this topic.
Comments