Rule Execution Server API

ilog.rules.xml
Interface IlrXmlSchemaDriver

All Known Subinterfaces:
IlrXmlDataDriver
All Known Implementing Classes:
IlrXmlDefaultDataDriver, IlrXmlDefaultSchemaDriver

public interface IlrXmlSchemaDriver

An XML schema driver converts an XML Schema to an Execution Object Model (XOM).

The XOM is represented by an IlrReflect instance and is used when an XML document is read. XML data are then translated into IlrXmlObject Java instances.

These Java instances or dynamic objects can be unmarshalled by the driver back into an XML document.


Method Summary
 IlrXmlDocumentDriver createDocumentDriver()
          Creates a new IlrXmlDocumentDriver to read and save XML document instance.
 void end()
          Dispose properly the allocated memory.
 IlrXmlError[] getErrors()
          Get the errors generated during the last model loading operation.
 IlrReflect getModel()
          Get the object model used by the driver.
 IlrXmlError[] getWarnings()
          Get the warnings generated during the last model loading operation.
 IlrXmlModel getXmlModel()
          Return the runtime XML reflect model.
 IlrReflect loadModel(InputSource schema, IlrXmlNsResolver nsToPackage)
          Load an XML Schema and convert it into an IlrReflect model.
 IlrReflect loadModel(Reader reader, String packageName)
          Load an XML Schema and convert it into an IlrReflect model.
 IlrReflect loadModels(InputSource[] schemaSrcs, IlrXmlNsResolver nsToPackage)
          Load a set of XML Schema and convert it into an IlrReflect model.
 void setModel(IlrReflect model)
          Set the object model used by the driver.
 

Method Detail

loadModel

IlrReflect loadModel(Reader reader,
                     String packageName)
                     throws IlrXmlErrorException

Load an XML Schema and convert it into an IlrReflect model. An IlrXmlErrorException is thrown when the parsing or the model conversion fails.

Throws:
IlrXmlErrorException
Parameters:
reader - The reader of the XML information.
packageName - The package name of the converted classes.
Returns:
the XOM.

loadModel

IlrReflect loadModel(InputSource schema,
                     IlrXmlNsResolver nsToPackage)
                     throws IlrXmlErrorException

Load an XML Schema and convert it into an IlrReflect model. An IlrXmlErrorException is thrown when the parsing or the model conversion fails.

Throws:
IlrXmlErrorException
Parameters:
schema - The location of the schema to be loaded.
nsToPackage - The package resolver that converts a namespace into a package name. If null, the loaded classes are put in the default package.
Returns:
the XOM.

loadModels

IlrReflect loadModels(InputSource[] schemaSrcs,
                      IlrXmlNsResolver nsToPackage)
                      throws IlrXmlErrorException
Load a set of XML Schema and convert it into an IlrReflect model. An IlrXmlErrorException is thrown when the parsing or the model conversion fails.

Throws:
IlrXmlErrorException
Parameters:
schemaSrcs - The location of the schemas to be loaded. To obtain better error localization and schema importation, the system and public identification should be set.
nsToPackage - The package resolver that converts a namespace into a package name. If null, the loaded classes are put in the default package.
Returns:
the XOM.

getErrors

IlrXmlError[] getErrors()

Get the errors generated during the last model loading operation.

Returns:
a list of errors.

getWarnings

IlrXmlError[] getWarnings()

Get the warnings generated during the last model loading operation.

Returns:
a list of warnings.

setModel

void setModel(IlrReflect model)
              throws IlrXmlErrorException

Set the object model used by the driver.

Throws:
IlrXmlErrorException - is returned when the model is not a valid XML model.
Parameters:
model - The model to be linked to the driver.

getModel

IlrReflect getModel()

Get the object model used by the driver.

Returns:
the object model used by the driver.

end

void end()

Dispose properly the allocated memory.


createDocumentDriver

IlrXmlDocumentDriver createDocumentDriver()
                                          throws IlrXmlErrorException
Creates a new IlrXmlDocumentDriver to read and save XML document instance.

Throws:
IlrXmlErrorException
Returns:
the new document driver

getXmlModel

IlrXmlModel getXmlModel()
Return the runtime XML reflect model.


Rule Execution Server API

© Copyright IBM Corp. 1987, 2012