PlanetPress Capture Library
TDocumentStore Class Reference

This object is used as the central document repository in pattern-enabled workflows. More...

List of all members.

Public Member Functions

Integer Add (Integer PdfID, const WideString TemplateName, const WideString MetaNode, const WideString PatternSequence, const WideString Name)
 Adds a new document in the Document Store.
 Delete (Integer ItemID)
 Deletes an entry from the store.
IDocumentStore Find (const WideString SearchField, const WideString SearchOp, const WideString SearchFor)
 Returns a new DocumentStore object instance that only contains the matching items.

Public Attributes

IDocument Item
 Returns the document at index ItemIndex.
IDocument ItemByID
 Returns the document whose ID is ItemID.
integer Count
 Number of documents in the collection.

Detailed Description

This object is used as the central document repository in pattern-enabled workflows.

It holds and manages documents, which are subsets of pages from PDF files stored in the PDF store. A PDF may contain one or more documents depending on the user's workflow configuration. A document cannot have pages stored in multiple PDF files.

Note:
Contrary to other collections, which are read live from the database, the list of items used by the Count and Item properties is a snapshot taken at the time the DocumentStore object was created and/or the Find method was called, and only the items in that list can be retrieved by Item or counted with Count. The ItemByID method however is not bound by this restriction and can be used to access any item regardless of whether it is in the list or not.

Member Function Documentation

Integer TDocumentStore::Add ( Integer  PdfID,
const WideString  TemplateName,
const WideString  MetaNode,
const WideString  PatternSequence,
const WideString  Name 
)

Adds a new document in the Document Store.

Parameters:
PdfIDID of the PDF Store item that contains the document's pages.
TemplateNameName of the PlanetPress document that was used to produce the document.
MetaNodeMetadata Document node for the document.
PatternSequencePattern sequence in which the document is a part.
NameUser-defined name of the document. This can be used later on as a search criteria.
Returns:
Item ID of the new entry.
TDocumentStore::Delete ( Integer  ItemID)

Deletes an entry from the store.

Parameters:
ItemIDID of the item to delete.
Exceptions:
EOleExceptionThe item cannot be found.
IDocumentStore TDocumentStore::Find ( const WideString  SearchField,
const WideString  SearchOp,
const WideString  SearchFor 
)

Returns a new DocumentStore object instance that only contains the matching items.

The Find method can be called on this new object to further refine the search. The item list of the DocumentStore from which the Find was called remains unchanged.

For example, to find all the documents opened in 2010 for the pattern sequence named transit:

MyDocs = Capture.DocumentStore.Find("OpenedDate", ">=", "2010-01-01").Find("PatternSequence", "=", "transit")

Parameters:
SearchFieldField on which the search is done. Accepted values are the names of the properties of a document, which are Status, Name, PatternSequence, TemplateName, OpenedDate and ClosedDate, as well as PenSerial, PenDescription and PatternCode. The dates are strings in ISO 8601 format.
SearchOpOperation to perform. Valid values are:
  • = is equal to
  • <> is not equal to
  • < is smaller than
  • > is greater than
  • <= is smaller or equal to
  • >= is greater or equal to
  • * contains the search string
  • ! does not contain the search string
SearchForThe string to search for. The actual use of the string depends on the value of the SearchOp argument.
Returns:
A new DocumentStore object instance that contains only the items that match the search arguments.
See also:
InternalFind

Member Data Documentation

Number of documents in the collection.

Returns the document at index ItemIndex.

Note:
Contrary to other collections, the index of a document in a specific instance of DocumentStore does not change.
Parameters:
ItemIndexIndex of the Document object to retrieve.
See also:
TDocument

Returns the document whose ID is ItemID.

Parameters:
ItemIDID of the Document object to retrieve.
See also:
TDocument