Interface CMLDocumentFactory

All Known Implementing Classes:
DocumentFactoryImpl

public interface CMLDocumentFactory
Creates DocumentFactory of appropriate subclass
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • setDocumentClassName

      void setDocumentClassName(String documentClassName)
      set the document class name
      Parameters:
      documentClassName - the classname with which to create new Documents
    • createDocument

      AbstractCMLDocument createDocument()
      create document with current documentClassName
      Returns:
      AbstractCMLDocument the document
    • parseString

      AbstractCMLDocument parseString(String xmlString) throws CMLException
      convenience method; parses a string representing a well-formed XML document
      Parameters:
      xmlString - the string
      Returns:
      Element
      Throws:
      CMLException
    • parseSAX

      Element parseSAX(InputSource is, AbstractCMLDocument doc, boolean debug) throws IOException, CMLException
      parses XML document into existing DOM The new document must be well-formewd with a single root element the application will probably wish to relocate this in the DOM.
      Parameters:
      is - the input
      doc - the existing document
      debug -
      Returns:
      Element element formed by parsing NOT attached to tree
      Throws:
      IOException - specific or IO
      CMLException
    • parseSAX

      parses XML document into existing DOM The new document must be well-formed with a single root element the application will probably wish to relocate this in the DOM. debug is set to false
      Parameters:
      is - - the input
      doc - - the existing document
      Returns:
      Element - element formed by parsing NOT attached to tree
      Throws:
      IOException - - domain or IO
      CMLException
    • parseSAX

      AbstractCMLDocument parseSAX(InputSource is, boolean debug) throws IOException, CMLException
      Parses an XML document into the DOM, creating a new owner document.
      Parameters:
      is - the input source
      debug - whether to enable debugging
      Returns:
      the parsed CML document
      Throws:
      IOException - if an I/O error occurs
      CMLException - if a CML-specific error occurs
    • parseSAX

      Parses an XML document into the DOM, creating a new owner document (debug is false).
      Parameters:
      is - the input source
      Returns:
      the parsed CML document
      Throws:
      IOException - if an I/O error occurs
      CMLException - if a CML-specific error occurs