summaryrefslogtreecommitdiffstats
path: root/contrib/java
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-12-08 14:30:45 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-12-08 14:30:45 (GMT)
commite1eabf08cb956c26dedb875549774960b1052cd1 (patch)
treebefdddc160ec96de93a784de1390e13018053a0e /contrib/java
parent89947b31a1daf4fea62b1f5055df8ef8ff8838ec (diff)
downloaduscxml-e1eabf08cb956c26dedb875549774960b1052cd1.zip
uscxml-e1eabf08cb956c26dedb875549774960b1052cd1.tar.gz
uscxml-e1eabf08cb956c26dedb875549774960b1052cd1.tar.bz2
Reactivating the Java binding tests
Diffstat (limited to 'contrib/java')
-rw-r--r--contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/Context.java (renamed from contrib/java/bindings/org/uscxml/apache/commons/scxml2/Context.java)0
-rw-r--r--contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/Evaluator.java (renamed from contrib/java/bindings/org/uscxml/apache/commons/scxml2/Evaluator.java)0
-rw-r--r--contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/JexlEvaluator.java (renamed from contrib/java/bindings/org/uscxml/apache/commons/scxml2/JexlEvaluator.java)0
-rw-r--r--contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/SCXML.java (renamed from contrib/java/bindings/org/uscxml/apache/commons/scxml2/SCXML.java)0
-rw-r--r--contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/SCXMLExecutor.java (renamed from contrib/java/bindings/org/uscxml/apache/commons/scxml2/SCXMLExecutor.java)0
-rw-r--r--contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/SCXMLReader.java (renamed from contrib/java/bindings/org/uscxml/apache/commons/scxml2/SCXMLReader.java)0
-rw-r--r--contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/SimpleErrorReporter.java (renamed from contrib/java/bindings/org/uscxml/apache/commons/scxml2/SimpleErrorReporter.java)0
-rw-r--r--contrib/java/apache-commons/org/uscxml/examples/ApacheCommonsAPI.java (renamed from contrib/java/bindings/org/uscxml/examples/ApacheCommonsAPI.java)0
-rw-r--r--contrib/java/bindings/build.properties4
-rw-r--r--contrib/java/bindings/build.xml2
-rw-r--r--contrib/java/bindings/org/uscxml/tests/JexlDataModelTest.java14
-rw-r--r--contrib/java/common/org/uscxml/dm/jexl/JexlDataModel.java3
12 files changed, 12 insertions, 11 deletions
diff --git a/contrib/java/bindings/org/uscxml/apache/commons/scxml2/Context.java b/contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/Context.java
index a0208c9..a0208c9 100644
--- a/contrib/java/bindings/org/uscxml/apache/commons/scxml2/Context.java
+++ b/contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/Context.java
diff --git a/contrib/java/bindings/org/uscxml/apache/commons/scxml2/Evaluator.java b/contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/Evaluator.java
index 5bd5642..5bd5642 100644
--- a/contrib/java/bindings/org/uscxml/apache/commons/scxml2/Evaluator.java
+++ b/contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/Evaluator.java
diff --git a/contrib/java/bindings/org/uscxml/apache/commons/scxml2/JexlEvaluator.java b/contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/JexlEvaluator.java
index 127bed3..127bed3 100644
--- a/contrib/java/bindings/org/uscxml/apache/commons/scxml2/JexlEvaluator.java
+++ b/contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/JexlEvaluator.java
diff --git a/contrib/java/bindings/org/uscxml/apache/commons/scxml2/SCXML.java b/contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/SCXML.java
index 67e5b1f..67e5b1f 100644
--- a/contrib/java/bindings/org/uscxml/apache/commons/scxml2/SCXML.java
+++ b/contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/SCXML.java
diff --git a/contrib/java/bindings/org/uscxml/apache/commons/scxml2/SCXMLExecutor.java b/contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/SCXMLExecutor.java
index 704e897..704e897 100644
--- a/contrib/java/bindings/org/uscxml/apache/commons/scxml2/SCXMLExecutor.java
+++ b/contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/SCXMLExecutor.java
diff --git a/contrib/java/bindings/org/uscxml/apache/commons/scxml2/SCXMLReader.java b/contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/SCXMLReader.java
index 45c2a54..45c2a54 100644
--- a/contrib/java/bindings/org/uscxml/apache/commons/scxml2/SCXMLReader.java
+++ b/contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/SCXMLReader.java
diff --git a/contrib/java/bindings/org/uscxml/apache/commons/scxml2/SimpleErrorReporter.java b/contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/SimpleErrorReporter.java
index 06187f8..06187f8 100644
--- a/contrib/java/bindings/org/uscxml/apache/commons/scxml2/SimpleErrorReporter.java
+++ b/contrib/java/apache-commons/org/uscxml/apache/commons/scxml2/SimpleErrorReporter.java
diff --git a/contrib/java/bindings/org/uscxml/examples/ApacheCommonsAPI.java b/contrib/java/apache-commons/org/uscxml/examples/ApacheCommonsAPI.java
index 4cf3de4..4cf3de4 100644
--- a/contrib/java/bindings/org/uscxml/examples/ApacheCommonsAPI.java
+++ b/contrib/java/apache-commons/org/uscxml/examples/ApacheCommonsAPI.java
diff --git a/contrib/java/bindings/build.properties b/contrib/java/bindings/build.properties
index dd0fe62..9d23ea4 100644
--- a/contrib/java/bindings/build.properties
+++ b/contrib/java/bindings/build.properties
@@ -5,5 +5,5 @@
uscxml.library.path=/usr/local/share/uscxml/bindings/java
uscxml.jar=/usr/local/share/uscxml/bindings/uscxml.jar
-jexl.jar=libs/commons-jexl3-3.0.jar
-logging.jar=libs/commons-logging-1.2.jar \ No newline at end of file
+jexl.jar=../libs/commons-jexl3-3.0.jar
+logging.jar=../libs/commons-logging-1.2.jar \ No newline at end of file
diff --git a/contrib/java/bindings/build.xml b/contrib/java/bindings/build.xml
index 19d7817..d5c6db7 100644
--- a/contrib/java/bindings/build.xml
+++ b/contrib/java/bindings/build.xml
@@ -4,6 +4,7 @@
<property file="build.properties" />
<property name="src" value="." />
+ <property name="common" value="../common" />
<property name="bin" value="bin" />
<!-- <property name="test.file" value="..." /> -->
@@ -21,6 +22,7 @@
<javac destdir="${bin}" debuglevel="lines,vars,source" debug="on"
encoding="utf-8" includeantruntime="false">
<src path="${src}" />
+ <src path="${common}" />
<classpath>
<pathelement location="${real.uscxml.jar}" />
<pathelement location="${jexl.jar}" />
diff --git a/contrib/java/bindings/org/uscxml/tests/JexlDataModelTest.java b/contrib/java/bindings/org/uscxml/tests/JexlDataModelTest.java
index da79d37..3db5b29 100644
--- a/contrib/java/bindings/org/uscxml/tests/JexlDataModelTest.java
+++ b/contrib/java/bindings/org/uscxml/tests/JexlDataModelTest.java
@@ -14,14 +14,14 @@ import org.uscxml.helper.TestMonitor;
public class JexlDataModelTest {
- public static void main(String[] args) {
+ public static void main(String[] args) throws MalformedURLException {
String uSCXMLLibPath = "/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava.jnilib";
if (System.getenv().containsKey("USCXML_JAVA_LIB")) {
uSCXMLLibPath = System.getenv("USCXML_JAVA_LIB");
}
System.load(uSCXMLLibPath);
-// String testUri = "/Users/sradomski/Documents/TK/Code/uscxml/test/w3c/jexl/test144.scxml";
+ String testUri = "/Users/sradomski/Documents/TK/Code/uscxml/test/w3c/jexl/test144.scxml";
// String testUri = "/Users/sradomski/Desktop/stopwatch.xml";
@@ -31,20 +31,20 @@ public class JexlDataModelTest {
{
JexlDataModel jdm = new JexlDataModel();
-// Factory.getInstance().registerDataModel(jdm);
+ //Factory.getInstance().registerDataModel(jdm);
TestMonitor tm = new TestMonitor();
try {
-// File testFile = new File(testUri);
-// String testName = testFile.toURI().toURL().toString();
- String testName = "https://raw.githubusercontent.com/woonsan/commons-scxml-examples/master/stopwatch/src/main/resources/com/github/woonsan/commons/scxml/examples/stopwatch/stopwatch.xml";
+ File testFile = new File(testUri);
+ String testName = testFile.toURI().toURL().toString();
+// String testName = "https://raw.githubusercontent.com/woonsan/commons-scxml-examples/master/stopwatch/src/main/resources/com/github/woonsan/commons/scxml/examples/stopwatch/stopwatch.xml";
System.out.println(testName);
Interpreter scxml = Interpreter.fromURL(testName);
- jdm.ctx.set("stopWatch", new StopWatch());
+ //jdm.ctx.set("stopWatch", new StopWatch());
ActionLanguage al = new ActionLanguage();
al.setDataModel(jdm);
diff --git a/contrib/java/common/org/uscxml/dm/jexl/JexlDataModel.java b/contrib/java/common/org/uscxml/dm/jexl/JexlDataModel.java
index 731ceaa..0b35c29 100644
--- a/contrib/java/common/org/uscxml/dm/jexl/JexlDataModel.java
+++ b/contrib/java/common/org/uscxml/dm/jexl/JexlDataModel.java
@@ -76,8 +76,6 @@ public class JexlDataModel extends DataModel {
public Data evalAsData(String content) {
JexlExpression expr = jexl.createExpression(content);
Data d = getJexlObjectAsData(expr.evaluate(ctx));
-// d.setAtom(expr.getParsedText());
-// d.setType(Data.Type.VERBATIM);
return d;
}
@@ -253,6 +251,7 @@ public class JexlDataModel extends DataModel {
private static Set<Class<?>> getWrapperTypes() {
Set<Class<?>> ret = new HashSet<Class<?>>();
+ ret.add(String.class);
ret.add(Boolean.class);
ret.add(Character.class);
ret.add(Byte.class);