| IPersistentFileConversionProperties Interface |
File-level properties that are guaranteed to be preserved (if necessary persisted to an intermediate bilingual file format) during different stages of the content processing lifecycle; passed to native content processors, parsers and writers that implement INativeContentCycleAware.
Components can set these properties during parsing, and they will be made available when generating the translated output, or during any other operation used to process content.
Custom properties can be stored as metadata key/value pairs through the IMetaDataContainer implementation. It is recommended that keys are prefixed with a value that is likely to be unique in order to avoid conflicts with unrelated components.
Namespace: Sdl.FileTypeSupport.Framework.NativeApi
The IPersistentFileConversionProperties type exposes the following members.
| Name | Description | |
|---|---|---|
| CreationDate |
The time of the original conversion
| |
| CreationTool |
The name of the tool used for the conversion
| |
| CreationToolVersion |
The version number of the tool used for the conversion
| |
| DependencyFiles | The dependency files used or created while parsing. | |
| FileId |
Unique identifier for this file; can be used to unambigously identify
the file in a bilingual document with multiple files.
| |
| FileSnifferInfo |
Properties determined during successful identification of this
file type
| |
| FileTypeDefinitionId |
The unique identifier for the file type definition used in this conversion.
| |
| HasMetaData | True if there is any metadata in the container
(Inherited from IMetaDataContainer.) | |
| InputFilePath | Full path to the file that should be used as source for the parser. | |
| Item | Convenience getter and setter for metadata using indexer syntax. The getter functionality is equivalent to calling SetMetaData(String, String), and setter functionality is equivalent to GetMetaData(String). | |
| MetaData |
Enumerator for the metadata key/value pairs.
(Inherited from IMetaDataContainer.) | |
| MetaDataCount |
The number of meta data key/value pairs in the container
(Inherited from IMetaDataContainer.) | |
| OriginalEncoding |
The original encoding of the native source language file from which the content originates
| |
| OriginalFilePath |
Full path name to the native file the content originates from.
| |
| PreferredTargetEncoding |
If set, indicates the preferred codepage that the target language file should be in.
You can test the IsValid property of the returned codepage
to find out if it has been set.
This property can be used during editing to warn the user when they try to use
characters in the translation that are not supported by the given codepage.
If this property is set when writing the target language version of the file, it may
be used by the native file writer (though it is ultimately up to the file writer
to decide).
| |
| SourceLanguage |
Original source language of the content
| |
| TargetLanguage |
Target language into which the content is being translated into.
|
| Name | Description | |
|---|---|---|
| ClearMetaData |
Removes all key/value pairs from the meta data collection.
(Inherited from IMetaDataContainer.) | |
| Clone | Creates a new object that is a copy of the current instance. (Inherited from ICloneable.) | |
| GetMetaData |
Returns the metadata value associated with the specified key,
or null if no such key exists in the collection.
(Inherited from IMetaDataContainer.) | |
| MetaDataContainsKey | True if a metadata value with the specified key exists
(Inherited from IMetaDataContainer.) | |
| RemoveMetaData |
Removes the metadata key/value pair with the specified key
from the collection. No changes are made if the collection
does not contain such a key.
(Inherited from IMetaDataContainer.) | |
| SetMetaData | Sets the value of the specified metadata key. If the key already exists in the collection, its value gets overwritten. |
Components can retrieve these properties by implementing INativeContentCycleAware. The framework calls SetFileProperties(IFileProperties) to pass the properties.
All metadata stored by SDL components use keys prefixed "SDL:".
Keys for a number of published file properties used by certain SDL components are defined in Sdl.FileTypeSupport.Framework.Core.Utilities.NativeApi.DefaultPersistentFilePropertiesKeys.