Rule Execution Server API

ilog.rules.xml
Class IlrXmlObjectAsserter

java.lang.Object
  extended by ilog.rules.xml.IlrXmlObjectExplorer
      extended by ilog.rules.xml.IlrXmlObjectAsserter

public class IlrXmlObjectAsserter
extends IlrXmlObjectExplorer

This class explores an XML object tree in order to assert some selected objects in a context. It is usually instantiated to explore an XML root object created from an XML document by an IlrXmlDataDriver. The selection and exploration policy is defined by registering the IlrClass of the asserted instances. By default, there is no class registered as selected or explored. Hence, a convenient registration is activated by the registerAllXmlClasses() method. In this case, all the instances of IlrXmlObject are asserted and recursively explored.

See Also:
IlrXmlObjectExplorer, IlrXmlObject

Nested Class Summary
 
Nested classes/interfaces inherited from class ilog.rules.xml.IlrXmlObjectExplorer
IlrXmlObjectExplorer.IlrObjectProcessor, IlrXmlObjectExplorer.IlrObjectSelector
 
Field Summary
 
Fields inherited from class ilog.rules.xml.IlrXmlObjectExplorer
explorer, processor, selector
 
Constructor Summary
IlrXmlObjectAsserter(IlrContext context)
          Builds an asserter linked to a context.
IlrXmlObjectAsserter(IlrContext context, boolean collectionExplored)
          Builds an asserter linked to a context.
 
Method Summary
 void registerAllXmlClasses()
          Register all XML classes (java.util.Vector and ilog.rules.factory.IlrXmlObject) of a reflect instance.
 void registerAssertedClass(IlrClass clazz)
          Register a class to activate the assertion of its instances.
 void registerClass(IlrClass clazz)
          Register an IlrClass as an asserted and an explored class.
 void registerClass(String className)
          Register a class known by its name.
 void registerCollectionExploration()
          Register that the collection element of an IlrXmObject is implicitly explored, that is, the Vector class is a member of the explored classes set.
 void registerExploredClass(IlrClass clazz)
          Register a class to activate the exploration of its instances.
 void registerTreeExploration()
          Register that all the XML tree is explored, that is, the object class is a member of the explored classes set.
 
Methods inherited from class ilog.rules.xml.IlrXmlObjectExplorer
exploreObject, getProcessor, getSelector, setProcessor, setSelector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlrXmlObjectAsserter

public IlrXmlObjectAsserter(IlrContext context)
Builds an asserter linked to a context.

Parameters:
context - The context where the XML objects are inserted.

IlrXmlObjectAsserter

public IlrXmlObjectAsserter(IlrContext context,
                            boolean collectionExplored)
Builds an asserter linked to a context.

Parameters:
context - The context where the XML objects are inserted.
collectionExplored - Indicates if the collection element of IlrXmlObject are explored, that is, whether the Vector class belongs to the explored classes set.
Method Detail

registerClass

public void registerClass(IlrClass clazz)
Register an IlrClass as an asserted and an explored class.

Parameters:
clazz - The class to be asserted or explored.

registerClass

public void registerClass(String className)
                   throws IlrXmlErrorException
Register a class known by its name.

Throws:
IlrXmlErrorException - if the class does not exist in the reflect model.
Parameters:
className - The class to be asserted or explored.

registerAllXmlClasses

public void registerAllXmlClasses()
                           throws IlrXmlErrorException
Register all XML classes (java.util.Vector and ilog.rules.factory.IlrXmlObject) of a reflect instance.

Throws:
IlrXmlErrorException - if the default class does not exist in the reflect model.

registerCollectionExploration

public void registerCollectionExploration()
Register that the collection element of an IlrXmObject is implicitly explored, that is, the Vector class is a member of the explored classes set.


registerTreeExploration

public void registerTreeExploration()
Register that all the XML tree is explored, that is, the object class is a member of the explored classes set.


registerAssertedClass

public void registerAssertedClass(IlrClass clazz)
Register a class to activate the assertion of its instances.

Parameters:
clazz - The registered dynamic class.

registerExploredClass

public void registerExploredClass(IlrClass clazz)
Register a class to activate the exploration of its instances.

Parameters:
clazz - The registered dynamic class.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013