Wednesday, October 18, 2006

Index

Indices are the only practical way to retrieve documents after they have been committed.

The DocClass (document class) defined on the server by the System Administrator dictates the indices supported by the document. It also defines the datatype, the mandatory nature of the value.

Images Services defines indexes to be numeric, string, date or menu item.

All repositories except local support indexing.

Indexing Overview

You can set Index values using the Capture Index component which is a Capture ActiveX controls with a user interface for entering index values.

You can also implement indexing programatically using Capture objects.

Assigning indices (properties) to documents allows us to retrieve them at a later time.

In Capture the Index component performs the indexing of documents. You can perform directly on individual Index objects.

"Index" comes from FileNet Images Services. Capture Content Services and the P8 Content Engine use the term "Property" to refer to the same functionality.

Creatable Objects

The Capture controls , components and OLE server are all creatable (that is they can be instantiated)

The can be drawn on forms (components and controls)

You can use the CreateObject(ProgID)

Dim them (Dim objObject as New ObjectType)

Set them (Set objObject = New ObjectType)

There are only 2 creatable objects in the Capture Repository Object Model, they are the RepServer and RepObject

Repository Collections

Most capture collection objects support the Add and Remove methods (exceptions are IIndices, IChoices, Structure)

The below snippet of code illustrates a simple itteration through a collection in the Repository



Dim objRepParent as RepServerLib.RepObject
Dim objRepChild as RepServerLib.RepObject

[..]

For Each objRepChild in objRepParent.Contents
-- 'Do processing on the child
Next

Repository Session

The RepSession object represents a single repository session. This manages the connection to the repository (using ODBC for the Local repository and NCH for the remote BES respository)

The Sessions collection contains all the active RepSession objects for the repository. It is zero based.





Dim objRepServer as RepServerLib.RepServer
..
Set objRepSession = objRepServer.Sessions(0)

Repository Object Model

To successfully program we need to understand the Repository Object Model

RepObject is a contraction of Repository Object. This is the name of the exposed dll object definition.

RepObject is part of a larger structure of repository objects.

The root for the entire object model is the RepServer (short for Repository Server). This is also the session manager.

The RepObject can be one of five types
1) Repository (root)
2) Folder
3) Batch
4) Document
5) Page

Every RepObject except a Page RepObject can contain other RepObjects.