Class Dumper

All Implemented Interfaces:
PCDataVisitor

@Undocumented public class Dumper extends Visitor
Serializes the model instance into a sequence of SAX events.
A ContentHandler MUST be given for all "substantial" events (= Document and Element Open and Close Tags, incl. Attributes; PCData; ProcessingInstructions).
A LexicalHandler MAY be given, for all TypedComment.
See the resp. SAX documentation.
The serialization process can be started by calling any visit(..) method as defined in Visitor (i.e.: for any Element or sub-content like Choice and Sequence). This will write out the whole sub-tree starting there.
(NOTE: in this case the document locator must be set manually, see the generated code for visit(Document_XXX) for details.)
  • Field Details

    • contentHandler

      protected final ContentHandler contentHandler
    • lexicalHandler

      protected final LexicalHandler lexicalHandler
    • EMPTY_ATTRIBUTES

      protected final Attributes EMPTY_ATTRIBUTES
  • Constructor Details

    • Dumper

      @Undocumented public Dumper(ContentHandler contentHandler, LexicalHandler lexicalHandler)
      Set both handlers for substantial and ethereal events, see class description above.
      Parameters:
      contentHandler - (never null) for Substantials and PIs.
      lexicalHandler - (maybe null) for Comments.
    • Dumper

      @Undocumented public Dumper(ContentHandler contentHandler)
      Uses the contentHandler also as a LexicalHandler (for TypedComment), iff it happens to implement this interface. @param contentHandler (never null) Object serving as contentHandler for substantial events, and possibly also as a LexicalHandler.
  • Method Details

    • handleSAXException

      protected void handleSAXException(SAXException exception)
    • visit

      public void visit(TypedPCData pcdata)
      Description copied from class: BaseVisitor
      To be overridden. This default implementation does nothing.
      Specified by:
      visit in interface PCDataVisitor
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_constant element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) .
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_bool element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) .
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_string element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) .
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_enumitem element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) and for all components in its contents according to the content model.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_optarg element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) .
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_type element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all components in its contents according to the content model.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_float element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) .
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_writable element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn .
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_dirOnly element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn .
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_not element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all components in its contents according to the content model.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_and element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all components in its contents according to the content model.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_text element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) and for all PCData in its contents.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_enumeration element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) and for all components in its contents according to the content model.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_rep element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) and for all components in its contents according to the content model.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_testequal element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all components in its contents according to the content model.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_simpletypes element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all components in its contents according to the content model.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_testgreater element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all components in its contents according to the content model.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_or element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all components in its contents according to the content model.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_rat element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) .
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_isMeta element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn .
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_enumSetContains element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) .
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_uri element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) and for all components in its contents according to the content model.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_int element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) .
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_enum element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) .
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_enumset element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) .
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_condition element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all components in its contents according to the content model.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_defaults element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all components in its contents according to the content model.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_v element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all PCData in its contents.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_printout_title element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all components in its contents according to the content model.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_optionlist element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) and for all components in its contents according to the content model.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_comment element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) and for all components in its contents according to the content model.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_noGui element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn .
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_notDir element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn .
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_desc element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all components in its contents according to the content model.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Element_option element)
      Description copied from class: Visitor
      Can be overridden by the user to define particular semantic operations. Will be called whenever the default model instance traversal (as implemented by the methods in this class) reaches such an element.
      This default implementation descends into the element by calling visit(..) in turn for all selected attributes (see BaseVisitor.validating) and for all components in its contents according to the content model.
      Overrides:
      visit in class Visitor
    • visit

      public void visit(Document_optionlist document)
      Description copied from class: Visitor
      Can be called to visit the complete model instance. (Is not intended to be overridden by the user.)
      Overrides:
      visit in class Visitor