ilog.rules.xml
Class IlrXmlObjectAsserter
- java.lang.Object
-
- ilog.rules.xml.IlrXmlObjectExplorer
-
- 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 anIlrXmlDataDriver. The selection and exploration policy is defined by registering theIlrClassof the asserted instances. By default, there is no class registered as selected or explored. Hence, a convenient registration is activated by theregisterAllXmlClasses()method. In this case, all the instances ofIlrXmlObjectare 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
Constructors Constructor and Description IlrXmlObjectAsserter(IlrContext context)Builds an asserter linked to a context.IlrXmlObjectAsserter(IlrContext context, boolean collectionExplored)Builds an asserter linked to a context.
-
Method Summary
Methods Modifier and Type Method and Description voidregisterAllXmlClasses()Register all XML classes (java.util.Vectorandilog.rules.factory.IlrXmlObject) of a reflect instance.voidregisterAssertedClass(IlrClass clazz)Register a class to activate the assertion of its instances.voidregisterClass(IlrClass clazz)Register anIlrClassas an asserted and an explored class.voidregisterClass(java.lang.String className)Register a class known by its name.voidregisterCollectionExploration()Register that the collection element of anIlrXmObjectis implicitly explored, that is, the Vector class is a member of the explored classes set.voidregisterExploredClass(IlrClass clazz)Register a class to activate the exploration of its instances.voidregisterTreeExploration()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
-
-
-
-
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 ofIlrXmlObjectare explored, that is, whether the Vector class belongs to the explored classes set.
-
-
Method Detail
-
registerClass
public void registerClass(IlrClass clazz)
Register anIlrClassas an asserted and an explored class.- Parameters:
clazz- The class to be asserted or explored.
-
registerClass
public void registerClass(java.lang.String className) throws IlrXmlErrorExceptionRegister 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 IlrXmlErrorExceptionRegister all XML classes (java.util.Vectorandilog.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 anIlrXmObjectis 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.
-
-