#include <OCDM.h>
Public Member Functions | |
OCDM_Collection () | |
This is a null constructor of an OCDM_Document Object. | |
OCDM_Collection (const char *name) | |
This is the overloaded version of the above constructor with a different usability. | |
OCDM_Collection (const class OCDM_Collection &obj) | |
This is the default Copy constructor. | |
OCDM_Collection (const char *name, const OCDM_AttributeSet &AttrSet, const char *encoding) | |
This is a constructor of the class OCDM_Collection. | |
OCDM_Collection (const CDM_Collection) | |
A constructor that maps a CDM_Collection to an OCDM_Collection object. | |
~OCDM_Collection () | |
This is the destructor of the OCDM_Collection Class. | |
OCDM_Collection & | operator= (const class OCDM_Collection &obj) |
This is the default Assignment operator. | |
void | storeObject (const class OCDM_Object *objPtr) const |
void | storeObject (const class OCDM_Document *objPtr) const |
OCDM_Object * | getStoredObject (void) const |
void | releaseStoredObject (void) const |
OCDM_BOOL | AttributeExists (const char *name) const |
This function will return true if an Attribute with the specified name exists in the Collection object. | |
void | CreateDocument (const char *XID, const OCDM_ByteSequence &RawData, const OCDM_AnnotationSet &Annotations, const OCDM_AttributeSet &Attributes, const char *encoding) |
This function creates a new Document object in an existing Collection object. | |
void | CreateDocument (const char *XID, const OCDM_ByteSequence &RawData, const OCDM_AnnotationSet &Annotations, const OCDM_AttributeSet &Attributes) |
int | Length (void) const |
This function will return the Length (the number of all the Documents) of the specified Collection. | |
OCDM_REF (OCDM_Attribute) GetAttribute(const char *name) const | |
OCDM_REF (OCDM_AttributeSet) GetAttributes(void) const | |
int | PutAttribute (const OCDM_Attribute &Attr) |
const char * | GetName (void) const |
This function will return the Name of the specified Collection. | |
int | RemoveAttribute (const char *name) |
const char * | GetEncoding (void) const |
const char * | SetEncoding (const char *encoding) |
OCDM_REF (OCDM_ByteSequence) Status(void) const | |
int | Sync (void) const |
int | AnnotateColection (void) |
int | Destroy (const char *name) |
OCDM_REF (OCDM_Document) FirstDocument(void) const | |
OCDM_REF (OCDM_Document) GetByExternalId(const char *XID) const | |
OCDM_REF (OCDM_Document) GetDocument(const char *ID) const | |
OCDM_REF (OCDM_Document) NextDocument(void) const | |
const char * | GetOwner (void) const |
int | RemoveDocument (const char *Id) |
const char * | SetName (const char *Name) |
const char * | SetOwner (const char *Owner) |
int | SetAssociatedInfo (const OCDM_ByteSequence &Info) |
void | Log (const char *str,...) const |
This method logs information. It is equivalent to OCDM_Utilities.Log(). | |
long | size (void) const |
This function returns the number of Documents contained in the Collection object. | |
OCDM_BOOL | Valid (void) const |
const char * | toString (void) const |
const char * | objectType (void) const |
OCDM_Collection | ( | ) |
OCDM_Collection | ( | const char * | name | ) |
name:
It is the Collection's name which must be the absolute path of the Collection on disk,If name is of the form "Col*", then it refers to an already open Collection. Else, we assume that name is a path, and the Collection is loaded from the disk... OCDM_Collection | ( | const class OCDM_Collection & | obj | ) |
OCDM_Collection | ( | const char * | name, | |
const OCDM_AttributeSet & | AttrSet, | |||
const char * | encoding | |||
) |
name:
It is the Collection's name which must be the absolute path of the Collection on disk, AttrSet:
It is an object of type OCDM_AttributeSet which represents a set of Attributes that will be inserted into the new Collection encoding:
The encoding of the CollectionOCDM_Collection | ( | const | CDM_Collection | ) |
~OCDM_Collection | ( | ) |
class OCDM_Collection & operator= | ( | const class OCDM_Collection & | obj | ) |
void storeObject | ( | const class OCDM_Object * | objPtr | ) | const |
void storeObject | ( | const class OCDM_Document * | objPtr | ) | const |
class OCDM_Object * getStoredObject | ( | void | ) | const |
void releaseStoredObject | ( | void | ) | const |
OCDM_BOOL AttributeExists | ( | const char * | name | ) | const |
name:
The Attribute name to be found.void CreateDocument | ( | const char * | XID, | |
const OCDM_ByteSequence & | RawData, | |||
const OCDM_AnnotationSet & | Annotations, | |||
const OCDM_AttributeSet & | Attributes, | |||
const char * | encoding | |||
) |
XID:
The External Id of the Document (which represents the full path in disk of the original file that contains the Document's text) RawData:
the text (RawData or ByteSequence) of the new Document, Annotations:
An initial Annotation set, Attributes:
An initial Attribute set Encoding:
The encoding of the Document.C:\Users\petasis\Collections
The RawData parameter must contain the desired for the new Document text, in UTF-8 format. A local copy of this variable will be also created. If the text is not in UTF-8 (i.e. contains text just red from a file using the standart C library routines and is in the ISO 8859-7 encoding) then must be converted to UTF using CDM_ExternalToUtf. If the origin of this string is Tcl, then it is already in UTF format, as Tcl uses ONLY UTF for encoding strings internally. The Annotations parameter must be of type OCDM_AnnotationSet.Note that a reference to this object will also be kept. The Attributes parameter must hold a valid Attribute set created, A reference to this object will also be kept. Finally, an encoding can be specified. A local copy of this string will be created. The value of this parameter must be a standart Tcl encoding value (like iso8859-7 or cp1253). For all available Tcl encodings please refer to the Tcl manuals. If this parameter is ommitted, then a default value will be used. This value will be inherited from the parent Collection object. It is important for the encoding to correctly describe the text. If the given UTF string cannot be converted to the Document's encoding, then the text will be filled with the character "?" in places where the conversion will fail.
void CreateDocument | ( | const char * | XID, | |
const OCDM_ByteSequence & | RawData, | |||
const OCDM_AnnotationSet & | Annotations, | |||
const OCDM_AttributeSet & | Attributes | |||
) |
\ brief This is an overloaded version of the above one. The only difference is that it does not hold encoding information.
int Length | ( | void | ) | const |
OCDM_REF | ( | OCDM_Attribute | ) | const |
OCDM_REF | ( | OCDM_AttributeSet | ) | const |
int PutAttribute | ( | const OCDM_Attribute & | Attr | ) |
Attr:
The name of the attribute to be inserted in the collection. const char * GetName | ( | void | ) | const |
int RemoveAttribute | ( | const char * | name | ) |
name:
The name of the attribute to be removed const char * GetEncoding | ( | void | ) | const |
const char * SetEncoding | ( | const char * | encoding | ) |
OCDM_REF | ( | OCDM_ByteSequence | ) | const |
int Sync | ( | void | ) | const |
int AnnotateColection | ( | void | ) |
This function will run the specified annotator over the given Collection... [Not Implemented]
int Destroy | ( | const char * | name | ) |
name:
The name of the collection to be destroyedOCDM_REF | ( | OCDM_Document | ) | const |
OCDM_REF | ( | OCDM_Document | ) | const |
OCDM_REF | ( | OCDM_Document | ) | const |
OCDM_REF | ( | OCDM_Document | ) | const |
const char * GetOwner | ( | void | ) | const |
int RemoveDocument | ( | const char * | Id | ) |
Id:
The Id parameter that specifies the document to be removed const char * SetName | ( | const char * | Name | ) |
Owner
; the parameter of the new nameconst char * SetOwner | ( | const char * | Owner | ) |
Owner
; the parameter of the new ownerint SetAssociatedInfo | ( | const OCDM_ByteSequence & | Info | ) |
void Log | ( | const char * | str, | |
... | ||||
) | const |
long size | ( | void | ) | const |
OCDM_BOOL Valid | ( | void | ) | const |
const char * toString | ( | void | ) | const |
const char* objectType | ( | void | ) | const |