Function CDM_GetAnnotatedTextRanges
|
|
|
|
Description:
This function will return a set of strings from the text of the
specified Document object
that are annotated by the provided Annotation. In simple words, this
function will examine the span set contained in the provided Annotation
and return in a list all text ranges (from the text of the
specified Document object) indexed by each one of the spans. CDM does not own the returned object: the caller is responsible to use
Tcl_DecrRefCount or CDM_Free in order to free the object and the memory
associated with it.
Note that this function will always create and return a new object, even
when the Annotations has an empty span set. (In this case an empty
object will be returned.)
This function will return a set of strings from the provided Text object
that are annotated by the provided Annotation. In simple words, this
function will examine the span set contained in the provided Annotation
and return in a list all text ranges (from the specified text object)
indexed by each one of the spans. CDM does not own the returned object: the caller is responsible to use
Tcl_DecrRefCount or CDM_Free in order to free the object and the memory
associated with it.
Note that this function will always create and return a new object, even
when the Annotations has an empty span set. (In this case an empty
object will be returned.)
Return Value:
This function returns a set of ByteSequence/RawData objects (of type
CDM_ByteSequence or CDM_RawData) containing the text ranges (or
portions) from the text contained in the "Document" object indexed by
the "Annotation" spans.
In order to retrieve the individual text ranges, the user can call
CDM_Nth as usual with set objects. Note that CDM does not own the returned object:
the caller is responsible to use
Tcl_DecrRefCount or CDM_Free in order to free the object and the memory
associated with it.
Note that this function will always create and return a new object, even
when the Annotations has an empty span set. (In this case an empty
object will be returned.)
This function returns a set of ByteSequence/RawData objects (of type
CDM_ByteSequence or CDM_RawData) containing the text ranges (or
portions) from the "Text" object indexed by the "Annotation" spans.
In order to retrieve the individual text ranges, the user can call
CDM_Nth as usual with set objects. Note that CDM does not own the returned object:
the caller is responsible to use
Tcl_DecrRefCount or CDM_Free in order to free the object and the memory
associated with it.
Note that this function will always create and return a new object, even
when the Annotations has an empty span set. (In this case an empty
object will be returned.)
Notes:
This function is equivelant to tip_GetAnnotatedTextRanges (Tcl API). Note that usually the provided text object is the text of a Document,
retrieved through calls to either CDM_GetByteSequence or CDM_GetRawData.
The text object is expected to contain text in Unicode or UTF-8
representation. This function is equivelant to tip_GetAnnotatedTextRanges (Tcl API).
See Also:
CDM_GetByteSequence, CDM_GetRawData, Tcl_DecrRefCount, CDM_Free,
CDM_GetFirstAnnotatedTextRange, tip_GetAnnotatedTextRanges CDM_GetByteSequence, CDM_GetRawData, Tcl_DecrRefCount, CDM_Free,
CDM_GetFirstAnnotatedTextRange, tip_GetAnnotatedTextRanges
Generated by: petasis@aias on Wed Aug 16 10:31:57 PM EEST 2006.