Package eu.bandm.tools.muli.tdom
Class Dumper
java.lang.Object
eu.bandm.tools.tdom.runtime.BaseVisitor
eu.bandm.tools.muli.tdom.Visitor
eu.bandm.tools.muli.tdom.Dumper
- All Implemented Interfaces:
PCDataVisitor
Serializes the model instance into a sequence of SAX events.
A
A
See the resp. SAX documentation.
The serialization process can be started by calling any
(NOTE: in this case the document locator must be set manually, see the generated code for
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 Summary
Modifier and TypeFieldDescriptionprotected final ContentHandler
protected final Attributes
protected final LexicalHandler
Fields inherited from class eu.bandm.tools.tdom.runtime.BaseVisitor
validating
-
Constructor Summary
ConstructorDescriptionDumper
(ContentHandler contentHandler) Uses the contentHandler also as a LexicalHandler (forTypedComment
), iff it happens to implement this interface.Dumper
(ContentHandler contentHandler, LexicalHandler lexicalHandler) Set both handlers for substantial and ethereal events, see class description above. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
handleSAXException
(SAXException exception) void
visit
(Document_translationfile document) Can be called to visit the complete model instance.void
visit
(Element_entry element) Can be overridden by the user to define particular semantic operations.void
visit
(Element_text element) Can be overridden by the user to define particular semantic operations.void
visit
(Element_translationfile element) Can be overridden by the user to define particular semantic operations.void
visit
(TypedPCData pcdata) To be overridden.Methods inherited from class eu.bandm.tools.muli.tdom.Visitor
visit, visit, visit, visit, visit, visit, visit
Methods inherited from class eu.bandm.tools.tdom.runtime.BaseVisitor
visit
-
Field Details
-
contentHandler
-
lexicalHandler
-
EMPTY_ATTRIBUTES
-
-
Constructor Details
-
Dumper
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
Uses the contentHandler also as a LexicalHandler (forTypedComment
), 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
-
visit
Description copied from class:BaseVisitor
To be overridden. This default implementation does nothing.- Specified by:
visit
in interfacePCDataVisitor
- Overrides:
visit
in classVisitor
-
visit
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 callingvisit(..)
in turn for all selected attributes (seeBaseVisitor.validating
) and for all components in its contents according to the content model. -
visit
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 callingvisit(..)
in turn for all components in its contents according to the content model. -
visit
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 callingvisit(..)
in turn for all selected attributes (seeBaseVisitor.validating
) and for all PCData in its contents. -
visit
Description copied from class:Visitor
Can be called to visit the complete model instance. (Is not intended to be overridden by the user.)
-