IMPORTANT NOTICE - Apr-30-2009:
This .NET implementation of Okapi is no longer actively developed.
Instead, a NEW JAVA IMPLEMENTATION IS
AVAILABLE and is being actively developed.
The material on this Web site is for archive propose. Some applications of the old .NET implementation
(e.g. Olifant) will be maintained to some degree until they have a replacement in the Java project.
Filter Item Interface Specification
Revision information: Version 1.1
Latest revision:
http://okapi.sourceforge.net/IFilterItem.html
- Document Status
-
Overview
-
Coded Text
-
Defined Values
-
Methods
This document is a stable specification. Feedback about the content of this document is encouraged. Send your comments to the Okapi Framework administrator, or alternatively to post them in the Okapi Tools users group.
DISCLAIMER: Parts of the documents are generated automatically from the source code documentation of Okapi's implementation of the specification. Because the generation tool is not completely working yet, this may result in incomplete or broken text or links in this document. See the source code documentation of the interface for complete text.
The Okapi Filter Item Interface is an object model that provides a common way of accessing the different data gathered when processing an input for a localization task. A object implementing this interface is usually used along with an object that implements the Okapi Filter Interface.
The Filter Item is meant to be utilized by two different type of users: the developers of filters (i.e. the providers), and the developers of applications using the filters (i.e. the consumers). While all the methods of the Filter Item interface are accessible to both, some are designed more for or or the other class of users.
Other related specifications:
A text item is composed of two parts: the text itself and, in some cases, the
inline codes within the text. These codes are the tags or codes of the original
material that have been parsed and isolated from the rest of the text. For
example, in the HTML string "Text in <b>bold</b>.
"
there are two inline codes: "<b>
" and "</b>
". An
important aspect of the Filter Item interface is that inline codes are
abstracted and can be manipulated regardless of what they are in the original
format.
A text item can be serialized into two strings: the first one is the coded text string that holds text and abstracted inline codes, and the second is the codes buffer which holds a string representation of the original inline codes and information about them. Having access to these two strings allows you, for example, to store the items in a database and reconstruct the item later on.
Use the GetText
method (with its
parameter set to zero) to obtain the coded text string, and use the
GetCodeMapping
method to obtain the string
representation of all the inline codes. You can the SetText
and SetCodeMapping
method to
reconstruct the item, as shown below:
string sText = myFilterItem.GetText(0); string sCodes = myFilterItem.GetCodeMapping(); myFilterItem.SetText(sText); myFilterItem.SetCodeMapping(sCodes);
Important: The SetText
method resets the inline codes internal structure, so you must call those two
methods in that order: SetText
, then
SetCodeMapping
.
Most of the time you will not have to deal directly with the codes buffer,
and manipulate only the coded text. To set the coded text back to an item after
having made some modifications, you can use the
ModifyText
method, as long as you have not modified any of the inline
codes inside that string (except possibly to move them around). For example:
string sText = myFilterItem.GetText(0); sText = sText.Replace("black", "white"); myFilterItem.ModifyText(sText);
In the coded text representation each inline code is abstracted as a pair of special characters. The first one is the inline code type indicator, and the second the index of the code. Both special characters are encoded in the Unicode Private Use Area:
<bpt>
,
<ept>
, and <ph>
elements in XLIFF.
GetCode
, the index parameter must be
zero-based.For example the text "Text in <b>bold</b>.
" will be coded
as follow:
T | e | x | t | i | n | <b> | b | o | l | d | </b> | . | ||||
0054 | 0065 | 0078 | 0074 | 0020 | 0069 | 006E | 0020 | E101 | E200 | 0062 | 006F | 006C | 0064 | E102 | E201 | 002E |
The <b>
tag is represented as a generic begin paired tag
(U+E101) with an index of 0 (U+E200 once converted to the offset
representation). You can obtain the coded text representation by making a
GetText(0)
call.
Using the Unicode Private Use Area for encoding the inline codes has the advantage of allowing most of the "normal" string functions. For example, you can run regular expressions on the coded text without risking to modify the inline codes while changing the text portions. The codes themselves can also be matched fairly easily by regular expressions too.
A function to convert the code index in the string representation to the
zero-based index to use with GetCode
would
look like this:
int ToIndex (char p_chIndex) { return ((int)p_chIndex)-0xE200; }
The information corresponding to the inline codes of a Filter Item can be
stored in a single string representation. You can retrieve this string with the
GetCodeMapping
method. You can also
assign the string back to a Filter Item by using the
SetCodeMapping
method. Note that, when
using this method, the inline markers in the coded text must correspond to the
codes of the string.
All line-breaks in a coded text are always represented by a single line-feed
character (\n
, i.e. U+000A), regardless of the original type of
line-break used in the input. It is the responsibility of the filter to perform
the relevant conversion as needed.
Example, a very basic word count function:
int WordCount (IFilterItem p_FI) { bool bInWord = false; int nCount = 0; string sText = p_FI.GetText(0); for ( int i=0; i<sText.Length; i++ ) { switch ( sText[i] ) { case '\xE101': // Begin paired tag case '\xE102': // End paired tag case '\xE103': // place-holder i++; // Skip code index // We ignore inline codes for the count continue; default: if ( Char.IsWhiteSpace(sText[i]) ) { if ( bInWord ) { nCount++; bInWord = false; } } else bInWord = true; continue; } } // End string ends a word? if ( bInWord ) nCount++; return nCount; }
TODO
The Filter Item Interface provides the following methods:
IFilterItem.GetInterfaceVersion | Gets the version of the IFilterItem interface the object implements. |
IFilterItem.Reset | Resets most of the states and values of the item to their defaults. |
IFilterItem.SetRTFOptions | Sets the options for the RTF formatting. |
IFilterItem.CopyFrom | Copies all the data from a specified filter item. |
IFilterItem.Extract | Extract a part of the text from the item. |
IFilterItem.GetItemType | Gets the type of the filter item. |
IFilterItem.SetItemType | Sets the type of the filter item. |
IFilterItem.GetItemID | Gets the ID of the item. |
IFilterItem.SetItemID | Sets the ID of the item. |
IFilterItem.GetGroupID | Gets the ID of the group to which the item belongs. |
IFilterItem.SetGroupID | Sets the ID of the group to which the item belongs. |
IFilterItem.GetLevel | Gets the level of grouping. |
IFilterItem.SetLevel | Sets the level of grouping. |
IFilterItem.GetEncoding | Gets the name of the encoding used for the item. |
IFilterItem.SetEncoding | Sets the name of the encoding used for the item. |
IFilterItem.GetLineBreak | Gets the type of line-break for this item. |
IFilterItem.SetLineBreak | Sets the type of line-break for this item. |
IFilterItem.GetXMLStyle | Gets the indicator for XML style for this item. |
IFilterItem.SetXMLStyle | Sets the indicator whether the item uses XML syntax or not. |
IFilterItem.GetResType | Gets the resource type of the item. |
IFilterItem.SetResType | Sets the resource type of the item. |
IFilterItem.GetResName | Gets the resource name of the item. |
IFilterItem.SetResName | Sets the resource name of the item. |
IFilterItem.GetMimeType | Gets the mime-type value of the item. |
IFilterItem.SetMimeType | Sets the mime-type value of the item. |
IFilterItem.HasCoord | Indicates whether at least one of the coordinates member is different from 0. |
IFilterItem.GetCoord | Gets the coordinates of the item. |
IFilterItem.SetCoord | Sets the coordinates of the item. |
IFilterItem.GetX | Gets the X coordinate of the item. |
IFilterItem.SetX | Sets the X coordinate of the item. |
IFilterItem.GetY | Gets the Y coordinate of the item. |
IFilterItem.SetY | Sets the Y coordinate of the item. |
IFilterItem.GetCX | Gets the CX coordinate of the item. |
IFilterItem.SetCX | Sets the CX coordinate of the item. |
IFilterItem.GetCY | Gets the CY coordinate of the item. |
IFilterItem.SetCY | Sets the CY coodinate of the item. |
IFilterItem.HasFont | Indicates whether the item has font information. |
IFilterItem.GetFont | Gets the font information of the item. |
IFilterItem.SetFont | Sets the font information for the item. |
IFilterItem.IsTranslatable | Indicates whether the text is translatable. |
IFilterItem.SetTranslatable | Sets the indicator whether the text of the item is translatable or not. |
IFilterItem.IsTranslated | Indicates whether the text of the item has already a translation. |
IFilterItem.SetTranslated | Sets the indicator whether the text of the item has already a translation. |
IFilterItem.IsSubFlow | Indicates whether the text of the item is a sub-flow text. |
IFilterItem.SetSubFlow | Sets the indicator whether the text of the item is a sub-flow text. |
IFilterItem.IsPreFormatted | Indicates whether the text is pre-formatted. |
IFilterItem.SetPreFormatted | Sets the indicator whether the text is pre-formatted. |
IFilterItem.GetStart | Gets the start position of the text of the item in the input. |
IFilterItem.SetStart | Sets the start position of the text of the item in the input. |
IFilterItem.GetLength | Gets the original length of the text of the item in the input. |
IFilterItem.SetLength | Sets the length of the text of the item in the input. |
IFilterItem.IsEmpty | Indicates whether the item is empty. |
IFilterItem.GetText | Gets the text of the item in a specified format. |
IFilterItem.GetTextLength | Gets the character length of the text of the item for a specified format. |
IFilterItem.SetText | Sets the text of the item. |
IFilterItem.ModifyText | Modify the text of the item. |
IFilterItem.AppendText | Appends a string to the text of the item. |
IFilterItem.AppendChar | Appends a character to the text of the item. |
IFilterItem.AppendCode | Appends an inline code to the text of the item. |
IFilterItem.ChangeToCode | Change a text section of a a text item to inline code. |
IFilterItem.HasCode | Indicator whether the item has at least one inline code. |
IFilterItem.GetCodeCount | Gets the number of inline codes in the text of the item. |
IFilterItem.GetCodeMapping | Gets the string representation of the inline codes for the item. |
IFilterItem.SetCodeMapping | Sets the string representation of the inline codes for the item. |
IFilterItem.GetCode | Gets the original code of a specified inline code. |
IFilterItem.GetCodeID | Gets the identifier for the code at the specified index. |
IFilterItem.GetCodeIndexFromID | Gets the index of a code with the given identifier and type. |
IFilterItem.GetCodeLabel | Gets the label for the code at the specified index. |
IFilterItem.HasText | Indicator whether the item has at least one text character. |
IFilterItem.RemoveEnd | Removes a specified count of characters form the end of the text. |
IFilterItem.HasNote | Indicates whether the item has a note. |
IFilterItem.GetNote | Gets the note information for the item. |
IFilterItem.GetNoteAttributeFrom |
Gets the |
IFilterItem.SetNote | Sets the nore information for the item. |
IFilterItem.ListProperties | Lists the current properties of the filter item. |
IFilterItem.GetProperty | Gets the property value for the given property name. |
IFilterItem.SetProperty | Sets the property value for a given property name. |
IFilterItem.NormalizeLineBreaks | Normalizes the type of line breaks in the current item. |
IFilterItem.NormalizeWhiteSpaces | Normalizes the whitespaces in the current item. |
Gets the version of the IFilterItem interface the object implements.
The version of the IFilterItem interface.
Resets most of the states and values of the item to their defaults.
Use this method to reset most of the states and values associated with the filter item to their default values.
Encoding and line-break type are not reset by this method. UseIFilterItem.SetEncoding
and IFilterItem.SetLineBreak
to
reset these.Sets the options for the RTF formatting.
String | p_sRTFStartInLine | RTF codes for the start of an inline code. |
String | p_sRTFStartProtected | RTF codes for the start of a protected code. |
Use this method to set the RTF codes to use before and after
each inline code. These codes are used to format the text to RTF
when using the IFilterItem.GetText
method. The RTF sequences must start
with a '}' that will be closed automatically at the end of the code.
Copies all the data from a specified filter item.
Okapi.Library.Filter.IFilterItem | p_FilterItem | The filter item from which to copy the data. |
Use this method to duplicate all the content of an item.
if ( Flt.ReadNextItem() == FilterItemType.TEXT ) { FilterItem FI = new FilterItem(); FI.CopyFrom(Flt.GetItem()); // Now FI and Flt.Getitem() are independent of each other // can be modified separately. }
Extract a part of the text from the item.
Integer | p_nStart | Start position of the part to extract in the coded representation of the text. |
Integer | p_nLength | Length of the part to extract in the coded representation of the text. |
System.Boolean | p_bAddMissingCodes | True if the missing codes creating when splitting the item are to be added as needed. False if the extra codes are simply to be changed to isolated codes. |
The new filter item containing a copy of the original one, with only the part of text to extract.
Use this method to split a filter item. The inline codes in both the original item and the returned item are adjusted as needed. If the p_nStart is out of bounds, or if p_nLength is invalid the method returns null.
Gets the type of the filter item.
The type of the filter item. The value is one of the
Filter.FilterItemType
values.
Depending on the filter item type, different properties are accessible in the filter item.
Sets the type of the filter item.
Integer | p_nValue | The type of the filter item to set. The value must be
one of the Filter.FilterItemType values. |
The default type of the filter item is the value 0 (ERROR).
Gets the ID of the item.
The ID of the item.
This value is unique within the input. It can be used for the value
of the id
attribute in XLIFF.
Sets the ID of the item.
Integer | p_nValue | The ID value to set. |
Gets the ID of the group to which the item belongs.
the ID value of the group to which the item belongs.
Group IDs are unique within the input. If the item belongs to no group, the ID is 0.
Sets the ID of the group to which the item belongs.
Integer | p_nValue | The new ID value to set. |
Use this method to set the ID of the group to which the item belongs.
Gets the level of grouping.
The level of grouping. The value starts at 0 (no group).
The level indicator is incremented for each embedded group. The start group and end group items themselves are one level above the items inside the group they delimit. The first level (items not inside any group) is level 0.
Sets the level of grouping.
Integer | p_nValue | The new level of grouping. |
The level value is zero-based (no group).
Gets the name of the encoding used for the item.
The encoding name. The value is one of the IANA charset names.
Some output (like RTF) require to know in which encoding the text is output. The default value is the name of the default encoding for the current user.
The encoding value is not reset when you call theIFilterItem.Reset
method.Sets the name of the encoding used for the item.
String | p_sValue | The name of the encoding to set. The value must be one of the IANA charset names. |
Use this method to set the name of the encoding the item will use for some of its output (e.g. RTF).
Gets the type of line-break for this item.
The line-break representation.
IFilterItem.Reset
method.Sets the type of line-break for this item.
String | p_sValue | The new line-break representation to use. |
Use this method to set the type of line-break to use with the item.
Gets the indicator for XML style for this item.
True if the item is XML text, false otherwise.
IFilterItem.Reset
method.Sets the indicator whether the item uses XML syntax or not.
System.Boolean | p_bValue | The new value for the indicator. |
Use this method to set whether or the text will be treatted for XML escapes in output.
Gets the resource type of the item.
The resource type of the item.
This value is the equivalent to the value of the restype
attribute in XLIFF.
Sets the resource type of the item.
String | p_sValue | The new resource type to set. |
Use this method to set the resource type of the item.
Gets the resource name of the item.
The resource name of the item.
This value is the equivalent to the value of the resname
attribute in XLIFF.
Sets the resource name of the item.
String | p_sValue | The new resource name to set. |
Use this method to set the resource name of the item.
Gets the mime-type value of the item.
The mime-type value of the item.
This value is used for BINARY items.
Sets the mime-type value of the item.
String | p_svalue | The new mime-type value to be set. |
Use this method to associate a mime-type value with a BINARY item.
Indicates whether at least one of the coordinates member is different from 0.
True if one or more of the coordinates member is different from 0, false if they are all set to 0.
Gets the coordinates of the item.
The string representation of the coordinates.
This value is equivalent to the coord
attribute in XLIFF. You can use
the IFilterItem.HasCoord
property to see whether the item has any member
of the coordinates different from 0. You can access each coordinates member
individually using the IFilterItem.GetX
, IFilterItem.GetY
,
IFilterItem.GetCX
, and IFilterItem.GetCY
methods.
Sets the coordinates of the item.
String | p_sValue | The string representation of the coordinates. |
Use this method to set the coordinates of the item. You can also set
each coordinate members individually using the IFilterItem.SetX
,
IFilterItem.SetY
, IFilterItem.SetCX
, and IFilterItem.SetCY
methods.
Gets the X coordinate of the item.
The X coordinate of the item.
Sets the X coordinate of the item.
System.Single | p_fValue | The new X coordinate to set. |
Gets the Y coordinate of the item.
The Y coordinate of the item.
Sets the Y coordinate of the item.
System.Single | p_fValue | The new Y coordinate to set. |
Gets the CX coordinate of the item.
The CX coordinate of the item.
Sets the CX coordinate of the item.
System.Single | p_fValue | The new CX coordinate to set. |
Gets the CY coordinate of the item.
The CY coordinate of the item.
Sets the CY coodinate of the item.
System.Single | p_fValue | The new CY coordinate to set. |
Indicates whether the item has font information.
True if the item has font information, false if not.
Gets the font information of the item.
The font information for the item.
This value is equivalent to the font
attribute
in XLIFF. You can use the IFilterItem.HasFont
property to query whether
the item has font information.
Sets the font information for the item.
String | p_sValue | The new font information to set. |
Use this method to set the font information for the item. The string
representation of the font information is the same as for the
font
attribute in XLIFF.
Indicates whether the text is translatable.
True if the text of the item is translatable, false if not.
Use this method to query whether the item is translatable or not.
Sets the indicator whether the text of the item is translatable or not.
System.Boolean | p_bValue | True if the text is translatable, false if not. |
Use this method to flag the item as translatable or not.
Indicates whether the text of the item has already a translation.
True if the text of the item has a translation, false if not.
Some file formats have bilingual content and may have both a source text and its
translation. Such items are normally considered having an existing translation if the
part where the translation text should be is 1) not empty or 2) has a text different from
the source text. Use the IFilter.GetTranslatedItem
method of the filter
to retrieve the translated text item.
Sets the indicator whether the text of the item has already a translation.
System.Boolean | p_bValue | True if the text has an existing translation, false if not. |
Use this method to set the status of the target text in bilingual files.
Indicates whether the text of the item is a sub-flow text.
True if the item is a sub-flow item, false if not.
Sets the indicator whether the text of the item is a sub-flow text.
System.Boolean | p_bValue | True if the item is a sub-flow item, false if not. |
Indicates whether the text is pre-formatted.
True if the text is pre-formatted, false if not.
Sets the indicator whether the text is pre-formatted.
System.Boolean | p_bValue | True if the text is pre-formatted, false if not. |
Gets the start position of the text of the item in the input.
The start position of the text of the item in the input.
The position returned is an offset from the beginning of the input. The value is -1 if the start position is not known.
If the input is a string, the position is relative to the IFilter.p_lOffsetInFile parameter of theIFilter.OpenInputString
method.Sets the start position of the text of the item in the input.
Integer64 | p_lValue | New start position to set. |
Use this method to set the start position of the text of the item (the position of the first character) in the input. The value must be set to -1 if the start position is not known.
If the input is a string, the position should be offset with the IFilter.p_lOffsetInFile parameter of theIFilter.OpenInputString
method.Gets the original length of the text of the item in the input.
The original length of the text of the item in the input.
The value returned by this method is not always the same as the value
returned by a call to IFilterItem.GetTextLength
for the original format.
The parsed text may have been transformed, for example to un-wrap a paragraph.
The value returned by this method is the length of the text as it is
in the input.
Sets the length of the text of the item in the input.
Integer | p_nValue | The new length to set. |
Indicates whether the item is empty.
True if the item has no text and no inline codes, false if it has text or inline code(s).
Gets the text of the item in a specified format.
Integer | p_nFormat | Format in which to get the text. the value must be
one of the Filter.FilterItemText values. |
The text of the item in the specified format.
Gets the character length of the text of the item for a specified format.
Integer | p_nFormat | Format in which to get the text. the value must be
one of the Filter.FilterItemText values. |
The length of the text of the item in the specified format.
Sets the text of the item.
String | p_sValue | Text to set. |
This method sets the text for the item, and reset any inline codes.
The p_sValue paramter must not contain inline codes. To set
inline codes to an item use the IFilterItem.AppendCode
method.
IFilterItem.SetText
. This may leads to error when writing out the output. To change
the text of an item and preserve its inline codes, use the
IFilterItem.ModifyText
method. Also if you call both IFilterItem.SetCodeMapping
and
IFilterItem.SetText
to build an item, make sure to call IFilterItem.SetCodeMapping
after IFilterItem.SetText
or the inline information you just set will be erased.Modify the text of the item.
String | p_sValue | Text to set. The string must be in coded text format. |
Appends a string to the text of the item.
String | p_sValue | String to append. |
Use this method to add text at the end of the current text.
To add an inline code use the IFilterItem.AppendCode
method. To add a
character use the IFilterItem.AppendChar
method.
Appends a character to the text of the item.
System.Char | p_chValue | Character to append. |
Use this method to add a character at the end of the current text.
To add an inline code use the IFilterItem.AppendCode
method. To add a run
of text use the IFilterItem.AppendText
method.
Appends an inline code to the text of the item.
Integer | p_nType | Type of the inline code. The value must be one of the
Filter.InlineCode values. |
String | p_sLabel | Label of the inline code. |
String | p_sData | Actual oode of the inline code. |
Use this method to add an inline code at the end of the current text.
To add a character use the IFilterItem.AppendChar
method. To add a run
of text use the IFilterItem.AppendText
method.
ctype
attribute in
XLIFF). For paired codes, you must specify the same label when appending the
opening code and the closing code. The label must be the same
for codes of the same kind (e.g. all <b>/<b> tags should be set to
the same label). It must also be distinct for each kind of code (i.e. the
<b> and <i> tags must have different labels. It is OK to use null if all
the inline codes in the item are of the same kind.Change a text section of a a text item to inline code.
Integer | p_nStart | Adjusted start position of the code in the coded text. This is the same value as p_nCodeIndex if no adjustment is needed. |
Integer | p_nCodeIndex | Start of the code in the original coded text. |
Integer | p_nCodeLength | Length of the code. |
Integer | p_nTextIndex | Start of the text embedded in the code, or -1 if there is no embedded text. |
Integer | p_nTextLength | Length of the text embedded in the code, or 0 if there is no embedded text. |
The length difference of the coded text between before and after the insertion.
Use this method to insert a code within a text item.
The code may include a run of text. In that case you must set p_nTextIndex to the starting position of the text, and p_nTextLength to the length of the text. If there is no text in the code p_nTextIndex must be set to -1 and/or p_nTextLength to 0.Indicator whether the item has at least one inline code.
True if the item has at least one inline code.
Use this method to query whether the text item contains at
least one inline code. You can obtain the number of inline codes
in the item with the IFilterItem.GetCodeCount
method.
Gets the number of inline codes in the text of the item.
The number of inline codes in the text of the item.
Use this method to get the number of inline codes in the
text item. You can also query whether there is at least one inline
code by using the IFilterItem.HasCode
method.
Gets the string representation of the inline codes for the item.
The string representation of the inline codes for the item.
You can use this string for storing the inline codes and the coded text string in separate location (e.g. in a database).
Sets the string representation of the inline codes for the item.
String | p_sValue | The new string representation to set. |
Use this method to set the string representation of all the inline codes in the text of the item.
Gets the original code of a specified inline code.
Integer | p_nIndex | Index of the inline code to access. The value must
be between 0 and IFilterItem.GetCodeCount -1. |
System.Boolean | p_bStandardLineBreaks | Indicator on whether to output standard line-breaks. The original line-breaks are used if this flag is set to false. |
String that contains the code for the specified inline code.
Use this method to retrieve the data associated with a given
inline code. The value returned is the one that was set when calling the
IFilterItem.AppendCode
method.
Gets the identifier for the code at the specified index.
Integer | p_nIndex | Index of the code to query. The value must
be between 0 and IFilterItem.GetCodeCount -1. |
The identifier of the specified inline code.
Use this method to retrieve the identifier of a given inline code.
Gets the index of a code with the given identifier and type.
Integer | p_nID | Identifier of the code to lookup. |
Integer | p_nType | Type of the code to lookup |
Index of the code in the code map, or -1 if no match was found.
Use this method to retrieve the mapping index of a given code. Be aware that the result of this function may be incorrect if you use it on an item that is currently being built because the index values may change when adding codes to the item.
Gets the label for the code at the specified index.
Integer | p_nIndex | Index of the code to query. The value must
be between 0 and IFilterItem.GetCodeCount -1. |
The label of the specified inline code.
Use this method to retrieve the label of a given inline code.
Indicator whether the item has at least one text character.
System.Boolean | p_bWhiteSpaceIsText | True if white-spaces should be treated as text. |
True if the item has at least one character (including spaces).
Use this method to query whether the text item contains text.
Removes a specified count of characters form the end of the text.
Integer | p_nCount | Number of characters to remove. |
This method removed p_nCount characters or less from the end of the text. It stops when the count is reached, or when an inline code is reached, or when the start of the text is reached, whichever comes first.
Indicates whether the item has a note.
True if the item has a note, false if not.
Gets the note information for the item.
The text of the note.
Gets the from
attribute of the note.
The value of the from
attribute.
Use this method to get the from
attribute value of the note.
This attribute is similar to the from
attribute in XLIFF.
Sets the nore information for the item.
String | p_sNote | Text of the note. |
String | p_sFrom | Indicator of who set the note. The value is
similar to the from attribute in XLIFF. |
Lists the current properties of the filter item.
A string containing the name of each property separated by a semi-colon (e.g. "date;time;user"). If there are no properties, this method should return and empty string (not null).
Gets the property value for the given property name.
String | p_sName | Name of the property to retrieve. |
Value of the property, or null if the property is not set.
Use this method to retrieve a non-standard property associated to the extracted item. The name of the property is case-sensitive.
Sets the property value for a given property name.
String | p_sName | Name of the property to set. |
String | p_sValue | New value of the property. |
This method, along with IFilterItem.GetProperty
and
IFilterItem.ListProperties
, allows manage non-standard
properties with the extracted item.
Normalizes the type of line breaks in the current item.
This method convert Unix, Windows, and Mac linebreaks into a simple LF character.
Normalizes the whitespaces in the current item.
This method reduces sequencial whitespaces into a single space.