marmotta-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sschaff...@apache.org
Subject [04/50] [abbrv] git commit: MARMOTTA-110: Splitted Backend for LDPath, fixed some warnings. MARMOTTA-215: Added Tests for @graph parsing in LDPath
Date Mon, 30 Sep 2013 16:44:41 GMT
MARMOTTA-110: Splitted Backend for LDPath, fixed some warnings.
MARMOTTA-215: Added Tests for @graph parsing in LDPath


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/55e05efa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/55e05efa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/55e05efa

Branch: refs/heads/master
Commit: 55e05efa4503a4bd7fdcb83de5ca86a48e94857f
Parents: d74b7a7
Author: Jakob Frank <jakob@apache.org>
Authored: Mon Sep 9 15:20:22 2013 +0200
Committer: Jakob Frank <jakob@apache.org>
Committed: Tue Sep 10 12:30:33 2013 +0200

----------------------------------------------------------------------
 .../ldpath/api/functions/NodeFunction.java      |  2 +-
 .../marmotta/ldpath/api/tests/NodeTest.java     |  1 +
 .../api/transformers/NodeTransformer.java       |  5 +-
 .../model/functions/ConcatenateFunction.java    |  3 +-
 .../ldpath/model/functions/CountFunction.java   |  3 +-
 .../ldpath/model/functions/FirstFunction.java   |  5 +-
 .../ldpath/model/functions/LastFunction.java    |  5 +-
 .../ldpath/model/functions/SortFunction.java    |  3 +-
 .../marmotta/ldpath/model/programs/Program.java | 53 +++++++++++------
 .../tests/functions/BinaryNumericTest.java      |  1 +
 .../marmotta/ldpath/util/Collections.java       |  3 +
 .../marmotta/ldpath/parser/ProgramTest.java     | 61 ++++++++++++++++++++
 .../ldpath-core/src/test/resources/logback.xml  |  2 +
 .../src/test/resources/parse/program.ldpath     | 17 +++---
 14 files changed, 128 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/55e05efa/libraries/ldpath/ldpath-api/src/main/java/org/apache/marmotta/ldpath/api/functions/NodeFunction.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-api/src/main/java/org/apache/marmotta/ldpath/api/functions/NodeFunction.java
