OCDM.cpp File Reference

This file contains the implementation of the object oriented CDM Public API (OCDM). More...

#include "OCDM.h"

Functions

template<class Type, class ParentObj, class Pointer>
const Type OCDM_GetReference (const ParentObj &This, const Pointer obj)
template<class ResultType, class ObjectType>
const ResultType OCDM_GetNth (const ObjectType &obj, const long index)
CDM_Object OCDM_STL_ContainerToCDM_Object (const std::vector< std::string > &stl_obj)
int OCDM_AppendElement (OCDM_Object &obj, CDM_Object element)
 OCDM_INDEX_OPERATOR_REF (OCDM_ByteSequence) OCDM_ByteSequenceSet
 This operator returns the element of a set pointed by the "index" parameter.
 OCDM_INDEX_OPERATOR_REF (OCDM_RawData) OCDM_RawDataSet
 This operator returns the element of a set pointed by the "index" parameter.
 OCDM_INDEX_OPERATOR_REF (OCDM_Span) OCDM_SpanSet
 This operator returns the element of a set pointed by the "index" parameter.
 OCDM_REF (OCDM_AttributeValue) OCDM_Attribute
 Returns Attribute's Value.
 OCDM_INDEX_OPERATOR_REF (OCDM_Attribute) OCDM_AttributeSet
 This operator returns the element of a set pointed by the "index" parameter.
 OCDM_REF (OCDM_Attribute) OCDM_AttributeSet
 This function will return an OCDM_Attribute object having as name the provided name through the "Name" parameter.
 OCDM_REF (OCDM_AttributeSet) OCDM_Annotation
 OCDM_REF (OCDM_Span) OCDM_Annotation
 OCDM_REF (OCDM_SpanSet) OCDM_Annotation
 OCDM_INDEX_OPERATOR_REF (OCDM_Annotation) OCDM_AnnotationSet
 This operator returns the element of a set pointed by the "index" parameter.
 OCDM_REF (OCDM_AnnotationSet) OCDM_AnnotationSet
 This function will return a new Annotation set object (of type OCDM_AnnotationSet) that will contain all the Annotations of the specified Annotation set that include the specified text position (as given by the parameter "Position") into their spans.
 OCDM_REF (OCDM_Annotation) OCDM_AnnotationSet
 This function will return the Annotation object that has as Id the value specified by the "Id" parameter. If the requested Annotation does not exist, an Exception of type OCDM_Exception will be thrown.
 OCDM_REF (OCDM_RawDataSet) OCDM_Document
 This function will return the set of all text portions annotated by the provided Annotation object.
 OCDM_REF (OCDM_ByteSequence) OCDM_Document
 This function will return the text range from the text of the Document object we are currently using that is annotated by the FIRST span of the provided Annotation.
 OCDM_REF (OCDM_Collection) OCDM_Document
 This function will return the parent of the specified Document object in use.
 OCDM_REF (OCDM_RawData) OCDM_Document
 This function will return the Text of the Document object in use.
 OCDM_REF (OCDM_Document) OCDM_Collection
 This function will return a Document object representing the first.


Detailed Description

This file contains the implementation of the object oriented CDM Public API (OCDM). CDM is the Collection and Document Manager and the core component of the "Ellogon" Text Engineering Platform.

Copyright 1998-2004 by: Software and Knowledge Engineering Laboratory, Institute of Informatics and Telecommunications, National Center for Scientific Research (N.C.S.R.) "Demokritos", Athens, Greece.

This file is part of the "Ellogon" Text Engineering Platform. For licencing information, please refer to the licence conditions of "Ellogon" Text Engineering Platform.


Function Documentation

int OCDM_AppendElement ( OCDM_Object obj,
CDM_Object  element 
)

const ResultType OCDM_GetNth ( const ObjectType &  obj,
const long  index 
) [inline]

const Type OCDM_GetReference ( const ParentObj &  This,
const Pointer  obj 
) [inline]

OCDM_INDEX_OPERATOR_REF ( OCDM_Annotation   ) 

Description: This operator returns the element of a set pointed by the
"index" parameter. Note that under languages that do not support operator overloading (i.e. Java, Perl, Python) this operator appears as a plain method named as "get".
Arguments:
  • index: the index (position) of the element to be retrieved. The first element of the set has as index the value 0.
Note:
In case of an error, an exception of type OCDM_Exception will be thrown.

OCDM_INDEX_OPERATOR_REF ( OCDM_Attribute   ) 

Description: This operator returns the element of a set pointed by the
"index" parameter. Note that under languages that do not support operator overloading (i.e. Java, Perl, Python) this operator appears as a plain method named as "get".
Arguments:
  • index: the index (position) of the element to be retrieved. The first element of the set has as index the value 0.
Note:
In case of an error, an exception of type OCDM_Exception will be thrown.

