ilog.rules.xml

Class IlrXmlObject

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


    public class IlrXmlObject
    extends java.lang.Object
    implements java.lang.Cloneable, java.io.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
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.lang.Object clone()
      Returns a clone of this XML object.
      boolean equals(java.lang.Object arg)
      Compares this XML object against the specified object.
      java.lang.String getAbsoluteXPath(boolean withPosition) 
      java.lang.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.
      java.lang.String getXOMClassName()
      Gets the fully qualified name of the XOM class.
      int hashCode()
      Returns the hashcode of the XML Object.
      java.lang.String printToString()
      Prints the class name and the field values of this XML object to a string.
      void setAsRootElement(java.lang.String elementName, java.lang.String namespace, java.lang.String schemaLocation)
      Set the root element information when the object is saved as an XML document.
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • NIL_VALUE

        public static final java.lang.Object NIL_VALUE
    • Method Detail

      • equals

        public boolean equals(java.lang.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 java.lang.Object
      • hashCode

        public int hashCode()
        Returns the hashcode of the XML Object.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        The hashcode of the XML object.
      • clone

        public java.lang.Object clone()
        Returns a clone of this XML object.
        Overrides:
        clone in class java.lang.Object
        Returns:
        A clone of this XML object.
      • setAsRootElement

        public void setAsRootElement(java.lang.String elementName,
                            java.lang.String namespace,
                            java.lang.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 java.lang.String getRelativeXPath(boolean withPosition)
      • getAbsoluteXPath

        public java.lang.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 java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • printToString

        public java.lang.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.

© Copyright IBM Corp. 1987, 2017