| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.jdom.input.DefaultJDOMFactoryDefaultJDOMFactory creates the standard
top-level JDOM classes (Element, Document, Comment, etc).
A subclass of this factory might construct custom classes.
Constructor Summary | |
Method Summary | |
Attribute | |
Attribute | |
Attribute | |
Attribute | |
CDATA |
|
Comment |
|
DocType |
|
DocType |
|
DocType |
|
Document | |
Document | |
Element | |
Element | |
Element | |
Element | |
EntityRef |
|
EntityRef |
|
ProcessingInstruction |
|
ProcessingInstruction |
|
Text |
|
public Attribute attribute(String name, String value)
This will create a newAttributewith the specified (local) name and value, and does not place the attribute in a. Note: This actually explicitly puts theNamespaceAttributein the "empty"Namespace().Namespace.NO_NAMESPACE
- Specified by:
- attribute in interface JDOMFactory
- Parameters:
name-Stringname ofAttribute.value-Stringvalue for new attribute.
public Attribute attribute(String name, String value, int type)
This will create a newAttributewith the specified (local) name, value and type, and does not place the attribute in a. Note: This actually explicitly puts theNamespaceAttributein the "empty"Namespace().Namespace.NO_NAMESPACE
- Specified by:
- attribute in interface JDOMFactory
- Parameters:
name-Stringname ofAttribute.value-Stringvalue for new attribute.type-inttype for new attribute.
public Attribute attribute(String name, String value, int type, Namespace namespace)
This will create a newAttributewith the specified (local) name, value, and type, and in the provided.Namespace
- Specified by:
- attribute in interface JDOMFactory
- Parameters:
name-Stringname ofAttribute.value-Stringvalue for new attribute.type-inttype for new attribute.namespace-Namespacenamespace for new attribute.
public Attribute attribute(String name, String value, Namespace namespace)
This will create a newAttributewith the specified (local) name and value, and in the provided.Namespace
- Specified by:
- attribute in interface JDOMFactory
- Parameters:
name-Stringname ofAttribute.value-Stringvalue for new attribute.
public CDATA cdata(String text)
This creates the CDATA with the supplied text.
- Specified by:
- cdata in interface JDOMFactory
- Parameters:
public Comment comment(String text)
This creates the comment with the supplied text.
- Specified by:
- comment in interface JDOMFactory
- Parameters:
text-Stringcontent of comment.
public DocType docType(String elementName)
This will create theDocTypewith the specified element name
- Specified by:
- docType in interface JDOMFactory
- Parameters:
elementName-Stringname of element being constrained.
public DocType docType(String elementName, String systemID)
This will create theDocTypewith the specified element name and reference to an external DTD.
- Specified by:
- docType in interface JDOMFactory
- Parameters:
elementName-Stringname of element being constrained.systemID-Stringsystem ID of referenced DTD
public DocType docType(String elementName, String publicID, String systemID)
This will create theDocTypewith the specified element name and a reference to an external DTD.
- Specified by:
- docType in interface JDOMFactory
- Parameters:
elementName-Stringname of element being constrained.publicID-Stringpublic ID of referenced DTDsystemID-Stringsystem ID of referenced DTD
public Document document(Element rootElement)
This will create a newDocument, with the suppliedas the root element, and noElementdeclaration.DocType
- Specified by:
- document in interface JDOMFactory
- Parameters:
rootElement-Elementfor document root
public Document document(Element rootElement, DocType docType)
This will create a newDocument, with the suppliedas the root element and the suppliedElementdeclaration.DocType
- Specified by:
- document in interface JDOMFactory
- Parameters:
rootElement-Elementfor document root.docType-DocTypedeclaration.
public Element element(String name)
This will create anElementin no.Namespace
- Specified by:
- element in interface JDOMFactory
- Parameters:
name-Stringname of element.
public Element element(String name, String uri)
This will create a newElementwith the supplied (local) name, and specifies the URI of thetheNamespaceElementshould be in, resulting it being unprefixed (in the default namespace).
- Specified by:
- element in interface JDOMFactory
- Parameters:
name-Stringname of element.uri-StringURI forNamespaceelement should be in.
public Element element(String name, String prefix, String uri)
This will create a newElementwith the supplied (local) name, and specifies the prefix and URI of thetheNamespaceElementshould be in.
- Specified by:
- element in interface JDOMFactory
- Parameters:
name-Stringname of element.uri-StringURI forNamespaceelement should be in.
public Element element(String name, Namespace namespace)
This will create a newElementwith the supplied (local) name, and define theto be used.Namespace
- Specified by:
- element in interface JDOMFactory
- Parameters:
name-Stringname of element.
public EntityRef entityRef(String name)
This will create a newEntityRefwith the supplied name.
- Specified by:
- entityRef in interface JDOMFactory
- Parameters:
name-Stringname of element.
public EntityRef entityRef(String name, String publicID, String systemID)
This will create a newEntityRefwith the supplied name, public ID, and system ID.
- Specified by:
- entityRef in interface JDOMFactory
- Parameters:
name-Stringname of element.
public ProcessingInstruction processingInstruction(String target, Map data)
This will create a newProcessingInstructionwith the specified target and data.
- Specified by:
- processingInstruction in interface JDOMFactory
- Parameters:
target-Stringtarget of PI.data-Mapdata for PI, in name/value pairs
public ProcessingInstruction processingInstruction(String target, String data)
This will create a newProcessingInstructionwith the specified target and data.
- Specified by:
- processingInstruction in interface JDOMFactory
- Parameters:
target-Stringtarget of PI.
public Text text(String text)
This creates the Text with the supplied text.
- Specified by:
- text in interface JDOMFactory
- Parameters: