Programmers guide.

To use the structured matcher package programmatically, you must import the package SM in your Java source code. The entry point into creating a structured matcher and using it would look like:

StructuredMatcher lubeSpecialist = new StructuredMatcher( "Lubrication Specialist" );
StructuredMatcherView lubeView = new StructuredMatcherView( lubeSpecialist );
lubeView.setVisible( true );

This little snippet of code will create a new structured matcher that will be a specialist on lubrication. A view on that specialist is then created and made visible. A non modal Frame window will open with a treelike view on the structured matcher. That window will also have menus and pop-up context menus that allows various operations to be performed on the structured matcher, including adding and deleting simple matchers from the tree, loading and saving the structured matcher to disk. When a node in the tree, which represents a simple matcher, is selected and opened, a SimpleMatcherView will be opened on the simple matcher. The SimpleMatcherView displays a simple matcher as an editable decision table. This operation is handled by the StructuredMatcherView so that the user of the package do not have to use the SimpleMatcher and SimpleMatcherView classes directly. In fact they should not. When a structured matcher is saved to disk, all its associated simple matchers will also be saved so the only classes that the user should be using are the StructuredMatcher, StructuredMatcherView and perhaps a few auxiliary classes such as Likelihood. The operation of the structured matcher, which is to return a confidence value, can be activated both through the view or programmatically:

Likelihood result = lubeSpecialist.evaluate();

To create a structured matcher from one that already exists as a serialized object, use the class method load() (to be implemented):

StructuredMatcher weldSpecialist = StructuredMatcher.load( "Welding Specialist" );

after making modification to the specialist you can save the structured matcher object by:

weldSpecialist.save(); (to be implemented).

Please take note that the package does not handle concurrent operations yet so you cannot have two threads with views on the same object and use both views to modify the object, for example. This may leave the object in an inconsistent state. We may leave concurrency handling as a future enhancement.

Polardoc class documentation.

Package index

An O.M diagram of the structured matcher and its supporting classes.

Back to main page
e-mail:wingkeonxxerasethisxx@ecst.csuchico.edu

Back to home