|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dom4j.DocumentFactory
DocumentFactory
is a collection of factory methods to allow
easy custom building of DOM4J trees. The default tree that is built uses a
doubly linked tree.
The tree built allows full XPath expressions from anywhere on the tree.
Field Summary | |
protected QNameCache |
cache
|
Constructor Summary | |
DocumentFactory()
|
Method Summary | |
Attribute |
createAttribute(Element owner,
QName qname,
String value)
|
Attribute |
createAttribute(Element owner,
String name,
String value)
|
CDATA |
createCDATA(String text)
|
Comment |
createComment(String text)
|
DocumentType |
createDocType(String name,
String publicId,
String systemId)
|
Document |
createDocument()
|
Document |
createDocument(Element rootElement)
|
Document |
createDocument(String encoding)
DOCUMENT ME! |
Element |
createElement(QName qname)
|
Element |
createElement(String name)
|
Element |
createElement(String qualifiedName,
String namespaceURI)
|
Entity |
createEntity(String name,
String text)
|
Namespace |
createNamespace(String prefix,
String uri)
|
Pattern |
createPattern(String xpathPattern)
createPattern parses the given XPath expression to create
an XSLT style Pattern instance which can then be used in an XSLT
processing model.
|
ProcessingInstruction |
createProcessingInstruction(String target,
Map data)
|
ProcessingInstruction |
createProcessingInstruction(String target,
String data)
|
QName |
createQName(String localName)
|
QName |
createQName(String localName,
Namespace namespace)
|
QName |
createQName(String qualifiedName,
String uri)
|
QName |
createQName(String name,
String prefix,
String uri)
|
protected QNameCache |
createQNameCache()
Factory method to create the QNameCache. |
protected static DocumentFactory |
createSingleton(String className)
createSingleton creates the singleton instance from the
given class name.
|
Text |
createText(String text)
|
XPath |
createXPath(String xpathExpression)
createXPath parses an XPath expression and creates a new
XPath XPath instance.
|
XPath |
createXPath(String xpathExpression,
org.jaxen.VariableContext variableContext)
createXPath parses an XPath expression and creates a new
XPath XPath instance.
|
NodeFilter |
createXPathFilter(String xpathFilterExpression)
createXPathFilter parses a NodeFilter from the given XPath
filter expression. |
NodeFilter |
createXPathFilter(String xpathFilterExpression,
org.jaxen.VariableContext variableContext)
createXPathFilter parses a NodeFilter from the given XPath
filter expression. |
static DocumentFactory |
getInstance()
Access to singleton implementation of DocumentFactory which is used if no DocumentFactory is specified when building using the standard builders. |
List |
getQNames()
Returns a list of all the QName instances currently used by this document factory |
Map |
getXPathNamespaceURIs()
DOCUMENT ME! |
protected void |
init()
|
protected QName |
intern(QName qname)
DOCUMENT ME! |
void |
setXPathNamespaceURIs(Map namespaceURIs)
Sets the namespace URIs to be used by XPath expressions created by this factory or by nodes associated with this factory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected transient QNameCache cache
Constructor Detail |
public DocumentFactory()
Method Detail |
public static DocumentFactory getInstance()
Access to singleton implementation of DocumentFactory which is used if no DocumentFactory is specified when building using the standard builders.
public Document createDocument()
public Document createDocument(String encoding)
encoding
- DOCUMENT ME!
public Document createDocument(Element rootElement)
public DocumentType createDocType(String name, String publicId, String systemId)
public Element createElement(QName qname)
public Element createElement(String name)
public Element createElement(String qualifiedName, String namespaceURI)
public Attribute createAttribute(Element owner, QName qname, String value)
public Attribute createAttribute(Element owner, String name, String value)
public CDATA createCDATA(String text)
public Comment createComment(String text)
public Text createText(String text)
public Entity createEntity(String name, String text)
public Namespace createNamespace(String prefix, String uri)
public ProcessingInstruction createProcessingInstruction(String target, String data)
public ProcessingInstruction createProcessingInstruction(String target, Map data)
public QName createQName(String localName, Namespace namespace)
public QName createQName(String localName)
public QName createQName(String name, String prefix, String uri)
public QName createQName(String qualifiedName, String uri)
public XPath createXPath(String xpathExpression) throws InvalidXPathException
createXPath
parses an XPath expression and creates a new
XPath XPath
instance.
xpathExpression
- is the XPath expression to create
XPath
instance
InvalidXPathException
- if the XPath expression is invalidpublic XPath createXPath(String xpathExpression, org.jaxen.VariableContext variableContext)
createXPath
parses an XPath expression and creates a new
XPath XPath
instance.
xpathExpression
- is the XPath expression to createvariableContext
- is the variable context to use when evaluating the XPath
XPath
instancepublic NodeFilter createXPathFilter(String xpathFilterExpression, org.jaxen.VariableContext variableContext)
createXPathFilter
parses a NodeFilter from the given XPath
filter expression. XPath filter expressions occur within XPath
expressions such as self::node()[ filterExpression ]
xpathFilterExpression
- is the XPath filter expression to createvariableContext
- is the variable context to use when evaluating the XPath
NodeFilter
instancepublic NodeFilter createXPathFilter(String xpathFilterExpression)
createXPathFilter
parses a NodeFilter from the given XPath
filter expression. XPath filter expressions occur within XPath
expressions such as self::node()[ filterExpression ]
xpathFilterExpression
- is the XPath filter expression to create
NodeFilter
instancepublic Pattern createPattern(String xpathPattern)
createPattern
parses the given XPath expression to create
an XSLT style Pattern
instance which can then be used in an XSLT
processing model.
xpathPattern
- is the XPath pattern expression to create
Pattern
instancepublic List getQNames()
public Map getXPathNamespaceURIs()
public void setXPathNamespaceURIs(Map namespaceURIs)
namespaceURIs
- DOCUMENT ME!protected static DocumentFactory createSingleton(String className)
createSingleton
creates the singleton instance from the
given class name.
className
- is the name of the DocumentFactory class to use
protected QName intern(QName qname)
qname
- DOCUMENT ME!
protected QNameCache createQNameCache()
protected void init()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |