You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by wi...@apache.org on 2014/06/13 10:57:30 UTC
[010/100] [abbrv] [partial] Reverting the erroneous merge by
Sebastian according to the instructions in INFRA-6876
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-functions-math/src/test/java/org/apache/marmotta/ldpath/model/functions/math/MathFunctionTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-math/src/test/java/org/apache/marmotta/ldpath/model/functions/math/MathFunctionTest.java b/libraries/ldpath/ldpath-functions-math/src/test/java/org/apache/marmotta/ldpath/model/functions/math/MathFunctionTest.java
index 1696341..0018de9 100644
--- a/libraries/ldpath/ldpath-functions-math/src/test/java/org/apache/marmotta/ldpath/model/functions/math/MathFunctionTest.java
+++ b/libraries/ldpath/ldpath-functions-math/src/test/java/org/apache/marmotta/ldpath/model/functions/math/MathFunctionTest.java
@@ -22,7 +22,7 @@ import java.util.Random;
import org.apache.marmotta.ldpath.model.fields.FieldMapping;
import org.apache.marmotta.ldpath.parser.ParseException;
-import org.apache.marmotta.ldpath.parser.RdfPathParser;
+import org.apache.marmotta.ldpath.parser.LdPathParser;
import org.apache.marmotta.ldpath.test.AbstractTestBase;
import org.hamcrest.CoreMatchers;
import org.junit.Assert;
@@ -100,7 +100,7 @@ public class MathFunctionTest extends AbstractTestBase {
dMin = Math.min(dMin, dData[i]);
}
- final RdfPathParser<Value> intParser = createParserFromString("fn:min(<" + iProp.stringValue() + ">) :: xsd:int");
+ final LdPathParser<Value> intParser = createParserFromString("fn:min(<" + iProp.stringValue() + ">) :: xsd:int");
final FieldMapping<Object, Value> intRule = intParser.parseRule(NSS);
final Collection<Object> intResult = intRule.getValues(backend, subject);
@@ -109,7 +109,7 @@ public class MathFunctionTest extends AbstractTestBase {
Assert.assertTrue("Integer (type)", intNext instanceof Integer);
Assert.assertEquals("Integer (result)", iMin, intNext);
- final RdfPathParser<Value> longParser = createParserFromString("fn:min(<" + lProp.stringValue() + ">) :: xsd:long");
+ final LdPathParser<Value> longParser = createParserFromString("fn:min(<" + lProp.stringValue() + ">) :: xsd:long");
final FieldMapping<Object, Value> longRule = longParser.parseRule(NSS);
final Collection<Object> longResult = longRule.getValues(backend, subject);
@@ -118,7 +118,7 @@ public class MathFunctionTest extends AbstractTestBase {
Assert.assertTrue("Long (type)", longNext instanceof Long);
Assert.assertEquals("Long (result)", lMin, longNext);
- final RdfPathParser<Value> floatParser = createParserFromString("fn:min(<" + fProp.stringValue() + ">) :: xsd:float");
+ final LdPathParser<Value> floatParser = createParserFromString("fn:min(<" + fProp.stringValue() + ">) :: xsd:float");
final FieldMapping<Object, Value> floatRule = floatParser.parseRule(NSS);
final Collection<Object> floatResult = floatRule.getValues(backend, subject);
@@ -127,7 +127,7 @@ public class MathFunctionTest extends AbstractTestBase {
Assert.assertTrue("Float (type)", floatNext instanceof Float);
Assert.assertEquals("Float (result)", fMin, floatNext);
- final RdfPathParser<Value> doubleParser = createParserFromString("fn:min(<" + dProp.stringValue() + ">) :: xsd:double");
+ final LdPathParser<Value> doubleParser = createParserFromString("fn:min(<" + dProp.stringValue() + ">) :: xsd:double");
final FieldMapping<Object, Value> doubleRule = doubleParser.parseRule(NSS);
final Collection<Object> doubleResult = doubleRule.getValues(backend, subject);
@@ -150,7 +150,7 @@ public class MathFunctionTest extends AbstractTestBase {
dMax = Math.max(dMax, dData[i]);
}
- final RdfPathParser<Value> intParser = createParserFromString("fn:max(<" + iProp.stringValue() + ">) :: xsd:int");
+ final LdPathParser<Value> intParser = createParserFromString("fn:max(<" + iProp.stringValue() + ">) :: xsd:int");
final FieldMapping<Object, Value> intRule = intParser.parseRule(NSS);
final Collection<Object> intResult = intRule.getValues(backend, subject);
@@ -159,7 +159,7 @@ public class MathFunctionTest extends AbstractTestBase {
Assert.assertTrue("Integer (type)", intNext instanceof Integer);
Assert.assertEquals("Integer (result)", iMax, intNext);
- final RdfPathParser<Value> longParser = createParserFromString("fn:max(<" + lProp.stringValue() + ">) :: xsd:long");
+ final LdPathParser<Value> longParser = createParserFromString("fn:max(<" + lProp.stringValue() + ">) :: xsd:long");
final FieldMapping<Object, Value> longRule = longParser.parseRule(NSS);
final Collection<Object> longResult = longRule.getValues(backend, subject);
@@ -168,7 +168,7 @@ public class MathFunctionTest extends AbstractTestBase {
Assert.assertTrue("Long (type)", longNext instanceof Long);
Assert.assertEquals("Long (result)", lMax, longNext);
- final RdfPathParser<Value> floatParser = createParserFromString("fn:max(<" + fProp.stringValue() + ">) :: xsd:float");
+ final LdPathParser<Value> floatParser = createParserFromString("fn:max(<" + fProp.stringValue() + ">) :: xsd:float");
final FieldMapping<Object, Value> floatRule = floatParser.parseRule(NSS);
final Collection<Object> floatResult = floatRule.getValues(backend, subject);
@@ -177,7 +177,7 @@ public class MathFunctionTest extends AbstractTestBase {
Assert.assertTrue("Float (type)", floatNext instanceof Float);
Assert.assertEquals("Float (result)", fMax, floatNext);
- final RdfPathParser<Value> doubleParser = createParserFromString("fn:max(<" + dProp.stringValue() + ">) :: xsd:double");
+ final LdPathParser<Value> doubleParser = createParserFromString("fn:max(<" + dProp.stringValue() + ">) :: xsd:double");
final FieldMapping<Object, Value> doubleRule = doubleParser.parseRule(NSS);
final Collection<Object> doubleResult = doubleRule.getValues(backend, subject);
@@ -196,7 +196,7 @@ public class MathFunctionTest extends AbstractTestBase {
dMin = Math.min(dMin, dData[i]);
}
- final RdfPathParser<Value> floatParser = createParserFromString("fn:round(<" + fProp.stringValue() + ">) :: xsd:int");
+ final LdPathParser<Value> floatParser = createParserFromString("fn:round(<" + fProp.stringValue() + ">) :: xsd:int");
final FieldMapping<Object, Value> floatRule = floatParser.parseRule(NSS);
final Collection<Object> floatResult = floatRule.getValues(backend, subject);
@@ -205,7 +205,7 @@ public class MathFunctionTest extends AbstractTestBase {
Assert.assertThat("round[Float] (result)", floatResult, CoreMatchers.hasItem(Math.round(element)));
}
- final RdfPathParser<Value> doubleParser = createParserFromString("fn:round(<" + dProp.stringValue() + ">) :: xsd:long");
+ final LdPathParser<Value> doubleParser = createParserFromString("fn:round(<" + dProp.stringValue() + ">) :: xsd:long");
final FieldMapping<Object, Value> doubleRule = doubleParser.parseRule(NSS);
final Collection<Object> doubleResult = doubleRule.getValues(backend, subject);
@@ -230,7 +230,7 @@ public class MathFunctionTest extends AbstractTestBase {
dSum += dData[i];
}
- final RdfPathParser<Value> intParser = createParserFromString("fn:sum(<" + iProp.stringValue() + ">) :: xsd:int");
+ final LdPathParser<Value> intParser = createParserFromString("fn:sum(<" + iProp.stringValue() + ">) :: xsd:int");
final FieldMapping<Object, Value> intRule = intParser.parseRule(NSS);
final Collection<Object> intResult = intRule.getValues(backend, subject);
@@ -239,7 +239,7 @@ public class MathFunctionTest extends AbstractTestBase {
Assert.assertTrue("Integer (type)", intNext instanceof Integer);
Assert.assertEquals("Integer (result)", iSum, intNext);
- final RdfPathParser<Value> longParser = createParserFromString("fn:sum(<" + lProp.stringValue() + ">) :: xsd:long");
+ final LdPathParser<Value> longParser = createParserFromString("fn:sum(<" + lProp.stringValue() + ">) :: xsd:long");
final FieldMapping<Object, Value> longRule = longParser.parseRule(NSS);
final Collection<Object> longResult = longRule.getValues(backend, subject);
@@ -248,7 +248,7 @@ public class MathFunctionTest extends AbstractTestBase {
Assert.assertTrue("Long (type)", longNext instanceof Long);
Assert.assertEquals("Long (result)", lSum, longNext);
- final RdfPathParser<Value> floatParser = createParserFromString("fn:sum(<" + fProp.stringValue() + ">) :: xsd:float");
+ final LdPathParser<Value> floatParser = createParserFromString("fn:sum(<" + fProp.stringValue() + ">) :: xsd:float");
final FieldMapping<Object, Value> floatRule = floatParser.parseRule(NSS);
final Collection<Object> floatResult = floatRule.getValues(backend, subject);
@@ -257,7 +257,7 @@ public class MathFunctionTest extends AbstractTestBase {
Assert.assertTrue("Float (type)", floatNext instanceof Float);
Assert.assertEquals("Float (result)", fSum, floatNext);
- final RdfPathParser<Value> doubleParser = createParserFromString("fn:sum(<" + dProp.stringValue() + ">) :: xsd:double");
+ final LdPathParser<Value> doubleParser = createParserFromString("fn:sum(<" + dProp.stringValue() + ">) :: xsd:double");
final FieldMapping<Object, Value> doubleRule = doubleParser.parseRule(NSS);
final Collection<Object> doubleResult = doubleRule.getValues(backend, subject);
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-functions-text/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-text/pom.xml b/libraries/ldpath/ldpath-functions-text/pom.xml
index b8052fa..42823a3 100644
--- a/libraries/ldpath/ldpath-functions-text/pom.xml
+++ b/libraries/ldpath/ldpath-functions-text/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.marmotta</groupId>
<artifactId>marmotta-parent</artifactId>
- <version>3.1.0-incubating-SNAPSHOT</version>
+ <version>3.1.0-incubating</version>
<relativePath>../../../parent</relativePath>
</parent>
@@ -68,6 +68,27 @@
</dependencies>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin> <!-- generate JRebel Configuration -->
+ <groupId>org.zeroturnaround</groupId>
+ <artifactId>jrebel-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-rebel-xml</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <relativePath>../../../</relativePath>
+ <rootPath>$${rebel.root}</rootPath>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/AbstractBinaryStringTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/AbstractBinaryStringTest.java b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/AbstractBinaryStringTest.java
new file mode 100644
index 0000000..a873c0d
--- /dev/null
+++ b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/AbstractBinaryStringTest.java
@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.marmotta.ldpath.model.tests.functions.text;
+
+import java.util.Collection;
+
+import com.google.common.collect.Collections2;
+
+/**
+ * Abstract base class for binary string tests.
+ * @author Jakob Frank <ja...@apache.org>
+ *
+ */
+public abstract class AbstractBinaryStringTest<Node> extends AbstractStringTest<Node> {
+
+ @Override
+ protected boolean test(AbstractStringTest<Node>.ToStringFunction toStringFunction, Collection<Node>... args) {
+ final Collection<Node> l = args[0], r = args[1];
+
+ try {
+ for (String first: Collections2.transform(l, toStringFunction)) {
+ for (String second: Collections2.transform(r, toStringFunction)) {
+ if (!test(first, second)) return false;
+ }
+ }
+ return true;
+ } catch (IllegalArgumentException e) {
+ return false;
+ }
+ }
+
+ /**
+ * Do the test.
+ * @param first the first (left) argument
+ * @param second the second (right) argument
+ */
+ protected abstract boolean test(String first, String second);
+
+ @Override
+ protected final int getArgCount() {
+ return 2;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/AbstractStringTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/AbstractStringTest.java b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/AbstractStringTest.java
new file mode 100644
index 0000000..306e78f
--- /dev/null
+++ b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/AbstractStringTest.java
@@ -0,0 +1,101 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.marmotta.ldpath.model.tests.functions.text;
+
+import java.util.Collection;
+
+import org.apache.marmotta.ldpath.api.backend.RDFBackend;
+import org.apache.marmotta.ldpath.api.functions.TestFunction;
+import org.apache.marmotta.ldpath.model.transformers.StringTransformer;
+
+import com.google.common.base.Function;
+import com.google.common.collect.Collections2;
+
+/**
+ * Abstract base class for LDPath Test functions that work on the string representation of nodes.
+ * @author Jakob Frank <ja...@apache.org>
+ * @see TestFunction
+ */
+public abstract class AbstractStringTest<Node> extends TestFunction<Node> {
+
+ protected final StringTransformer<Node> transformer = new StringTransformer<Node>();
+
+ @Override
+ public Boolean apply(RDFBackend<Node> backend, Node context,
+ Collection<Node>... args) throws IllegalArgumentException {
+
+ if (args.length != getArgCount()) { throw new IllegalArgumentException(getLocalName() + " requires exactly " + getArgCount() + " arguments"); }
+
+ return test(new ToStringFunction(backend), args);
+ }
+
+ /**
+ *
+ * @param toStringFunction
+ * @param args
+ */
+ protected abstract boolean test(ToStringFunction toStringFunction, Collection<Node>... args);
+
+ /**
+ * The signature of this functions (how to use it)
+ */
+ @Override
+ public String getSignature() {
+ return "fn:" + getLocalName() + "(" + getArgSignature() + ") :: Boolean";
+ }
+
+ private String getArgSignature() {
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < getArgCount(); i++) {
+ if (i > 0)
+ sb.append(", ");
+ sb.append("Node ").append('a' + i);
+ }
+ return sb.toString();
+ }
+
+ /**
+ * Number of (required) arguments this function accepts.
+ * @return
+ */
+ protected abstract int getArgCount();
+
+ /**
+ * A function for the guava-library to convert a node into a string based on
+ * the backend provided in the constructor.
+ *
+ * @author Jakob Frank <ja...@apache.org>
+ * @see Collections2
+ * @see Function
+ */
+ protected class ToStringFunction implements Function<Node, String> {
+ private final RDFBackend<Node> backend;
+
+ /**
+ * @param backend the RDFBackend to use for transformation
+ */
+ public ToStringFunction(RDFBackend<Node> backend) {
+ this.backend = backend;
+ }
+
+ @Override
+ public String apply(Node n) {
+ return transformer.transform(backend, n, null);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringContainsTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringContainsTest.java b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringContainsTest.java
new file mode 100644
index 0000000..0714c3a
--- /dev/null
+++ b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringContainsTest.java
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.marmotta.ldpath.model.tests.functions.text;
+
+/**
+ * Check if one string is contained within an other.
+ * @author Jakob Frank <ja...@apache.org>
+ * @see String#contains(CharSequence)
+ */
+public class StringContainsTest<Node> extends AbstractBinaryStringTest<Node> {
+
+ @Override
+ public String getDescription() {
+ return "Checks if the first string contains the second";
+ }
+
+ @Override
+ protected boolean test(String first, String second) {
+ return first != null && second != null && first.contains(second);
+ }
+
+ @Override
+ public String getLocalName() {
+ return "contains";
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringEndsWithTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringEndsWithTest.java b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringEndsWithTest.java
new file mode 100644
index 0000000..a7e64c8
--- /dev/null
+++ b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringEndsWithTest.java
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.marmotta.ldpath.model.tests.functions.text;
+
+import org.apache.marmotta.ldpath.model.tests.functions.text.AbstractBinaryStringTest;
+
+/**
+ * Check if one string ends with the other.
+ * @author Jakob Frank <ja...@apache.org>
+ * @see String#endsWith(String)
+ */
+public class StringEndsWithTest<Node> extends AbstractBinaryStringTest<Node> {
+
+ @Override
+ public String getDescription() {
+ return "Checks if the first string ends the second";
+ }
+
+ @Override
+ protected boolean test(String first, String second) {
+ return first != null && second != null && first.endsWith(second);
+ }
+
+ @Override
+ public String getLocalName() {
+ return "endsWith";
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringEqualsIC.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringEqualsIC.java b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringEqualsIC.java
new file mode 100644
index 0000000..bd2e385
--- /dev/null
+++ b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringEqualsIC.java
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.marmotta.ldpath.model.tests.functions.text;
+
+/**
+ * Check two strings for equality, ignoring case considerations.
+ * @author Jakob Frank <ja...@apache.org>
+ * @see String#equalsIgnoreCase(String)
+ */
+public class StringEqualsIC<Node> extends AbstractBinaryStringTest<Node> {
+
+ @Override
+ public String getDescription() {
+ return "Checks the provided arguments for equality (string representation, ignoring case considerations)";
+ }
+
+ @Override
+ protected boolean test(String first, String second) {
+ return first==null?second==null:first.equalsIgnoreCase(second);
+ }
+
+ @Override
+ public String getLocalName() {
+ return "equalsIgnoreCase";
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringEqualsTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringEqualsTest.java b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringEqualsTest.java
new file mode 100644
index 0000000..816704a
--- /dev/null
+++ b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringEqualsTest.java
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.marmotta.ldpath.model.tests.functions.text;
+
+/**
+ * Check two strings for equality.
+ * @author Jakob Frank <ja...@apache.org>
+ * @see String#equals(Object)
+ */
+public class StringEqualsTest<Node> extends AbstractBinaryStringTest<Node> {
+
+ @Override
+ public String getDescription() {
+ return "Checks the provided arguments for equality (string representation)";
+ }
+
+ @Override
+ protected boolean test(String first, String second) {
+ return first==null?second==null:first.equals(second);
+ }
+
+ @Override
+ public String getLocalName() {
+ return "equals";
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringIsEmptyTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringIsEmptyTest.java b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringIsEmptyTest.java
new file mode 100644
index 0000000..aa2c421
--- /dev/null
+++ b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringIsEmptyTest.java
@@ -0,0 +1,61 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.marmotta.ldpath.model.tests.functions.text;
+
+import java.util.Collection;
+
+import com.google.common.collect.Collections2;
+
+/**
+ * LDPath test function to check if the string representation of an node is empty.
+ *
+ * @author Jakob Frank <ja...@apache.org>
+ *
+ */
+public class StringIsEmptyTest<Node> extends AbstractStringTest<Node> {
+
+ @Override
+ public String getDescription() {
+ return "Check if the string representation of the node is empty";
+ }
+
+ @Override
+ protected boolean test(AbstractStringTest<Node>.ToStringFunction toStringFunction, Collection<Node>... args) {
+ try {
+ for (String str: Collections2.transform(args[0], toStringFunction)) {
+ if (!str.isEmpty()) return false;
+ }
+
+ return true;
+ } catch (IllegalArgumentException e) {
+ return false;
+ }
+
+ }
+
+ @Override
+ protected final int getArgCount() {
+ return 1;
+ }
+
+ @Override
+ public String getLocalName() {
+ return "isEmpty";
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringStartsWithTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringStartsWithTest.java b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringStartsWithTest.java
new file mode 100644
index 0000000..a7f2ab8
--- /dev/null
+++ b/libraries/ldpath/ldpath-functions-text/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringStartsWithTest.java
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.marmotta.ldpath.model.tests.functions.text;
+
+import org.apache.marmotta.ldpath.model.tests.functions.text.AbstractBinaryStringTest;
+
+/**
+ * Check if one string starts with the other.
+ * @author Jakob Frank <ja...@apache.org>
+ * @see String#startsWith(String)
+ */
+public class StringStartsWithTest<Node> extends AbstractBinaryStringTest<Node> {
+
+ @Override
+ public String getDescription() {
+ return "Checks if the first string starts the second";
+ }
+
+ @Override
+ protected boolean test(String first, String second) {
+ return first != null && second != null && first.startsWith(second);
+ }
+
+ @Override
+ public String getLocalName() {
+ return "startsWith";
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-functions-text/src/main/resources/META-INF/services/org.apache.marmotta.ldpath.api.functions.TestFunction
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-text/src/main/resources/META-INF/services/org.apache.marmotta.ldpath.api.functions.TestFunction b/libraries/ldpath/ldpath-functions-text/src/main/resources/META-INF/services/org.apache.marmotta.ldpath.api.functions.TestFunction
new file mode 100644
index 0000000..444c898
--- /dev/null
+++ b/libraries/ldpath/ldpath-functions-text/src/main/resources/META-INF/services/org.apache.marmotta.ldpath.api.functions.TestFunction
@@ -0,0 +1,6 @@
+org.apache.marmotta.ldpath.model.tests.functions.text.StringIsEmptyTest
+org.apache.marmotta.ldpath.model.tests.functions.text.StringEqualsTest
+org.apache.marmotta.ldpath.model.tests.functions.text.StringEqualsIC
+org.apache.marmotta.ldpath.model.tests.functions.text.StringContainsTest
+org.apache.marmotta.ldpath.model.tests.functions.text.StringStartsWithTest
+org.apache.marmotta.ldpath.model.tests.functions.text.StringEndsWithTest
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-functions-text/src/test/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringTestTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-text/src/test/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringTestTest.java b/libraries/ldpath/ldpath-functions-text/src/test/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringTestTest.java
new file mode 100644
index 0000000..2da31a7
--- /dev/null
+++ b/libraries/ldpath/ldpath-functions-text/src/test/java/org/apache/marmotta/ldpath/model/tests/functions/text/StringTestTest.java
@@ -0,0 +1,181 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.marmotta.ldpath.model.tests.functions.text;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Random;
+import java.util.UUID;
+
+import org.apache.marmotta.ldpath.api.tests.NodeTest;
+import org.apache.marmotta.ldpath.parser.ParseException;
+import org.apache.marmotta.ldpath.parser.LdPathParser;
+import org.apache.marmotta.ldpath.test.AbstractTestBase;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameter;
+import org.junit.runners.Parameterized.Parameters;
+import org.openrdf.model.URI;
+import org.openrdf.model.Value;
+import org.openrdf.model.ValueFactory;
+import org.openrdf.repository.sail.SailRepositoryConnection;
+
+@RunWith(Parameterized.class)
+public class StringTestTest extends AbstractTestBase {
+
+ @Parameters(name = "Case-{index}")
+ public static List<String[]> data() {
+ return Arrays.asList(
+ new String[] { "Welcome to The Apache Software Foundation!" },
+ new String[] { "Apache Marmotta (incubator) is an Open Platform for Linked Data" }
+ );
+ }
+ private static Random rnd;
+
+ @Parameter
+ public String text;
+
+ private int textLen;
+
+ private int testWindow;
+
+ private String errSalt;
+
+ private URI subject, predicate;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ rnd = new Random();
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ textLen = text.length();
+ Assert.assertTrue(textLen > 4);
+ testWindow = 1+rnd.nextInt((textLen / 4));
+
+ errSalt = UUID.randomUUID().toString();
+
+ subject = repository.getValueFactory().createURI(ns("foo", UUID.randomUUID().toString()));
+ predicate = repository.getValueFactory().createURI(ns("foo", UUID.randomUUID().toString()));
+
+ final SailRepositoryConnection con = repository.getConnection();
+ try {
+ final ValueFactory vf = con.getValueFactory();
+
+ con.add(vf.createStatement(subject, predicate, vf.createLiteral(text)));
+
+ con.commit();
+ } finally {
+ con.close();
+ }
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ private boolean checkTest(String ldPathTest, URI context) throws ParseException {
+ final LdPathParser<Value> parser = createParserFromString(ldPathTest);
+ final NodeTest<Value> test = parser.parseTest(NSS);
+ return test.accept(backend, context, context);
+ }
+
+ @Test
+ public void testEquals() throws ParseException {
+ final String ldPath_T = String.format("fn:equals(<%s>, \"%s\")", predicate.stringValue(), text);
+ final String ldPath_F = String.format("fn:equals(<%s>, \"%s\")", predicate.stringValue(), errSalt);
+
+ Assert.assertTrue(checkTest(ldPath_T, subject));
+ Assert.assertFalse(checkTest(ldPath_F, subject));
+ }
+
+ @Test
+ public void testEqualsIgnoreCase() throws ParseException {
+ final String ldPath_T = String.format("fn:equalsIgnoreCase(<%s>, \"%s\")", predicate.stringValue(), text);
+ final String ldPath_T_LC = String.format("fn:equalsIgnoreCase(<%s>, \"%s\")", predicate.stringValue(), text.toLowerCase());
+ final String ldPath_T_UC = String.format("fn:equalsIgnoreCase(<%s>, \"%s\")", predicate.stringValue(), text.toUpperCase());
+
+ final String ldPath_F = String.format("fn:equalsIgnoreCase(<%s>, \"%s\")", predicate.stringValue(), errSalt);
+ final String ldPath_F_LC = String.format("fn:equalsIgnoreCase(<%s>, \"%s\")", predicate.stringValue(), errSalt.toLowerCase());
+ final String ldPath_F_UC = String.format("fn:equalsIgnoreCase(<%s>, \"%s\")", predicate.stringValue(), errSalt.toUpperCase());
+
+ Assert.assertTrue(checkTest(ldPath_T, subject));
+ Assert.assertTrue(checkTest(ldPath_T_LC, subject));
+ Assert.assertTrue(checkTest(ldPath_T_UC, subject));
+
+ Assert.assertFalse(checkTest(ldPath_F, subject));
+ Assert.assertFalse(checkTest(ldPath_F_LC, subject));
+ Assert.assertFalse(checkTest(ldPath_F_UC, subject));
+ }
+
+ @Test
+ public void testContains() throws ParseException {
+ final String ldPath_T1 = String.format("fn:contains(<%s>, \"%s\")", predicate.stringValue(), text.substring(textLen/2-testWindow, textLen/2+testWindow));
+ final String ldPath_T2 = String.format("fn:contains(<%s>, \"%s\")", predicate.stringValue(), text.substring(textLen-testWindow));
+ final String ldPath_T3 = String.format("fn:contains(<%s>, \"%s\")", predicate.stringValue(), text.substring(0,testWindow));
+ final String ldPath_F = String.format("fn:contains(<%s>, \"%s\")", predicate.stringValue(), UUID.randomUUID().toString());
+
+ Assert.assertTrue(checkTest(ldPath_T1, subject));
+ Assert.assertTrue(checkTest(ldPath_T2, subject));
+ Assert.assertTrue(checkTest(ldPath_T3, subject));
+ Assert.assertFalse(checkTest(ldPath_F, subject));
+ }
+
+ @Test
+ public void testEndsWith() throws ParseException {
+ final String ldPath_S = String.format("fn:endsWith(<%s>, \"%s\")", predicate.stringValue(), text.substring(0,testWindow));
+ final String ldPath_M = String.format("fn:endsWith(<%s>, \"%s\")", predicate.stringValue(), text.substring(textLen/2-testWindow, textLen/2+testWindow));
+ final String ldPath_E = String.format("fn:endsWith(<%s>, \"%s\")", predicate.stringValue(), text.substring(textLen-testWindow));
+
+ Assert.assertFalse(checkTest(ldPath_S, subject));
+ Assert.assertFalse(checkTest(ldPath_M, subject));
+ Assert.assertTrue(checkTest(ldPath_E, subject));
+ }
+
+ @Test
+ public void testStartsWith() throws ParseException {
+ final String ldPath_S = String.format("fn:startsWith(<%s>, \"%s\")", predicate.stringValue(), text.substring(0,testWindow));
+ final String ldPath_M = String.format("fn:startsWith(<%s>, \"%s\")", predicate.stringValue(), text.substring(textLen/2-testWindow, textLen/2+testWindow));
+ final String ldPath_E = String.format("fn:startsWith(<%s>, \"%s\")", predicate.stringValue(), text.substring(textLen-testWindow));
+
+ Assert.assertTrue(checkTest(ldPath_S, subject));
+ Assert.assertFalse(checkTest(ldPath_M, subject));
+ Assert.assertFalse(checkTest(ldPath_E, subject));
+ }
+
+ @Test
+ public void testIsEmpty() throws ParseException {
+ final String ldPath_T = "fn:isEmpty(\"\")";
+ final String ldPath_F = String.format("fn:isEmpty(<%s>)", predicate.stringValue());
+
+ Assert.assertTrue(checkTest(ldPath_T, subject));
+ Assert.assertFalse(checkTest(ldPath_F, subject));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-functions-xml/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-xml/pom.xml b/libraries/ldpath/ldpath-functions-xml/pom.xml
index 3adfd91..57a840d 100644
--- a/libraries/ldpath/ldpath-functions-xml/pom.xml
+++ b/libraries/ldpath/ldpath-functions-xml/pom.xml
@@ -19,7 +19,7 @@
<parent>
<groupId>org.apache.marmotta</groupId>
<artifactId>marmotta-parent</artifactId>
- <version>3.1.0-incubating-SNAPSHOT</version>
+ <version>3.1.0-incubating</version>
<relativePath>../../../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -84,6 +84,27 @@
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin> <!-- generate JRebel Configuration -->
+ <groupId>org.zeroturnaround</groupId>
+ <artifactId>jrebel-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-rebel-xml</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <relativePath>../../../</relativePath>
+ <rootPath>$${rebel.root}</rootPath>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-functions-xml/src/test/java/org/apache/marmotta/ldpath/model/functions/xml/RemoveXmlTagsFunctionTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-xml/src/test/java/org/apache/marmotta/ldpath/model/functions/xml/RemoveXmlTagsFunctionTest.java b/libraries/ldpath/ldpath-functions-xml/src/test/java/org/apache/marmotta/ldpath/model/functions/xml/RemoveXmlTagsFunctionTest.java
index b4b2e7c..070d22b 100644
--- a/libraries/ldpath/ldpath-functions-xml/src/test/java/org/apache/marmotta/ldpath/model/functions/xml/RemoveXmlTagsFunctionTest.java
+++ b/libraries/ldpath/ldpath-functions-xml/src/test/java/org/apache/marmotta/ldpath/model/functions/xml/RemoveXmlTagsFunctionTest.java
@@ -22,7 +22,7 @@ import java.util.Collection;
import org.apache.marmotta.ldpath.model.fields.FieldMapping;
import org.apache.marmotta.ldpath.parser.ParseException;
-import org.apache.marmotta.ldpath.parser.RdfPathParser;
+import org.apache.marmotta.ldpath.parser.LdPathParser;
import org.apache.marmotta.ldpath.test.AbstractTestBase;
import org.junit.Assert;
import org.junit.Before;
@@ -47,7 +47,7 @@ public class RemoveXmlTagsFunctionTest extends AbstractTestBase {
final URI context = repository.getValueFactory().createURI(NSS.get("ex") + "Text");
- final RdfPathParser<Value> parser = createParserFromString("fn:removeTags(foo:formatted) :: xsd:string");
+ final LdPathParser<Value> parser = createParserFromString("fn:removeTags(foo:formatted) :: xsd:string");
final FieldMapping<Object, Value> rule = parser.parseRule(NSS);
final Collection<Object> values = rule.getValues(backend, context);
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-functions-xml/src/test/java/org/apache/marmotta/ldpath/model/functions/xml/XPathFunctionTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-xml/src/test/java/org/apache/marmotta/ldpath/model/functions/xml/XPathFunctionTest.java b/libraries/ldpath/ldpath-functions-xml/src/test/java/org/apache/marmotta/ldpath/model/functions/xml/XPathFunctionTest.java
index 613d1ad..87eaa6c 100644
--- a/libraries/ldpath/ldpath-functions-xml/src/test/java/org/apache/marmotta/ldpath/model/functions/xml/XPathFunctionTest.java
+++ b/libraries/ldpath/ldpath-functions-xml/src/test/java/org/apache/marmotta/ldpath/model/functions/xml/XPathFunctionTest.java
@@ -24,7 +24,7 @@ import java.util.List;
import org.apache.marmotta.ldpath.model.fields.FieldMapping;
import org.apache.marmotta.ldpath.parser.ParseException;
-import org.apache.marmotta.ldpath.parser.RdfPathParser;
+import org.apache.marmotta.ldpath.parser.LdPathParser;
import org.apache.marmotta.ldpath.test.AbstractTestBase;
import org.junit.Assert;
import org.junit.Before;
@@ -73,7 +73,7 @@ public class XPathFunctionTest extends AbstractTestBase {
public void testXpathFunction() throws ParseException {
final URI ctx = repository.getValueFactory().createURI(NSS.get("ex") + "Quiz");
- final RdfPathParser<Value> parser = createParserFromString("fn:xpath(\"/quiz/question[" +
+ final LdPathParser<Value> parser = createParserFromString("fn:xpath(\"/quiz/question[" +
index +
"]/answers/answer[@correct='true']/text()\", foo:xml) :: xsd:string");
final FieldMapping<Object, Value> rule = parser.parseRule(NSS);
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-template-linkeddata/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-template-linkeddata/pom.xml b/libraries/ldpath/ldpath-template-linkeddata/pom.xml
index df42569..d2a227d 100644
--- a/libraries/ldpath/ldpath-template-linkeddata/pom.xml
+++ b/libraries/ldpath/ldpath-template-linkeddata/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.marmotta</groupId>
<artifactId>marmotta-parent</artifactId>
- <version>3.1.0-incubating-SNAPSHOT</version>
+ <version>3.1.0-incubating</version>
<relativePath>../../../parent</relativePath>
</parent>
@@ -31,6 +31,27 @@
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin> <!-- generate JRebel Configuration -->
+ <groupId>org.zeroturnaround</groupId>
+ <artifactId>jrebel-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-rebel-xml</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <relativePath>../../../</relativePath>
+ <rootPath>$${rebel.root}</rootPath>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-template/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-template/pom.xml b/libraries/ldpath/ldpath-template/pom.xml
index d7ea7da..a2f5a15 100644
--- a/libraries/ldpath/ldpath-template/pom.xml
+++ b/libraries/ldpath/ldpath-template/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.marmotta</groupId>
<artifactId>marmotta-parent</artifactId>
- <version>3.1.0-incubating-SNAPSHOT</version>
+ <version>3.1.0-incubating</version>
<relativePath>../../../parent</relativePath>
</parent>
@@ -50,6 +50,27 @@
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin> <!-- generate JRebel Configuration -->
+ <groupId>org.zeroturnaround</groupId>
+ <artifactId>jrebel-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-rebel-xml</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <relativePath>../../../</relativePath>
+ <rootPath>$${rebel.root}</rootPath>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/engine/LDPathDirective.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/engine/LDPathDirective.java b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/engine/LDPathDirective.java
index 78902e8..d5deeaa 100644
--- a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/engine/LDPathDirective.java
+++ b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/engine/LDPathDirective.java
@@ -116,8 +116,9 @@ public class LDPathDirective<Node> implements TemplateDirectiveModel {
*
* @throws java.io.IOException
*/
+ @SuppressWarnings("unchecked")
@Override
- public void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException {
+ public void execute(Environment env, @SuppressWarnings("rawtypes") Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException {
TemplateStackModel contextStack = (TemplateStackModel)env.getVariable("context");
if(contextStack == null || contextStack.empty()) {
throw new TemplateModelException("error; no context node available");
@@ -147,7 +148,7 @@ public class LDPathDirective<Node> implements TemplateDirectiveModel {
path = path + ":: xsd:string";
}
try {
- Collection results = ldpath.pathTransform(context.getNode(),path,namespaces);
+ Collection<?> results = ldpath.pathTransform(context.getNode(),path,namespaces);
if(results.size() > 0) {
Object result = results.iterator().next();
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/engine/NamespaceDirective.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/engine/NamespaceDirective.java b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/engine/NamespaceDirective.java
index fc5ea85..a111963 100644
--- a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/engine/NamespaceDirective.java
+++ b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/engine/NamespaceDirective.java
@@ -70,6 +70,7 @@ public class NamespaceDirective implements TemplateDirectiveModel {
*
* @throws java.io.IOException
*/
+ @SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException {
TemplateWrapperModel<Map<String,String>> namespacesWrapped = (TemplateWrapperModel<Map<String,String>>)env.getGlobalVariable("namespaces");
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/engine/TemplateEngine.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/engine/TemplateEngine.java b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/engine/TemplateEngine.java
index d99d542..a10534e 100644
--- a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/engine/TemplateEngine.java
+++ b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/engine/TemplateEngine.java
@@ -28,7 +28,6 @@ import java.io.IOException;
import java.io.Writer;
import java.util.HashMap;
import java.util.Map;
-import java.util.Set;
import org.apache.marmotta.ldpath.api.backend.RDFBackend;
import org.apache.marmotta.ldpath.template.model.freemarker.TemplateNodeModel;
@@ -52,6 +51,7 @@ public class TemplateEngine<Node> {
this.backend = backend;
freemarker = new Configuration();
+ freemarker.setDefaultEncoding("utf-8");
freemarker.setObjectWrapper(new DefaultObjectWrapper());
@@ -77,7 +77,7 @@ public class TemplateEngine<Node> {
freemarker.setServletContextForTemplateLoading(sctxt, path);
}
- public void setClassForTemplateLoading(Class clazz, String pathPrefix) {
+ public void setClassForTemplateLoading(Class<?> clazz, String pathPrefix) {
freemarker.setClassForTemplateLoading(clazz, pathPrefix);
}
@@ -109,26 +109,26 @@ public class TemplateEngine<Node> {
* @throws IOException
* @throws TemplateException
*/
- public void processFileTemplate(Node context, String templateName, Map initialEnv, Writer out) throws IOException, TemplateException {
+ public void processFileTemplate(Node context, String templateName, Map<String, ?> initialEnv, Writer out) throws IOException, TemplateException {
processTemplate(context,freemarker.getTemplate(templateName),initialEnv,out);
}
- private void processTemplate(Node context, Template template, Map initialEnv, Writer out) throws IOException, TemplateException {
- Map root = new HashMap();
+ private void processTemplate(Node context, Template template, Map<String, ?> initialEnv, Writer out) throws IOException, TemplateException {
+ Map<String, Object> root = new HashMap<>();
if(initialEnv != null) {
- for(Map.Entry entry : (Set<Map.Entry>) initialEnv.entrySet()) {
+ for(Map.Entry<String, ?> entry : initialEnv.entrySet()) {
root.put(entry.getKey(), entry.getValue());
}
}
root.put("namespace", new NamespaceDirective());
- root.put("evalLDPath",new LDPathMethod(backend));
- root.put("ldpath",new LDPathDirective(backend));
+ root.put("evalLDPath",new LDPathMethod<>(backend));
+ root.put("ldpath",new LDPathDirective<>(backend));
TemplateStackModel contexts = new TemplateStackModel();
- contexts.push(new TemplateNodeModel(context,backend));
+ contexts.push(new TemplateNodeModel<>(context,backend));
root.put("context",contexts);
template.process(root,out);
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/freemarker/TemplateNodeModel.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/freemarker/TemplateNodeModel.java b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/freemarker/TemplateNodeModel.java
index 91fc21c..6d369fa 100644
--- a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/freemarker/TemplateNodeModel.java
+++ b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/freemarker/TemplateNodeModel.java
@@ -105,7 +105,7 @@ public class TemplateNodeModel<Node> implements TemplateModel, TemplateHashModel
* class.
*/
@Override
- public Object getAdaptedObject(Class hint) {
+ public Object getAdaptedObject(@SuppressWarnings("rawtypes") Class hint) {
return node;
}
}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/freemarker/TemplateWrapperModel.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/freemarker/TemplateWrapperModel.java b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/freemarker/TemplateWrapperModel.java
index 90b066f..2f24609 100644
--- a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/freemarker/TemplateWrapperModel.java
+++ b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/freemarker/TemplateWrapperModel.java
@@ -50,7 +50,7 @@ public class TemplateWrapperModel<T> implements AdapterTemplateModel {
* class.
*/
@Override
- public T getAdaptedObject(Class hint) {
+ public T getAdaptedObject(@SuppressWarnings("rawtypes") Class hint) {
return object;
}
}
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateBooleanTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateBooleanTransformer.java b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateBooleanTransformer.java
index b6df026..551da4e 100644
--- a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateBooleanTransformer.java
+++ b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateBooleanTransformer.java
@@ -17,7 +17,7 @@
*/
package org.apache.marmotta.ldpath.template.model.transformers;
-import org.apache.marmotta.ldpath.api.backend.NodeBackend;
+import org.apache.marmotta.ldpath.api.backend.RDFBackend;
import org.apache.marmotta.ldpath.api.transformers.NodeTransformer;
import org.apache.marmotta.ldpath.model.transformers.BooleanTransformer;
@@ -45,12 +45,14 @@ public class TemplateBooleanTransformer<Node> implements NodeTransformer<Templat
* carrying out the transformation.
*
*
+ *
+ * @param nodeRDFBackend
* @param node
* @param configuration
* @return
*/
@Override
- public TemplateBooleanModel transform(final NodeBackend<Node> nodeRDFBackend, final Node node, final Map<String, String> configuration) throws IllegalArgumentException {
+ public TemplateBooleanModel transform(final RDFBackend<Node> nodeRDFBackend, final Node node, final Map<String, String> configuration) throws IllegalArgumentException {
return new TemplateBooleanModel() {
@Override
public boolean getAsBoolean() throws TemplateModelException {
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateDateTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateDateTransformer.java b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateDateTransformer.java
index 57f0a70..d934994 100644
--- a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateDateTransformer.java
+++ b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateDateTransformer.java
@@ -23,7 +23,7 @@ import freemarker.template.TemplateModelException;
import java.util.Date;
import java.util.Map;
-import org.apache.marmotta.ldpath.api.backend.NodeBackend;
+import org.apache.marmotta.ldpath.api.backend.RDFBackend;
import org.apache.marmotta.ldpath.api.transformers.NodeTransformer;
import org.apache.marmotta.ldpath.model.transformers.DateTimeTransformer;
@@ -52,12 +52,14 @@ public class TemplateDateTransformer<Node> implements NodeTransformer<TemplateDa
* carrying out the transformation.
*
*
+ *
+ * @param nodeRDFBackend
* @param node
* @param configuration
* @return
*/
@Override
- public TemplateDateModel transform(final NodeBackend<Node> nodeRDFBackend, final Node node, final Map<String, String> configuration) throws IllegalArgumentException {
+ public TemplateDateModel transform(final RDFBackend<Node> nodeRDFBackend, final Node node, final Map<String, String> configuration) throws IllegalArgumentException {
return new TemplateDateModel() {
@Override
public Date getAsDate() throws TemplateModelException {
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateDoubleTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateDoubleTransformer.java b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateDoubleTransformer.java
index 594ea93..f5ffddb 100644
--- a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateDoubleTransformer.java
+++ b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateDoubleTransformer.java
@@ -17,7 +17,7 @@
*/
package org.apache.marmotta.ldpath.template.model.transformers;
-import org.apache.marmotta.ldpath.api.backend.NodeBackend;
+import org.apache.marmotta.ldpath.api.backend.RDFBackend;
import org.apache.marmotta.ldpath.api.transformers.NodeTransformer;
import org.apache.marmotta.ldpath.model.transformers.DoubleTransformer;
@@ -47,12 +47,14 @@ public class TemplateDoubleTransformer<Node> implements NodeTransformer<Template
* carrying out the transformation.
*
*
+ *
+ * @param nodeRDFBackend
* @param node
* @param configuration
* @return
*/
@Override
- public TemplateNumberModel transform(final NodeBackend<Node> nodeRDFBackend, final Node node, final Map<String, String> configuration) throws IllegalArgumentException {
+ public TemplateNumberModel transform(final RDFBackend<Node> nodeRDFBackend, final Node node, final Map<String, String> configuration) throws IllegalArgumentException {
return new TemplateNumberModel() {
@Override
public Number getAsNumber() throws TemplateModelException {
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateFloatTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateFloatTransformer.java b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateFloatTransformer.java
index d8d2c2a..bc3e206 100644
--- a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateFloatTransformer.java
+++ b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateFloatTransformer.java
@@ -17,7 +17,7 @@
*/
package org.apache.marmotta.ldpath.template.model.transformers;
-import org.apache.marmotta.ldpath.api.backend.NodeBackend;
+import org.apache.marmotta.ldpath.api.backend.RDFBackend;
import org.apache.marmotta.ldpath.api.transformers.NodeTransformer;
import org.apache.marmotta.ldpath.model.transformers.FloatTransformer;
@@ -45,12 +45,14 @@ public class TemplateFloatTransformer<Node> implements NodeTransformer<TemplateN
* carrying out the transformation.
*
*
+ *
+ * @param nodeRDFBackend
* @param node
* @param configuration
* @return
*/
@Override
- public TemplateNumberModel transform(final NodeBackend<Node> nodeRDFBackend, final Node node, final Map<String, String> configuration) throws IllegalArgumentException {
+ public TemplateNumberModel transform(final RDFBackend<Node> nodeRDFBackend, final Node node, final Map<String, String> configuration) throws IllegalArgumentException {
return new TemplateNumberModel() {
@Override
public Number getAsNumber() throws TemplateModelException {
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateIntegerTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateIntegerTransformer.java b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateIntegerTransformer.java
index 5df8bd6..760ce99 100644
--- a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateIntegerTransformer.java
+++ b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateIntegerTransformer.java
@@ -17,7 +17,7 @@
*/
package org.apache.marmotta.ldpath.template.model.transformers;
-import org.apache.marmotta.ldpath.api.backend.NodeBackend;
+import org.apache.marmotta.ldpath.api.backend.RDFBackend;
import org.apache.marmotta.ldpath.api.transformers.NodeTransformer;
import org.apache.marmotta.ldpath.model.transformers.IntTransformer;
@@ -45,12 +45,14 @@ public class TemplateIntegerTransformer<Node> implements NodeTransformer<Templat
* carrying out the transformation.
*
*
+ *
+ * @param nodeRDFBackend
* @param node
* @param configuration
* @return
*/
@Override
- public TemplateNumberModel transform(final NodeBackend<Node> nodeRDFBackend, final Node node, final Map<String, String> configuration) throws IllegalArgumentException {
+ public TemplateNumberModel transform(final RDFBackend<Node> nodeRDFBackend, final Node node, final Map<String, String> configuration) throws IllegalArgumentException {
return new TemplateNumberModel() {
@Override
public Number getAsNumber() throws TemplateModelException {
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateLongTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateLongTransformer.java b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateLongTransformer.java
index 9fc20b0..8f12d36 100644
--- a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateLongTransformer.java
+++ b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateLongTransformer.java
@@ -17,7 +17,7 @@
*/
package org.apache.marmotta.ldpath.template.model.transformers;
-import org.apache.marmotta.ldpath.api.backend.NodeBackend;
+import org.apache.marmotta.ldpath.api.backend.RDFBackend;
import org.apache.marmotta.ldpath.api.transformers.NodeTransformer;
import org.apache.marmotta.ldpath.model.transformers.LongTransformer;
@@ -33,10 +33,10 @@ import java.util.Map;
*/
public class TemplateLongTransformer<Node> implements NodeTransformer<TemplateNumberModel,Node> {
- private LongTransformer delegate;
+ private LongTransformer<Node> delegate;
public TemplateLongTransformer() {
- delegate = new LongTransformer();
+ delegate = new LongTransformer<>();
}
/**
@@ -45,12 +45,14 @@ public class TemplateLongTransformer<Node> implements NodeTransformer<TemplateNu
* carrying out the transformation.
*
*
+ *
+ * @param nodeRDFBackend
* @param node
* @param configuration
* @return
*/
@Override
- public TemplateNumberModel transform(final NodeBackend<Node> nodeRDFBackend, final Node node, final Map<String, String> configuration) throws IllegalArgumentException {
+ public TemplateNumberModel transform(final RDFBackend<Node> nodeRDFBackend, final Node node, final Map<String, String> configuration) throws IllegalArgumentException {
return new TemplateNumberModel() {
@Override
public Number getAsNumber() throws TemplateModelException {
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateScalarTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateScalarTransformer.java b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateScalarTransformer.java
index 980a030..bc6d711 100644
--- a/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateScalarTransformer.java
+++ b/libraries/ldpath/ldpath-template/src/main/java/org/apache/marmotta/ldpath/template/model/transformers/TemplateScalarTransformer.java
@@ -17,7 +17,7 @@
*/
package org.apache.marmotta.ldpath.template.model.transformers;
-import org.apache.marmotta.ldpath.api.backend.NodeBackend;
+import org.apache.marmotta.ldpath.api.backend.RDFBackend;
import org.apache.marmotta.ldpath.api.transformers.NodeTransformer;
import org.apache.marmotta.ldpath.model.transformers.StringTransformer;
@@ -46,12 +46,14 @@ public class TemplateScalarTransformer<Node> implements NodeTransformer<Template
* carrying out the transformation.
*
*
+ *
+ * @param nodeRDFBackend
* @param node
* @param configuration
* @return
*/
@Override
- public TemplateScalarModel transform(final NodeBackend<Node> nodeRDFBackend, final Node node, final Map<String, String> configuration) throws IllegalArgumentException {
+ public TemplateScalarModel transform(final RDFBackend<Node> nodeRDFBackend, final Node node, final Map<String, String> configuration) throws IllegalArgumentException {
return new TemplateScalarModel() {
@Override
public String getAsString() throws TemplateModelException {
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/ldpath/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/pom.xml b/libraries/ldpath/pom.xml
index 99568d2..42eaaa3 100644
--- a/libraries/ldpath/pom.xml
+++ b/libraries/ldpath/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.marmotta</groupId>
<artifactId>marmotta-parent</artifactId>
- <version>3.1.0-incubating-SNAPSHOT</version>
+ <version>3.1.0-incubating</version>
<relativePath>../../parent</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/marmotta/blob/582abb5b/libraries/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/pom.xml b/libraries/pom.xml
index a3dbffd..9c1079c 100644
--- a/libraries/pom.xml
+++ b/libraries/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.marmotta</groupId>
<artifactId>marmotta-parent</artifactId>
- <version>3.1.0-incubating-SNAPSHOT</version>
+ <version>3.1.0-incubating</version>
<relativePath>../parent</relativePath>
</parent>