Skip to content

Commit 4473670

Browse files
committed
[WIP] [E4 Xpath] Replace apache.commons.jxpath by javax.xml.xpath
1 parent 8d647ea commit 4473670

File tree

5 files changed

+684
-7
lines changed

5 files changed

+684
-7
lines changed

bundles/org.eclipse.e4.emf.xpath/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: %Bundle-Name
44
Bundle-SymbolicName: org.eclipse.e4.emf.xpath
5-
Bundle-Version: 0.4.300.qualifier
5+
Bundle-Version: 0.5.0.qualifier
66
Bundle-RequiredExecutionEnvironment: JavaSE-17
77
Require-Bundle: org.apache.commons.jxpath;bundle-version="1.2.0",
88
org.eclipse.emf.ecore;bundle-version="2.35.0",
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)