KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > dom4j > XPathFactory


1 /*
2  * XPathFactory.java
3  *
4  * Created on 22 mei 2003, 22:40
5  */

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

18 public interface XPathFactory {
19
20     /** Sets the namespace URIs to be used by XPath expressions created by this factory
21      * or by nodes associated with this factory. The keys are namespace prefixes and the
22      * values are namespace URIs.
23      */

24     void setXPathNamespaceURIs(Map JavaDoc xpathNamespaceURIs);
25
26     /** <p><code>createXPath</code> parses an XPath expression
27       * and creates a new XPath <code>XPath</code> instance.</p>
28       *
29       * @param xpathExpression is the XPath expression to create
30       * @return a new <code>XPath</code> instance
31       * @throws InvalidXPathException if the XPath expression is invalid
32       */

33     XPath createXPath(String JavaDoc xpathExpression) throws InvalidXPathException;
34
35     /** <p><code>createXPath</code> parses an XPath expression
36       * and creates a new XPath <code>XPath</code> instance.</p>
37       *
38       * @param xpathExpression is the XPath expression to create
39       * @param variableContext is the variable context to use when evaluating the XPath
40       * @return a new <code>XPath</code> instance
41       * @throws InvalidXPathException if the XPath expression is invalid
42       */

43     XPath createXPath(String JavaDoc xpathExpression, VariableContext variableContext);
44
45     /** <p><code>createXPathFilter</code> parses a NodeFilter
46       * from the given XPath filter expression.
47       * XPath filter expressions occur within XPath expressions such as
48       * <code>self::node()[ filterExpression ]</code></p>
49       *
50       * @param xpathFilterExpression is the XPath filter expression
51       * to create
52       * @param variableContext is the variable context to use when evaluating the XPath
53       * @return a new <code>NodeFilter</code> instance
54       */

55     NodeFilter createXPathFilter(String JavaDoc xpathFilterExpression, VariableContext variableContext);
56
57     /** <p><code>createXPathFilter</code> parses a NodeFilter
58       * from the given XPath filter expression.
59       * XPath filter expressions occur within XPath expressions such as
60       * <code>self::node()[ filterExpression ]</code></p>
61       *
62       * @param xpathFilterExpression is the XPath filter expression
63       * to create
64       * @return a new <code>NodeFilter</code> instance
65       */

66     NodeFilter createXPathFilter(String JavaDoc xpathFilterExpression);
67
68     /** <p><code>createPattern</code> parses the given
69       * XPath expression to create an XSLT style {@link Pattern} instance
70       * which can then be used in an XSLT processing model.</p>
71       *
72       * @param xpathPattern is the XPath pattern expression
73       * to create
74       * @return a new <code>Pattern</code> instance
75       */

76     Pattern createPattern(String JavaDoc xpathPattern);
77
78 }
79
Popular Tags