Interface IFileTypeDefinition
Represents the functionality of a file type definition as a read-only object, which can be used to instantiate the file type support components.
The file type definition includes all information on the support for a specific file type.
The file type definition uses a IFileTypeComponentBuilder to retrieve the relevant information from persistent storage, e.g. file type definition XML files or database tables.
Namespace: Sdl.FileTypeSupport.Framework.IntegrationApi
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public interface IFileTypeDefinition
Properties
ComponentBuilder
The factory that is used to instantiate actual components for this file type.
Declaration
IFileTypeComponentBuilder ComponentBuilder { get; set; }
Property Value
| Type | Description |
|---|---|
| IFileTypeComponentBuilder |
CustomizationLevel
Determines if the file type definition is standard, customized standard or has been overridden by a file type profile.
Declaration
FileTypeDefinitionCustomizationLevel CustomizationLevel { get; set; }
Property Value
| Type | Description |
|---|---|
| FileTypeDefinitionCustomizationLevel |
FileTypeInformation
Everything you want to know about the file type this particular file type definition represents.
Declaration
IFileTypeInformation FileTypeInformation { get; }
Property Value
| Type | Description |
|---|---|
| IFileTypeInformation |
Methods
BuildAdditionalGeneratorsInfo()
Called to create an instance of the additional generator information specified for this particular file type.
Declaration
IAdditionalGeneratorsInfo BuildAdditionalGeneratorsInfo()
Returns
| Type | Description |
|---|---|
| IAdditionalGeneratorsInfo | An additional generators info object |
BuildBilingualDocumentGenerator()
Called by the file type manager to create an instance of the default intermediate bilingual document generator for this particular file type.
Declaration
IBilingualDocumentGenerator BuildBilingualDocumentGenerator()
Returns
| Type | Description |
|---|---|
| IBilingualDocumentGenerator |
|
Remarks
This is only intended for file types that can be used to fully serialize the content of the bilingual object model (e.g. SDL XLIFF).
BuildExtractor()
Called by the file type manager to instantiate an extractor for the supported file type.
Declaration
IFileExtractor BuildExtractor()
Returns
| Type | Description |
|---|---|
| IFileExtractor |
Remarks
Unlike the file generator, the extractor can be used to parse bilingual documents as well as native files.
BuildGenerator(GeneratorId)
Called to create an instance of the generator of the specified type.
Declaration
IAbstractGenerator BuildGenerator(GeneratorId generatorId)
Parameters
| Type | Name | Description |
|---|---|---|
| GeneratorId | generatorId | Must be a generator type defined in the file type definition, or
|
Returns
| Type | Description |
|---|---|
| IAbstractGenerator | A native or bilingual document generator |
BuildNativeGenerator()
Called by the file type manager to create an instance of the default generator for this particular file type.
Declaration
IFileGenerator BuildNativeGenerator()
Returns
| Type | Description |
|---|---|
| IFileGenerator | A file generator, or |
BuildPreviewApplication(PreviewApplicationId)
Instantiate a preview application of the specified type.
Declaration
IAbstractPreviewApplication BuildPreviewApplication(PreviewApplicationId previewApplicationId)
Parameters
| Type | Name | Description |
|---|---|---|
| PreviewApplicationId | previewApplicationId | Must be a preview application defined in the file type definition. |
Returns
| Type | Description |
|---|---|
| IAbstractPreviewApplication |
BuildPreviewControl(PreviewControlId)
Instantiates a preview control of the specified type.
Declaration
IAbstractPreviewControl BuildPreviewControl(PreviewControlId previewControlId)
Parameters
| Type | Name | Description |
|---|---|---|
| PreviewControlId | previewControlId | Must be a preview control defined in the file type definition |
Returns
| Type | Description |
|---|---|
| IAbstractPreviewControl |
BuildPreviewSetsFactory()
Creates the factory for preview sets available for this file type (if any).
Declaration
IPreviewSetsFactory BuildPreviewSetsFactory()
Returns
| Type | Description |
|---|---|
| IPreviewSetsFactory |
BuildQuickInsertIdsList()
Returns a list of QuickInsertIds which the given file type defines
Declaration
List<QuickInsertIds> BuildQuickInsertIdsList()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<QuickInsertIds> |
BuildQuickTagsFactory()
Creates the factory for QuickTags available for this file type (if any).
Declaration
IQuickTagsFactory BuildQuickTagsFactory()
Returns
| Type | Description |
|---|---|
| IQuickTagsFactory |
BuildSubContentExtractor()
Called by the FileExtractor to instantiate a sub-content extractor for the supported file type
Declaration
ISubContentExtractor BuildSubContentExtractor()
Returns
| Type | Description |
|---|---|
| ISubContentExtractor |
BuildSubContentGenerator()
Called by the FileGenerator to instantiate a sub-content generator for the supported file type
Declaration
ISubContentGenerator BuildSubContentGenerator()
Returns
| Type | Description |
|---|---|
| ISubContentGenerator |
BuildVerifierCollection()
Called by the file type manager to instantiate a set of verifiers.
Declaration
IVerifierCollection BuildVerifierCollection()
Returns
| Type | Description |
|---|---|
| IVerifierCollection |
GetQuickInserts(ISettingsBundle, IFileProperties)
Gets a collection of QuickInserts. This consists of any Default QuickInserts plus any custom ones as well...
Declaration
IQuickTags GetQuickInserts(ISettingsBundle settingsBundle, IFileProperties fileProperties)
Parameters
| Type | Name | Description |
|---|---|---|
| ISettingsBundle | settingsBundle | settingsBundle |
| IFileProperties | fileProperties | fileProperties |
Returns
| Type | Description |
|---|---|
| IQuickTags | IQuickTags object |
IsSupportedFilename(String)
Called by the file type manager to evaluate whether the file may be of a type supported by this file type definition (based on its file name).
Declaration
bool IsSupportedFilename(string nativeFilePath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | nativeFilePath | The file to evaluate |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the file name can be supported by this file type |
Remarks
The file type manager calls this method before calling SniffFile(String, Language, Codepage, INativeTextLocationMessageReporter, ISettingsBundle) in order to perform a quick filtering to avoid having to sniff files unnecessarily.
SniffFile(String, Language, Codepage, INativeTextLocationMessageReporter, ISettingsBundle)
Called by the file type manager to perform file sniffing in order to determine whether the file can be supported by this file type definition.
Declaration
SniffInfo SniffFile(string nativeFilePath, Language suggestedSourceLanguage, Codepage suggestedCodepage, INativeTextLocationMessageReporter messageReporter, ISettingsBundle settingsBundle)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | nativeFilePath | |
| Language | suggestedSourceLanguage | |
| Codepage | suggestedCodepage | |
| INativeTextLocationMessageReporter | messageReporter | Optional message reporter; if specified, it may be used by the file sniffer to report peculiarities detected in the file |
| ISettingsBundle | settingsBundle | This settings bundle may be used by the file type Definition implementation to retrieve a settings group, and pass it to the file sniffer through the ISettingsAware implementation. |
Returns
| Type | Description |
|---|---|
| SniffInfo |