ilog.rules.xml
Interface IlrXmlDocumentDriver
-
- All Known Subinterfaces:
- IlrXmlDataDriver
- All Known Implementing Classes:
- IlrXmlDefaultDataDriver
public interface IlrXmlDocumentDriverAn XML document driver creates anIlrXmlObjectfrom an XML document instance, or creates the XML document from anIlrXmlObjectinstance.
-
-
Method Summary
Methods Modifier and Type Method and Description voidend()Dispose properly the allocated memory.IlrXmlError[]getErrors()Get the errors generated during the last marshalling/unmarshalling operation.IlrReflectgetModel()Get the object model used by the driver.IlrXmlError[]getWarnings()Get the warnings generated during the last marshalling/unmarshalling operation.IlrXmlModelgetXmlModel()Return the runtime XML reflect model.IlrXmlObjectreadObject(java.io.InputStream stream)Read an XML document to create anIlrXmlObjectJava instance given the mapping contained in the driver model.IlrXmlObjectreadObject(java.io.Reader reader)Read an XML document to create anIlrXmlObjectJava instance given the mapping contained in the driver model.IlrXmlObjectreadObject(java.io.Reader reader, IlrClass xomType)Reads an XML document to create anIlrXmlObjectJava instance given the mapping contained in the driver model.voidwriteObject(IlrXmlObject object, java.io.Writer objectWriter)Write anIlrXmlObjectinstance 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(java.io.Reader reader) throws IlrXmlErrorException
Read an XML document to create an
IlrXmlObjectJava 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(java.io.InputStream stream) throws IlrXmlErrorException
Read an XML document to create an
IlrXmlObjectJava 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(java.io.Reader reader, IlrClass xomType) throws IlrXmlErrorException
Reads an XML document to create anIlrXmlObjectJava instance given the mapping contained in the driver model.This method is different from the previous
readObjectmethod 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, java.io.Writer objectWriter) throws IlrXmlErrorException
Write anIlrXmlObjectinstance 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.
-
-