A GPO classifier is the equivalent of a relational database index.

But, where the relational index is used to support SQL queries, the GPO classifier can be accessed directly - it is itself an object derived from GPO.

The classifier implements the IClassifier interface that provides various access methods, from lookup to range iteration and access methods specifically to support GUI interactions.

Setting Up

A classifier "classifies" a GPO set, defined by either a one-to-many or many-to-many object association, and using the value of a specified property.

The classifier must be "registered" before the set is created. This is achieved through the registerClassifier method of IObjectManager.

om.registerClassifier("parent", "name");

The above request will classify all sets defined by objects that commonly reference an object using the "parent" property, and use as a key the value of their "name" property.

IGPOMap p = new GPOMap(om);

IGPOMap c1 = new GPOMap(om);
c1.set("name", "C1");
c1.set("parent", p);

IGPOMap c2 = new GPOMap(om);
c2.set("parent", p);
c2.set("name", "C2");

The example above demonstrates that it is not necessary to have the value property before adding to the classified set.

LinkSet

To access the IClassifier the ILinkSet should be used:

ILinkSet ls = p.getLinkSet("parent");
IClassifier cls = ls.getClassifier("name");

Lookups

Once you have the IClassifier you can lookup objects by their classfied values:

IGPOMap v = cls.getValue("C1");

Checkout the javadoc for IClassifier for more information. You will find this in the docs directory where you unzipped the download.