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 Detail

      • loadModel

        IlrReflect loadModel(java.io.Reader reader,
                           java.lang.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(org.xml.sax.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(org.xml.sax.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.

      • getXmlModel

        IlrXmlModel getXmlModel()
        Return the runtime XML reflect model.

© Copyright IBM Corp. 1987, 2017