Package org.jdom.output.support
Interface DOMOutputProcessor
-
- All Known Implementing Classes:
AbstractDOMOutputProcessor
public interface DOMOutputProcessorThis interface provides a base support for theDOMOutputter.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
AbstractDOMOutputProcessorclass 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
- See Also:
DOMOutputter,AbstractDOMOutputProcessor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<Node>process(Document basedoc, Format format, List<? extends Content> list)This will convert the list of JDOMusing the given DOM Document to create the resulting list of DOM Nodes.ContentAttrprocess(Document basedoc, Format format, Attribute attribute)This will convert theusing the given DOM Document to create the resulting DOM Attr.AttributeCDATASectionprocess(Document basedoc, Format format, CDATA cdata)This will convert theusing the given DOM Document to create the resulting DOM CDATASection.CDATACommentprocess(Document basedoc, Format format, Comment comment)This will convert theusing the given DOM Document to create the resulting DOM Comment.CommentDocumentprocess(Document basedoc, Format format, Document doc)This will convert theto the given DOM Document.DocumentElementprocess(Document basedoc, Format format, Element element)This will convert theusing the given DOM Document to create the resulting DOM Element.ElementEntityReferenceprocess(Document basedoc, Format format, EntityRef entity)This will convert theusing the given DOM Document to create the resulting DOM EntityReference.EntityRefProcessingInstructionprocess(Document basedoc, Format format, ProcessingInstruction pi)This will convert theusing the given DOM Document to create the resulting DOM ProcessingInstruction.ProcessingInstructionTextprocess(Document basedoc, Format format, Text text)This will convert theusing the given DOM Document to create the resulting DOM Text.Text
-
-
-
Method Detail
-
process
Document process(Document basedoc, Format format, Document doc)
This will convert theto the given DOM Document.Document- Parameters:
basedoc- The DOM document to use for the conversionformat-Formatinstance specifying output styledoc-Documentto format.- Returns:
- The same DOM Document as the input document, but with the JDOM content converted and added.
-
process
Element process(Document basedoc, Format format, Element element)
This will convert theusing the given DOM Document to create the resulting DOM Element.Element- Parameters:
basedoc- The DOM document to use for the conversionformat-Formatinstance specifying output styleelement-Elementto format.- Returns:
- The input JDOM Element converted to a DOM Element
-
process
List<Node> process(Document basedoc, Format format, List<? extends Content> list)
This will convert the list of JDOMusing the given DOM Document to create the resulting list of DOM Nodes.Content- Parameters:
basedoc- The DOM document to use for the conversionformat-Formatinstance specifying output stylelist- JDOMContentto convert.- Returns:
- The input JDOM Content List converted to a List of DOM Nodes
-
process
CDATASection process(Document basedoc, Format format, CDATA cdata)
This will convert theusing the given DOM Document to create the resulting DOM CDATASection.CDATA- Parameters:
basedoc- The DOM document to use for the conversionformat-Formatinstance specifying output stylecdata-CDATAto format.- Returns:
- The input JDOM CDATA converted to a DOM CDATASection
-
process
Text process(Document basedoc, Format format, Text text)
This will convert theusing the given DOM Document to create the resulting DOM Text.Text- Parameters:
basedoc- The DOM document to use for the conversionformat-Formatinstance specifying output styletext-Textto format.- Returns:
- The input JDOM Text converted to a DOM Text
-
process
Comment process(Document basedoc, Format format, Comment comment)
This will convert theusing the given DOM Document to create the resulting DOM Comment.Comment- Parameters:
basedoc- The DOM document to use for the conversionformat-Formatinstance specifying output stylecomment-Commentto format.- Returns:
- The input JDOM Comment converted to a DOM Comment
-
process
ProcessingInstruction process(Document basedoc, Format format, ProcessingInstruction pi)
This will convert theusing the given DOM Document to create the resulting DOM ProcessingInstruction.ProcessingInstruction- Parameters:
basedoc- The DOM document to use for the conversionformat-Formatinstance specifying output stylepi-ProcessingInstructionto format.- Returns:
- The input JDOM ProcessingInstruction converted to a DOM ProcessingInstruction
-
process
EntityReference process(Document basedoc, Format format, EntityRef entity)
This will convert theusing the given DOM Document to create the resulting DOM EntityReference.EntityRef- Parameters:
basedoc- The DOM document to use for the conversionformat-Formatinstance specifying output styleentity-EntityRefto format.- Returns:
- The input JDOM EntityRef converted to a DOM EntityReference
-
process
Attr process(Document basedoc, Format format, Attribute attribute)
This will convert theusing the given DOM Document to create the resulting DOM Attr.Attribute- Parameters:
basedoc- The DOM document to use for the conversionformat-Formatinstance specifying output styleattribute-Attributeto format.- Returns:
- The input JDOM Attribute converted to a DOM Attr
-
-