Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.jdom.input.DefaultJDOMFactory
DefaultJDOMFactory
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 newAttribute
with the specified (local) name and value, and does not place the attribute in a. Note: This actually explicitly puts the
Namespace
Attribute
in the "empty"Namespace
().
Namespace.NO_NAMESPACE
- Specified by:
- attribute in interface JDOMFactory
- Parameters:
name
-String
name ofAttribute
.value
-String
value for new attribute.
public Attribute attribute(String name, String value, int type)
This will create a newAttribute
with the specified (local) name, value and type, and does not place the attribute in a. Note: This actually explicitly puts the
Namespace
Attribute
in the "empty"Namespace
().
Namespace.NO_NAMESPACE
- Specified by:
- attribute in interface JDOMFactory
- Parameters:
name
-String
name ofAttribute
.value
-String
value for new attribute.type
-int
type for new attribute.
public Attribute attribute(String name, String value, int type, Namespace namespace)
This will create a newAttribute
with the specified (local) name, value, and type, and in the provided.
Namespace
- Specified by:
- attribute in interface JDOMFactory
- Parameters:
name
-String
name ofAttribute
.value
-String
value for new attribute.type
-int
type for new attribute.namespace
-Namespace
namespace for new attribute.
public Attribute attribute(String name, String value, Namespace namespace)
This will create a newAttribute
with the specified (local) name and value, and in the provided.
Namespace
- Specified by:
- attribute in interface JDOMFactory
- Parameters:
name
-String
name ofAttribute
.value
-String
value 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
-String
content of comment.
public DocType docType(String elementName)
This will create theDocType
with the specified element name
- Specified by:
- docType in interface JDOMFactory
- Parameters:
elementName
-String
name of element being constrained.
public DocType docType(String elementName, String systemID)
This will create theDocType
with the specified element name and reference to an external DTD.
- Specified by:
- docType in interface JDOMFactory
- Parameters:
elementName
-String
name of element being constrained.systemID
-String
system ID of referenced DTD
public DocType docType(String elementName, String publicID, String systemID)
This will create theDocType
with the specified element name and a reference to an external DTD.
- Specified by:
- docType in interface JDOMFactory
- Parameters:
elementName
-String
name of element being constrained.publicID
-String
public ID of referenced DTDsystemID
-String
system ID of referenced DTD
public Document document(Element rootElement)
This will create a newDocument
, with the suppliedas the root element, and no
Element
declaration.
DocType
- Specified by:
- document in interface JDOMFactory
- Parameters:
rootElement
-Element
for document root
public Document document(Element rootElement, DocType docType)
This will create a newDocument
, with the suppliedas the root element and the supplied
Element
declaration.
DocType
- Specified by:
- document in interface JDOMFactory
- Parameters:
rootElement
-Element
for document root.docType
-DocType
declaration.
public Element element(String name)
This will create anElement
in no.
Namespace
- Specified by:
- element in interface JDOMFactory
- Parameters:
name
-String
name of element.
public Element element(String name, String uri)
This will create a newElement
with the supplied (local) name, and specifies the URI of thethe
Namespace
Element
should be in, resulting it being unprefixed (in the default namespace).
- Specified by:
- element in interface JDOMFactory
- Parameters:
name
-String
name of element.uri
-String
URI forNamespace
element should be in.
public Element element(String name, String prefix, String uri)
This will create a newElement
with the supplied (local) name, and specifies the prefix and URI of thethe
Namespace
Element
should be in.
- Specified by:
- element in interface JDOMFactory
- Parameters:
name
-String
name of element.uri
-String
URI forNamespace
element should be in.
public Element element(String name, Namespace namespace)
This will create a newElement
with the supplied (local) name, and define theto be used.
Namespace
- Specified by:
- element in interface JDOMFactory
- Parameters:
name
-String
name of element.
public EntityRef entityRef(String name)
This will create a newEntityRef
with the supplied name.
- Specified by:
- entityRef in interface JDOMFactory
- Parameters:
name
-String
name of element.
public EntityRef entityRef(String name, String publicID, String systemID)
This will create a newEntityRef
with the supplied name, public ID, and system ID.
- Specified by:
- entityRef in interface JDOMFactory
- Parameters:
name
-String
name of element.
public ProcessingInstruction processingInstruction(String target, Map data)
This will create a newProcessingInstruction
with the specified target and data.
- Specified by:
- processingInstruction in interface JDOMFactory
- Parameters:
target
-String
target of PI.data
-Map
data for PI, in name/value pairs
public ProcessingInstruction processingInstruction(String target, String data)
This will create a newProcessingInstruction
with the specified target and data.
- Specified by:
- processingInstruction in interface JDOMFactory
- Parameters:
target
-String
target of PI.
public Text text(String text)
This creates the Text with the supplied text.
- Specified by:
- text in interface JDOMFactory
- Parameters: