Documentation of 'org.jhotdraw.xml.DOMOutput' Java class
DOMOutput
org.jhotdraw.xml

Interface DOMOutput

  • All Known Implementing Classes:
    JavaxDOMOutput, NanoXMLDOMOutput


    public interface DOMOutput
    DOMOutput.


    Design Patterns

    Abstract Factory
    DOMFactory is used by DOMInput and DOMOutput for creating Java objects and DOM elements. Abstract Factory: DOMFactory
    Client: DOMInput, DOMOutput.

    Strategy
    DOMFactory is used by DOMInput and DOMOutput for reading and writing objects. Client: DOMInput, DOMOutput.
    Strategy: DOMFactory.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void addAttribute(java.lang.String name, boolean value)
      Adds an attribute to current element of the DOM Document.
      void addAttribute(java.lang.String name, boolean value, boolean defaultValue)
      Adds an attribute to current element of the DOM Document if it is different from the default value.
      void addAttribute(java.lang.String name, double value)
      Adds an attribute to current element of the DOM Document.
      void addAttribute(java.lang.String name, double value, double defaultValue)
      Adds an attribute to current element of the DOM Document if it is different from the default value.
      void addAttribute(java.lang.String name, float value)
      Adds an attribute to current element of the DOM Document.
      void addAttribute(java.lang.String name, float value, float defaultValue)
      Adds an attribute to current element of the DOM Document if it is different from the default value.
      void addAttribute(java.lang.String name, int value)
      Adds an attribute to current element of the DOM Document.
      void addAttribute(java.lang.String name, int value, int defaultValue)
      Adds an attribute to current element of the DOM Document if it is different from the default value.
      void addAttribute(java.lang.String name, java.lang.String value)
      Adds an attribute to current element of the DOM Document.
      void addAttribute(java.lang.String name, java.lang.String value, java.lang.String defaultValue)
      Adds an attribute to current element of the DOM Document if it is different from the default value.
      void addComment(java.lang.String comment)
      Adds a comment to the current element of the DOM Document.
      void addText(java.lang.String text)
      Adds a text to current element of the DOM Document.
      void closeElement()
      Closes the current element of the DOM Document.
      java.lang.Object getPrototype()
      Returns a prototype for the object currently being written.
      void openElement(java.lang.String tagName)
      Adds a new element to the DOM Document and opens it.
      void setDoctype(java.lang.String doctype)
      Sets the doctype for the XML document.
      void writeObject(java.lang.Object o)
      Writes an object.
    • Method Detail

      • setDoctype

        void setDoctype(java.lang.String doctype)
        Sets the doctype for the XML document.
      • openElement

        void openElement(java.lang.String tagName)
        Adds a new element to the DOM Document and opens it. The new element is added as a child to the current element in the DOM document. Then it becomes the current element. The element must be closed using closeElement.
      • closeElement

        void closeElement()
        Closes the current element of the DOM Document. The parent of the current element becomes the current element.
        Throws:
        java.lang.IllegalArgumentException - if the provided tagName does not match the tag name of the element.
      • addComment

        void addComment(java.lang.String comment)
        Adds a comment to the current element of the DOM Document.
      • addText

        void addText(java.lang.String text)
        Adds a text to current element of the DOM Document. Note: Multiple consecutives texts will be merged.
      • addAttribute

        void addAttribute(java.lang.String name,
                          java.lang.String value)
        Adds an attribute to current element of the DOM Document.
      • addAttribute

        void addAttribute(java.lang.String name,
                          java.lang.String value,
                          java.lang.String defaultValue)
        Adds an attribute to current element of the DOM Document if it is different from the default value.
      • addAttribute

        void addAttribute(java.lang.String name,
                          int value)
        Adds an attribute to current element of the DOM Document.
      • addAttribute

        void addAttribute(java.lang.String name,
                          int value,
                          int defaultValue)
        Adds an attribute to current element of the DOM Document if it is different from the default value.
      • addAttribute

        void addAttribute(java.lang.String name,
                          boolean value)
        Adds an attribute to current element of the DOM Document.
      • addAttribute

        void addAttribute(java.lang.String name,
                          boolean value,
                          boolean defaultValue)
        Adds an attribute to current element of the DOM Document if it is different from the default value.
      • addAttribute

        void addAttribute(java.lang.String name,
                          float value)
        Adds an attribute to current element of the DOM Document.
      • addAttribute

        void addAttribute(java.lang.String name,
                          float value,
                          float defaultValue)
        Adds an attribute to current element of the DOM Document if it is different from the default value.
      • addAttribute

        void addAttribute(java.lang.String name,
                          double value)
        Adds an attribute to current element of the DOM Document.
      • addAttribute

        void addAttribute(java.lang.String name,
                          double value,
                          double defaultValue)
        Adds an attribute to current element of the DOM Document if it is different from the default value.
      • writeObject

        void writeObject(java.lang.Object o)
                  throws java.io.IOException
        Writes an object.
        Throws:
        java.io.IOException
      • getPrototype

        java.lang.Object getPrototype()
        Returns a prototype for the object currently being written. This can be used, to reduce the amount of data written to DOMOutput. For example, by not writing object attributes, which have the same values as the prototype.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.