org.jdom

Class DefaultJDOMFactory

Implemented Interfaces:
JDOMFactory

public class DefaultJDOMFactory
extends Object
implements JDOMFactory

Creates the standard top-level JDOM classes (Element, Document, Comment, etc). A subclass of this factory might construct custom classes.

Constructor Summary

DefaultJDOMFactory()

Method Summary

void
addContent(Parent parent, Content child)
void
addNamespaceDeclaration(Element parent, Namespace additional)
Attribute
attribute(String name, String value)
Attribute
attribute(String name, String value, int type)
Attribute
attribute(String name, String value, int type, Namespace namespace)
Attribute
attribute(String name, String value, Namespace namespace)
CDATA
cdata(String text)
Comment
comment(String text)
DocType
docType(String elementName)
DocType
docType(String elementName, String systemID)
DocType
docType(String elementName, String publicID, String systemID)
Document
document(Element rootElement)
Document
document(Element rootElement, DocType docType)
Document
document(Element rootElement, DocType docType, String baseURI)
Element
element(String name)
Element
element(String name, String uri)
Element
element(String name, String prefix, String uri)
Element
element(String name, Namespace namespace)
EntityRef
entityRef(String name)
EntityRef
entityRef(String name, String systemID)
EntityRef
entityRef(String name, String publicID, String systemID)
ProcessingInstruction
processingInstruction(String target, String data)
ProcessingInstruction
processingInstruction(String target, Map<K,V> data)
void
setAttribute(Element parent, Attribute a)
Text
text(String text)

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

DefaultJDOMFactory

public DefaultJDOMFactory()
Usages and Demos :

View More Examples of DefaultJDOMFactory()
   1:     public JDomWriter(final Element container, final XmlFriendlyReplacer replacer) {
   2:         this(container, new DefaultJDOMFactory(), replacer);
   3:     }
   4:         ...
   5:     public JDomWriter(final Element container) {
   6:         this(container, new DefaultJDOMFactory());
   7:     }
   8:         ...
   9:     public JDomWriter() {
  10:         this(new DefaultJDOMFactory());
  11:     }

View Full Code Here

Method Details

addContent

public void addContent(Parent parent,
                       Content child)
Specified by:
addContent in interface JDOMFactory

addNamespaceDeclaration

public void addNamespaceDeclaration(Element parent,
                                    Namespace additional)
Specified by:
addNamespaceDeclaration in interface JDOMFactory

attribute

public Attribute attribute(String name,
                           String value)
Specified by:
attribute in interface JDOMFactory

attribute

public Attribute attribute(String name,
                           String value,
                           int type)
Specified by:
attribute in interface JDOMFactory

attribute

public Attribute attribute(String name,
                           String value,
                           int type,
                           Namespace namespace)
Specified by:
attribute in interface JDOMFactory

attribute

public Attribute attribute(String name,
                           String value,
                           Namespace namespace)
Specified by:
attribute in interface JDOMFactory

cdata

public CDATA cdata(String text)
Specified by:
cdata in interface JDOMFactory

comment

public Comment comment(String text)
Specified by:
comment in interface JDOMFactory

docType

public DocType docType(String elementName)
Specified by:
docType in interface JDOMFactory

docType

public DocType docType(String elementName,
                       String systemID)
Specified by:
docType in interface JDOMFactory

docType

public DocType docType(String elementName,
                       String publicID,
                       String systemID)
Specified by:
docType in interface JDOMFactory

document

public Document document(Element rootElement)
Specified by:
document in interface JDOMFactory

document

public Document document(Element rootElement,
                         DocType docType)
Specified by:
document in interface JDOMFactory

document

public Document document(Element rootElement,
                         DocType docType,
                         String baseURI)
Specified by:
document in interface JDOMFactory

element

public Element element(String name)
Specified by:
element in interface JDOMFactory

element

public Element element(String name,
                       String uri)
Specified by:
element in interface JDOMFactory

element

public Element element(String name,
                       String prefix,
                       String uri)
Specified by:
element in interface JDOMFactory

element

public Element element(String name,
                       Namespace namespace)
Specified by:
element in interface JDOMFactory

entityRef

public EntityRef entityRef(String name)
Specified by:
entityRef in interface JDOMFactory

entityRef

public EntityRef entityRef(String name,
                           String systemID)
Specified by:
entityRef in interface JDOMFactory

entityRef

public EntityRef entityRef(String name,
                           String publicID,
                           String systemID)
Specified by:
entityRef in interface JDOMFactory

processingInstruction

public ProcessingInstruction processingInstruction(String target,
                                                   String data)
Specified by:
processingInstruction in interface JDOMFactory

processingInstruction

public ProcessingInstruction processingInstruction(String target,
                                                   Map<K,V> data)
Specified by:
processingInstruction in interface JDOMFactory

setAttribute

public void setAttribute(Element parent,
                         Attribute a)
Specified by:
setAttribute in interface JDOMFactory

text

public Text text(String text)
Specified by:
text in interface JDOMFactory