marmotta-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ja...@apache.org
Subject [13/19] MARMOTTA-104: renamed packages in ldpath (resolved)
Date Thu, 21 Feb 2013 11:23:28 GMT
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/PathTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/PathTest.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/PathTest.java
deleted file mode 100644
index c6e8606..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/PathTest.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.tests;
-
-import at.newmedialab.ldpath.api.backend.RDFBackend;
-import at.newmedialab.ldpath.api.selectors.NodeSelector;
-import at.newmedialab.ldpath.api.tests.NodeTest;
-
-import java.util.Collection;
-
-/**
- * Tests whether the path given as argument for the constructor yields at least one node when evaluated
- * from the context node to which the test is applied.
- * <p/>
- * Author: Sebastian Schaffert <sebastian.schaffert@salzburgresearch.at>
- */
-public class PathTest<Node> extends NodeTest<Node> {
-
-    private NodeSelector<Node> path;
-
-    public PathTest(NodeSelector<Node> path) {
-        this.path = path;
-    }
-
-    /**
-     * Apply the function to the list of nodes passed as arguments and return the result as type T.
-     * Throws IllegalArgumentException if the function cannot be applied to the nodes passed as argument
-     * or the number of arguments is not correct.
-     *
-     * @param args a nested list of KiWiNodes
-     * @return
-     */
-    @Override
-    public boolean accept(RDFBackend<Node> rdfBackend, Node context, Node candidate) throws IllegalArgumentException {
-
-        if (rdfBackend.isURI(candidate) || rdfBackend.isBlank(candidate)) {
-            Collection<Node> testResult = path.select(rdfBackend, candidate,null,null);
-            return testResult.size() > 0;
-        } else {
-            return false;
-        }
-
-    }
-
-    /**
-     * Return the representation of the NodeFunction or NodeSelector in the RDF Path Language
-     *
-     * @param rdfBackend
-     * @return
-     */
-    @Override
-    public String getPathExpression(RDFBackend<Node> rdfBackend) {
-        return path.getPathExpression(rdfBackend);
-    }
-
-    /**
-     * A string describing the signature of this node function, e.g. "fn:content(uris : Nodes) : Nodes". The
-     * syntax for representing the signature can be chosen by the implementer. This method is for informational
-     * purposes only.
-     *
-     * @return
-     */
-    @Override
-    public String getSignature() {
-        return "nodes :: NodeList -> Boolean";
-    }
-
-    /**
-     * A short human-readable description of what the node function does.
-     *
-     * @return
-     */
-    @Override
-    public String getDescription() {
-        return "Tests whether the node list is non-empty";
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) { return true; }
-        if (o == null || getClass() != o.getClass()) { return false; }
-
-        @SuppressWarnings("rawtypes")
-        PathTest pathTest = (PathTest) o;
-
-        if (path != null ? !path.equals(pathTest.path) : pathTest.path != null) { return false; }
-
-        return true;
-    }
-
-    @Override
-    public int hashCode() {
-        return path != null ? path.hashCode() : 0;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/BinaryNumericTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/BinaryNumericTest.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/BinaryNumericTest.java
deleted file mode 100644
index bb715c6..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/BinaryNumericTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.tests.functions;
-
-import at.newmedialab.ldpath.api.backend.RDFBackend;
-import at.newmedialab.ldpath.api.functions.TestFunction;
-import at.newmedialab.ldpath.model.transformers.DoubleTransformer;
-
-import java.util.Collection;
-
-public abstract  class BinaryNumericTest<Node> extends TestFunction<Node> {
-
-
-    protected final DoubleTransformer<Node> transformer = new DoubleTransformer<Node>();
-
-    @Override
-    public final Boolean apply(RDFBackend<Node> backend, Node context,
-            Collection<Node>... args) throws IllegalArgumentException {
-
-        if (args.length != 2) { throw new IllegalArgumentException(getLocalName() + " is a binary function and therefor requires exactly two arguments"); }
-
-        Collection<Node> leftArgs = args[0];
-        Collection<Node> rightArgs = args[1];
-
-        for (Node lN : leftArgs) {
-            for (Node rN : rightArgs) {
-                if (!test(backend, lN, rN)) {
-                    return false;
-                }
-            }
-        }
-        return true;
-    }
-
-    protected boolean test(RDFBackend<Node> backend, Node leftNode, Node rightNode) {
-        try {
-            return test(transformer.transform(backend, leftNode), transformer.transform(backend, rightNode));
-        } catch (IllegalArgumentException e) {
-            return false;
-        }
-    }
-
-    protected abstract boolean test(Double left, Double right);
-
-    @Override
-    public String getSignature() {
-        return "fn:"+getLocalName()+"(NumericNode a, NumericNode b) :: Boolean";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/EqualTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/EqualTest.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/EqualTest.java
deleted file mode 100644
index 5436b4b..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/EqualTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.tests.functions;
-
-
-public class EqualTest<Node> extends BinaryNumericTest<Node> {
-
-	@Override
-	protected boolean test(Double left, Double right) {
-		return left.compareTo(right) == 0;
-	}
-
-	@Override
-    public String getDescription() {
-		return "Check whether the two arguments are (numerical) equal";
-	}
-
-	@Override
-	public String getLocalName() {
-		return "eq";
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/GreaterEqualTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/GreaterEqualTest.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/GreaterEqualTest.java
deleted file mode 100644
index c0a8e20..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/GreaterEqualTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.tests.functions;
-
-
-public class GreaterEqualTest<Node> extends BinaryNumericTest<Node> {
-
-
-    @Override
-    protected boolean test(Double left, Double right) {
-        return left.compareTo(right) >= 0;
-    }
-
-    @Override
-    public String getDescription() {
-        return "Check whether the first argument is greater than or equal the second";
-    }
-
-    @Override
-    public String getLocalName() {
-        return "ge";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/GreaterThanTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/GreaterThanTest.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/GreaterThanTest.java
deleted file mode 100644
index 026d5c8..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/GreaterThanTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.tests.functions;
-
-
-public class GreaterThanTest<Node> extends BinaryNumericTest<Node> {
-
-
-	@Override
-	protected boolean test(Double left, Double right) {
-		return left.compareTo(right) > 0;
-	}
-
-	@Override
-    public String getDescription() {
-		return "Check whether the first argument is greater than the second";
-	}
-
-	@Override
-	public String getLocalName() {
-		return "gt";
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/LessEqualTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/LessEqualTest.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/LessEqualTest.java
deleted file mode 100644
index f33fc70..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/LessEqualTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.tests.functions;
-
-
-public class LessEqualTest<Node> extends BinaryNumericTest<Node> {
-
-
-    @Override
-    protected boolean test(Double left, Double right) {
-        return left.compareTo(right) <= 0;
-    }
-
-    @Override
-    public String getDescription() {
-        return "Check whether the first argument is less than or equal the second";
-    }
-
-    @Override
-    public String getLocalName() {
-        return "le";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/LessThanTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/LessThanTest.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/LessThanTest.java
deleted file mode 100644
index 767c88c..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/LessThanTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.tests.functions;
-
-
-public class LessThanTest<Node> extends BinaryNumericTest<Node> {
-
-    @Override
-    protected boolean test(Double left, Double right) {
-        return left.compareTo(right) < 0;
-    }
-
-    @Override
-    public String getDescription() {
-        return "Check whether the first argument is less than the second";
-    }
-
-    @Override
-    public String getLocalName() {
-        return "lt";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/NotEqualTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/NotEqualTest.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/NotEqualTest.java
deleted file mode 100644
index 0ce7b55..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/tests/functions/NotEqualTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.tests.functions;
-
-
-public class NotEqualTest<Node> extends BinaryNumericTest<Node> {
-
-	@Override
-	protected boolean test(Double left, Double right) {
-		return left.compareTo(right) != 0;
-	}
-
-	@Override
-    public String getDescription() {
-		return "Check whether the two arguments are (numerical) different";
-	}
-
-	@Override
-	public String getLocalName() {
-		return "ne";
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/BigDecimalTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/BigDecimalTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/BigDecimalTransformer.java
deleted file mode 100644
index a6d62b6..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/BigDecimalTransformer.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.transformers;
-
-import at.newmedialab.ldpath.api.backend.RDFBackend;
-import at.newmedialab.ldpath.api.transformers.NodeTransformer;
-
-import java.math.BigDecimal;
-
-public class BigDecimalTransformer<Node> implements NodeTransformer<BigDecimal,Node> {
-
-    @Override
-    public BigDecimal transform(RDFBackend<Node> backend, Node node) throws IllegalArgumentException {
-        if(backend.isLiteral(node)) {
-            return backend.decimalValue(node);
-        } else {
-            throw new IllegalArgumentException("cannot transform node of type "+node.getClass().getCanonicalName()+" to BigDecimal");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/BigIntegerTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/BigIntegerTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/BigIntegerTransformer.java
deleted file mode 100644
index cb33a70..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/BigIntegerTransformer.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.transformers;
-
-import java.math.BigInteger;
-
-import at.newmedialab.ldpath.api.backend.RDFBackend;
-import at.newmedialab.ldpath.api.transformers.NodeTransformer;
-
-public class BigIntegerTransformer<Node> implements NodeTransformer<BigInteger,Node> {
-
-    @Override
-    public BigInteger transform(RDFBackend<Node> backend, Node node) throws IllegalArgumentException {
-        if(backend.isLiteral(node)) {
-            return backend.integerValue(node);
-        } else {
-            throw new IllegalArgumentException("cannot transform node of type "+node.getClass().getCanonicalName()+" to BigInteger");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/BooleanTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/BooleanTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/BooleanTransformer.java
deleted file mode 100644
index d83b7e1..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/BooleanTransformer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.transformers;
-
-import at.newmedialab.ldpath.api.backend.RDFBackend;
-import at.newmedialab.ldpath.api.transformers.NodeTransformer;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert <sebastian.schaffert@salzburgresearch.at>
- */
-public class BooleanTransformer<Node> implements NodeTransformer<Boolean,Node> {
-
-
-    /**
-     * Transform the KiWiNode node into the datatype T. In case the node cannot be transformed to
-     * the respective datatype, throws an IllegalArgumentException that needs to be caught by the class
-     * carrying out the transformation.
-     *
-     * @param node
-     * @return
-     */
-    @Override
-    public Boolean transform(RDFBackend<Node> rdfBackend, Node node) throws IllegalArgumentException {
-        if(rdfBackend.isLiteral(node)) {
-            return rdfBackend.booleanValue(node);
-        } else {
-            throw new IllegalArgumentException("cannot transform node of type "+node.getClass().getCanonicalName()+" to boolean");
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/ByteTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/ByteTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/ByteTransformer.java
deleted file mode 100644
index 885688e..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/ByteTransformer.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.transformers;
-
-import at.newmedialab.ldpath.api.backend.RDFBackend;
-import at.newmedialab.ldpath.api.transformers.NodeTransformer;
-
-public class ByteTransformer<Node> implements NodeTransformer<Byte,Node> {
-
-    @Override
-    public Byte transform(RDFBackend<Node> backend, Node node) throws IllegalArgumentException {
-        if(backend.isLiteral(node)) {
-            return backend.decimalValue(node).byteValueExact();
-        } else {
-            throw new IllegalArgumentException("cannot transform node of type "+
-                node.getClass().getCanonicalName()+" to byte");
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/DateTimeTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/DateTimeTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/DateTimeTransformer.java
deleted file mode 100644
index fc0ee61..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/DateTimeTransformer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.transformers;
-
-import at.newmedialab.ldpath.api.backend.RDFBackend;
-import at.newmedialab.ldpath.api.transformers.NodeTransformer;
-
-import java.util.Date;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert <sebastian.schaffert@salzburgresearch.at>
- */
-public class DateTimeTransformer<Node> implements NodeTransformer<Date,Node> {
-
-    /**
-     * Transform the KiWiNode node into the datatype T. In case the node cannot be transformed to
-     * the respective datatype, throws an IllegalArgumentException that needs to be caught by the class
-     * carrying out the transformation.
-     *
-     * @param node
-     * @return
-     */
-    @Override
-    public Date transform(RDFBackend<Node> rdfBackend, Node node) throws IllegalArgumentException {
-        if(rdfBackend.isLiteral(node)) {
-            return rdfBackend.dateTimeValue(node);
-        } else {
-            throw new IllegalArgumentException("could not parse node, because it is not a literal");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/DateTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/DateTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/DateTransformer.java
deleted file mode 100644
index 372a615..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/DateTransformer.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.transformers;
-
-import at.newmedialab.ldpath.api.backend.RDFBackend;
-import at.newmedialab.ldpath.api.transformers.NodeTransformer;
-import java.util.Date;
-
-/**
- * TODO: is this a duplicate of DateTimeTransformer?
- * <p/>
- * Author: Sebastian Schaffert <sebastian.schaffert@salzburgresearch.at>
- */
-public class DateTransformer<Node> implements NodeTransformer<Date,Node> {
-
-    /**
-     * Transform the KiWiNode node into the datatype T. In case the node cannot be transformed to
-     * the respective datatype, throws an IllegalArgumentException that needs to be caught by the class
-     * carrying out the transformation.
-     *
-     * @param node
-     * @return
-     */
-    @Override
-    public Date transform(RDFBackend<Node> rdfBackend, Node node) throws IllegalArgumentException {
-        if(rdfBackend.isLiteral(node)) {
-            return rdfBackend.dateValue(node);
-        } else {
-            throw new IllegalArgumentException("could not parse node, because it is not a literal");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/DoubleTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/DoubleTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/DoubleTransformer.java
deleted file mode 100644
index dac4906..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/DoubleTransformer.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.transformers;
-
-import at.newmedialab.ldpath.api.backend.RDFBackend;
-import at.newmedialab.ldpath.api.transformers.NodeTransformer;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert <sebastian.schaffert@salzburgresearch.at>
- */
-public class DoubleTransformer<Node> implements NodeTransformer<Double,Node> {
-
-    /**
-     * Transform the KiWiNode node into the datatype T. In case the node cannot be transformed to
-     * the respective datatype, throws an IllegalArgumentException that needs to be caught by the class
-     * carrying out the transformation.
-     *
-     * @param node
-     * @return
-     */
-    @Override
-    public Double transform(RDFBackend<Node> rdfBackend, Node node) throws IllegalArgumentException {
-        if(rdfBackend.isLiteral(node)) {
-            return rdfBackend.doubleValue(node);
-        } else {
-            throw new IllegalArgumentException("cannot transform node of type "+node.getClass().getCanonicalName()+" to double");
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/DurationTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/DurationTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/DurationTransformer.java
deleted file mode 100644
index 697421b..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/DurationTransformer.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.transformers;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.Duration;
-
-import at.newmedialab.ldpath.api.backend.RDFBackend;
-import at.newmedialab.ldpath.api.transformers.NodeTransformer;
-
-/**
- * Transforms (and validates) the lexical value of a node to
- * {@link Duration}.
- * @author Rupert Westenthaler
- * @param <Node> the generic node type
- */
-public class DurationTransformer<Node> implements NodeTransformer<Duration,Node> {
-
-    /**
-     * Lazy initialisation to avoid Exceptions if {@link DatatypeConfigurationException}
-     * is thrown during initialisation of the Utility class.<p>
-     * Do not access directly! Use {@link #getXmlDataTypeFactory()} instead.
-     */
-    private static DatatypeFactory xmlDatatypeFactory;
-    /**
-     * Inits the {@link #xmlDatatypeFactory} if not already done.<p>
-     * @return the XML datatype factory
-     * @throws IllegalStateException if a {@link DatatypeConfigurationException}
-     * is encountered during {@link DatatypeFactory#newInstance()}
-     */
-    private static DatatypeFactory getXmlDataTypeFactory() throws IllegalStateException {
-        if(xmlDatatypeFactory == null){
-            try {
-                xmlDatatypeFactory = DatatypeFactory.newInstance();
-            } catch (DatatypeConfigurationException e) {
-                throw new IllegalStateException("Unable to instantiate XML Datatype Factory!",e);
-            }
-        }
-        return xmlDatatypeFactory;
-    }
-    @Override
-    public Duration transform(RDFBackend<Node> backend, Node node) throws IllegalArgumentException {
-        if(backend.isLiteral(node)) {
-            return toDuration(backend.stringValue(node), false);
-        } else {
-            throw new IllegalArgumentException("cannot transform node of type "+
-                node.getClass().getCanonicalName()+" to byte");
-        }
-    }
-    
-    private static Duration toDuration(String value, boolean nullAsZeroDuration) throws IllegalArgumentException,IllegalStateException{
-        if(value == null){
-            if(nullAsZeroDuration){
-                return getXmlDataTypeFactory().newDuration(0);
-            } else {
-                throw new IllegalArgumentException("The parsed value MUST NOT be NULL. Parse \"boolean nullAsZeroDuration=true\" to enable creation of zero lenght durations for NULL values!");
-            }
-        } else {
-            return getXmlDataTypeFactory().newDuration(value);
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/FloatTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/FloatTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/FloatTransformer.java
deleted file mode 100644
index 61e44ec..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/FloatTransformer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.transformers;
-
-import at.newmedialab.ldpath.api.backend.RDFBackend;
-import at.newmedialab.ldpath.api.transformers.NodeTransformer;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert <sebastian.schaffert@salzburgresearch.at>
- */
-public class FloatTransformer<Node> implements NodeTransformer<Float,Node> {
-
-    /**
-     * Transform the KiWiNode node into the datatype T. In case the node cannot be transformed to
-     * the respective datatype, throws an IllegalArgumentException that needs to be caught by the class
-     * carrying out the transformation.
-     *
-     * @param node
-     * @return
-     */
-    @Override
-    public Float transform(RDFBackend<Node> rdfBackend, Node node) throws IllegalArgumentException {
-        if(rdfBackend.isLiteral(node)) {
-            return rdfBackend.floatValue(node);
-        } else {
-            throw new IllegalArgumentException("cannot transform node of type "+node.getClass().getCanonicalName()+" to float");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/IdentityTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/IdentityTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/IdentityTransformer.java
deleted file mode 100644
index 70bb7db..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/IdentityTransformer.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.transformers;
-
-import at.newmedialab.ldpath.api.backend.RDFBackend;
-import at.newmedialab.ldpath.api.transformers.NodeTransformer;
-
-/**
- * A very simple transformer that only returns the node itself. Used in case no transformer is given in a
- * field mapping.
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class IdentityTransformer<Node> implements NodeTransformer<Node,Node> {
-
-    /**
-     * Transform the KiWiNode node into the datatype T. In case the node cannot be transformed to
-     * the respective datatype, throws an IllegalArgumentException that needs to be caught by the class
-     * carrying out the transformation.
-     *
-     * @param node
-     * @return
-     */
-    @Override
-    public Node transform(RDFBackend<Node> nodeRDFBackend, Node node) throws IllegalArgumentException {
-        return node;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/IntTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/IntTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/IntTransformer.java
deleted file mode 100644
index 8cb20ff..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/IntTransformer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.transformers;
-
-import at.newmedialab.ldpath.api.backend.RDFBackend;
-import at.newmedialab.ldpath.api.transformers.NodeTransformer;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert <sebastian.schaffert@salzburgresearch.at>
- */
-public class IntTransformer<Node> implements NodeTransformer<Integer,Node> {
-
-
-    /**
-     * Transform the KiWiNode node into the datatype T. In case the node cannot be transformed to
-     * the respective datatype, throws an IllegalArgumentException that needs to be caught by the class
-     * carrying out the transformation.
-     *
-     * @param node
-     * @return
-     */
-    @Override
-    public Integer transform(RDFBackend<Node> rdfBackend, Node node) throws IllegalArgumentException {
-        if(rdfBackend.isLiteral(node)) {
-            return rdfBackend.intValue(node);
-        } else {
-            throw new IllegalArgumentException("cannot transform node of type "+node.getClass().getCanonicalName()+" to integer");
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/LongTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/LongTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/LongTransformer.java
deleted file mode 100644
index 3528012..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/LongTransformer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.transformers;
-
-import at.newmedialab.ldpath.api.backend.RDFBackend;
-import at.newmedialab.ldpath.api.transformers.NodeTransformer;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert <sebastian.schaffert@salzburgresearch.at>
- */
-public class LongTransformer<Node> implements NodeTransformer<Long,Node> {
-
-    /**
-     * Transform the KiWiNode node into the datatype T. In case the node cannot be transformed to
-     * the respective datatype, throws an IllegalArgumentException that needs to be caught by the class
-     * carrying out the transformation.
-     *
-     * @param node
-     * @return
-     */
-    @Override
-    public Long transform(RDFBackend<Node> rdfBackend, Node node) throws IllegalArgumentException {
-        if(rdfBackend.isLiteral(node)) {
-            return rdfBackend.longValue(node);
-        } else {
-            throw new IllegalArgumentException("cannot transform node of type "+node.getClass().getCanonicalName()+" to long");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/ShortTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/ShortTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/ShortTransformer.java
deleted file mode 100644
index de73a35..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/ShortTransformer.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.transformers;
-
-import at.newmedialab.ldpath.api.backend.RDFBackend;
-import at.newmedialab.ldpath.api.transformers.NodeTransformer;
-
-public class ShortTransformer<Node> implements NodeTransformer<Short,Node> {
-
-    @Override
-    public Short transform(RDFBackend<Node> backend, Node node) throws IllegalArgumentException {
-        if(backend.isLiteral(node)) {
-            return backend.decimalValue(node).shortValueExact();
-        } else {
-            throw new IllegalArgumentException("cannot transform node of type "+
-                node.getClass().getCanonicalName()+" to short");
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/StringTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/StringTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/StringTransformer.java
deleted file mode 100644
index 4a70c39..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/StringTransformer.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.transformers;
-
-import at.newmedialab.ldpath.api.backend.RDFBackend;
-import at.newmedialab.ldpath.api.transformers.NodeTransformer;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert <sebastian.schaffert@salzburgresearch.at>
- */
-public class StringTransformer<Node> implements NodeTransformer<String,Node> {
-
-
-    /**
-     * Transform the KiWiNode node into the datatype T. In case the node cannot be transformed to
-     * the respective datatype, throws an IllegalArgumentException that needs to be caught by the class
-     * carrying out the transformation.
-     *
-     * @param node
-     * @return
-     */
-    @Override
-    public String transform(RDFBackend<Node> backend, Node node) throws IllegalArgumentException {
-        return backend.stringValue(node);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/TimeTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/TimeTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/TimeTransformer.java
deleted file mode 100644
index 15e2d29..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/model/transformers/TimeTransformer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.model.transformers;
-
-import at.newmedialab.ldpath.api.backend.RDFBackend;
-import at.newmedialab.ldpath.api.transformers.NodeTransformer;
-
-import java.util.Date;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert <sebastian.schaffert@salzburgresearch.at>
- */
-public class TimeTransformer<Node> implements NodeTransformer<Date,Node> {
-
-    /**
-     * Transform the KiWiNode node into the datatype T. In case the node cannot be transformed to
-     * the respective datatype, throws an IllegalArgumentException that needs to be caught by the class
-     * carrying out the transformation.
-     *
-     * @param node
-     * @return
-     */
-    @Override
-    public Date transform(RDFBackend<Node> rdfBackend, Node node) throws IllegalArgumentException {
-        if(rdfBackend.isLiteral(node)) {
-            return rdfBackend.timeValue(node);
-        } else {
-            throw new IllegalArgumentException("could not parse node, because it is not a literal");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/parser/Configuration.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/parser/Configuration.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/parser/Configuration.java
deleted file mode 100644
index 80445cf..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/parser/Configuration.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.parser;
-
-import at.newmedialab.ldpath.api.functions.SelectorFunction;
-import at.newmedialab.ldpath.api.functions.TestFunction;
-import at.newmedialab.ldpath.api.transformers.NodeTransformer;
-import at.newmedialab.ldpath.model.Constants;
-import at.newmedialab.ldpath.model.tests.functions.EqualTest;
-import com.google.common.collect.ImmutableMap;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * A generic configuration object for LDPath parsers. Contains default settings for namespaces, functions,
- * and transformers to be used by all parser instances.
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class Configuration<Node> {
-
-    private static Logger log = LoggerFactory.getLogger(Configuration.class);
-
-    /**
-     * A map from namespace prefixes to namespace URIs
-     */
-    protected Map<String,String> namespaces;
-
-    /**
-     * A map from type URIs (e.g. XSD Schema Types) to LDPath transformer instances
-     */
-    protected Map<String, NodeTransformer<?,Node>> transformers;
-
-    /**
-     * A map from function URIs (e.g. LMF functions) to LDPath selector function instances
-     */
-    protected Map<String, SelectorFunction<Node>> functions;
-
-    /**
-     * A map from function URIs (e.g. LMF functions) to LDPath test function instances
-     */
-    protected Map<String, TestFunction<Node>> testFunctions;
-
-    public Configuration() {
-        namespaces   = new HashMap<String,String>();
-        transformers = new HashMap<String, NodeTransformer<?, Node>>();
-        functions    = new HashMap<String, SelectorFunction<Node>>();
-        testFunctions = new HashMap<String, TestFunction<Node>>();
-    }
-
-    /**
-     * Return an immutable map of the registered namespaces.
-     *
-     * @return an {@link ImmutableMap} of the registered namespaces.
-     */
-    public Map<String, String> getNamespaces() {
-        return ImmutableMap.copyOf(namespaces);
-    }
-
-    /**
-     * Return an immutable map of the registered transformers.
-     *
-     * @return an {@link ImmutableMap} of the registered transformers.
-     */
-    public Map<String, NodeTransformer<?, Node>> getTransformers() {
-        return ImmutableMap.copyOf(transformers);
-    }
-
-    /**
-     * Return an immutable map of the registered functions.
-     *
-     * @return an {@link ImmutableMap} of the registered {@link SelectorFunction}s.
-     */
-    public Map<String, SelectorFunction<Node>> getFunctions() {
-        return ImmutableMap.copyOf(functions);
-    }
-
-    /**
-     * Return an immutable map of the registered function tests.
-     * 
-     * @return an {@link ImmutableMap} of the registered {@link TestFunction}s.
-     */
-    public Map<String, TestFunction<Node>> getTestFunctions() {
-        return ImmutableMap.copyOf(testFunctions);
-    }
-
-    /**
-     * Add a namespace prefix to URI mapping to this configuration.
-     *
-     * @param prefix the namespace prefix to be used for the URI as a string
-     * @param uri    the URI of the namespace to map to as a string
-     */
-    public void addNamespace(String prefix, String uri) {
-        namespaces.put(prefix,uri);
-    }
-
-    /**
-     * Remove the namespace with the prefix given as argument.
-     *
-     * @param prefix the namespace prefix to remove as a string
-     */
-    public void removeNamespace(String prefix) {
-        namespaces.remove(prefix);
-    }
-
-    /**
-     * Add a mapping from a URI to a {@link SelectorFunction} implementation to the configuration.
-     * Registered selector functions will be available under their URIs during program parsing.
-     * Function calls are not thread safe and the order of function calls is not predictable;
-     * they should therefore not hold any state.
-     * <p/>
-     * Example:<br/>
-     * <code>fn:concat(...)</code> is a mapping from http://www.newmedialab.at/lmf/functions/1.0/ to an instance
-     * of {@link at.newmedialab.ldpath.model.functions.ConcatenateFunction}
-     * <p/>
-     * Note that currently you can only use the http://www.newmedialab.at/lmf/functions/1.0/ namespace for
-     * registering functions.
-     *
-     * @param uri      the URI under which to register the selector function as a string
-     * @param function an instance of the selector function implementation to use for this URI
-     */
-    public void addFunction(String uri, SelectorFunction<Node> function) {
-        if(!uri.startsWith(Constants.NS_LMF_FUNCS)) {
-            log.warn("Attempt to add a function from an external namespace: <{}>", uri);
-            throw new IllegalArgumentException("namespaces other than http://www.newmedialab.at/lmf/functions/1.0/ are currently not supported");
-        }
-        functions.put(uri,function);
-    }
-
-    /**
-     * Remove the function registered under the given URI.
-     *
-     * @param uri a string representing the URI under which the function has been registered.
-     */
-    public void removeFunction(String uri) {
-        functions.remove(uri);
-    }
-
-    /**
-     * Add a mapping from an URI to a {@link TestFunction} inplementation to the configuration.
-     * Registered test functions will be available under their URIs during program parsing.
-     * Function calls are not thread safe and the order of function calls in not predictable;
-     * they should therefore not hold any state.
-     * <p/>
-     * Example:<br/>
-     * <code>fn:eq(...)</code> is a mapping from http://www.newmedialab.at/lmf/functions/1.0/eq to an instance
-     * of {@link EqualTest}
-     * <p/>
-     * Note that currently you can only use the http://www.newmedialab.at/lmf/functions/1.0/ namespace for
-     * registering functions.
-     * 
-     * @param uri   the URI under which to register the selector function as a string
-     * @param test  an instance of the test function implementation for this URI
-     */
-    public void addTestFunction(String uri, TestFunction<Node> test) {
-        if(!uri.startsWith(Constants.NS_LMF_FUNCS)) {
-            log.warn("Attempt to add a test function from an external namespace: <{}>", uri);
-            throw new IllegalArgumentException("namespaces other than http://www.newmedialab.at/lmf/functions/1.0/ are currently not supported");
-        }
-        testFunctions.put(uri,test);
-    }
-
-    /**
-     * Remove the test function registered under the given URI.
-     *
-     * @param uri a string representing the URI under which the test function has been registered.
-     */
-    public void removeTestFunction(String uri) {
-        testFunctions.remove(uri);
-    }
-
-    /**
-     * Add a mapping from a type URI to a {@link NodeTransformer}. The values of fields with a
-     * type specification with this URI will be transformed to other Java types using this transformer.
-     * <p/>
-     * Example:<br/>
-     * <code>... :: xsd:int</code> will transform the values of the field to Java integer values using
-     * an instance of {@link at.newmedialab.ldpath.model.transformers.IntTransformer}
-     *
-     * @param uri         a string identifying the URI for which to register the transformer
-     * @param transformer
-     */
-    public void addTransformer(String uri, NodeTransformer<?,Node> transformer) {
-        transformers.put(uri,transformer);
-    }
-
-    /**
-     * Remove the transformer registered with the URI given as argument
-     * @param uri a string representing the URI under which the transformer is registered
-     */
-    public void removeTransformer(String uri) {
-        transformers.remove(uri);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/parser/DefaultConfiguration.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/parser/DefaultConfiguration.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/parser/DefaultConfiguration.java
deleted file mode 100644
index 02736cc..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/parser/DefaultConfiguration.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.parser;
-
-import at.newmedialab.ldpath.api.functions.SelectorFunction;
-import at.newmedialab.ldpath.api.functions.TestFunction;
-import at.newmedialab.ldpath.model.Constants;
-import at.newmedialab.ldpath.model.functions.ConcatenateFunction;
-import at.newmedialab.ldpath.model.functions.FirstFunction;
-import at.newmedialab.ldpath.model.functions.LastFunction;
-import at.newmedialab.ldpath.model.functions.SortFunction;
-import at.newmedialab.ldpath.model.transformers.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.ServiceLoader;
-import java.util.Set;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class DefaultConfiguration<Node> extends Configuration<Node> {
-
-    private static Logger log = LoggerFactory.getLogger(DefaultConfiguration.class);
-
-    @SuppressWarnings("rawtypes")
-    private static ServiceLoader<SelectorFunction> functionLoader = ServiceLoader.load(SelectorFunction.class);
-
-    @SuppressWarnings("rawtypes")
-    private static ServiceLoader<TestFunction> testLoader = ServiceLoader.load(TestFunction.class);
-
-    public static final Map<String, String> DEFAULT_NAMESPACES;
-    static {
-        HashMap<String, String> defNS = new HashMap<String, String>();
-        defNS.put("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#");
-        defNS.put("rdfs", "http://www.w3.org/2000/01/rdf-schema#");
-        defNS.put("owl", "http://www.w3.org/2002/07/owl#");
-        defNS.put("skos", "http://www.w3.org/2004/02/skos/core#");
-        defNS.put("foaf", "http://xmlns.com/foaf/0.1/");
-        defNS.put("dc", "http://purl.org/dc/elements/1.1/");
-        defNS.put("xsd", "http://www.w3.org/2001/XMLSchema#");
-        defNS.put("lmf", "http://www.newmedialab.at/lmf/types/1.0/");
-        defNS.put("fn", Constants.NS_LMF_FUNCS);
-        DEFAULT_NAMESPACES = Collections.unmodifiableMap(defNS);
-    }
-
-    public static final Set<Class<?>> DEFAULT_FUNCTIONS = new HashSet<Class<?>>();
-    static {
-        DEFAULT_FUNCTIONS.add(ConcatenateFunction.class);
-        DEFAULT_FUNCTIONS.add(FirstFunction.class);
-        DEFAULT_FUNCTIONS.add(LastFunction.class);
-        DEFAULT_FUNCTIONS.add(SortFunction.class);
-    }
-
-
-    public DefaultConfiguration() {
-        super();
-        addDefaultNamespaces();
-        addDefaultTransformers();
-        addDefaultFunctions();
-        addDefaultTestFunctions();
-    }
-
-
-    private void addDefaultNamespaces() {
-        namespaces.putAll(DEFAULT_NAMESPACES);
-
-
-    }
-
-    private void addDefaultTransformers() {
-        addTransformer(Constants.NS_XSD + "decimal", new BigDecimalTransformer<Node>());
-        addTransformer(Constants.NS_XSD + "integer", new BigIntegerTransformer<Node>());
-        addTransformer(Constants.NS_XSD + "long", new LongTransformer<Node>());
-        addTransformer(Constants.NS_XSD + "int", new IntTransformer<Node>());
-        addTransformer(Constants.NS_XSD + "short", new ShortTransformer<Node>());
-        addTransformer(Constants.NS_XSD + "byte", new ByteTransformer<Node>());
-        addTransformer(Constants.NS_XSD + "double", new DoubleTransformer<Node>());
-        addTransformer(Constants.NS_XSD + "float", new FloatTransformer<Node>());
-        addTransformer(Constants.NS_XSD + "dateTime", new DateTimeTransformer<Node>());
-        addTransformer(Constants.NS_XSD + "date", new DateTransformer<Node>());
-        addTransformer(Constants.NS_XSD + "time", new TimeTransformer<Node>());
-        addTransformer(Constants.NS_XSD + "boolean", new BooleanTransformer<Node>());
-        addTransformer(Constants.NS_XSD + "anyURI", new StringTransformer<Node>());
-        addTransformer(Constants.NS_XSD + "string", new StringTransformer<Node>());
-        addTransformer(Constants.NS_XSD + "duration", new DurationTransformer<Node>());
-
-    }
-
-    private void addDefaultFunctions() {
-        for (SelectorFunction<Node> f : functionLoader) {
-            log.info("registering LDPath function: {}",f.getSignature());
-            addFunction(f);
-        }
-    }
-
-    private void addFunction(SelectorFunction<Node> function) {
-        addFunction(Constants.NS_LMF_FUNCS + function.getPathExpression(null), function);
-    }
-
-    private void addDefaultTestFunctions() {
-        for (TestFunction<Node> t : testLoader) {
-            log.info("registering LDPath test function: {}", t.getSignature());
-            addTestFunction(t);
-        }
-    }
-
-    private void addTestFunction(TestFunction<Node> test) {
-        addTestFunction(Constants.NS_LMF_FUNCS + test.getLocalName(), test);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/util/Collections.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/util/Collections.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/util/Collections.java
deleted file mode 100644
index 570710d..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/util/Collections.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class Collections {
-
-    /**
-     * Copies all entries of the parsed collections to an new list
-     * @param lists
-     * @return
-     */
-    public static <T> List<T> concat(final Collection<T>... lists) {
-        List<T> result = new ArrayList<T>();
-        for(Collection<T> list : lists) {
-            result.addAll(list);
-        }
-        return result;
-    }
-    /**
-     * Returns an iterable over all lists without copying any data
-     * @param lists the array with the lists
-     * @return the plain iterator over all elements of the lists
-     */
-    public static <T> Iterator<T> iterator(final Collection<T>...lists){
-        return iterator(0,lists);
-    }
-    /**
-     * Returns an iterable over all lists starting by the parsed offset.
-     * @param offset the offset of the first entry those elements should be
-     * included in the returned entries
-     * @param lists the array with the lists of elements
-     * @return the plain iterator over all elements of the lists starting from
-     * index offset
-     */
-    public static <T> Iterator<T> iterator(final int offset,final Collection<T>...lists){
-        if(offset < 0){
-            throw new IllegalArgumentException("The parsed Offest MUST NOT be < 0!");
-        }
-        if(lists == null){
-            return null;
-        } else if( lists.length <= offset){
-            return java.util.Collections.<T>emptyList().iterator();
-        }
-        return new Iterator<T>() {
-            
-            private int listsIndex = offset-1;
-            private Iterator<T> it;
-            
-            @Override
-            public boolean hasNext() {
-                while(it == null || !it.hasNext()){
-                    listsIndex++;
-                    if(listsIndex < lists.length ){
-                        Collection<T> list = lists[listsIndex];
-                        if(list != null){
-                            it = lists[listsIndex].iterator();
-                        }
-                    } else {
-                        return false;
-                    }
-                }
-                return true;
-            }
-
-            @Override
-            public T next() {
-                if(it == null){
-                    hasNext();
-                }
-                return it.next();
-            }
-
-            @Override
-            public void remove() {
-                if(it != null){
-                    it.remove();
-                }
-            }};
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/util/FormatUtils.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/util/FormatUtils.java b/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/util/FormatUtils.java
deleted file mode 100644
index 1b26776..0000000
--- a/libraries/ldpath/ldpath-core/src/main/java/at/newmedialab/ldpath/util/FormatUtils.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * Copyright (C) 2013 Salzburg Research.
- *
- * Licensed 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 at.newmedialab.ldpath.util;
-
-import java.text.DateFormat;
-import java.text.DateFormatSymbols;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-import java.util.TimeZone;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class FormatUtils {
-
-    public static final SimpleDateFormat ISO8601FORMAT  = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
-
-    public static final SimpleDateFormat ISO8601FORMAT_TIME  = new SimpleDateFormat("HH:mm:ss.SSSZ");
-    public static final SimpleDateFormat ISO8601FORMAT_DATE  = new SimpleDateFormat("yyyy-MM-dd");
-
-
-    /**
-      * Some parsers will have the date as a ISO-8601 string
-      *  already, and will set that into the Metadata object.
-      * So we can return Date objects for these, this is the
-      *  list (in preference order) of the various ISO-8601
-      *  variants that we try when processing a date based
-      *  property.
-      */
-     private static final DateFormat[] iso8601InputFormats = new DateFormat[] {
-         // yyyy-mm-ddThh...
-         createDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", "UTF"), // UTC/Zulu
-         createDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ", null),    // With timezone
-         createDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS", null),     // Without timezone
-         createDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", "UTF"),     // UTC/Zulu
-         createDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", null),        // With timezone
-         createDateFormat("yyyy-MM-dd'T'HH:mm:ss", null),         // Without timezone
-         // yyyy-mm-dd hh...
-         createDateFormat("yyyy-MM-dd' 'HH:mm:ss.SSS'Z'", "UTF"), // UTC/Zulu
-         createDateFormat("yyyy-MM-dd' 'HH:mm:ss.SSSZ", null),    // With timezone
-         createDateFormat("yyyy-MM-dd' 'HH:mm:ss.SSS", null),     // Without timezone
-         createDateFormat("yyyy-MM-dd' 'HH:mm:ss'Z'", "UTF"),     // UTC/Zulu
-         createDateFormat("yyyy-MM-dd' 'HH:mm:ssZ", null),        // With timezone
-         createDateFormat("yyyy-MM-dd' 'HH:mm:ss", null),         // Without timezone
-         createDateFormat("EEE MMM dd HH:mm:ss z yyyy", null),    // Word documents/java Date.toString()
-         createDateFormat("EEE MMM d HH:mm:ss z yyyy", null),     // Word documents/java Date.toString()
-         createDateFormat("dd.MM.yyyy' 'HH:mm:ss", null),         // German with seconds
-         createDateFormat("dd.MM.yyyy' 'HH:mm", null),            // German without seconds
-     };
-
-     private static DateFormat createDateFormat(String format, String timezone) {
-         SimpleDateFormat sdf =
-             new SimpleDateFormat(format, new DateFormatSymbols(Locale.US));
-         if (timezone != null) {
-             sdf.setTimeZone(TimeZone.getTimeZone(timezone));
-         }
-         return sdf;
-     }
-
-
-    /**
-     * Parses the given date string. This method is synchronized to prevent
-     * concurrent access to the thread-unsafe date formats.
-     *
-     * Stolen from TIKA to workaround a bug there ...
-     *
-     * @see <a href="https://issues.apache.org/jira/browse/TIKA-495">TIKA-495</a>
-     * @param date date string
-     * @return parsed date, or <code>null</code> if the date can't be parsed
-     */
-    public static synchronized Date parseDate(String date) {
-        if(date == null) {
-            return null;
-        }
-
-        // Java doesn't like timezones in the form ss+hh:mm
-        // It only likes the hhmm form, without the colon
-        int n = date.length();
-        if (date.charAt(n - 3) == ':'
-            && (date.charAt(n - 6) == '+' || date.charAt(n - 6) == '-')) {
-            date = date.substring(0, n - 3) + date.substring(n - 2);
-        }
-
-        // Try several different ISO-8601 variants
-        for (DateFormat format : iso8601InputFormats) {
-            try {
-                return format.parse(date);
-            } catch (ParseException ignore) {
-            }
-        }
-        return null;
-    }
-
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5b8766b3/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/LDPath.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/LDPath.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/LDPath.java
new file mode 100644
index 0000000..c3ce667
--- /dev/null
+++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/LDPath.java
@@ -0,0 +1,310 @@
+/**
+ * Copyright (C) 2013 Salzburg Research.
+ *
+ * Licensed 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;
+
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.marmotta.ldpath.api.backend.RDFBackend;
+import org.apache.marmotta.ldpath.api.functions.SelectorFunction;
+import org.apache.marmotta.ldpath.api.selectors.NodeSelector;
+import org.apache.marmotta.ldpath.api.transformers.NodeTransformer;
+import org.apache.marmotta.ldpath.exception.LDPathParseException;
+import org.apache.marmotta.ldpath.model.fields.FieldMapping;
+import org.apache.marmotta.ldpath.model.programs.Program;
+import org.apache.marmotta.ldpath.parser.Configuration;
+import org.apache.marmotta.ldpath.parser.DefaultConfiguration;
+import org.apache.marmotta.ldpath.parser.ParseException;
+import org.apache.marmotta.ldpath.parser.RdfPathParser;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
+
+/**
+ * Main class providing query functionality for the different RDF backends.
+ * <p/>
+ * Author: Sebastian Schaffert
+ */
+public class LDPath<Node> {
+
+    private RDFBackend<Node> backend;
+
+    private HashSet<SelectorFunction<Node>> functions;
+
+    private HashMap<String,NodeTransformer<?,Node>> transformers;
+
+    private Configuration<Node> config;
+
+    /**
+     * Initialise a new LDPath instance for querying the backend passed as argument with the default configuration.
+     * @param backend
+     */
+    public LDPath(RDFBackend<Node> backend) {
+        this(backend,new DefaultConfiguration<Node>());
+    }
+
+    /**
+     * Initialise a new LDPath instance for querying the backend passed as argument with a custom configuration
+     * for default functions, transformers and namespaces.
+     *
+     * @param backend
+     * @param config
+     */
+    public LDPath(RDFBackend<Node> backend, Configuration<Node> config) {
+        this.backend      = backend;
+        this.functions    = new HashSet<SelectorFunction<Node>>();
+        this.transformers = new HashMap<String, NodeTransformer<?, Node>>();
+        this.config       = config;
+    }
+
+    /**
+     * Execute a single path query starting from the given context node and return a collection of nodes resulting
+     * from the selection. Default namespaces (rdf, rdfs, skos, dc, foaf) are added automatically, further namespaces
+     * need to be passed as arguments.
+     * <p/>
+     * Paths need to conform to the RdfPath Selector syntax described at
+     * <a href="http://code.google.com/p/kiwi/wiki/RdfPathLanguage#Path_Selectors">the wiki</a>.
+     * For example, the following selection would select the names of all friends:
+     * <p/>
+     * <code>
+     * foaf:knows / foaf:name
+     * </code>
+     * <p/>
+     * Note that since this method returns a collection of nodes, no transformations can be used.
+     *
+     * @param context the context node where to start the path query
+     * @param path  the LDPath path specification
+     * @param namespaces an optional map mapping namespace prefixes to URIs (used for lookups of prefixes used in the path);
+     *                   can be null
+     * @return a collection of nodes
+     * @throws LDPathParseException when the path passed as argument is not valid
+     */
+    public Collection<Node> pathQuery(Node context, String path, Map<String, String> namespaces) throws LDPathParseException {
+        RdfPathParser<Node> parser = new RdfPathParser<Node>(backend,config,new StringReader(path));
+        for(SelectorFunction<Node> function : functions) {
+            parser.registerFunction(function);
+        }
+        for(String typeUri : transformers.keySet()) {
+            parser.registerTransformer(typeUri,transformers.get(typeUri));
+        }
+
+        try {
+            NodeSelector<Node> selector = parser.parseSelector(namespaces);
+
+            return selector.select(backend,context,null,null);
+
+        } catch (ParseException e) {
+            throw new LDPathParseException("error while parsing path expression",e);
+        }
+
+    }
+
+
+    /**
+     * Execute a single path query starting from the given context node and return a collection of nodes resulting
+     * from the selection. In addition, the paths leading to the individual results are returned in the map passed as
+     * argument "paths".
+     * <p/>
+     * Default namespaces (rdf, rdfs, skos, dc, foaf) are added automatically, further namespaces
+     * need to be passed as arguments.
+     * <p/>
+     * Paths need to conform to the RdfPath Selector syntax described at
+     * <a href="http://code.google.com/p/kiwi/wiki/RdfPathLanguage#Path_Selectors">the wiki</a>.
+     * For example, the following selection would select the names of all friends:
+     * <p/>
+     * <code>
+     * foaf:knows / foaf:name
+     * </code>
+     * <p/>
+     * Note that since this method returns a collection of nodes, no transformations can be used.
+     *
+     * @param context the context node where to start the path query
+     * @param path  the LDPath path specification
+     * @param namespaces an optional map mapping namespace prefixes to URIs (used for lookups of prefixes used in the path);
+     *                   can be null
+     * @return a collection of nodes
+     * @throws LDPathParseException when the path passed as argument is not valid
+     */
+    public Collection<Node> pathQuery(Node context, String path, Map<String, String> namespaces, Map<Node,List<Node>> paths) throws LDPathParseException {
+        RdfPathParser<Node> parser = new RdfPathParser<Node>(backend,config,new StringReader(path));
+        for(SelectorFunction<Node> function : functions) {
+            parser.registerFunction(function);
+        }
+        for(String typeUri : transformers.keySet()) {
+            parser.registerTransformer(typeUri,transformers.get(typeUri));
+        }
+
+        try {
+            NodeSelector<Node> selector = parser.parseSelector(namespaces);
+
+            return selector.select(backend, context, ImmutableList.<Node> of(), paths);
+
+        } catch (ParseException e) {
+            throw new LDPathParseException("error while parsing path expression",e);
+        }
+
+    }
+
+
+
+    /**
+     * Execute a single path query starting from the given context node and return a collection of nodes resulting
+     * from the selection. Default namespaces (rdf, rdfs, skos, dc, foaf) are added automatically, further namespaces
+     * need to be passed as arguments.
+     * <p/>
+     * Paths need to conform to the RdfPath Selector syntax described at
+     * <a href="http://code.google.com/p/kiwi/wiki/RdfPathLanguage#Path_Selectors">the wiki</a>.
+     * For example, the following selection would select the names of all friends:
+     * <p/>
+     * <code>
+     * foaf:knows / foaf:name
+     * </code>
+     * <p/>
+     * Note that since this method returns a collection of nodes, no transformations can be used.
+     *
+     * @param context the context node where to start the path query
+     * @param path  the LDPath path specification
+     * @param namespaces an optional map mapping namespace prefixes to URIs (used for lookups of prefixes used in the path);
+     *                   can be null
+     * @return a collection of nodes
+     * @throws LDPathParseException when the path passed as argument is not valid
+     */
+    public <T> Collection<T> pathTransform(Node context, String path, Map<String, String> namespaces) throws LDPathParseException {
+        RdfPathParser<Node> parser = new RdfPathParser<Node>(backend,config,new StringReader(path));
+        for(SelectorFunction<Node> function : functions) {
+            parser.registerFunction(function);
+        }
+        for(String typeUri : transformers.keySet()) {
+            parser.registerTransformer(typeUri,transformers.get(typeUri));
+        }
+
+        try {
+            FieldMapping<T,Node> mapping = parser.parseRule(namespaces);
+
+            return mapping.getValues(backend, context);
+
+        } catch (ParseException e) {
+            throw new LDPathParseException("error while parsing path expression",e);
+        }
+
+    }
+
+    /**
+     * Evaluate a path program passed as argument starting from the given context node and return a mapping for
+     * each field in the program to the selected values.
+     *
+     * @param context
+     * @param program
+     * @return
+     * @throws LDPathParseException
+     */
+    public Map<String,Collection<?>> programQuery(Node context, Reader program) throws LDPathParseException {
+        RdfPathParser<Node> parser = new RdfPathParser<Node>(backend,config,program);
+        for(SelectorFunction<Node> function : functions) {
+            parser.registerFunction(function);
+        }
+        for(String typeUri : transformers.keySet()) {
+            parser.registerTransformer(typeUri, transformers.get(typeUri));
+        }
+
+        try {
+            Program<Node> p = parser.parseProgram();
+
+            Map<String,Collection<?>> result = new HashMap<String, Collection<?>>();
+
+            for(FieldMapping<?,Node> mapping : p.getFields()) {
+                result.put(mapping.getFieldName(),mapping.getValues(backend,context));
+            }
+
+            return result;
+
+        } catch (ParseException e) {
+            throw new LDPathParseException("error while parsing path expression",e);
+        }
+    }
+
+    /**
+     * Parse a program passed as argument and return it for further use.
+     *
+     * @param program a reader containing the program in LDPath syntax
+     * @return the parsed program
+     * @throws LDPathParseException
+     */
+    public Program<Node> parseProgram(Reader program) throws LDPathParseException {
+        RdfPathParser<Node> parser = new RdfPathParser<Node>(backend,config,program);
+        for(SelectorFunction<Node> function : functions) {
+            parser.registerFunction(function);
+        }
+        for(String typeUri : transformers.keySet()) {
+            parser.registerTransformer(typeUri, transformers.get(typeUri));
+        }
+
+        try {
+            return parser.parseProgram();
+        } catch (ParseException e) {
+            throw new LDPathParseException("error while parsing path program",e);
+        }
+    }
+
+    /**
+     * Register a selector function to be used in LDPath. Use this method in your own
+     * projects to register custom selector functions.
+     * @param function
+     */
+    public void registerFunction(SelectorFunction<Node> function) {
+        functions.add(function);
+    }
+
+    /**
+     * Return the collection of selector functions registered with this LDPath instance.
+     *
+     * @return
+     */
+    public Set<SelectorFunction<Node>> getFunctions() {
+        return ImmutableSet.copyOf(functions);
+    }
+
+    /**
+     * Register a result transformer for a type URI. Use this method in your own projects
+     * to register custom result transformers.
+     *
+     * @param typeUri a URI identifying the type for which to use this transformer; can be specified in path programs
+     * @param transformer instance of a node transformer
+     */
+    public void registerTransformer(String typeUri, NodeTransformer<?,Node> transformer) {
+        transformers.put(typeUri,transformer);
+    }
+
+    public Map<String, NodeTransformer<?,Node>> getTransformers() {
+        return ImmutableMap.copyOf(transformers);
+    }
+
+
+    /**
+     * Return the configuration underlying this LDPath instance.
+     * @return
+     */
+    public Configuration<Node> getConfig() {
+        return config;
+    }
+}


Mime
View raw message