Package org.jdom2.output.support
Interface DOMOutputProcessor
- All Known Implementing Classes:
AbstractDOMOutputProcessor
public interface DOMOutputProcessor
This interface provides a base support for the
DOMOutputter
.
People who want to create a custom DOMOutputProcessor for DOMOutputter are able to implement this interface with the following notes and restrictions:
- The DOMOutputter will call one, and only one of the
process(Format,*)
methods each time the DOMOutputter is requested to output some JDOM content. It is thus safe to assume that aprocess(Format,*)
method can set up any infrastructure needed to process the content, and that the DOMOutputter will not re-call that method, or some otherprocess(Format,*)
method for the same output sequence. - The process methods should be thread-safe and reentrant: The same
process(Format,*)
method may (will) be called concurrently from different threads.
The AbstractDOMOutputProcessor
class is a full implementation of this
interface and is fully customisable. People who want a custom DOMOutputter
are encouraged to extend the AbstractDOMOutputProcessor rather than do a full
re-implementation of this interface.
- Since:
- JDOM2
- Author:
- Rolf Lear
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionThis will convert the list of JDOM
using the given DOM Document to create the resulting list of DOM Nodes.Content
This will convert the
using the given DOM Document to create the resulting DOM Attr.Attribute
This will convert the
using the given DOM Document to create the resulting DOM CDATASection.CDATA
This will convert the
using the given DOM Document to create the resulting DOM Comment.Comment
This will convert the
to the given DOM Document.Document
This will convert the
using the given DOM Document to create the resulting DOM Element.Element
This will convert the
using the given DOM Document to create the resulting DOM EntityReference.EntityRef
process
(Document basedoc, Format format, ProcessingInstruction pi) This will convert the
using the given DOM Document to create the resulting DOM ProcessingInstruction.ProcessingInstruction
This will convert the
using the given DOM Document to create the resulting DOM Text.Text
-
Method Details
-
process
This will convert the
to the given DOM Document.Document
- Parameters:
basedoc
- The DOM document to use for the conversionformat
-Format
instance specifying output styledoc
-Document
to format.- Returns:
- The same DOM Document as the input document, but with the JDOM content converted and added.
-
process
This will convert the
using the given DOM Document to create the resulting DOM Element.Element
- Parameters:
basedoc
- The DOM document to use for the conversionformat
-Format
instance specifying output styleelement
-Element
to format.- Returns:
- The input JDOM Element converted to a DOM Element
-
process
This will convert the list of JDOM
using the given DOM Document to create the resulting list of DOM Nodes.Content
- Parameters:
basedoc
- The DOM document to use for the conversionformat
-Format
instance specifying output stylelist
- JDOMContent
to convert.- Returns:
- The input JDOM Content List converted to a List of DOM Nodes
-
process
This will convert the
using the given DOM Document to create the resulting DOM CDATASection.CDATA
- Parameters:
basedoc
- The DOM document to use for the conversionformat
-Format
instance specifying output stylecdata
-CDATA
to format.- Returns:
- The input JDOM CDATA converted to a DOM CDATASection
-
process
This will convert the
using the given DOM Document to create the resulting DOM Text.Text
- Parameters:
basedoc
- The DOM document to use for the conversionformat
-Format
instance specifying output styletext
-Text
to format.- Returns:
- The input JDOM Text converted to a DOM Text
-
process
This will convert the
using the given DOM Document to create the resulting DOM Comment.Comment
- Parameters:
basedoc
- The DOM document to use for the conversionformat
-Format
instance specifying output stylecomment
-Comment
to format.- Returns:
- The input JDOM Comment converted to a DOM Comment
-
process
This will convert the
using the given DOM Document to create the resulting DOM ProcessingInstruction.ProcessingInstruction
- Parameters:
basedoc
- The DOM document to use for the conversionformat
-Format
instance specifying output stylepi
-ProcessingInstruction
to format.- Returns:
- The input JDOM ProcessingInstruction converted to a DOM ProcessingInstruction
-
process
This will convert the
using the given DOM Document to create the resulting DOM EntityReference.EntityRef
- Parameters:
basedoc
- The DOM document to use for the conversionformat
-Format
instance specifying output styleentity
-EntityRef
to format.- Returns:
- The input JDOM EntityRef converted to a DOM EntityReference
-
process
This will convert the
using the given DOM Document to create the resulting DOM Attr.Attribute
- Parameters:
basedoc
- The DOM document to use for the conversionformat
-Format
instance specifying output styleattribute
-Attribute
to format.- Returns:
- The input JDOM Attribute converted to a DOM Attr
-