Rule Execution Server API

ilog.rules.xml
Class IlrXmlObject

java.lang.Object
  extended by ilog.rules.xml.IlrXmlObject
All Implemented Interfaces:
ilog.rules.factory.IlrBindingObject, Serializable, Cloneable

public class IlrXmlObject
extends Object
implements Cloneable, Serializable, ilog.rules.factory.IlrBindingObject

This class is used to receive the XML data read from an XML document. Once the XML Schema is parsed by the XML driver, the reading of each XML element mapped to an IlrClass creates an instance of this class. To create an IlrXmlObject instance without the XML driver it is possible to use the IlrReflect class. The method ilog.rules.factory.IlrReflect.getClass(String fullyQualifiedName) can be used together with (IlrXmlObject)IlrReflect.newInstance(IlrClass class) to create the IlrXmlObject instance.

See Also:
Serialized Form

Field Summary
static Object NIL_VALUE
           
static int UNKNOWN_POSITIVE_VALUE
           
 
Method Summary
 Object clone()
          Returns a clone of this XML object.
 boolean equals(Object arg)
          Compares this XML object against the specified object.
 String getAbsoluteXPath(boolean withPosition)
           
 String getRelativeXPath(boolean withPosition)
           
 IlrClass getXOMClass()
          Gets the XOM class of the XML object.
 IlrClass getXOMClass(IlrObjectModel model)
          Gets the XOM class of the XML object.
 String getXOMClassName()
          Gets the fully qualified name of the XOM class.
 int hashCode()
          Returns the hashcode of the XML Object.
 String printToString()
          Prints the class name and the field values of this XML object to a string.
 void setAsRootElement(String elementName, String namespace, String schemaLocation)
          Set the root element information when the object is saved as an XML document.
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN_POSITIVE_VALUE

public static final int UNKNOWN_POSITIVE_VALUE
See Also:
Constant Field Values

NIL_VALUE

public static final Object NIL_VALUE
Method Detail

equals

public boolean equals(Object arg)
Compares this XML object against the specified object. Returns true if the objects are the same. Two XML objects are the same if they belong to the same IlrClass and their field values are the same.

Overrides:
equals in class Object

hashCode

public int hashCode()
Returns the hashcode of the XML Object.

Overrides:
hashCode in class Object
Returns:
The hashcode of the XML object.

clone

public Object clone()
Returns a clone of this XML object.

Overrides:
clone in class Object
Returns:
A clone of this XML object.

setAsRootElement

public void setAsRootElement(String elementName,
                             String namespace,
                             String schemaLocation)
Set the root element information when the object is saved as an XML document.

Parameters:
elementName - The root element name.
namespace - The element namespace. The null value represents the default namespace.
schemaLocation - The schema location. It could be null.

getRelativeXPath

public String getRelativeXPath(boolean withPosition)

getAbsoluteXPath

public String getAbsoluteXPath(boolean withPosition)

getXOMClass

public IlrClass getXOMClass()
Gets the XOM class of the XML object.

Specified by:
getXOMClass in interface ilog.rules.factory.IlrBindingObject
Returns:
A XOM class.

getXOMClass

public IlrClass getXOMClass(IlrObjectModel model)
Gets the XOM class of the XML object.

Specified by:
getXOMClass in interface ilog.rules.factory.IlrBindingObject
Returns:
A XOM class.

getXOMClassName

public String getXOMClassName()
Gets the fully qualified name of the XOM class.

Specified by:
getXOMClassName in interface ilog.rules.factory.IlrBindingObject
Returns:
The fully qualified name of the XOM class.

toString

public String toString()
Overrides:
toString in class Object

printToString

public String printToString()
Prints the class name and the field values of this XML object to a string.

Returns:
A string which shows the object's content.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013