XQC_Collection_s Struct Reference

A Collection is a sequence of Node Items. More...

#include <zorba/zorbac.h>


Data Fields

XQUERY_ERROR(* add_document )(XQC_Collection collection, FILE *doc)
 Adds a document given by the FILE pointer to this collection.
XQUERY_ERROR(* add_document_char )(XQC_Collection collection, const char *doc)
 Adds a document given by the char pointer to this collection.
XQUERY_ERROR(* add_node )(XQC_Collection collection, XQC_Item node)
 Adds a Node Item to the Collection.
XQUERY_ERROR(* add_sequence )(XQC_Collection collection, XQC_Sequence sequence)
 Adds a sequence of Node Items to the Collection.
void * data
 for internal use only
XQUERY_ERROR(* delete_node )(XQC_Collection collection, XQC_Item node)
 Deletes a Node Item from the given Collection.
void(* free )(XQC_Collection collection)
 called to free the resources associated with the xqc_itemfactory.
XQUERY_ERROR(* get_uri )(XQC_Collection collection, XQC_Item_Ref uri_item)
 Get the URI of a collection as an anyURI Item.


Detailed Description

A Collection is a sequence of Node Items.

Each Collection is created by the XmlDataManager and referenced by a URI. The URI can be accessed in a query's fn:collection function.

Examples:

cdatamanager.c.

Definition at line 1747 of file zorbac.h.


Field Documentation

XQUERY_ERROR(* XQC_Collection_s::add_document)(XQC_Collection collection, FILE *doc)

Adds a document given by the FILE pointer to this collection.

Parameters:
collection the XQC_Collection_s that this function pointer is a member of
doc The document to add as a FILE pointer.
Return values:
XQC_NO_ERROR 
XQP0016_LOADER_IO_ERROR,\retval XQP0017_LOADER_PARSING_ERROR,
XQC_INTERNAL_ERROR 

XQUERY_ERROR(* XQC_Collection_s::add_document_char)(XQC_Collection collection, const char *doc)

Adds a document given by the char pointer to this collection.

Parameters:
collection the XQC_Collection_s that this function pointer is a member of
doc The document to add as a char pointer.
Return values:
XQC_NO_ERROR 
XQP0016_LOADER_IO_ERROR,\retval XQP0017_LOADER_PARSING_ERROR,
XQC_INTERNAL_ERROR 
Examples:
cdatamanager.c.

XQUERY_ERROR(* XQC_Collection_s::add_node)(XQC_Collection collection, XQC_Item node)

Adds a Node Item to the Collection.

Parameters:
collection the XQC_Collection_s that this function pointer is a member of
node The node item to add to the given collection.
Return values:
XQC_NO_ERROR 
XQP0019_INTERNAL_ERROR 
API0007_COLLECTION_ITEM_MUST_BE_A_NODE 

XQUERY_ERROR(* XQC_Collection_s::add_sequence)(XQC_Collection collection, XQC_Sequence sequence)

Adds a sequence of Node Items to the Collection.

Parameters:
collection the XQC_Collection_s that this function pointer is a member of
sequence The sequence of node items to add to the given collection.
Return values:
XQC_NO_ERROR 
XQP0019_INTERNAL_ERROR 
API0007_COLLECTION_ITEM_MUST_BE_A_NODE 

void* XQC_Collection_s::data

for internal use only

Definition at line 1840 of file zorbac.h.

XQUERY_ERROR(* XQC_Collection_s::delete_node)(XQC_Collection collection, XQC_Item node)

Deletes a Node Item from the given Collection.

Parameters:
collection the XQC_Collection_s that this function pointer is a member of
node The node item to delete from the given collection.
Return values:
XQC_NO_ERROR 
XQP0019_INTERNAL_ERROR 
API0007_COLLECTION_ITEM_MUST_BE_A_NODE 

void(* XQC_Collection_s::free)(XQC_Collection collection)

called to free the resources associated with the xqc_itemfactory.

Parameters:
collection the XQC_Collection that this function pointer is a member of
Examples:
cdatamanager.c.

XQUERY_ERROR(* XQC_Collection_s::get_uri)(XQC_Collection collection, XQC_Item_Ref uri_item)

Get the URI of a collection as an anyURI Item.

Parameters:
collection the XQC_Collection_s that this function pointer is a member of
[out] uri_item The uri item of the given collection. The user is responsible for freeing the object by calling the XQC_Item::free() function.
Return values:
XQC_NO_ERROR 
XQP0019_INTERNAL_ERROR 
Examples:
cdatamanager.c.


The documentation for this struct was generated from the following file: