Working with Collections (COM-based API)
Important! The indexing of ABBYY FineReader Server Open API collections starts with 0.
Collection classes are implemented for several types of objects in the Open API. The following collection types are available:
- StringsCollection — a collection of strings
- DocumentInfoItems — a collection of DocumentInfoItem objects
- DocumentAttributes — a collection of DocumentAttribute objects
- DocumentTypes — a collection of DocumentType objects
- IndexingFields — a collection of IndexingField objects
- JobMessages — a collection of JobMessage objects
- JobStateInfos — a collection of JobStateInfo objects
- OutputDocuments — a collection of OutputDocument objects
- OutputFormatSettingsCollection — a collection of OutputFormatSettings objects
- Workflows — a collection of Workflow objects
- XmlResultInputFiles — a collection of XmlResultInputFile objects
These collections are independent objects and are used to pass various sets of parameters to functions that require them.
All these objects are characterized by a common set of properties and methods that make them collections.
These properties and methods are (in IDL notation):
Standard collection-specific properties and methods:
// This property stores the number of elements in the collection
HRESULT Count( [out, retval]long* pVal );
// This method provides access to a single collection element
HRESULT Item( [in]long index, [out, retval]<collection type>* pVal );
ABBYY FineReader Server collection-specific properties and methods (optional):
// Inserts a new element at the specified position
HRESULT Insert( [in]<collection type> newVal, [in]long index );
// Adds a new element at the end of the collection
HRESULT Add( [in]<collection type> newVal );
// Removes an element from the collection
HRESULT Remove( [in]long index );
// Removes all elements from the collection
HRESULT RemoveAll();
See also
See samples: Open API Samples.
3/26/2024 1:49:49 PM