You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by an...@apache.org on 2013/10/01 01:48:02 UTC

[10/51] [partial] Revert "Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-marmotta"

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/IntTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/IntTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/IntTransformer.java
index 8cddda4..d0a33c9 100644
--- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/IntTransformer.java
+++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/IntTransformer.java
@@ -17,7 +17,7 @@
  */
 package org.apache.marmotta.ldpath.model.transformers;
 
-import org.apache.marmotta.ldpath.api.backend.RDFBackend;
+import org.apache.marmotta.ldpath.api.backend.NodeBackend;
 import org.apache.marmotta.ldpath.api.transformers.NodeTransformer;
 
 import java.util.Map;
@@ -35,13 +35,11 @@ public class IntTransformer<Node> implements NodeTransformer<Integer,Node> {
      * the respective datatype, throws an IllegalArgumentException that needs to be caught by the class
      * carrying out the transformation.
      *
-     *
-     * @param rdfBackend
      * @param node
      * @return
      */
     @Override
-    public Integer transform(RDFBackend<Node> rdfBackend, Node node, Map<String, String> configuration) throws IllegalArgumentException {
+    public Integer transform(NodeBackend<Node> rdfBackend, Node node, Map<String, String> configuration) throws IllegalArgumentException {
         if(rdfBackend.isLiteral(node)) {
             return rdfBackend.intValue(node);
         } else {

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/LongTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/LongTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/LongTransformer.java
index 49754e5..4188e02 100644
--- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/LongTransformer.java
+++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/LongTransformer.java
@@ -17,7 +17,7 @@
  */
 package org.apache.marmotta.ldpath.model.transformers;
 
-import org.apache.marmotta.ldpath.api.backend.RDFBackend;
+import org.apache.marmotta.ldpath.api.backend.NodeBackend;
 import org.apache.marmotta.ldpath.api.transformers.NodeTransformer;
 
 import java.util.Map;
@@ -34,13 +34,11 @@ public class LongTransformer<Node> implements NodeTransformer<Long,Node> {
      * the respective datatype, throws an IllegalArgumentException that needs to be caught by the class
      * carrying out the transformation.
      *
-     *
-     * @param rdfBackend
      * @param node
      * @return
      */
     @Override
-    public Long transform(RDFBackend<Node> rdfBackend, Node node, Map<String, String> configuration) throws IllegalArgumentException {
+    public Long transform(NodeBackend<Node> rdfBackend, Node node, Map<String, String> configuration) throws IllegalArgumentException {
         if(rdfBackend.isLiteral(node)) {
             return rdfBackend.longValue(node);
         } else {

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/ShortTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/ShortTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/ShortTransformer.java
index 352f6a1..66fcfa1 100644
--- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/ShortTransformer.java
+++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/ShortTransformer.java
@@ -17,7 +17,7 @@
  */
 package org.apache.marmotta.ldpath.model.transformers;
 
-import org.apache.marmotta.ldpath.api.backend.RDFBackend;
+import org.apache.marmotta.ldpath.api.backend.NodeBackend;
 import org.apache.marmotta.ldpath.api.transformers.NodeTransformer;
 
 import java.util.Map;
@@ -25,7 +25,7 @@ import java.util.Map;
 public class ShortTransformer<Node> implements NodeTransformer<Short,Node> {
 
     @Override
-    public Short transform(RDFBackend<Node> backend, Node node, Map<String, String> configuration) throws IllegalArgumentException {
+    public Short transform(NodeBackend<Node> backend, Node node, Map<String, String> configuration) throws IllegalArgumentException {
         if(backend.isLiteral(node)) {
             return backend.decimalValue(node).shortValueExact();
         } else {

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/StringTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/StringTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/StringTransformer.java
index 7f6e365..addb444 100644
--- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/StringTransformer.java
+++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/StringTransformer.java
@@ -17,7 +17,7 @@
  */
 package org.apache.marmotta.ldpath.model.transformers;
 
-import org.apache.marmotta.ldpath.api.backend.RDFBackend;
+import org.apache.marmotta.ldpath.api.backend.NodeBackend;
 import org.apache.marmotta.ldpath.api.transformers.NodeTransformer;
 
 import java.util.Map;
@@ -35,13 +35,11 @@ public class StringTransformer<Node> implements NodeTransformer<String,Node> {
      * the respective datatype, throws an IllegalArgumentException that needs to be caught by the class
      * carrying out the transformation.
      *
-     *
-     * @param backend
      * @param node
      * @return
      */
     @Override
-    public String transform(RDFBackend<Node> backend, Node node, Map<String, String> configuration) throws IllegalArgumentException {
+    public String transform(NodeBackend<Node> backend, Node node, Map<String, String> configuration) throws IllegalArgumentException {
         return backend.stringValue(node);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/TimeTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/TimeTransformer.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/TimeTransformer.java
index c6aeb48..887c0eb 100644
--- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/TimeTransformer.java
+++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/transformers/TimeTransformer.java
@@ -21,7 +21,7 @@ package org.apache.marmotta.ldpath.model.transformers;
 import java.util.Date;
 import java.util.Map;
 
-import org.apache.marmotta.ldpath.api.backend.RDFBackend;
+import org.apache.marmotta.ldpath.api.backend.NodeBackend;
 import org.apache.marmotta.ldpath.api.transformers.NodeTransformer;
 
 /**
@@ -36,13 +36,11 @@ public class TimeTransformer<Node> implements NodeTransformer<Date,Node> {
      * the respective datatype, throws an IllegalArgumentException that needs to be caught by the class
      * carrying out the transformation.
      *
-     *
-     * @param rdfBackend
      * @param node
      * @return
      */
     @Override
-    public Date transform(RDFBackend<Node> rdfBackend, Node node, Map<String, String> configuration) throws IllegalArgumentException {
+    public Date transform(NodeBackend<Node> rdfBackend, Node node, Map<String, String> configuration) throws IllegalArgumentException {
         if(rdfBackend.isLiteral(node)) {
             return rdfBackend.timeValue(node);
         } else {

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/util/Collections.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/util/Collections.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/util/Collections.java
index 651c771..8f2abea 100644
--- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/util/Collections.java
+++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/util/Collections.java
@@ -34,7 +34,6 @@ public class Collections {
      * @param lists
      * @return
      */
-    @SafeVarargs
     public static <T> List<T> concat(final Collection<T>... lists) {
         List<T> result = new ArrayList<T>();
         for(Collection<T> list : lists) {
@@ -47,7 +46,6 @@ public class Collections {
      * @param lists the array with the lists
      * @return the plain iterator over all elements of the lists
      */
-    @SafeVarargs
     public static <T> Iterator<T> iterator(final Collection<T>...lists){
         return iterator(0,lists);
     }
@@ -59,7 +57,6 @@ public class Collections {
      * @return the plain iterator over all elements of the lists starting from
      * index offset
      */
-    @SafeVarargs
     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!");

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/main/javacc/at/newmedialab/ldpath/parser/rdfpath.jj
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/javacc/at/newmedialab/ldpath/parser/rdfpath.jj b/libraries/ldpath/ldpath-core/src/main/javacc/at/newmedialab/ldpath/parser/rdfpath.jj
index bd71bb5..c91a6a9 100644
--- a/libraries/ldpath/ldpath-core/src/main/javacc/at/newmedialab/ldpath/parser/rdfpath.jj
+++ b/libraries/ldpath/ldpath-core/src/main/javacc/at/newmedialab/ldpath/parser/rdfpath.jj
@@ -26,7 +26,7 @@ options
 //  DEBUG_LOOKAHEAD=true;
 }
 
-PARSER_BEGIN(LdPathParser)
+PARSER_BEGIN(RdfPathParser)
 package org.apache.marmotta.ldpath.parser;
 
 import org.apache.marmotta.ldpath.model.Constants;
@@ -47,7 +47,6 @@ import org.apache.marmotta.ldpath.model.transformers.*;
 
 
 import java.util.ArrayList;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -65,12 +64,12 @@ import org.slf4j.LoggerFactory;
 
 
 @SuppressWarnings("all")
-public class LdPathParser<Node> {
+public class RdfPathParser<Node> {
 
         private enum Mode { RULE, SELECTOR, TEST, PROGRAM, PREFIX };
 
 
-        private static final Logger log = LoggerFactory.getLogger(LdPathParser.class);
+        private static final Logger log = LoggerFactory.getLogger(RdfPathParser.class);
 
         /**
          * A map mapping from namespace prefix to namespace URI
@@ -83,11 +82,11 @@ public class LdPathParser<Node> {
 
         private Mode mode = Mode.PROGRAM;
 
-        public LdPathParser(NodeBackend<Node> backend, Reader in) {
+        public RdfPathParser(NodeBackend<Node> backend, Reader in) {
             this(backend,null,in);
         }
 
-        public LdPathParser(NodeBackend<Node> backend, Configuration config, Reader in) {
+        public RdfPathParser(NodeBackend<Node> backend, Configuration config, Reader in) {
             this(in);
             this.backend = backend;
             if(config == null) {
@@ -99,11 +98,11 @@ public class LdPathParser<Node> {
             initialise();
         }
 
-        public LdPathParser(NodeBackend<Node> backend, InputStream in) {
+        public RdfPathParser(NodeBackend<Node> backend, InputStream in) {
             this(backend,null,in);
         }
 
-        public LdPathParser(NodeBackend<Node> backend, Configuration config, InputStream in) {
+        public RdfPathParser(NodeBackend<Node> backend, Configuration config, InputStream in) {
             this(in);
             this.backend = backend;
             if(config == null) {
@@ -115,11 +114,11 @@ public class LdPathParser<Node> {
             initialise();
         }
 
-        public LdPathParser(NodeBackend<Node> backend, InputStream in, String encoding) {
+        public RdfPathParser(NodeBackend<Node> backend, InputStream in, String encoding) {
             this(backend,null,in,encoding);
         }
 
-        public LdPathParser(NodeBackend<Node> backend, Configuration config, InputStream in, String encoding) {
+        public RdfPathParser(NodeBackend<Node> backend, Configuration config, InputStream in, String encoding) {
             this(in,encoding);
             this.backend = backend;
             if(config == null) {
@@ -212,16 +211,11 @@ public class LdPathParser<Node> {
             }
         }
 
-        public Node resolveURI(URI uri) {
            return backend.createURI(uri.toString());
-        }
 
-        public Node resolveResource(String uri) throws ParseException {
+        public Node resolveResource(String uri) {
             return backend.createURI(uri);
         }
 
-        public Node resolveResource(String prefix, String local) throws ParseException {
-            return resolveResource(resolveNamespace(prefix)+local);
        }
-
 
         public String resolveNamespace(String prefix) throws ParseException {
             String uri = namespaces.get(prefix);
@@ -248,14 +242,6 @@ public class LdPathParser<Node> {
             }
         }
 
-        public NodeTransformer<?,Node> getTransformer(URI type) throws ParseException {
-            return getTransformer(type.toString());
-        }
-
-        public NodeTransformer<?,Node> getTransformer(Node node) throws ParseException {
-            return getTransformer(backend.stringValue(node));
-        }
-
         public NodeTransformer<?,Node> getTransformer(String uri) throws ParseException {
             if(xsdNodeTransformerMap.get(uri) != null) {
                 return xsdNodeTransformerMap.get(uri);
@@ -303,7 +289,7 @@ public class LdPathParser<Node> {
 
 
         private Map<String, SelectorFunction<Node>> xsdNodeFunctionMap;
-        private Map<String, TestFunction<Node>> xsdNodeTestMap;
+    private Map<String, TestFunction<Node>> xsdNodeTestMap;
         private void initFunctionMappings() {
             Map<String, SelectorFunction<Node>> functionMap = new HashMap<String, SelectorFunction<Node>>();
 
@@ -347,7 +333,7 @@ public class LdPathParser<Node> {
         }
 
 }
-PARSER_END(LdPathParser)
+PARSER_END(RdfPathParser)
 
 SKIP :
 {
@@ -388,49 +374,20 @@ MORE:
 }
 
 
-TOKEN : /* LDPATH */
-{
-  < COMMA:  "," >  |
-  < SCOLON: ";" >  |
-  < COLON:  ":" >  |
-  < DCOLON: "::" > |
-  < ASSIGN: "=" >  |
-  < K_PREFIX: "@prefix" > |
-  < K_FILTER: "@filter" > |
-  < K_BOOST:  "@boost" >  |
-  < K_GRAPH:  "@graph" >
-}
 TOKEN : /* OPERATORS */
 {
-    < SELF: "." >    |
 	< AND:  "&" >    |
 	< OR:   "|" >    |
-    < P_SEP:"/" >    |
-    < PLUS: "+" >    |
-    < STAR: "*" >    |
 	< NOT:  "!" >    |
-    < INVERSE: "^" > |
 	< IS:   "is" >   |
 	< IS_A: "is-a" > |
-    < FUNC: "fn:" >  |
   	< TYPE: "^^" >   |
   	< LANG: "@" >
 }
 
-TOKEN : /* BRACKETS */
-{
-  < B_RO: "(" > |
-  < B_RC: ")" > |
-  < B_SO: "[" > |
-  < B_SC: "]" > |
-  < B_CO: "{" > |
-  < B_CC: "}" > |
-  < B_XO: "<" > |
-  < B_XC: ">" > 
-}
 TOKEN :
 {
-    < URI: "<" (~[ ">","<", "\"", "{", "}", "^", "\\", "|", "`", "\u0000"-"\u0020"])+ ">" > |
+    < URI: ["a"-"z","A"-"Z"](["a"-"z","A"-"Z","0"-"9","+","-","."])* "://"  (["a"-"z","A"-"Z","0"-"9",";","/","?",":","@","&","=","+","$",".","-","_","!","~","*","'","%"])+ ("#" (["a"-"z","A"-"Z","0"-"9",";","/","?",":","@","&","=","+","$",".","-","_","!","~","*","'","%"])*)? | "#" (["a"-"z","A"-"Z","0"-"9",";","/","?",":","@","&","=","+","$",".","-","_","!","~","*","'","%"])+> |
     < IDENTIFIER: ["a"-"z","A"-"Z","0"-"9","_"](["a"-"z","A"-"Z","0"-"9","_","'","-", "."])* > |
     < #URICHAR: ["a"-"z","A"-"Z","0"-"9",";","/","?",":","@","&","=","+","$",".","-","_","!","~","*","'","%"] >
 }
@@ -458,9 +415,9 @@ Entry<String, String> Namespace() :
 }
 {
   ( 
-    <K_PREFIX> id = <IDENTIFIER> <COLON> uri = <URI> (<SCOLON> )? {
+    "@prefix" id = <IDENTIFIER> ":" "<" uri = <URI> ">" (";")? {
     }
-  ) { return new Namespace(id.image, uri.image.substring(1,uri.image.length()-1)); }
+  ) { return new Namespace(id.image, uri.image); }
 }
 
 Program Program() :
@@ -470,7 +427,6 @@ Program Program() :
     Map<String, String> nss = null;
     FieldMapping<?,Node> rule;
     NodeSelector<Node> boostSelector;
-    LinkedList<Node> graphs;
 }
 {
   (
@@ -483,21 +439,15 @@ Program Program() :
   )?
 
   (
-    <K_GRAPH> graphs = UriList() <SCOLON> {
-      program.setGraphs(graphs);
-    }
-  )?
-
-  (
-    <K_FILTER> filter = NodeTest() <SCOLON> {
+    "@filter" filter = NodeTest() ";" {
         program.setFilter(filter);
     }
   )?
 
   (
-    <K_BOOST> boostSelector = Selector() <SCOLON> {
+    "@boost" boostSelector = Selector() ";" {
     	NodeTransformer transformer = getTransformer(Program.DOCUMENT_BOOST_TYPE);
-		FieldMapping booster = new FieldMapping("@boost", java.net.URI.create(Program.DOCUMENT_BOOST_TYPE), boostSelector, transformer, null);
+		FieldMapping booster = new FieldMapping("@boost", Program.DOCUMENT_BOOST_TYPE, boostSelector, transformer, null);
 		program.setBooster(booster);  
     }
   )?
@@ -514,32 +464,18 @@ Program Program() :
   }
 }
 
-LinkedList<Node> UriList() :
-{
-    LinkedList<Node> rest = null;
-    URI uri;
-}
-{
-    uri = Uri() ( <COMMA> rest = UriList() )?
-    {
-      if (rest == null) rest = new LinkedList<Node>();
-      rest.addFirst(resolveURI(uri));
-      return rest;
-    }
-}
-
 FieldMapping Rule() :
 {
     FieldMapping<?,Node> rule;
     Token name;
-    URI uri;
-    URI type = null;
+    String uri;
+    String type = null;
     NodeSelector<Node> selector;
     NodeTransformer<?,Node> transformer;
     Map<String, String> conf = null;
 }
 {
-    name = <IDENTIFIER> <ASSIGN> selector = Selector() (<DCOLON> type = Uri())? (<B_RO> conf = FieldConfig() <B_RC>)? <SCOLON> {
+    name = <IDENTIFIER> "=" selector = Selector() ("::" type = Uri())? ("(" conf = FieldConfig() ")")? ";" {
         if(type != null) {
             transformer = getTransformer(type);
         } else {
@@ -551,7 +487,7 @@ FieldMapping Rule() :
         rule = new FieldMapping(name.image,type,selector,transformer, conf);
         return rule;
     }
-|   uri = Uri() <ASSIGN> selector = Selector() (<DCOLON> type = Uri())? (<B_RO> conf = FieldConfig() <B_RC>)? <SCOLON> {
+|   uri = Uri() "=" selector = Selector() ("::" type = Uri())? ("(" conf = FieldConfig() ")")? ";" {
         if(type != null) {
             transformer = getTransformer(type);
         } else {
@@ -563,7 +499,7 @@ FieldMapping Rule() :
         rule = new FieldMapping(uri,type,selector,transformer, conf);
         return rule;
     }
-|   selector = Selector() (<DCOLON> type = Uri())? (<B_RO> conf = FieldConfig() <B_RC>)? (<SCOLON>)? {
+|   selector = Selector() ("::" type = Uri())? ("(" conf = FieldConfig() ")")? (";")? {
         if(type != null) {
             transformer = getTransformer(type);
         } else {
@@ -595,7 +531,7 @@ Map<String,String> FieldConfig() : {
 	Map<String,String> more = null;
 }
 {
-	( key = <IDENTIFIER> <ASSIGN> val = ConfVal() ( <COMMA> more = FieldConfig() )? )? {
+	( key = <IDENTIFIER> "=" val = ConfVal() ("," more = FieldConfig() )? )? {
 		if (key == null || val == null) return null;
 		conf.put(key.image, val);
 		if (more != null) {
@@ -613,16 +549,16 @@ String ConfVal() : {
 |	id = <IDENTIFIER> { return id.image; }
 }
 
-URI Uri() : {
+String Uri() : {
     Token uri, prefix, localName;
 
 }
 {
-    uri = <URI> {
-       return java.net.URI.create(uri.image.substring(1,uri.image.length()-1));
+    "<" uri = <URI> ">" {
+       return uri.image;
     }
 |   prefix = <IDENTIFIER> ":" localName = <IDENTIFIER> {
-        return java.net.URI.create(resolveNamespace(prefix.image)+localName.image);
+        return resolveNamespace(prefix.image)+localName.image;
     }
 }
 
@@ -742,7 +678,7 @@ NodeSelector SelfSelector() :
 {
 }
 {
-	<SELF> { return new SelfSelector(); }
+	"." { return new SelfSelector(); }
 }
 
 NodeSelector GroupedSelector() :
@@ -751,9 +687,9 @@ NodeSelector GroupedSelector() :
 }
 {
     /* Other selector enclosed in braces */
-    <B_RO> result = Selector() <B_RC>
+    "(" result = Selector() ")"
     {
-        return new GroupedSelector(result);
+        return result;
     }
 
 }
@@ -764,12 +700,12 @@ RecursivePathSelector RecursivePathSelector() :
 	NodeSelector delegate        = null;
 }
 {
-	<B_RO> delegate = Selector() <B_RC> <PLUS>	
+	"(" delegate = Selector() ")" "+"
 	{
 		result = RecursivePathSelector.getPathSelectorPlused(delegate);
 		return result;
 	} |
-    <B_RO> delegate = Selector() <B_RC> <STAR>
+    "(" delegate = Selector() ")" "*"
     {
         result = RecursivePathSelector.getPathSelectorStared(delegate);
         return result;
@@ -783,7 +719,7 @@ PathSelector PathSelector() :
     NodeSelector right  = null;
 }
 {
-    left = AtomicOrTestingSelector() <P_SEP> right = AtomicOrTestingOrPathSelector()
+    left = AtomicOrTestingSelector() "/" right = AtomicOrTestingOrPathSelector()
     {
         result = new PathSelector(left,right);
         return result;
@@ -797,7 +733,7 @@ IntersectionSelector IntersectionSelector() :
     NodeSelector right  = null;
 }
 {
-    left = AtomicOrTestingOrPathSelector() <AND> right = Selector()
+    left = AtomicOrTestingOrPathSelector() "&" right = Selector()
     {
         result = new IntersectionSelector(left,right);
         return result;
@@ -811,7 +747,7 @@ UnionSelector UnionSelector() :
     NodeSelector right  = null;
 }
 {
-    left = AtomicOrTestingOrPathSelector() <OR> right = Selector()
+    left = AtomicOrTestingOrPathSelector() "|" right = Selector()
     {
         result = new UnionSelector(left,right);
         return result;
@@ -825,7 +761,7 @@ TestingSelector TestingSelector() :
     NodeTest test = null;
 }
 {
-    delegate = AtomicSelector() <B_SO> test = NodeTest() <B_SC> {
+    delegate = AtomicSelector() "[" test = NodeTest() "]" {
         result = new TestingSelector(delegate,test);
         return result;
     }
@@ -834,11 +770,13 @@ TestingSelector TestingSelector() :
 ReversePropertySelector ReversePropertySelector() :
 {
 	ReversePropertySelector result = null;
-	URI uri;
+	Node property;
+    String uri;
 }
 {
-	<INVERSE> uri = Uri() {
-        result   = new ReversePropertySelector(resolveURI(uri));
+	"^" uri = Uri() {
+        property = resolveResource(uri);
+        result   = new ReversePropertySelector(property);
         return result;
 	}
 }
@@ -846,11 +784,13 @@ ReversePropertySelector ReversePropertySelector() :
 PropertySelector PropertySelector() :
 {
     PropertySelector result = null;
-    URI uri;
+    Node property;
+    String uri;
 }
 {
     uri = Uri() {
-        result   = new PropertySelector(resolveURI(uri));
+        property = resolveResource(uri);
+        result   = new PropertySelector(property);
         return result;
     }
 }
@@ -860,7 +800,7 @@ WildcardSelector WildcardSelector() :
     WildcardSelector result = null;
 }
 {
-    <STAR> {
+    "*" {
         result = new WildcardSelector();
         return result;
     }
@@ -877,22 +817,22 @@ FunctionSelector FunctionSelector() :
 {
     /* Function-Calls without arguments can skip parenthesis */
     /* Does not work... why?
-    <FUNC> fName = <IDENTIFIER> {
+    "fn:" fName = <IDENTIFIER> {
            uri = namespaces.get("fn") + fName.image;
            result = new FunctionSelector(getFunction(uri),Collections.emptyList());
            return result;
     } | */
     /* Functions do not need to have arguments */
-    <FUNC> fName = <IDENTIFIER> <B_RO> <B_RC> {
+    "fn:" fName = <IDENTIFIER> "(" ")" {
            uri = namespaces.get("fn") + fName.image;
            result = new FunctionSelector(getFunction(uri),Collections.emptyList());
            return result;
     } |
     /* Sometimes arguments are required */
-    <FUNC> fName = <IDENTIFIER> <B_RO>
+    "fn:" fName = <IDENTIFIER> "("
             argument = Selector() { arguments.add(argument); }
-            ( <COMMA> argument = Selector() { arguments.add(argument); } )*
-    <B_RC> {
+            ( "," argument = Selector() { arguments.add(argument); } )*
+    ")" {
            uri = namespaces.get("fn") + fName.image;
            result = new FunctionSelector(getFunction(uri),arguments);
            return result;
@@ -936,7 +876,7 @@ NodeTest GroupedTest() :
     NodeTest delegate;
 }
 {
-    <B_RO> delegate = NodeTest() <B_RC> {
+    "(" delegate = NodeTest() ")" {
        return delegate;
     }
 }
@@ -949,7 +889,7 @@ NodeTest AtomicNodeTest() :
     (
         result = LiteralLanguageTest()
     |   result = LiteralTypeTest()
-    |   result = IsATest()
+    |   result = TypeTest()
     |   result = PathEqualityTest()
     |   result = FunctionTest()
     |   result = PathTest()
@@ -971,20 +911,20 @@ FunctionTest FunctionTest() :
   (    
     /* Function-Calls without arguments can skip parenthesis */
     /* Does not work... why?
-    <FUNC> fName = <IDENTIFIER> {
+    "fn:" fName = <IDENTIFIER> {
            uri = namespaces.get("fn") + fName.image;
            result = new FunctionSelector(getTestFunction(uri),Collections.emptyList());
     } | */
     /* Functions do not need to have arguments */
-    <FUNC> fName = <IDENTIFIER> <B_RO> <B_RC> {
+    "fn:" fName = <IDENTIFIER> "(" ")" {
            uri = namespaces.get("fn") + fName.image;
            result = new FunctionTest(getTestFunction(uri),Collections.emptyList());
     } |
     /* Sometimes arguments are required */
-    <FUNC> fName = <IDENTIFIER> <B_RO>
+    "fn:" fName = <IDENTIFIER> "("
             argument = Selector() { arguments.add(argument); }
-            ( <COMMA> argument = Selector() { arguments.add(argument); } )*
-    <B_RC> {
+            ( "," argument = Selector() { arguments.add(argument); } )*
+    ")" {
            uri = namespaces.get("fn") + fName.image;
            result = new FunctionTest(getTestFunction(uri),arguments);
     }
@@ -999,17 +939,17 @@ LiteralLanguageTest LiteralLanguageTest():
     Token lang;
 }
 {
-    <LANG> lang = <IDENTIFIER> {
+    "@" lang = <IDENTIFIER> {
         return new LiteralLanguageTest(lang.image);
     }
 }
 
 LiteralTypeTest LiteralTypeTest():
 {
-    URI type;
+    String type;
 }
 {
-    <TYPE> type = Uri() {
+    "^^" type = Uri() {
         return new LiteralTypeTest(type);
     }
 }
@@ -1019,18 +959,18 @@ NotTest NotTest() :
     NodeTest delegate;
 }
 {
-    <NOT>  delegate = NodeTest() {
+    "!" delegate = NodeTest() {
         return new NotTest(delegate);
     }
 }
 
-IsATest IsATest() :
+PathEqualityTest TypeTest() :
 {
     Node node;
 }
 {
     <IS_A> node = Node() {
-        return new IsATest(resolveResource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), node);
+        return new PathEqualityTest(new PropertySelector(resolveResource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")), node);
     }
 }
 
@@ -1040,7 +980,7 @@ AndTest AndTest():
     NodeTest left, right;
 }
 {
-    left = AtomicNodeTest() <AND> right = NodeTest() {
+    left = AtomicNodeTest() "&" right = NodeTest() {
         return new AndTest(left,right);
     }
 }
@@ -1050,7 +990,7 @@ OrTest OrTest():
     NodeTest left, right;
 }
 {
-    left = AtomicNodeTest() <OR> right = NodeTest() {
+    left = AtomicNodeTest() "|" right = NodeTest() {
         return new OrTest(left,right);
     }
 }
@@ -1061,7 +1001,7 @@ PathEqualityTest PathEqualityTest():
     Node node;
 }
 {
-    path = Selector() <IS> node = Node() {
+    path = Selector() "is" node = Node() {
         return new PathEqualityTest(path,node);
     }
 }
@@ -1069,17 +1009,21 @@ PathEqualityTest PathEqualityTest():
 
 Node Node():
 {
-    URI uri, type = null;
+    String uri, type = null;
     Token literal, language;
 }
 {
     uri = Uri() {
-        return resolveURI(uri);
+        return resolveResource(uri);
     }
-|   literal = <STRLIT>  (<TYPE> type = Uri() )? {
-        return backend.createLiteral(literal.image.substring(1, literal.image.length()-1),null,type);
+|   literal = <STRLIT>  ("^^" type = Uri() )? {
+        try {
+            return backend.createLiteral(literal.image.substring(1, literal.image.length()-1),null,type == null ? null : new URI(type));
+        } catch(java.net.URISyntaxException ex) {
+            throw new ParseException("could not parse type URI "+type+": "+ex.getMessage());
+	    }
     }
-|   literal = <STRLIT>  <LANG> language = <IDENTIFIER> {
+|   literal = <STRLIT>  "@" language = <IDENTIFIER> {
         return backend.createLiteral(literal.image.substring(1, literal.image.length()-1),new Locale(language.image),null);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/model/functions/BinaryNumericTestFunctionsTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/model/functions/BinaryNumericTestFunctionsTest.java b/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/model/functions/BinaryNumericTestFunctionsTest.java
index 948d5c4..5047873 100644
--- a/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/model/functions/BinaryNumericTestFunctionsTest.java
+++ b/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/model/functions/BinaryNumericTestFunctionsTest.java
@@ -29,7 +29,7 @@ import java.util.List;
 
 import org.apache.marmotta.ldpath.api.selectors.NodeSelector;
 import org.apache.marmotta.ldpath.parser.ParseException;
-import org.apache.marmotta.ldpath.parser.LdPathParser;
+import org.apache.marmotta.ldpath.parser.RdfPathParser;
 import org.apache.marmotta.ldpath.test.AbstractTestBase;
 import org.junit.Before;
 import org.junit.Test;
@@ -70,7 +70,7 @@ public class BinaryNumericTestFunctionsTest extends AbstractTestBase {
 
     @Before
     public void loadData() throws RepositoryException, RDFParseException, IOException {
-        super.loadData("/ldpath/test-data.n3", RDFFormat.N3);
+        super.loadData("test-data.n3", RDFFormat.N3);
     }
 
     @Test
@@ -96,7 +96,7 @@ public class BinaryNumericTestFunctionsTest extends AbstractTestBase {
         }
 
 
-        final LdPathParser<Value> parser = createParserFromString("ex:hasItem[" + fkt + "(foo:left, foo:right)]");
+        final RdfPathParser<Value> parser = createParserFromString("ex:hasItem[" + fkt + "(foo:left, foo:right)]");
         final NodeSelector<Value> sel = parser.parseSelector(NSS);
 
         final Collection<Value> result = sel.select(backend, start, null, null);

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/model/functions/FunctionsTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/model/functions/FunctionsTest.java b/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/model/functions/FunctionsTest.java
index 7df1621..5ee947e 100644
--- a/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/model/functions/FunctionsTest.java
+++ b/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/model/functions/FunctionsTest.java
@@ -29,7 +29,7 @@ import java.util.Collection;
 import org.apache.marmotta.ldpath.api.selectors.NodeSelector;
 import org.apache.marmotta.ldpath.model.fields.FieldMapping;
 import org.apache.marmotta.ldpath.parser.ParseException;
-import org.apache.marmotta.ldpath.parser.LdPathParser;
+import org.apache.marmotta.ldpath.parser.RdfPathParser;
 import org.apache.marmotta.ldpath.test.AbstractTestBase;
 import org.hamcrest.CoreMatchers;
 import org.junit.Before;
@@ -47,13 +47,13 @@ public class FunctionsTest extends AbstractTestBase {
 
     @Before
     public void loadData() throws RepositoryException, RDFParseException, IOException {
-        loadData("/ldpath/test-data.n3", RDFFormat.N3);
+        loadData("test-data.n3", RDFFormat.N3);
     }
 
     @Test
     public void testConcat() throws ParseException {
 
-        LdPathParser<Value> parser = createParserFromString("fn:concat(foo:title, \" \", foo:subtitle) :: xsd:string; ");
+        RdfPathParser<Value> parser = createParserFromString("fn:concat(foo:title, \" \", foo:subtitle) :: xsd:string; ");
         final URI context = repository.getValueFactory().createURI("http://www.example.com/1");
 
         final FieldMapping<Object, Value> field = parser.parseRule(NSS);
@@ -67,7 +67,7 @@ public class FunctionsTest extends AbstractTestBase {
         final URI ctx1 = repository.getValueFactory().createURI("http://www.example.com/1");
         final URI ctx2 = repository.getValueFactory().createURI("http://www.example.com/2");
 
-        LdPathParser<Value> parser = createParserFromString("fn:first(foo:not_valid, foo:title, foo:subtitle, foo:not_valid2) :: xsd:string; ");
+        RdfPathParser<Value> parser = createParserFromString("fn:first(foo:not_valid, foo:title, foo:subtitle, foo:not_valid2) :: xsd:string; ");
         final FieldMapping<Object, Value> field = parser.parseRule(NSS);
 
         final Collection<Object> result = field.getValues(backend, ctx1);
@@ -84,7 +84,7 @@ public class FunctionsTest extends AbstractTestBase {
         final URI ctx1 = repository.getValueFactory().createURI("http://www.example.com/1");
         final URI ctx2 = repository.getValueFactory().createURI("http://www.example.com/2");
 
-        LdPathParser<Value> parser = createParserFromString("fn:first(foo:i) :: xsd:int; ");
+        RdfPathParser<Value> parser = createParserFromString("fn:first(foo:i) :: xsd:int; ");
         final FieldMapping<Object, Value> field = parser.parseRule(NSS);
 
         final Collection<Object> result = field.getValues(backend, ctx1);
@@ -101,7 +101,7 @@ public class FunctionsTest extends AbstractTestBase {
         final URI ctx1 = repository.getValueFactory().createURI("http://www.example.com/1");
         final URI ctx2 = repository.getValueFactory().createURI("http://www.example.com/2");
 
-        LdPathParser<Value> parser = createParserFromString("fn:last(foo:not_valid, foo:title, foo:subtitle, foo:not_valid2) :: xsd:string; ");
+        RdfPathParser<Value> parser = createParserFromString("fn:last(foo:not_valid, foo:title, foo:subtitle, foo:not_valid2) :: xsd:string; ");
         final FieldMapping<Object, Value> field = parser.parseRule(NSS);
 
         final Collection<Object> result = field.getValues(backend, ctx1);
@@ -118,7 +118,7 @@ public class FunctionsTest extends AbstractTestBase {
         final URI ctx1 = repository.getValueFactory().createURI("http://www.example.com/1");
         final URI ctx2 = repository.getValueFactory().createURI("http://www.example.com/2");
 
-        LdPathParser<Value> parser = createParserFromString("fn:last(foo:i, ex:not_here) :: xsd:int; ");
+        RdfPathParser<Value> parser = createParserFromString("fn:last(foo:i, ex:not_here) :: xsd:int; ");
         final FieldMapping<Object, Value> field = parser.parseRule(NSS);
 
         final Collection<Object> result = field.getValues(backend, ctx1);
@@ -136,14 +136,14 @@ public class FunctionsTest extends AbstractTestBase {
         final URI ex1 = repository.getValueFactory().createURI("http://www.example.com/1");
         final URI ex2 = repository.getValueFactory().createURI("http://www.example.com/2");
 
-        final LdPathParser<Value> parser = createParserFromString("ex:hasItem[fn:eq(foo:i, foo:j)]");
+        final RdfPathParser<Value> parser = createParserFromString("ex:hasItem[fn:eq(foo:i, foo:j)]");
         final NodeSelector<Value> sel = parser.parseSelector(NSS);
 
         final Collection<Value> result = sel.select(backend, start, null, null);
         assertEquals(1, result.size());
         assertThat(result, allOf(hasItem(ex2), not(hasItem(ex1))));
 
-        final LdPathParser<Value> parseri = createParserFromString("ex:hasItem[! fn:eq(foo:i, foo:j)]");
+        final RdfPathParser<Value> parseri = createParserFromString("ex:hasItem[! fn:eq(foo:i, foo:j)]");
         final NodeSelector<Value> seli = parseri.parseSelector(NSS);
 
         final Collection<Value> resulti = seli.select(backend, start, null, null);

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/EmptyTestingBackend.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/EmptyTestingBackend.java b/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/EmptyTestingBackend.java
index cf02c4c..65329f0 100644
--- a/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/EmptyTestingBackend.java
+++ b/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/EmptyTestingBackend.java
@@ -1,12 +1,13 @@
-/*
- * 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
+/**
+ * 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
+ *     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,

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/ParserTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/ParserTest.java b/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/ParserTest.java
index 6a7734d..f7bcbe8 100644
--- a/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/ParserTest.java
+++ b/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/ParserTest.java
@@ -1,12 +1,13 @@
-/*
- * 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
+/**
+ * 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
+ *     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,
@@ -19,7 +20,6 @@ package org.apache.marmotta.ldpath.parser;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -32,11 +32,11 @@ import java.util.Map;
 
 import org.apache.commons.io.IOUtils;
 import org.apache.marmotta.ldpath.api.backend.NodeBackend;
-import org.apache.marmotta.ldpath.api.backend.RDFBackend;
 import org.apache.marmotta.ldpath.api.tests.NodeTest;
 import org.apache.marmotta.ldpath.api.transformers.NodeTransformer;
 import org.apache.marmotta.ldpath.model.programs.Program;
 import org.hamcrest.CoreMatchers;
+import org.junit.Assume;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -46,14 +46,12 @@ public class ParserTest {
     private static NodeBackend<String> backend;
     private static final String NS_TEST = "http://example.com/";
     private static final String NS_FOO = "http://foo.com/some/path#";
-    private static final String NS_FOOBAR = "urn:uuid:1234";
 
     private static final Map<String, String> NAMESPACES;
     static {
         Map<String, String> ns = new HashMap<String, String>();
         ns.put("test", NS_TEST);
         ns.put("foo", NS_FOO);
-        ns.put("foobar", NS_FOOBAR);
         NAMESPACES = Collections.unmodifiableMap(ns);
     }
 
@@ -65,7 +63,7 @@ public class ParserTest {
 
     @Test
     public void testParseProgram() throws IOException {
-        LdPathParser<String> parser = createParser("program.ldpath");
+        RdfPathParser<String> parser = createParser("program.ldpath");
         try {
             Program<String> program = parser.parseProgram();
             assertNotNull(program.getField("path"));
@@ -85,7 +83,7 @@ public class ParserTest {
 
     @Test
     public void testParseTest() throws IOException {
-        LdPathParser<String> parser = createParser("test.ldpath");
+        RdfPathParser<String> parser = createParser("test.ldpath");
         try {
             NodeTest<String> test = parser.parseTest(NAMESPACES);
             assertNotNull(test);
@@ -97,29 +95,27 @@ public class ParserTest {
 
     @Test
     public void testParsePrefixes() throws IOException {
-        LdPathParser<String> parser = createParser("namespaces.ldpath");
+        RdfPathParser<String> parser = createParser("namespaces.ldpath");
         try {
             Map<String, String> prefixes = parser.parsePrefixes();
             assertTrue(prefixes.containsKey("test"));
             assertTrue(prefixes.containsKey("foo"));
-            assertTrue(prefixes.containsKey("foobar"));
             assertEquals(NS_TEST, prefixes.get("test"));
             assertEquals(NS_FOO, prefixes.get("foo"));
-            assertEquals(NS_FOOBAR, prefixes.get("foobar"));
         } catch (ParseException e) {
             assertFalse(e.getMessage(), true);
         }
     }
 
 
-    private LdPathParser<String> createParser(String input) throws IOException {
-        final URL resource = ParserTest.class.getResource("/parse/"+input);
-        assertThat("Could not load test input data '" + input + "'", resource, CoreMatchers.notNullValue());
+    private RdfPathParser<String> createParser(String input) throws IOException {
+        final URL resource = ParserTest.class.getResource(input);
+        Assume.assumeThat("Could not load test input data '" + input + "'", resource, CoreMatchers.notNullValue());
 
-        LdPathParser<String> rdfPathParser = new LdPathParser<String>(backend,new StringReader(IOUtils.toString(resource)));
+        RdfPathParser<String> rdfPathParser = new RdfPathParser<String>(backend,new StringReader(IOUtils.toString(resource)));
         rdfPathParser.registerTransformer(NS_TEST + "type", new NodeTransformer<String, String>() {
             @Override
-            public String transform(RDFBackend<String> backend, String node, Map<String,String> configuration)
+            public String transform(NodeBackend<String> backend, String node, Map<String,String> configuration)
                     throws IllegalArgumentException {
                 return node;
             }

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/ProgramTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/ProgramTest.java b/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/ProgramTest.java
deleted file mode 100644
index 0f74279..0000000
--- a/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/ProgramTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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.parser;
-
-import static org.junit.Assert.assertThat;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.net.URL;
-import java.util.Map;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.marmotta.ldpath.api.backend.RDFBackend;
-import org.apache.marmotta.ldpath.api.transformers.NodeTransformer;
-import org.apache.marmotta.ldpath.model.programs.Program;
-import org.hamcrest.CoreMatchers;
-import org.hamcrest.text.IsEqualIgnoringWhiteSpace;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class ProgramTest {
-    
-    private static StringTestingBackend backend;
-
-    private String expr;
-
-    private Program<String> program;
-
-    @BeforeClass
-    public static void beforeClass() {
-        backend = new StringTestingBackend();
-    }
-
-    
-    @Before
-    public void before() throws ParseException, IOException {
-        final URL resource = ParserTest.class.getResource("/parse/program.ldpath");
-        assertThat("Could not load test input data '/parse/program.ldpath'", resource, CoreMatchers.notNullValue());
-
-        expr = IOUtils.toString(resource);
-        
-        LdPathParser<String> rdfPathParser = new LdPathParser<String>(backend,new StringReader(expr));
-        rdfPathParser.registerTransformer("http://example.com/type", new NodeTransformer<String, String>() {
-            @Override
-            public String transform(RDFBackend<String> backend, String node, Map<String,String> configuration)
-                    throws IllegalArgumentException {
-                return node;
-            }
-        });
-
-        program = rdfPathParser.parseProgram();
-        
-        expr = expr.replaceAll("/\\*(?:.|[\\n\\r])*?\\*/", "");
-    }
-
-    @Test
-    public void testGetPathExpression() {
-        final String result = program.getPathExpression(backend);
-        Assert.assertThat(result, IsEqualIgnoringWhiteSpace.equalToIgnoringWhiteSpace(expr));
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/SelectorsTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/SelectorsTest.java b/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/SelectorsTest.java
deleted file mode 100644
index f2a0327..0000000
--- a/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/SelectorsTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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.parser;
-
-import java.io.StringReader;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.marmotta.ldpath.api.backend.NodeBackend;
-import org.apache.marmotta.ldpath.api.selectors.NodeSelector;
-import org.hamcrest.CoreMatchers;
-import org.hamcrest.text.IsEqualIgnoringWhiteSpace;
-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;
-
-@RunWith(Parameterized.class)
-public class SelectorsTest {
-
-    @Parameters(name = "{index}: {1}Selector")
-    public static List<String[]> testCases() {
-        return Arrays.asList(new String[][] {
-                {"*", "Wildcard"},
-                {"<http://www.example.com/>", "Property"},
-                {"<http://foo.bar> / <http://bar.foo>", "Path"},
-                {"<http://foo.bar> & <http://bar.foo>", "Intersection"},
-                {"<http://foo.bar> | <http://bar.foo>", "Union"},
-                {"<http://foo.bar>[<http://bar.foo>]", "Testing"},
-                {"(<http://www.example.com/>[@en])", "Grouped"},
-                {"(<http://www.example.com/>)*", "RecursivePath"},
-                {"(<http://www.example.com/>)+", "RecursivePath"},
-                {"^<http://www.example.com/>", "ReverseProperty"},
-                {"fn:count(\"foo\")", "Function"},
-                // Not implemented yet: {"^*", "ReverseProperty"},
-                {".", "Self"},
-                {"\"Hello World\"", "StringConstant"},
-                });
-    }
-    
-    @Parameter
-    public String expr;
-    
-    @Parameter(1)
-    public String name;
-
-    private NodeSelector<String> selector;
-    
-    private static NodeBackend<String> backend;
-
-    @BeforeClass
-    public static void beforeClass() {
-        backend = new StringTestingBackend();
-    }
-    
-    @Before
-    public void before() throws ParseException {
-        LdPathParser<String> rdfPathParser = new LdPathParser<String>(backend,new StringReader(expr));
-        selector = rdfPathParser.parseSelector(Collections.<String,String>emptyMap());
-    }
-    
-    @Test
-    public void testGetPathExpression() {
-        Assert.assertThat(selector.getPathExpression(backend), IsEqualIgnoringWhiteSpace.equalToIgnoringWhiteSpace(expr));
-    }
-    
-    @Test
-    public void testParseSelector() {
-        final String className = "org.apache.marmotta.ldpath.model.selectors." + name + "Selector";
-        try {
-            final Class<?> cls = Class.forName(className);
-            Assert.assertThat(selector, CoreMatchers.instanceOf(cls));
-        } catch (ClassNotFoundException e) {
-            Assert.fail("Could not load class: " + className);
-        }
-        
-    }
-    
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/StringTestingBackend.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/StringTestingBackend.java b/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/StringTestingBackend.java
deleted file mode 100644
index 2af51ad..0000000
--- a/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/StringTestingBackend.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * 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.parser;
-
-import java.net.URI;
-import java.util.Locale;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.marmotta.ldpath.model.backend.AbstractBackend;
-
-public class StringTestingBackend extends AbstractBackend<String> {
-
-    private static final Pattern LANG_PATTERN = Pattern.compile("@(\\w+)"),
-            TYPE_PATTERN = Pattern.compile("\\^\\^([\\w:/.#%-]+)");
-    
-    @Override
-    public boolean isLiteral(String n) {
-        return n.startsWith("\"");
-    }
-
-    @Override
-    public boolean isURI(String n) {
-        return n.startsWith("<");
-    }
-
-    @Override
-    public boolean isBlank(String n) {
-        return n.startsWith("_");
-    }
-
-    @Override
-    public Locale getLiteralLanguage(String n) {
-        final Matcher m = LANG_PATTERN.matcher(n);
-        if (m.find()) {
-            return new Locale(m.group(1));
-        }
-        return null;
-    }
-
-    @Override
-    public URI getLiteralType(String n) {
-        final Matcher m = TYPE_PATTERN.matcher(n);
-        if (m.find()) {
-            return URI.create(m.group(1));
-        }
-        return null;
-    }
-
-    @Override
-    public String createLiteral(String content) {
-        return "\""+content+"\"";
-    }
-
-    @Override
-    public String createLiteral(String content, Locale language, URI type) {
-        StringBuilder sb = new StringBuilder('"');
-        sb.append(content).append('"');
-        if (language != null) {
-            sb.append("@").append(language.getLanguage());
-        }
-        if (type != null) {
-            sb.append("^^").append(type.toString());
-        }
-        return sb.toString();
-    }
-
-    @Override
-    public String createURI(String uri) {
-        return "<" + uri + ">";
-    }
-
-    @Override
-    public String stringValue(String node) {
-        if (node.startsWith("<")) {
-            return node.substring(1, node.length()-1);
-        } else if (node.startsWith("\"")) {
-            return node.substring(1, node.indexOf('"', 1));
-        } else
-            return node;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/TestsTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/TestsTest.java b/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/TestsTest.java
deleted file mode 100644
index 92f820e..0000000
--- a/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/TestsTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * 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.parser;
-
-import java.io.StringReader;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.marmotta.ldpath.api.backend.NodeBackend;
-import org.apache.marmotta.ldpath.api.tests.NodeTest;
-import org.hamcrest.CoreMatchers;
-import org.hamcrest.text.IsEqualIgnoringWhiteSpace;
-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;
-
-@RunWith(Parameterized.class)
-public class TestsTest {
-
-    @Parameters(name = "{index}: {1}Test")
-    public static List<String[]> testCases() {
-        return Arrays.asList(new String[][] {
-                {"<http://foo.bar> & <http://bar.foo>", "And"},
-                {"fn:eq(\"1\", \"2\")", "Function"},
-                {"@en", "LiteralLanguage"},
-                {"^^<http://foo.bar>", "LiteralType"},
-                {"!@en", "Not"},
-                {"<http://foo.bar> | <http://bar.foo>", "Or"},
-                {"<http://www.example.com/> is <http://foo.bar>", "PathEquality"},
-                {"is-a <http://foo.bar>", "IsA"},
-                {"<http://www.example.com/>", "Path"},
-                });
-    }
-    
-    @Parameter
-    public String expr;
-    
-    @Parameter(1)
-    public String name;
-
-    private NodeTest<String> test;
-    
-    private static NodeBackend<String> backend;
-
-    @BeforeClass
-    public static void beforeClass() {
-        backend = new StringTestingBackend();
-    }
-    
-    @Before
-    public void before() throws ParseException {
-        LdPathParser<String> rdfPathParser = new LdPathParser<String>(backend,new StringReader(expr));
-        test = rdfPathParser.parseTest(Collections.<String,String>emptyMap());
-    }
-    
-    @Test
-    public void testGetPathExpression() {
-        Assert.assertThat(test.getPathExpression(backend), IsEqualIgnoringWhiteSpace.equalToIgnoringWhiteSpace(expr));
-    }
-    
-    @Test
-    public void testParseSelector() {
-        final String className = "org.apache.marmotta.ldpath.model.tests." + name + "Test";
-        try {
-            final Class<?> cls = Class.forName(className);
-            Assert.assertThat(test, CoreMatchers.instanceOf(cls));
-        } catch (ClassNotFoundException e) {
-            Assert.fail("Could not load class: " + className);
-        }
-        
-    }
-    
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/test/AbstractTestBase.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/test/AbstractTestBase.java b/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/test/AbstractTestBase.java
index e1acd89..9152031 100644
--- a/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/test/AbstractTestBase.java
+++ b/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/test/AbstractTestBase.java
@@ -18,27 +18,13 @@
 package org.apache.marmotta.ldpath.test;
 
 
-import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.junit.Assert.assertThat;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringReader;
-import java.net.URL;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.NoSuchElementException;
-
 import org.apache.marmotta.ldpath.api.selectors.NodeSelector;
 import org.apache.marmotta.ldpath.backend.sesame.SesameRepositoryBackend;
 import org.apache.marmotta.ldpath.model.fields.FieldMapping;
-import org.apache.marmotta.ldpath.parser.ParseException;
-import org.apache.marmotta.ldpath.parser.LdPathParser;
+import org.apache.marmotta.ldpath.parser.*;
 import org.hamcrest.CoreMatchers;
 import org.junit.After;
-import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.rules.TestWatcher;
@@ -54,6 +40,20 @@ import org.openrdf.sail.memory.MemoryStore;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringReader;
+import java.net.URL;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.NoSuchElementException;
+
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assume.assumeThat;
+
 public abstract class AbstractTestBase {
     protected final static Map<String, String> NSS;
     static {
@@ -108,18 +108,18 @@ public abstract class AbstractTestBase {
     };
 
 
-    protected LdPathParser<Value> createParserFromResource(String input) throws IOException {
+    protected RdfPathParser<Value> createParserFromResource(String input) throws IOException {
         final URL resource = this.getClass().getResource(input);
-        assertThat("Could not load test input data '" + input + "'", resource, CoreMatchers.notNullValue());
+        assumeThat("Could not load test input data '" + input + "'", resource, CoreMatchers.notNullValue());
 
-        LdPathParser<Value> parser = new LdPathParser<Value>(backend, resource.openStream());
+        RdfPathParser<Value> parser = new RdfPathParser<Value>(backend, resource.openStream());
         assertThat("Could not parse ldPath", parser, CoreMatchers.notNullValue());
 
         return parser;
     }
 
-    protected LdPathParser<Value> createParserFromString(String program) {
-        final LdPathParser<Value> parser = new LdPathParser<Value>(backend, new StringReader(program));
+    protected RdfPathParser<Value> createParserFromString(String program) {
+        final RdfPathParser<Value> parser = new RdfPathParser<Value>(backend, new StringReader(program));
         assertThat("Could not parse ldPath", parser, CoreMatchers.notNullValue());
 
         return parser;
@@ -132,7 +132,7 @@ public abstract class AbstractTestBase {
     protected final void loadData(String datafile, RDFFormat format, String baseURI) throws RepositoryException, RDFParseException, IOException {
         // load demo data
         InputStream data = this.getClass().getResourceAsStream(datafile);
-        Assert.assertThat("Could not load test-data: " + datafile, data, notNullValue(InputStream.class));
+        Assume.assumeThat("Could not load test-data: " + datafile, data, notNullValue(InputStream.class));
 
         final SailRepositoryConnection con = repository.getConnection();
         try {
@@ -146,7 +146,7 @@ public abstract class AbstractTestBase {
     }
 
     protected Collection<Object> evaluateRule(final String ldPath, URI context) throws ParseException {
-        final LdPathParser<Value> parser = createParserFromString(ldPath);
+        final RdfPathParser<Value> parser = createParserFromString(ldPath);
         final FieldMapping<Object, Value> rule = parser.parseRule(NSS);
         final Collection<Object> values = rule.getValues(backend, context);
         return values;
@@ -166,7 +166,7 @@ public abstract class AbstractTestBase {
     }
 
     protected Collection<Value> evaluateSelector(final String ldPath, URI context) throws ParseException {
-        final LdPathParser<Value> parser = createParserFromString(ldPath);
+        final RdfPathParser<Value> parser = createParserFromString(ldPath);
         final NodeSelector<Value> sel = parser.parseSelector(NSS);
         final Collection<Value> nodes = sel.select(backend, context, null, null);
         return nodes;

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/test/resources/logback.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/test/resources/logback.xml b/libraries/ldpath/ldpath-core/src/test/resources/logback.xml
index 16c98cd..1bfecff 100644
--- a/libraries/ldpath/ldpath-core/src/test/resources/logback.xml
+++ b/libraries/ldpath/ldpath-core/src/test/resources/logback.xml
@@ -21,8 +21,6 @@
             <pattern>%d{HH:mm:ss.SSS} %highlight(%level) %cyan(%logger{15}) - %m%n</pattern>
         </encoder>
     </appender>
-    
-    <logger name="org.apache.marmotta.ldpath.parser.DefaultConfiguration" level="WARN" />
     <root level="${root-level:-INFO}">
         <appender-ref ref="CONSOLE"/>
     </root>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/test/resources/parse/namespaces.ldpath
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/test/resources/parse/namespaces.ldpath b/libraries/ldpath/ldpath-core/src/test/resources/parse/namespaces.ldpath
index 81a7def..0f7c569 100644
--- a/libraries/ldpath/ldpath-core/src/test/resources/parse/namespaces.ldpath
+++ b/libraries/ldpath/ldpath-core/src/test/resources/parse/namespaces.ldpath
@@ -17,5 +17,4 @@
 @prefix foo: <http://foo.com/some/path#> ;
 @prefix foaf: <http://xmlns.com/foaf/0.1/> ;
 @prefix test: <http://example.com/>
-@prefix dcterms: <http://purl.org/dc/terms/> ;
-@prefix foobar: <urn:uuid:1234> ;
+@prefix dcterms: <http://purl.org/dc/terms/> ;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-core/src/test/resources/parse/program.ldpath
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/test/resources/parse/program.ldpath b/libraries/ldpath/ldpath-core/src/test/resources/parse/program.ldpath
index fc4fdc5..5af4a0e 100644
--- a/libraries/ldpath/ldpath-core/src/test/resources/parse/program.ldpath
+++ b/libraries/ldpath/ldpath-core/src/test/resources/parse/program.ldpath
@@ -13,25 +13,19 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-@prefix test: <http://example.com/> ;
+@prefix test: <http://example.com/>;
 @prefix foo: <http://foo.com/some/path#> ;
 
-@graph test:context, foo:ctx, test:bar ;
-
 @filter test:type is foo:bar | test:p1 & is-a test:Case ;
 
 @boost foo:boost / ^test:boost ;
 
-path = test:p1 / test:p2 :: test:type ;
-lang_test = test:p1[@en] :: test:type ;
-type_test = foo:p2[^^test:int] :: test:type ;
-int_s = (foo:go)* :: test:type ;
-int_p = (foo:go)+ :: test:type ;
-group = (test:p1 / test:p2) :: test:type ;
-
-inverse = ^test:incoming :: test:type ;
+path = test:p1 / test:p2 :: test:type;
+lang_test = test:p1[@en] :: test:type;
+type_test = foo:p2[^^test:int] :: test:type;
+int_s = (foo:go)* :: test:type;
+int_p = (foo:go)+ :: test:type;
 
-config = test:foo :: test:type(c1="true", c2="false", c3="1.234") ;
+inverse = ^test:incoming :: test:type;
 
-foo:bar = test:foo :: test:type ;
-<http://test/> = test:test :: test:type ;
+config = test:foo :: test:type(c1=true, c2="false", c3="1.234");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-functions-collections/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-collections/pom.xml b/libraries/ldpath/ldpath-functions-collections/pom.xml
index 150c0da..e6ed175 100644
--- a/libraries/ldpath/ldpath-functions-collections/pom.xml
+++ b/libraries/ldpath/ldpath-functions-collections/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <groupId>org.apache.marmotta</groupId>
         <artifactId>marmotta-parent</artifactId>
-        <version>3.2.0-incubating-SNAPSHOT</version>
+        <version>3.1.0-incubating-SNAPSHOT</version>
         <relativePath>../../../parent</relativePath>
     </parent>
 
@@ -73,27 +73,6 @@
     </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/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-functions-date/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-date/pom.xml b/libraries/ldpath/ldpath-functions-date/pom.xml
index cecc3cc..e990287 100644
--- a/libraries/ldpath/ldpath-functions-date/pom.xml
+++ b/libraries/ldpath/ldpath-functions-date/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <groupId>org.apache.marmotta</groupId>
         <artifactId>marmotta-parent</artifactId>
-        <version>3.2.0-incubating-SNAPSHOT</version>
+        <version>3.1.0-incubating-SNAPSHOT</version>
         <relativePath>../../../parent</relativePath>
     </parent>
 
@@ -69,27 +69,6 @@
         </dependency>
     </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/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-functions-date/src/test/java/org/apache/marmotta/ldpath/model/functions/date/DateFunctionsTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-date/src/test/java/org/apache/marmotta/ldpath/model/functions/date/DateFunctionsTest.java b/libraries/ldpath/ldpath-functions-date/src/test/java/org/apache/marmotta/ldpath/model/functions/date/DateFunctionsTest.java
index ea8c9e8..8470462 100644
--- a/libraries/ldpath/ldpath-functions-date/src/test/java/org/apache/marmotta/ldpath/model/functions/date/DateFunctionsTest.java
+++ b/libraries/ldpath/ldpath-functions-date/src/test/java/org/apache/marmotta/ldpath/model/functions/date/DateFunctionsTest.java
@@ -24,7 +24,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.LdPathParser;
+import org.apache.marmotta.ldpath.parser.RdfPathParser;
 import org.apache.marmotta.ldpath.test.AbstractTestBase;
 import org.junit.Assert;
 import org.junit.Before;
@@ -48,7 +48,7 @@ public class DateFunctionsTest extends AbstractTestBase {
     @Before
     public void loadData() throws RepositoryException, RDFParseException, IOException {
         final int delta = 60 * 60 * 24 * 365;
-        now = new Date(1000*(System.currentTimeMillis() / 1000));
+        now = new Date();
         first = new Date(now.getTime() - 1000l * delta);
 
         uri = repository.getValueFactory().createURI(NSS.get("ex") + now.getTime());
@@ -76,7 +76,7 @@ public class DateFunctionsTest extends AbstractTestBase {
 
     @Test
     public void testEarliest() throws ParseException {
-        final LdPathParser<Value> parser = createParserFromString("fn:earliest(<" + prop.stringValue() + ">) :: xsd:dateTime");
+        final RdfPathParser<Value> parser = createParserFromString("fn:earliest(<" + prop.stringValue() + ">) :: xsd:dateTime");
         final FieldMapping<Object, Value> rule = parser.parseRule(NSS);
         final Collection<Object> result = rule.getValues(backend, uri);
 
@@ -88,7 +88,7 @@ public class DateFunctionsTest extends AbstractTestBase {
 
     @Test
     public void testLatest() throws ParseException {
-        final LdPathParser<Value> parser = createParserFromString("fn:latest(<" + prop.stringValue() + ">) :: xsd:dateTime");
+        final RdfPathParser<Value> parser = createParserFromString("fn:latest(<" + prop.stringValue() + ">) :: xsd:dateTime");
         final FieldMapping<Object, Value> rule = parser.parseRule(NSS);
         final Collection<Object> result = rule.getValues(backend, uri);
 

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-functions-html/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-html/pom.xml b/libraries/ldpath/ldpath-functions-html/pom.xml
index 83a77ed..fd9fe94 100644
--- a/libraries/ldpath/ldpath-functions-html/pom.xml
+++ b/libraries/ldpath/ldpath-functions-html/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>org.apache.marmotta</groupId>
         <artifactId>marmotta-parent</artifactId>
-        <version>3.2.0-incubating-SNAPSHOT</version>
+        <version>3.1.0-incubating-SNAPSHOT</version>
         <relativePath>../../../parent</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -83,27 +83,6 @@
 
 
     <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/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-functions-html/src/test/java/org/apache/marmotta/ldpath/model/functions/html/HtmlFunctionsTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-html/src/test/java/org/apache/marmotta/ldpath/model/functions/html/HtmlFunctionsTest.java b/libraries/ldpath/ldpath-functions-html/src/test/java/org/apache/marmotta/ldpath/model/functions/html/HtmlFunctionsTest.java
index 29f5426..d663924 100644
--- a/libraries/ldpath/ldpath-functions-html/src/test/java/org/apache/marmotta/ldpath/model/functions/html/HtmlFunctionsTest.java
+++ b/libraries/ldpath/ldpath-functions-html/src/test/java/org/apache/marmotta/ldpath/model/functions/html/HtmlFunctionsTest.java
@@ -27,7 +27,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.LdPathParser;
+import org.apache.marmotta.ldpath.parser.RdfPathParser;
 import org.apache.marmotta.ldpath.test.AbstractTestBase;
 import org.hamcrest.CoreMatchers;
 import org.junit.Before;
@@ -50,7 +50,7 @@ public class HtmlFunctionsTest extends AbstractTestBase {
     public void testCleanHtmlFunction() throws ParseException {
         URI uri = repository.getValueFactory().createURI(NSS.get("ex") + "Simple");
 
-        final LdPathParser<Value> parser = createParserFromString("fn:cleanHtml(foo:html) :: xsd:string");
+        final RdfPathParser<Value> parser = createParserFromString("fn:cleanHtml(foo:html) :: xsd:string");
         final FieldMapping<Object, Value> rule = parser.parseRule(NSS);
 
         final Collection<Object> result = rule.getValues(backend, uri);
@@ -67,7 +67,7 @@ public class HtmlFunctionsTest extends AbstractTestBase {
     public void testCssSelectFunction() throws ParseException {
         URI uri = repository.getValueFactory().createURI(NSS.get("ex") + "Simple");
 
-        final LdPathParser<Value> parser = createParserFromString("fn:css(\"p\", foo:html) :: xsd:string");
+        final RdfPathParser<Value> parser = createParserFromString("fn:css(\"p\", foo:html) :: xsd:string");
         final FieldMapping<Object, Value> rule = parser.parseRule(NSS);
 
         final Collection<Object> result = rule.getValues(backend, uri);
@@ -79,7 +79,7 @@ public class HtmlFunctionsTest extends AbstractTestBase {
             assertThat("String end", s, CoreMatchers.endsWith("</p>"));
         }
 
-        final LdPathParser<Value> parser2 = createParserFromString("fn:css(\"p#p2\", foo:html) :: xsd:string");
+        final RdfPathParser<Value> parser2 = createParserFromString("fn:css(\"p#p2\", foo:html) :: xsd:string");
         final FieldMapping<Object, Value> rule2 = parser2.parseRule(NSS);
 
         final Collection<Object> result2 = rule2.getValues(backend, uri);

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-functions-math/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-math/pom.xml b/libraries/ldpath/ldpath-functions-math/pom.xml
index a7c844c..3a8ede8 100644
--- a/libraries/ldpath/ldpath-functions-math/pom.xml
+++ b/libraries/ldpath/ldpath-functions-math/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <groupId>org.apache.marmotta</groupId>
         <artifactId>marmotta-parent</artifactId>
-        <version>3.2.0-incubating-SNAPSHOT</version>
+        <version>3.1.0-incubating-SNAPSHOT</version>
         <relativePath>../../../parent</relativePath>
     </parent>
 
@@ -68,27 +68,6 @@
 
 
     <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/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/MaxFunction.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/MaxFunction.java b/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/MaxFunction.java
index 252c268..a403303 100644
--- a/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/MaxFunction.java
+++ b/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/MaxFunction.java
@@ -46,7 +46,7 @@ public class MaxFunction<Node> extends MathFunction<Node> {
         return result;
     }
 
-    protected Node calc(RDFBackend<Node> backend, Collection<Node> arg) {
+    protected Node calc(NodeBackend<Node> backend, Collection<Node> arg) {
         /* MAX */
         double d = Double.MIN_VALUE;
         Node max = null;

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/MinFunction.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/MinFunction.java b/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/MinFunction.java
index c4fd8b0..ada8303 100644
--- a/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/MinFunction.java
+++ b/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/MinFunction.java
@@ -47,7 +47,7 @@ public class MinFunction<Node> extends MathFunction<Node> {
         return result;
     }
 
-    protected Node calc(RDFBackend<Node> backend, Collection<Node> arg) {
+    protected Node calc(NodeBackend<Node> backend, Collection<Node> arg) {
         /* MIN */
         double d = Double.MAX_VALUE;
         Node min = null;

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/RoundFunction.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/RoundFunction.java b/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/RoundFunction.java
index 0675249..9a18a8e 100644
--- a/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/RoundFunction.java
+++ b/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/RoundFunction.java
@@ -49,7 +49,7 @@ public class RoundFunction<Node> extends MathFunction<Node> {
         return result;
     }
 
-    protected Node calc(RDFBackend<Node> backend, Node node) {
+    protected Node calc(NodeBackend<Node> backend, Node node) {
         /* SUM */
         try {
             Double val = doubleTransformer.transform(backend, node, null);

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/4aa87dbe/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/SumFunction.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/SumFunction.java b/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/SumFunction.java
index 99d271f..a78d68b 100644
--- a/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/SumFunction.java
+++ b/libraries/ldpath/ldpath-functions-math/src/main/java/org/apache/marmotta/ldpath/model/functions/math/SumFunction.java
@@ -46,7 +46,7 @@ public class SumFunction<Node> extends MathFunction<Node> {
         return result;
     }
 
-    protected Node calc(RDFBackend<Node> backend, Collection<Node> arg) {
+    protected Node calc(NodeBackend<Node> backend, Collection<Node> arg) {
         /* SUM */
         Double d = 0d;
         for (Node n : arg) {