You can write a XOM using a Java-like syntax.
To write a XOM:
-
Use the classes in
ilog.rules.bom.util .
The classes in
ilog.rules.bom.util provide the utilities used for loading such a file into an object model. Here is an example of a class specified using this syntax:
package mypackage.binding;
extends ilog.rules.factory.IlrHashObject
property "ilog.rules.engine.driver"
"ilog.rules.factory.IlrHashDriver"
public java.lang.String name;
-
To read this class, create a reader with the above content.
-
Use the following code to load the reader into the XOM:
import ilog.rules.bom.util.*;
new IlrJavaSerializer().readObjectModel(reflect,reader);
// we have to process the syntax error
String[] messages = error.getErrorMessages();
for (int i = 0; i < messages.length; i++) {
System.err.println(messages[i]);
System.err(error.getMessage());
Related Concepts
Related Tasks
Related Reference
Related Samples and Tutorials
How to Run Rules Against XML Objects