OCDM_INDEX_OPERATOR_REF ( OCDM_Span   ) 

Description: This operator returns the element of a set pointed by the
"index" parameter. Note that under languages that do not support operator overloading (i.e. Java, Perl, Python) this operator appears as a plain method named as "get".
Arguments:
  • index: the index (position) of the element to be retrieved. The first element of the set has as index the value 0.
Note:
In case of an error, an exception of type OCDM_Exception will be thrown.

OCDM_INDEX_OPERATOR_REF ( OCDM_RawData   ) 

Description: This operator returns the element of a set pointed by the
"index" parameter. Note that under languages that do not support operator overloading (i.e. Java, Perl, Python) this operator appears as a plain method named as "get".
Arguments:
  • index: the index (position) of the element to be retrieved. The first element of the set has as index the value 0.
Note:
In case of an error, an exception of type OCDM_Exception will be thrown.

OCDM_INDEX_OPERATOR_REF ( OCDM_ByteSequence   ) 

Description: This operator returns the element of a set pointed by the
"index" parameter. Note that under languages that do not support operator overloading (i.e. Java, Perl, Python) this operator appears as a plain method named as "get".
Arguments:
  • index: the index (position) of the element to be retrieved. The first element of the set has as index the value 0.
Note:
In case of an error, an exception of type OCDM_Exception will be thrown.

OCDM_REF ( OCDM_Document   ) 

Description
This function will return a Document object representing the first Document of the Collection object in use. It can be used in order to start an iteration over all Documents of the Collection. This function will return the first Document in the given Collection and make the proper arrangements so as subsequent calls to OCDM_NextDocument return the following Documents.
Note:
If an error occurs, then an OCDM_Exception will be thrown

OCDM_REF ( OCDM_RawData   ) 

Description
This function will return the Text of the Document object in use. It will return an object (of type OCDM_RawData) that will contain the text of the Document object. The caller can use the Tcl function Tcl_GetString in order to get the text stored in the returned object as a C pointer (of type char*). The text will be stored using the UTF-8 encoding. In order to convertthe returned C pointer into a specific encoding (like iso8859-1 or iso8859-7), the function CDM_UtfToExternal can be used.

OCDM_REF ( OCDM_Collection   ) 

Description
his function will return the parent of the specified Document object in use. The parent of a Document is the Collection object that holds the Document object in use. The return value will be the parent Collection object (of type OCDM_Collection) and will be owned by CDM.

OCDM_REF ( OCDM_ByteSequence   ) 

Description:
This function will return the text range from the text of the Document object we are currently using that is annotated by the FIRST span of the provided Annotation. In simple words, this function will retrieve the first span from the provided Annotation and return the text range (from the text of the Document object) that is indexed by this span.
Arguments:
  • Ann: The provided Annotation object
Note:
In this new release of Ellogon, the user does not have to manualy free the returned object as well as the memory associated with it (for example by the use of the Tcl_DecrRefCount or CDM_Free) since java performs it own garbage collection methods.

OCDM_REF ( OCDM_RawDataSet   ) 

OCDM_REF ( OCDM_Annotation   ) 

Description:
This function will return a new Annotation object (of type OCDM_Annotation) that will be the first Annotation (with Annotations sorted by their Id) of the Annotation Set that includes the specified text position (as given by the parameter "Position") into its spans.
Arguments:
  • Position: Position in text. (long)

OCDM_REF ( OCDM_AnnotationSet   ) 

Description:
This function will return a new Annotation set object (of type OCDM_AnnotationSet) that will contain all the Annotations of the Annotation set in use that have the specified text position (as given by the parameter "Position") as a start position in any of their spans.
Note:
This function will always create and return a new Annotation set object, even when the Annotation set has no Annotations defined or when no Annotation is found that includes the specified text position into its span set. (In this case an empty Annotation set will be returned.)

OCDM_REF ( OCDM_SpanSet   ) 

Returns:
This function will return the span list contained in the specified Annotation object in use.

OCDM_REF ( OCDM_Span   ) 

Returns:
This function will return the first span range of the span list contained in the Annotation object in use.

OCDM_REF ( OCDM_AttributeSet   ) 

Returns:
This function returns a new object (of type OCDM_AttributeSet) that contains all the Attributes that the specified Annotation object in use has.

OCDM_REF ( OCDM_Attribute   ) 

Arguments:
Note:
In case of an Error an Exception of type OCDM_Exception will be thrown.

OCDM_REF ( OCDM_AttributeValue   ) 

Note:
In case of Error an Exception of type OCDM_Exception will be thrown

CDM_Object OCDM_STL_ContainerToCDM_Object ( const std::vector< std::string > &  stl_obj  ) 


Generated on Tue Jun 26 17:40:45 2007 for PerlCDM by  doxygen 1.5.2