Function CDM_SelectAnnotations


Definition:#include <CDM.h>
Prototype:CDM_AnnotationSet CDM_SelectAnnotations(CDM_Document Document, char *Type);
Arguments:

Document: A Document object. (CDM_Document)
Type: The type of the Annotations to be selected. (char *)


Prototype:CDM_AnnotationSet CDM_SelectAnnotations(CDM_Document Document, char *Type, char *Constraints);
Arguments:

Document: A Document object. (CDM_Document)
Type: The type of the Annotations to be selected. (char *)
Constraints: A boolean expression. (char *)


Prototype:CDM_AnnotationSet CDM_SelectAnnotations(CDM_AnnotationSet Set, char *Type);
Arguments:

Set: A set of Annotations. (CDM_AnnotationSet)
Type: The type of the Annotations to be selected. (char *)


Prototype:CDM_AnnotationSet CDM_SelectAnnotations(CDM_AnnotationSet Set, char *Type, char *Constraints);
Arguments:

Set: A set of Annotations. (CDM_AnnotationSet)
Type: The type of the Annotations to be selected. (char *)
Constraints: A boolean expression. (char *)

C/C++ API Sections
Tcl API Sections
Description
Return Value
Notes
See Also
Index

Description:

CDM_AnnotationSet CDM_SelectAnnotations(CDM_Document Document, char *Type):
This function will create and return a new object (of type CDM_AnnotationSet) that will contain all the Annotations of the specified Document that their type is the same as the value of the "Type" parameter. This function will always create and return a new object, even when no Annotations of the requested type are found or when the Document has no Annotations defined. In this case an empty object will be returned.

Note that CDM does not own this object: the caller is responsible to use Tcl_DecrRefCount or CDM_Free in order to free the object and the memory associated with it.

CDM_AnnotationSet CDM_SelectAnnotations(CDM_Document Document, char *Type, char *Constraints):
This function will create and return a new object (of type CDM_AnnotationSet) that will contain all the Annotations of the specified Document that their type is the same as the value of the "Type" parameter and the provided boolean expression (specified through the "Constraints" parameter) is true for every one of these Annotations. This function will always create and return a new object, even when no Annotations of the requested type are found or when the Document has no Annotations defined. In this case an empty object will be returned.

