Document Classification Concepts

Documents checked into the Content Engine require a class. A document can be classified manually, with a user selecting the document's class, or it can be classified automatically when the document is checked in. The Content Engine provides an extensible framework that enables an incoming document of a specified MIME type to be automatically assigned to a target document class, as well as setting selected properties of that target class based on values found in the incoming document. A classification component, or classifier, does the work of assigning a document class. One such classifier packaged with the Content Engine is XML Classifier. For details on the XML Classifier, see Classification Flowchart and Understanding the XML Classifier.

You can also plug custom Java™-implemented classifiers into the document classification framework, which is the focus of this topic. It outlines custom classifier requirements and describes the document checkin process of which classifier execution is a part. Before developing a custom classifier, read Understanding Automatic Document Classification. It discusses key classification framework concepts, including the asynchronous execution of a classifier and the security implications of automatically classifying a document.

For document classification code examples, see Working with Document Classification-related Objects.

Custom Classifier Requirements

To plug a custom classifier into the document classification framework, you must do the following:

For best practices for implementing a DocumentClassifier interface, see Implementation Concepts. For code examples on implementing a document classifier and on creating a DocumentClassificationAction object, see Working with Document Classification-related Objects. For deployment options, see Deploying Action Handlers.

Document Checkin Process

You can automatically classify documents with a content type that matches the MIME type property of an existing DocumentClassificationAction object. To automatically classify a new document, you create a Document object and do the following:

The Document object is checked into the object store with an initial class, and the object's ClassificationStatus property is set to CLASSIFICATION_PENDING. Document classification is an asynchronous action; therefore, the auto-classification request is queued, represented by a DocumentClassificationQueueItem object.

The Classification Manager is responsible for dequeuing a classification request and processing it. The Classification Manager obtains the MIME type from the target document and searches for the DocumentClassificationAction object registered for that MIME type. Getting the class name of the classifier from the DocumentClassificationAction's ProgId property, the Classification Manager invokes the classifier. A classifier operates with the same access permissions of the user who initiated the document checkin.

When document classification is complete, the Document's ClassificationStatus property is updated to indicate success or failure. If classification fails, the initial class assigned to the document remains. If classification succeeds, a new class is assigned to the document and a ClassifyCompleteEvent object is triggered.