KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > dom4j > tree > DelegateDocumentFactory


1 /*
2  * DelegateDocumentFactory.java
3  *
4  * Created on 22 mei 2003, 23:27
5  */

6
7 package org.dom4j.tree;
8
9 import org.dom4j.*;
10 import org.dom4j.rule.Pattern;
11 import org.jaxen.VariableContext;
12
13 import java.util.Map JavaDoc;
14
15 /**
16  *
17  * @author Maarten
18  */

19 public class DelegateDocumentFactory extends DocumentFactory {
20
21     private NodeFactory nodeFactory;
22     private XPathFactory xpathFactory;
23
24     /** Creates a new instance of DelegateDocumentFactory */
25     public DelegateDocumentFactory(NodeFactory nodeFactory, XPathFactory xpathFactory) {
26         super();
27
28         this.nodeFactory = nodeFactory;
29         this.xpathFactory = xpathFactory;
30     }
31
32     public Attribute createAttribute(Element owner, String JavaDoc name, String JavaDoc value) {
33         return nodeFactory.createAttribute(owner, name, value);
34     }
35
36     public Attribute createAttribute(Element owner, QName qname, String JavaDoc value) {
37         return nodeFactory.createAttribute(owner, qname, value);
38     }
39
40     public CDATA createCDATA(String JavaDoc text) {
41         return nodeFactory.createCDATA(text);
42     }
43
44     public Comment createComment(String JavaDoc text) {
45         return nodeFactory.createComment(text);
46     }
47
48     public DocumentType createDocType(String JavaDoc name, String JavaDoc publicId, String JavaDoc systemId) {
49         return nodeFactory.createDocType(name, publicId, systemId);
50     }
51
52     public Document createDocument() {
53         return nodeFactory.createDocument();
54     }
55
56     public Document createDocument(Element rootElement) {
57         return nodeFactory.createDocument(rootElement);
58     }
59
60     public Element createElement(QName qname) {
61         return nodeFactory.createElement(qname);
62     }
63
64     public Element createElement(String JavaDoc name) {
65         return nodeFactory.createElement(name);
66     }
67
68     public Element createElement(String JavaDoc qualifiedName, String JavaDoc namespaceURI) {
69         return nodeFactory.createElement(qualifiedName, namespaceURI);
70     }
71
72     public Entity createEntity(String JavaDoc name, String JavaDoc text) {
73         return nodeFactory.createEntity(name, text);
74     }
75
76     public Namespace createNamespace(String JavaDoc prefix, String JavaDoc uri) {
77         return nodeFactory.createNamespace(prefix, uri);
78     }
79
80     public Pattern createPattern(String JavaDoc xpathPattern) {
81         return xpathFactory.createPattern(xpathPattern);
82     }
83
84     public ProcessingInstruction createProcessingInstruction(String JavaDoc target, Map JavaDoc data) {
85         return nodeFactory.createProcessingInstruction(target, data);
86     }
87
88     public ProcessingInstruction createProcessingInstruction(String JavaDoc target, String JavaDoc data) {
89         return nodeFactory.createProcessingInstruction(target, data);
90     }
91
92     public QName createQName(String JavaDoc localName) {
93         return nodeFactory.createQName(localName);
94     }
95
96     public QName createQName(String JavaDoc qualifiedName, String JavaDoc uri) {
97         return nodeFactory.createQName(qualifiedName, uri);
98     }
99
100     public QName createQName(String JavaDoc localName, Namespace namespace) {
101         return nodeFactory.createQName(localName, namespace);
102     }
103
104     public QName createQName(String JavaDoc name, String JavaDoc prefix, String JavaDoc uri) {
105         return nodeFactory.createQName(name, prefix, uri);
106     }
107
108     public Text createText(String JavaDoc text) {
109         return nodeFactory.createText(text);
110     }
111
112     public XPath createXPath(String JavaDoc xpathExpression) throws InvalidXPathException {
113         return xpathFactory.createXPath(xpathExpression);
114     }
115
116     public XPath createXPath(String JavaDoc xpathExpression, VariableContext variableContext) {
117         return xpathFactory.createXPath(xpathExpression, variableContext);
118     }
119
120     public NodeFilter createXPathFilter(String JavaDoc xpathFilterExpression) {
121         return xpathFactory.createXPathFilter(xpathFilterExpression);
122     }
123
124     public NodeFilter createXPathFilter(String JavaDoc xpathFilterExpression, VariableContext variableContext) {
125         return xpathFactory.createXPathFilter(xpathFilterExpression, variableContext);
126     }
127
128 }
129
Popular Tags