The boolean expression that can be specified through the "Constraints" parameter can be any valid Tcl boolean expression (i.e. a boolean expression that will be accepted by the "expr" Tcl command), with the following excepion:

  • The boolean expression can contain references to the values of Atttributes of the Annotation, by utilising the notation "ann::<Attribute Name>". The only limitation is that "<Attribute Name>" cannot exceed 120 characters. For example, the following code will create a new Annotation set that will contain all Annotations from the specified Document that their type is token, they have a "type" Attribute which has as value "EFW" and also have a "pos" Attribute that has a value other than "NN":

  • CDM_SelectAnnotations(Doc, "token", "ann::type == \"EFW\" && ann::pos != \"NN\"");

    Note that CDM does not own this object: the caller is responsible to use Tcl_DecrRefCount or CDM_Free in order to free the object and the memory associated with it.

    CDM_AnnotationSet CDM_SelectAnnotations(CDM_AnnotationSet Set, char *Type):
    This function will create and return a new object (of type CDM_AnnotationSet) that will contain all the Annotations of the specified Annotation set that their type is the same as the value of the "Type" parameter. This function will always create and return a new object, even when no Annotations of the requested type are found or when the Annotation set is empty. In this case an empty object will be returned.

    Note that CDM does not own this object: the caller is responsible to use Tcl_DecrRefCount or CDM_Free in order to free the object and the memory associated with it.

    CDM_AnnotationSet CDM_SelectAnnotations(CDM_AnnotationSet Set, char *Type, char *Constraints):
    This function will create and return a new object (of type CDM_AnnotationSet) that will contain all the Annotations of the specified Annotation set that their type is the same as the value of the "Type" parameter and the provided boolean expression (specified through the "Constraints" parameter) is true for every one of these Annotations. This function will always create and return a new object, even when no Annotations of the requested type are found or when the Annotation set is empty. In this case an empty object will be returned.

    The boolean expression that can be specified through the "Constraints" parameter can be any valid Tcl boolean expression (i.e. a boolean expression that will be accepted by the "expr" Tcl command), with the following excepion:

  • The boolean expression can contain references to the values of Atttributes of the Annotation, by utilising the notation "ann::<Attribute Name>". The only limitation is that "<Attribute Name>" cannot exceed 120 characters. For example, the following code will create a new Annotation set that will contain all Annotations from the specified Annotation set that their type is token, they have a "type" Attribute which has as value "EFW" and also have a "pos" Attribute that has a value other than "NN":

  • CDM_SelectAnnotations(Doc, "token", "ann::type == \"EFW\" && ann::pos != \"NN\"");

    Note that CDM does not own this object: the caller is responsible to use Tcl_DecrRefCount or CDM_Free in order to free the object and the memory associated with it.

    Return Value:

    CDM_AnnotationSet CDM_SelectAnnotations(CDM_Document Document, char *Type):
    This function will create and return an AnnotationSet object, that will contain all the Annotations of the specified Document that have as type the value of the "Type" parameter.

    Note that the caller is responsible to free this object through Tcl_DecrRefCount or CDM_Free. In case of an error, NULL will be return and an error message will be left at the current active Tcl interpreter (CDM_Interp).

    CDM_AnnotationSet CDM_SelectAnnotations(CDM_Document Document, char *Type, char *Constraints):
    This function will create and return an AnnotationSet object, that will contain all the Annotations of the specified Document that have as type the value of the "Type" parameter and the provided by the "Constraints" parameter boolean expression was true for these Annotations.

    Note that the caller is responsible to free this object through Tcl_DecrRefCount or CDM_Free. In case of an error, NULL will be return and an error message will be left at the current active Tcl interpreter (CDM_Interp).

    CDM_AnnotationSet CDM_SelectAnnotations(CDM_AnnotationSet Set, char *Type):
    This function will create and return an AnnotationSet object, that will contain all the Annotations of the specified Annotation set that have as type the value of the "Type" parameter.

    Note that the caller is responsible to free this object through Tcl_DecrRefCount or CDM_Free. In case of an error, NULL will be return and an error message will be left at the current active Tcl interpreter (CDM_Interp).

    CDM_AnnotationSet CDM_SelectAnnotations(CDM_AnnotationSet Set, char *Type, char *Constraints):
    This function will create and return an AnnotationSet object, that will contain all the Annotations of the specified Annotation set that have as type the value of the "Type" parameter and the provided by the "Constraints" parameter boolean expression was true for these Annotations.

    Note that the caller is responsible to free this object through Tcl_DecrRefCount or CDM_Free. In case of an error, NULL will be return and an error message will be left at the current active Tcl interpreter (CDM_Interp).

    Notes:

    CDM_AnnotationSet CDM_SelectAnnotations(CDM_Document Document, char *Type):
    This function is equivelant to tip_SelectAnnotations (Tcl API).

    CDM_AnnotationSet CDM_SelectAnnotations(CDM_Document Document, char *Type, char *Constraints):
    This function is equivelant to tip_SelectAnnotations (Tcl API).

    CDM_AnnotationSet CDM_SelectAnnotations(CDM_AnnotationSet Set, char *Type):
    This function is equivelant to tip_SelectAnnotations (Tcl API).

    CDM_AnnotationSet CDM_SelectAnnotations(CDM_AnnotationSet Set, char *Type, char *Constraints):
    This function is equivelant to tip_SelectAnnotations (Tcl API).

    See Also:

    CDM_AnnotationSet CDM_SelectAnnotations(CDM_Document Document, char *Type):
    CDM_Free, Tcl_DecrRefCount, tip_SelectAnnotations

    CDM_AnnotationSet CDM_SelectAnnotations(CDM_Document Document, char *Type, char *Constraints):
    CDM_Free, Tcl_DecrRefCount, tip_SelectAnnotations, The Tcl "expr" manual.

    CDM_AnnotationSet CDM_SelectAnnotations(CDM_AnnotationSet Set, char *Type):
    CDM_Free, Tcl_DecrRefCount, tip_SelectAnnotations

    CDM_AnnotationSet CDM_SelectAnnotations(CDM_AnnotationSet Set, char *Type, char *Constraints):
    CDM_Free, Tcl_DecrRefCount, tip_SelectAnnotations, The Tcl "expr" manual.


    Generated by: petasis@aias on Wed Aug 16 10:31:57 PM EEST 2006.