ilog.rules.rf.model.io

Class IlrRFModelXmlSerializer

  • java.lang.Object
    • ilog.rules.rf.model.io.IlrRFModelXmlSerializer
  • All Implemented Interfaces:
    IlrRFModelSerializer


    public class IlrRFModelXmlSerializer
    extends java.lang.Object
    implements IlrRFModelSerializer
    IlrRFModelXmlSerializer implements an XML serializer for a ruleflow model. The class uses the DOM and SAX apis.
    Since:
    JRules 7.0
    • Constructor Summary

      Constructors 
      Constructor and Description
      IlrRFModelXmlSerializer()
      Creates a new IlrRFModelXmlSerializer instance.
      IlrRFModelXmlSerializer(java.util.logging.Logger logger)
      Creates a new IlrRFModelXmlSerializer instance.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.util.logging.Logger getLogger() 
      protected IlrRFModel readRFModel(org.w3c.dom.Element root)
      Populates a RF model from the given XML root element
      IlrRFModel readRFModel(java.io.Reader reader)
      Reads a ruleflow model from a reader.
      protected void writeRFModel(IlrRFModel model, org.w3c.dom.Document document)
      Populates a document with the RF model XML.
      void writeRFModel(IlrRFModel model, java.io.Writer writer)
      Writes a ruleflow model to a writer.
      void writeRFModel(IlrRFModel model, java.io.Writer writer, boolean omitXMLDeclaration)
      Writes a ruleflow model to a writer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IlrRFModelXmlSerializer

        public IlrRFModelXmlSerializer(java.util.logging.Logger logger)
        Creates a new IlrRFModelXmlSerializer instance.
        Parameters:
        logger - The for log serialization and deserialisation errors.
      • IlrRFModelXmlSerializer

        public IlrRFModelXmlSerializer()
        Creates a new IlrRFModelXmlSerializer instance.
    • Method Detail

      • readRFModel

        public IlrRFModel readRFModel(java.io.Reader reader)
        Reads a ruleflow model from a reader. This method uses the SAX API.
        Specified by:
        readRFModel in interface IlrRFModelSerializer
        Parameters:
        reader - The object to read the model from.
        Returns:
        The model read from reader.
      • getLogger

        public java.util.logging.Logger getLogger()
      • writeRFModel

        public void writeRFModel(IlrRFModel model,
                        java.io.Writer writer)
        Writes a ruleflow model to a writer. This method uses the SAX API.
        Specified by:
        writeRFModel in interface IlrRFModelSerializer
        Parameters:
        model - The ruleflow model to write to writer.
        writer - The writer.
      • writeRFModel

        public void writeRFModel(IlrRFModel model,
                        java.io.Writer writer,
                        boolean omitXMLDeclaration)
        Writes a ruleflow model to a writer. This method uses the SAX API.
        Throws:
        org.xml.sax.SAXException - if there is a problem writing the ruleflow model.
        javax.xml.transform.TransformerConfigurationException - if there is a problem transforming the XML.
        Parameters:
        model - The ruleflow model to write to writer.
        writer - The writer.
        omitXMLDeclaration - Set to true to omit the XML declaration.
      • writeRFModel

        protected void writeRFModel(IlrRFModel model,
                        org.w3c.dom.Document document)
        Populates a document with the RF model XML.
        Parameters:
        model - The model to populate the document with.
        document - The document to populate.
      • readRFModel

        protected IlrRFModel readRFModel(org.w3c.dom.Element root)
        Populates a RF model from the given XML root element
        Parameters:
        root - The root element.
        Returns:
        A new RF model.

© Copyright IBM Corp. 1987, 2017