Rule Execution Server API

ilog.rules.xml
Interface IlrXmlDocumentDriver

All Known Subinterfaces:
IlrXmlDataDriver
All Known Implementing Classes:
IlrXmlDefaultDataDriver

public interface IlrXmlDocumentDriver

An XML document driver creates an IlrXmlObject from an XML document instance, or creates the XML document from an IlrXmlObject instance.


Method Summary
 void end()
           Dispose properly the allocated memory.
 IlrXmlError[] getErrors()
           Get the errors generated during the last marshalling/unmarshalling operation.
 IlrReflect getModel()
           Get the object model used by the driver.
 IlrXmlError[] getWarnings()
           Get the warnings generated during the last marshalling/unmarshalling operation.
 IlrXmlModel getXmlModel()
           Return the runtime XML reflect model.
 IlrXmlObject readObject(InputStream stream)
           Read an XML document to create an IlrXmlObject Java instance given the mapping contained in the driver model.
 IlrXmlObject readObject(Reader reader)
           Read an XML document to create an IlrXmlObject Java instance given the mapping contained in the driver model.
 IlrXmlObject readObject(Reader reader, IlrClass xomType)
          Reads an XML document to create an IlrXmlObject Java instance given the mapping contained in the driver model.
 void writeObject(IlrXmlObject object, Writer objectWriter)
          Write an IlrXmlObject instance as an XML document given the Java/XML mapping defined in the driver object model.
 

Method Detail

getErrors

IlrXmlError[] getErrors()

Get the errors generated during the last marshalling/unmarshalling operation.

Returns:
a list of errors.

getWarnings

IlrXmlError[] getWarnings()

Get the warnings generated during the last marshalling/unmarshalling operation.

Returns:
a list of warnings.

readObject

IlrXmlObject readObject(Reader reader)
                        throws IlrXmlErrorException

Read an XML document to create an IlrXmlObject Java instance given the mapping contained in the driver model.

Throws:
IlrXmlErrorException - thrown when the reading fails.
Parameters:
reader - The reader containing the XML document.
Returns:
the Java instance related to the XML information.

readObject

IlrXmlObject readObject(InputStream stream)
                        throws IlrXmlErrorException

Read an XML document to create an IlrXmlObject Java instance given the mapping contained in the driver model.

Throws:
IlrXmlErrorException - thrown when the reading fails.
Parameters:
stream - The InputStream containing the XML document.
Returns:
the Java instance related to the XML information.

readObject

IlrXmlObject readObject(Reader reader,
                        IlrClass xomType)
                        throws IlrXmlErrorException
Reads an XML document to create an IlrXmlObject Java instance given the mapping contained in the driver model.

This method is different from the previous readObject method with only one parameter. It does not require that the enclosing tag be a root element.

Throws:
IlrXmlErrorException - When the reading fails.
Parameters:
reader - The reader containing the XML document.
xomType - The expected XOM type of the XML object.
Returns:
The Java instance related to the XML information.

writeObject

void writeObject(IlrXmlObject object,
                 Writer objectWriter)
                 throws IlrXmlErrorException
Write an IlrXmlObject instance as an XML document given the Java/XML mapping defined in the driver object model.

Throws:
IlrXmlErrorException - thrown when the writing fails.
Parameters:
object - The default object to be written.

objectWriter - The XML document writer.

end

void end()

Dispose properly the allocated memory.


getXmlModel

IlrXmlModel getXmlModel()

Return the runtime XML reflect model.


getModel

IlrReflect getModel()

Get the object model used by the driver.

Returns:
the object model used by the driver.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013