ilog.rules.vocabulary.model.bom.io

Class IlrBOMVocabularyXMLWriter

  • java.lang.Object
    • ilog.rules.vocabulary.model.bom.io.IlrBOMVocabularyXMLWriter


  • public class IlrBOMVocabularyXMLWriter
    extends java.lang.Object
    Use IlrBOMVocabularyXMLWriter to save a Vocabulary to a stream in the Vocx XML schema.
    • Constructor Summary

      Constructors 
      Constructor and Description
      IlrBOMVocabularyXMLWriter()
      Creates a new IlrBOMVocabularyXMLWriter instance.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void writeVocabularies(IlrVocabulary[] vocabularies, org.w3c.dom.Document[] docs)
      Writes the XML representation for vocabularies to a set of documents.
      void writeVocabularies(IlrVocabulary[] vocabularies, java.io.Writer[] writers)
      Writes the XML representation for vocabularies to a set of writers.
      void writeVocabulary(IlrVocabulary vocabulary, org.w3c.dom.Document doc)
      Writes the vocabulary associated with this writer to an XML DOM tree.
      void writeVocabulary(IlrVocabulary vocabulary, java.io.Writer writer)
      Writes an XML representation of a vocabulary to a Writer.
      • Methods inherited from class java.lang.Object

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

      • IlrBOMVocabularyXMLWriter

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

      • writeVocabulary

        public void writeVocabulary(IlrVocabulary vocabulary,
                           java.io.Writer writer)
                             throws javax.xml.parsers.ParserConfigurationException,
                                    java.io.IOException
        Writes an XML representation of a vocabulary to a Writer. The XML written to writer is indented and complies with the Vocx XML schema.
        Throws:
        javax.xml.parsers.ParserConfigurationException - if DOM document creation failed.
        java.io.IOException - if an error occurs when writing to writer.
        Parameters:
        vocabulary - The vocabulary to write.
        writer - The output writer the XML representation of vocabulary is written to.
      • writeVocabulary

        public void writeVocabulary(IlrVocabulary vocabulary,
                           org.w3c.dom.Document doc)
        Writes the vocabulary associated with this writer to an XML DOM tree. Writes a <Vocabulary> root element tag to doc, and then populates doc with vocabulary. The root must to be the XML element.
        Parameters:
        vocabulary - A vocabulary.
        doc - An empty document.
      • writeVocabularies

        public void writeVocabularies(IlrVocabulary[] vocabularies,
                             java.io.Writer[] writers)
                               throws javax.xml.parsers.ParserConfigurationException,
                                      java.io.IOException
        Writes the XML representation for vocabularies to a set of writers. The first vocabulary is written completely. Locale-specific vocabulary information only is written for all following vocabularies. The resulting XML fragments are companion vocabulary that must be read as a complement to an first reference vocabulary.
        Throws:
        javax.xml.parsers.ParserConfigurationException - if DOM document creation failed.
        java.io.IOException - if an error occurs when writing on the given writers.
        Parameters:
        vocabularies - An array of vocabularies, the first vocabulary is the reference.
        writers - An array of writers. There must be an equal number of writers and vocabularies.
      • writeVocabularies

        public void writeVocabularies(IlrVocabulary[] vocabularies,
                             org.w3c.dom.Document[] docs)
        Writes the XML representation for vocabularies to a set of documents.

        The first vocabulary is written completely. Locale-specific vocabulary information only is written for all following vocabularies. The resulting XML fragments are companion vocabulary that must be read as a complement to an first reference vocabulary.

        Writes a <Vocabulary> root element tag to a document, and then populates each document with a vocabulary. The root must to be the XML element.

        Parameters:
        vocabularies - An array of vocabularies, the first vocabulary is the reference.
        docs - An array of empty DOM documents. There must be an equal number of documents and vocabularies.

© Copyright IBM Corp. 1987, 2017