Skip to content

Commit 9c19812

Browse files
HannesWellakurtakov
authored andcommitted
[WIP] [E4 Xpath] Replace apache.commons.jxpath by javax.xml.xpath
1 parent 7308b62 commit 9c19812

File tree

4 files changed

+684
-7
lines changed

4 files changed

+684
-7
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package org.eclipse.e4.emf.xpath;
2+
3+
import org.eclipse.e4.emf.xpath.internal.java.JavaXPathFactoryImpl;
4+
import org.eclipse.emf.ecore.EObject;
5+
6+
/**
7+
* @since 0.5
8+
*/
9+
public abstract class JavaXPathFactory<T> {
10+
/**
11+
* Creates a new XPathContext with the specified object as the root node.
12+
*
13+
* @param contextBean Object
14+
* @return XPathContext
15+
*/
16+
public abstract XPathContext newContext(T contextBean);
17+
18+
/**
19+
* Creates a new XPathContext with the specified bean as the root node and the
20+
* specified parent context. Variables defined in a parent context can be
21+
* referenced in XPaths passed to the child context.
22+
*
23+
* @param parentContext parent context
24+
* @param contextBean Object
25+
* @return XPathContext
26+
*/
27+
public abstract XPathContext newContext(XPathContext parentContext, T contextBean);
28+
29+
/**
30+
* @param <Type> the object type the xpath is created for
31+
* @return Create a new XPath-Factory
32+
*/
33+
public static XPathContextFactory<EObject> newInstance() {
34+
return new JavaXPathFactoryImpl<>();
35+
}
36+
37+
38+
39+
}

0 commit comments

Comments
 (0)