JDOM
0.0.5-BETA

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:

  1. 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 a process(Format,*) method can set up any infrastructure needed to process the content, and that the DOMOutputter will not re-call that method, or some other process(Format,*) method for the same output sequence.
  2. 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:
DOMOutputter, AbstractDOMOutputProcessor

Method Summary
 org.w3c.dom.Attr process(org.w3c.dom.Document basedoc, Format format, Attribute attribute)
          This will convert the Attribute using the given DOM Document to create the resulting DOM Attr.
 org.w3c.dom.CDATASection process(org.w3c.dom.Document basedoc, Format format, CDATA cdata)
          This will convert the CDATA using the given DOM Document to create the resulting DOM CDATASection.
 org.w3c.dom.Comment process(org.w3c.dom.Document basedoc, Format format, Comment comment)
          This will convert the Comment using the given DOM Document to create the resulting DOM Comment.
 org.w3c.dom.Document process(org.w3c.dom.Document basedoc, Format format, Document doc)
          This will convert the Document to the given DOM Document.
 org.w3c.dom.Element process(org.w3c.dom.Document basedoc, Format format, Element element)
          This will convert the Element using the given DOM Document to create the resulting DOM Element.
 org.w3c.dom.EntityReference process(org.w3c.dom.Document basedoc, Format format, EntityRef entity)
          This will convert the EntityRef using the given DOM Document to create the resulting DOM EntityReference.
 java.util.List<org.w3c.dom.Node> process(org.w3c.dom.Document basedoc, Format format, java.util.List<? extends Content> list)
          This will convert the list of JDOM Content using the given DOM Document to create the resulting list of DOM Nodes.
 org.w3c.dom.ProcessingInstruction process(org.w3c.dom.Document basedoc, Format format, ProcessingInstruction pi)
          This will convert the ProcessingInstruction using the given DOM Document to create the resulting DOM ProcessingInstruction.
 org.w3c.dom.Text process(org.w3c.dom.Document basedoc, Format format, Text text)
          This will convert the Text using the given DOM Document to create the resulting DOM Text.
 

Method Detail

process

org.w3c.dom.Document process(org.w3c.dom.Document basedoc,
                             Format format,
                             Document doc)
This will convert the Document to the given DOM Document.

Parameters:
basedoc - The DOM document to use for the conversion
format - Format instance specifying output style
doc - Document to format.
Returns:
The same DOM Document as the input document, but with the JDOM content converted and added.

process

org.w3c.dom.Element process(org.w3c.dom.Document basedoc,
                            Format format,
                            Element element)
This will convert the Element using the given DOM Document to create the resulting DOM Element.

Parameters:
basedoc - The DOM document to use for the conversion
format - Format instance specifying output style
element - Element to format.
Returns:
The input JDOM Element converted to a DOM Element

process

java.util.List<org.w3c.dom.Node> process(org.w3c.dom.Document basedoc,
                                         Format format,
                                         java.util.List<? extends Content> list)
This will convert the list of JDOM Content using the given DOM Document to create the resulting list of DOM Nodes.

Parameters:
basedoc - The DOM document to use for the conversion
format - Format instance specifying output style
list - JDOM Content to convert.
Returns:
The input JDOM Content List converted to a List of DOM Nodes

process

org.w3c.dom.CDATASection process(org.w3c.dom.Document basedoc,
                                 Format format,
                                 CDATA cdata)
This will convert the CDATA using the given DOM Document to create the resulting DOM CDATASection.

Parameters:
basedoc - The DOM document to use for the conversion
format - Format instance specifying output style
cdata - CDATA to format.
Returns:
The input JDOM CDATA converted to a DOM CDATASection

process

org.w3c.dom.Text process(org.w3c.dom.Document basedoc,
                         Format format,
                         Text text)
This will convert the Text using the given DOM Document to create the resulting DOM Text.

Parameters:
basedoc - The DOM document to use for the conversion
format - Format instance specifying output style
text - Text to format.
Returns:
The input JDOM Text converted to a DOM Text

process

org.w3c.dom.Comment process(org.w3c.dom.Document basedoc,
                            Format format,
                            Comment comment)
This will convert the Comment using the given DOM Document to create the resulting DOM Comment.

Parameters:
basedoc - The DOM document to use for the conversion
format - Format instance specifying output style
comment - Comment to format.
Returns:
The input JDOM Comment converted to a DOM Comment

process

org.w3c.dom.ProcessingInstruction process(org.w3c.dom.Document basedoc,
                                          Format format,
                                          ProcessingInstruction pi)
This will convert the ProcessingInstruction using the given DOM Document to create the resulting DOM ProcessingInstruction.

Parameters:
basedoc - The DOM document to use for the conversion
format - Format instance specifying output style
pi - ProcessingInstruction to format.
Returns:
The input JDOM ProcessingInstruction converted to a DOM ProcessingInstruction

process

org.w3c.dom.EntityReference process(org.w3c.dom.Document basedoc,
                                    Format format,
                                    EntityRef entity)
This will convert the EntityRef using the given DOM Document to create the resulting DOM EntityReference.

Parameters:
basedoc - The DOM document to use for the conversion
format - Format instance specifying output style
entity - EntityRef to format.
Returns:
The input JDOM EntityRef converted to a DOM EntityReference

process

org.w3c.dom.Attr process(org.w3c.dom.Document basedoc,
                         Format format,
                         Attribute attribute)
This will convert the Attribute using the given DOM Document to create the resulting DOM Attr.

Parameters:
basedoc - The DOM document to use for the conversion
format - Format instance specifying output style
attribute - Attribute to format.
Returns:
The input JDOM Attribute converted to a DOM Attr

JDOM
0.0.5-BETA

Copyright � 2012 Jason Hunter, Brett McLaughlin. All Rights Reserved.