b/libraries/ldpath/ldpath-api/src/main/java/org/apache/marmotta/ldpath/api/functions/NodeFunction.java
index 4d26d83..86805f6 100644
--- a/libraries/ldpath/ldpath-api/src/main/java/org/apache/marmotta/ldpath/api/functions/NodeFunction.java
+++ b/libraries/ldpath/ldpath-api/src/main/java/org/apache/marmotta/ldpath/api/functions/NodeFunction.java
@@ -44,7 +44,7 @@ public interface NodeFunction<T,Node> extends LDPathConstruct<Node>
{
      * @param args a nested list of KiWiNodes
      * @return
      */
-    public T apply(RDFBackend<Node> backend, Node context, Collection<Node>...
args) throws IllegalArgumentException;
+    public T apply(RDFBackend<Node> backend, Node context, @SuppressWarnings("unchecked")
Collection<Node>... args) throws IllegalArgumentException;
 
     /**
      * A string describing the signature of this node function, e.g. "fn:content(uris : Nodes)
: Nodes". The

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/55e05efa/libraries/ldpath/ldpath-api/src/main/java/org/apache/marmotta/ldpath/api/tests/NodeTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-api/src/main/java/org/apache/marmotta/ldpath/api/tests/NodeTest.java
b/libraries/ldpath/ldpath-api/src/main/java/org/apache/marmotta/ldpath/api/tests/NodeTest.java
index 17f4da1..78a0414 100644
--- a/libraries/ldpath/ldpath-api/src/main/java/org/apache/marmotta/ldpath/api/tests/NodeTest.java
+++ b/libraries/ldpath/ldpath-api/src/main/java/org/apache/marmotta/ldpath/api/tests/NodeTest.java
@@ -31,6 +31,7 @@ import org.apache.marmotta.ldpath.api.functions.NodeFunction;
 public abstract class NodeTest<Node> implements NodeFunction<Boolean, Node> {
 
     @Override
+    @SafeVarargs
     public final Boolean apply(RDFBackend<Node> backend, Node context, Collection<Node>...
args)
             throws IllegalArgumentException {
 

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/55e05efa/libraries/ldpath/ldpath-api/src/main/java/org/apache/marmotta/ldpath/api/transformers/NodeTransformer.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-api/src/main/java/org/apache/marmotta/ldpath/api/transformers/NodeTransformer.java
b/libraries/ldpath/ldpath-api/src/main/java/org/apache/marmotta/ldpath/api/transformers/NodeTransformer.java
index 54e50ff..c467fb1 100644
--- a/libraries/ldpath/ldpath-api/src/main/java/org/apache/marmotta/ldpath/api/transformers/NodeTransformer.java
+++ b/libraries/ldpath/ldpath-api/src/main/java/org/apache/marmotta/ldpath/api/transformers/NodeTransformer.java
@@ -17,11 +17,10 @@
  */
 package org.apache.marmotta.ldpath.api.transformers;
 
-import org.apache.marmotta.ldpath.api.backend.NodeBackend;
-import org.apache.marmotta.ldpath.api.backend.RDFBackend;
-
 import java.util.Map;
 
+import org.apache.marmotta.ldpath.api.backend.RDFBackend;
+
 /**
  * Implementations of this interface allow to transform KiWiNode objects into the type T.
This is
  * currently required by the indexer to map KiWiNodes to the Java types corresponding to
the

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/55e05efa/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/ConcatenateFunction.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/ConcatenateFunction.java
b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/ConcatenateFunction.java
index 81437a6..127c621 100644
--- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/ConcatenateFunction.java
+++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/ConcatenateFunction.java
@@ -46,7 +46,8 @@ public class ConcatenateFunction<Node> extends SelectorFunction<Node>
{
      * @return
      */
     @Override
-    public Collection<Node> apply(RDFBackend<Node> rdfBackend, Node context,
Collection<Node>... args) throws IllegalArgumentException {
+    @SafeVarargs
+    public final Collection<Node> apply(RDFBackend<Node> rdfBackend, Node context,
Collection<Node>... args) throws IllegalArgumentException {
         Iterator<Node> it = org.apache.marmotta.ldpath.util.Collections.iterator(args);
         StringBuilder result = new StringBuilder();
         while (it.hasNext()) {

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/55e05efa/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/CountFunction.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/CountFunction.java
b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/CountFunction.java
index 1f0d130..6e0fc90 100644
--- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/CountFunction.java
+++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/CountFunction.java
@@ -31,7 +31,8 @@ public class CountFunction<Node> extends SelectorFunction<Node>
{
     private final URI dataType = URI.create("http://www.w3.org/2001/XMLSchema#integer");
 
     @Override
-    public Collection<Node> apply(RDFBackend<Node> backend, Node context, Collection<Node>...
args) throws IllegalArgumentException {
+    @SafeVarargs
+    public final Collection<Node> apply(RDFBackend<Node> backend, Node context,
Collection<Node>... args) throws IllegalArgumentException {
 
         LinkedList<Node> result = new LinkedList<Node>();
         for (Collection<Node> coll : args) {

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/55e05efa/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/FirstFunction.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/FirstFunction.java
b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/FirstFunction.java
index 735c13a..44e34c4 100644
--- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/FirstFunction.java
+++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/FirstFunction.java
@@ -29,7 +29,7 @@ import org.apache.marmotta.ldpath.api.functions.SelectorFunction;
  *
  *
  * @param <Node> the node type used by the backend
- * @author jakob
+ * @author Jakob Frank <jakob@apache.org>
  * 
  */
 public class FirstFunction<Node> extends SelectorFunction<Node> {
@@ -44,7 +44,8 @@ public class FirstFunction<Node> extends SelectorFunction<Node>
{
      * @return
      */
     @Override
-    public Collection<Node> apply(RDFBackend<Node> rdfBackend, Node context,
Collection<Node>... args) throws IllegalArgumentException {
+    @SafeVarargs
+    public final Collection<Node> apply(RDFBackend<Node> rdfBackend, Node context,
Collection<Node>... args) throws IllegalArgumentException {
         for (Collection<Node> arg : args) {
             if (arg.size() > 0) { return arg; }
         }

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/55e05efa/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/LastFunction.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/LastFunction.java
b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/LastFunction.java
index ef3cbfe..a0e502e 100644
--- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/LastFunction.java
+++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/LastFunction.java
@@ -27,7 +27,7 @@ import org.apache.marmotta.ldpath.api.functions.SelectorFunction;
 /**
  * Selects the <code>last</code> node in the argument list.
  * 
- * @author jfrank
+ * @author Jakob Frank <jakob@apache.org>
  * 
  */
 public class LastFunction<Node> extends SelectorFunction<Node> {
@@ -41,7 +41,8 @@ public class LastFunction<Node> extends SelectorFunction<Node>
{
      * @return
      */
     @Override
-    public Collection<Node> apply(RDFBackend<Node> rdfBackend, Node context,
Collection<Node>... args) throws IllegalArgumentException {
+    @SafeVarargs
+    public final Collection<Node> apply(RDFBackend<Node> rdfBackend, Node context,
Collection<Node>... args) throws IllegalArgumentException {
         for (int i = args.length - 1; i >= 0; i--) {
             if (args[i].size() > 0) { return args[i]; }
         }

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/55e05efa/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/SortFunction.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/SortFunction.java
b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/SortFunction.java
index 30ec623..786f4ad 100644
--- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/SortFunction.java
+++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/SortFunction.java
@@ -65,7 +65,8 @@ public class SortFunction<Node> extends SelectorFunction<Node>
{
      * @return
      */
     @Override
-    public Collection<Node> apply(final RDFBackend<Node> nodeRDFBackend, Node
context, Collection<Node>... args) throws IllegalArgumentException {
+    @SafeVarargs
+    public final Collection<Node> apply(final RDFBackend<Node> nodeRDFBackend,
Node context, Collection<Node>... args) throws IllegalArgumentException {
         String order     = "string";
         String direction = "asc";
 

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/55e05efa/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/programs/Program.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/programs/Program.java
b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/programs/Program.java
index 43930eb..ae4ffcb 100644
--- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/programs/Program.java
+++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/programs/Program.java
@@ -58,7 +58,7 @@ public class Program<Node> implements LDPathConstruct<Node>
{
      * A map mapping from namespace prefix to namespace URI
      */
     private Map<String, String> namespaces;
-    
+
     /**
      * Restrict evaluation of the program to the graphs/contexts
      */
@@ -74,7 +74,7 @@ public class Program<Node> implements LDPathConstruct<Node>
{
      * An (optional) selector to resolve a document boost factor.
      */
     private FieldMapping<Float,Node> booster;
-    
+
     /**
      * The field mappings contained in this program.
      */
@@ -83,7 +83,7 @@ public class Program<Node> implements LDPathConstruct<Node>
{
     public Program() {
         namespaces = new LinkedHashMap<String, String>();
         fields = new LinkedHashSet<FieldMapping<?,Node>>();
-        graphs = new HashSet<Node>();
+        graphs = new LinkedHashSet<Node>();
     }
 
     public void addNamespace(String prefix, String uri) {
@@ -97,7 +97,7 @@ public class Program<Node> implements LDPathConstruct<Node>
{
     public Set<FieldMapping<?,Node>> getFields() {
         return fields;
     }
-    
+
     public FieldMapping<?,Node> getField(String name) {
         for(FieldMapping<?,Node> m : fields) {
             if(name.equals(m.getFieldName())) {
@@ -134,21 +134,21 @@ public class Program<Node> implements LDPathConstruct<Node>
{
     public void setNamespaces(Map<String, String> namespaces) {
         this.namespaces = new LinkedHashMap<String, String>(namespaces);
     }
-    
+
     public Set<Node> getGraphs() {
         return this.graphs;
     }
-    
+
     @SuppressWarnings("unchecked")
     public Node[] getGraphArr() {
-        return (Node[]) this.graphs.toArray(new Object[this.graphs.size()]);
+        return (Node[]) this.graphs.toArray();
     }
-    
+
     public void setGraphs(Collection<Node> graphs) {
         this.graphs.clear();
         this.graphs.addAll(graphs);
     }
-    
+
     /**
      * Executes this Program on the parsed {@link RDFBackend backend}. 
      * @param context The context of the execution
@@ -178,22 +178,41 @@ public class Program<Node> implements LDPathConstruct<Node>
{
         return result;
     }
 
-    
-    
+
+
     public String getPathExpression(NodeBackend<Node> backend) {
         StringBuilder sb = new StringBuilder();
-        // Filter (?)
+        // Graphs (optional)
+        if (graphs != null && graphs.size() > 0) {
+            sb.append("@graph");
+            boolean first = true;
+            for (Node gaph : graphs) {
+                if (backend.isURI(gaph)) {
+                    if (first) {
+                        sb.append(" <");
+                    } else{
+                        sb.append(", <");
+                    }
+                    sb.append(backend.stringValue(gaph)).append(">");
+
+                    first = false;
+                }
+            }
+            sb.append(" ;\n");
+        }
+
+        // Filter (optional)
         if (filter != null) {
             sb.append(String.format("@filter %s ;%n", filter.getPathExpression(backend)));
         }
 
-        // Booster (?)
+        // Booster (optional)
         if (booster != null) {
             sb.append(String.format("@boost %s ;%n", booster.getSelector().getPathExpression(backend)));
         }
 
         // Field-Definitions
-		for (FieldMapping<?,Node> field : fields) {
+        for (FieldMapping<?,Node> field : fields) {
             sb.append(String.format("  %s%n", field.getPathExpression(backend)));
         }
         String progWithoutNamespace = sb.toString();
@@ -210,7 +229,7 @@ public class Program<Node> implements LDPathConstruct<Node>
{
             progWithoutNamespace = progWithoutNamespace.replaceAll("<" + Pattern.quote(ns.getValue())
+ "([^>]*)>", Matcher.quoteReplacement(ns.getKey())
                     + ":$1");
         }
-        
+
 
         // Also resolve default namespaces...
         for (Entry<String, String> ns : DEFAULT_NAMESPACES.entrySet()) {
@@ -221,8 +240,8 @@ public class Program<Node> implements LDPathConstruct<Node>
{
         }
         final StringBuilder prefixes = new StringBuilder();
         for (Entry<String, String> ns : namespaces.entrySet()) {
-        	prefixes.append(String.format("@prefix %s : <%s> ;%n", ns.getKey(), ns.getValue()));
-		}
+            prefixes.append(String.format("@prefix %s: <%s> ;%n", ns.getKey(), ns.getValue()));
+        }
 
         return prefixes.append(progWithoutNamespace).toString();
     }

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/55e05efa/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/BinaryNumericTest.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/BinaryNumericTest.java
b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/BinaryNumericTest.java
index b7422d6..a35781c 100644
--- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/BinaryNumericTest.java
+++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/BinaryNumericTest.java
@@ -30,6 +30,7 @@ public abstract  class BinaryNumericTest<Node> extends TestFunction<Node>
{
     protected final DoubleTransformer<Node> transformer = new DoubleTransformer<Node>();
 
     @Override
+    @SafeVarargs
     public final Boolean apply(RDFBackend<Node> backend, Node context,
             Collection<Node>... args) throws IllegalArgumentException {
 

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/55e05efa/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 8f2abea..651c771 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,6 +34,7 @@ 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) {
@@ -46,6 +47,7 @@ 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);
     }
@@ -57,6 +59,7 @@ 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/55e05efa/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
new file mode 100644
index 0000000..0ee7311
--- /dev/null
+++ b/libraries/ldpath/ldpath-core/src/test/java/org/apache/marmotta/ldpath/parser/ProgramTest.java
@@ -0,0 +1,61 @@
+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);
+        
+        RdfPathParser<String> rdfPathParser = new RdfPathParser<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/55e05efa/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 1bfecff..16c98cd 100644
--- a/libraries/ldpath/ldpath-core/src/test/resources/logback.xml
+++ b/libraries/ldpath/ldpath-core/src/test/resources/logback.xml
@@ -21,6 +21,8 @@
             <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/55e05efa/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 cb75ce6..7d2670a 100644
--- a/libraries/ldpath/ldpath-core/src/test/resources/parse/program.ldpath
+++ b/libraries/ldpath/ldpath-core/src/test/resources/parse/program.ldpath
@@ -13,7 +13,7 @@
  *  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 ;
@@ -22,12 +22,13 @@
 
 @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;
+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;
+inverse = ^test:incoming :: test:type ;
 
-config = test:foo :: test:type(c1=true, c2="false", c3="1.234");
\ No newline at end of file
+config = test:foo :: test:type(c1="true", c2="false", c3="1.234") ;
\ No newline at end of file


Mime
View raw message