Class IlrXmlObject

java.lang.Object
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:
  • Field Details

    • UNKNOWN_POSITIVE_VALUE

      public static final int UNKNOWN_POSITIVE_VALUE
      See Also:
    • NIL_VALUE

      public static final Object NIL_VALUE
  • Method Details

    • 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.