You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by wi...@apache.org on 2015/10/12 16:05:57 UTC

[1/9] marmotta git commit: fixed module description

Repository: marmotta
Updated Branches:
  refs/heads/MARMOTTA-584 d702f9eda -> 87a037ddc


fixed module description


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

Branch: refs/heads/MARMOTTA-584
Commit: c911ee2c5035ad3f36c8bbb354dfb2b0738c112f
Parents: b4d8c33
Author: Sergio Fernández <wi...@apache.org>
Authored: Mon Oct 12 10:34:40 2015 +0200
Committer: Sergio Fernández <wi...@apache.org>
Committed: Mon Oct 12 10:34:40 2015 +0200

----------------------------------------------------------------------
 commons/marmotta-sesame-tools/marmotta-model-vocabs/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/c911ee2c/commons/marmotta-sesame-tools/marmotta-model-vocabs/pom.xml
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-model-vocabs/pom.xml b/commons/marmotta-sesame-tools/marmotta-model-vocabs/pom.xml
index 3365857..825263a 100644
--- a/commons/marmotta-sesame-tools/marmotta-model-vocabs/pom.xml
+++ b/commons/marmotta-sesame-tools/marmotta-model-vocabs/pom.xml
@@ -30,7 +30,7 @@
 
     <name>Marmotta Sesame Tools: Common Vocabularies</name>
 
-    <description>Util-Methods to apply 'application/rdf-patch' changesets to Sesame</description>
+    <description>Common RDF vocabularies fro Sesame</description>
 
     <build>
         <plugins>


[7/9] marmotta git commit: Merge branch 'develop' into MARMOTTA-584

Posted by wi...@apache.org.
Merge branch 'develop' into MARMOTTA-584


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

Branch: refs/heads/MARMOTTA-584
Commit: 648b9a1f6897a523aa516f0a10abff64f0226847
Parents: 0b44731 adefed4
Author: Sergio Fernández <wi...@apache.org>
Authored: Mon Oct 12 15:41:10 2015 +0200
Committer: Sergio Fernández <wi...@apache.org>
Committed: Mon Oct 12 15:41:10 2015 +0200

----------------------------------------------------------------------
 .../kiwi/reasoner/test/model/JustificationTest.java         | 9 ---------
 .../kiwi/sparql/evaluation/KiWiEvaluationStrategy.java      | 1 -
 .../apache/marmotta/kiwi/sparql/test/KiWiSparqlTest.java    | 8 --------
 3 files changed, 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/648b9a1f/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/evaluation/KiWiEvaluationStrategy.java
----------------------------------------------------------------------


[3/9] marmotta git commit: typo

Posted by wi...@apache.org.
typo


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

Branch: refs/heads/MARMOTTA-584
Commit: 9ac05e72b36a30fc9bffb5599e4d4e236104da44
Parents: c911ee2
Author: Sergio Fernández <wi...@apache.org>
Authored: Mon Oct 12 10:36:29 2015 +0200
Committer: Sergio Fernández <wi...@apache.org>
Committed: Mon Oct 12 10:36:29 2015 +0200

----------------------------------------------------------------------
 commons/marmotta-sesame-tools/marmotta-model-vocabs/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/9ac05e72/commons/marmotta-sesame-tools/marmotta-model-vocabs/pom.xml
----------------------------------------------------------------------
diff --git a/commons/marmotta-sesame-tools/marmotta-model-vocabs/pom.xml b/commons/marmotta-sesame-tools/marmotta-model-vocabs/pom.xml
index 825263a..80e683a 100644
--- a/commons/marmotta-sesame-tools/marmotta-model-vocabs/pom.xml
+++ b/commons/marmotta-sesame-tools/marmotta-model-vocabs/pom.xml
@@ -30,7 +30,7 @@
 
     <name>Marmotta Sesame Tools: Common Vocabularies</name>
 
-    <description>Common RDF vocabularies fro Sesame</description>
+    <description>Common RDF vocabularies for Sesame</description>
 
     <build>
         <plugins>


[2/9] marmotta git commit: Merge branch 'develop' into MARMOTTA-584

Posted by wi...@apache.org.
Merge branch 'develop' into MARMOTTA-584


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

Branch: refs/heads/MARMOTTA-584
Commit: 7a87c9de97049a9052b7e130f5bc45a01897b26e
Parents: d702f9e c911ee2
Author: Sergio Fernández <wi...@apache.org>
Authored: Mon Oct 12 10:35:03 2015 +0200
Committer: Sergio Fernández <wi...@apache.org>
Committed: Mon Oct 12 10:35:03 2015 +0200

----------------------------------------------------------------------
 commons/marmotta-sesame-tools/marmotta-model-vocabs/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[4/9] marmotta git commit: some code cleanup

Posted by wi...@apache.org.
some code cleanup


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

Branch: refs/heads/MARMOTTA-584
Commit: 8e97ffc51b05c7d1d92a94684308099ab9794ece
Parents: 9ac05e7
Author: Sergio Fernández <wi...@apache.org>
Authored: Mon Oct 12 11:58:47 2015 +0200
Committer: Sergio Fernández <wi...@apache.org>
Committed: Mon Oct 12 11:58:47 2015 +0200

----------------------------------------------------------------------
 .../reasoner/model/program/Justification.java    |  3 ++-
 .../test/engine/JustificationResolutionTest.java | 19 +++++--------------
 2 files changed, 7 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/8e97ffc5/libraries/kiwi/kiwi-reasoner/src/main/java/org/apache/marmotta/kiwi/reasoner/model/program/Justification.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-reasoner/src/main/java/org/apache/marmotta/kiwi/reasoner/model/program/Justification.java b/libraries/kiwi/kiwi-reasoner/src/main/java/org/apache/marmotta/kiwi/reasoner/model/program/Justification.java
index 56d982b..ec8f947 100644
--- a/libraries/kiwi/kiwi-reasoner/src/main/java/org/apache/marmotta/kiwi/reasoner/model/program/Justification.java
+++ b/libraries/kiwi/kiwi-reasoner/src/main/java/org/apache/marmotta/kiwi/reasoner/model/program/Justification.java
@@ -71,7 +71,7 @@ public class Justification  {
 
     public Justification() {
         supportingTriples = StatementCommons.newQuadrupleSet();
-        supportingRules   = new HashSet<Rule>();
+        supportingRules   = new HashSet<>();
     }
 
     public long getId() {
@@ -146,4 +146,5 @@ public class Justification  {
                 ", supportingRules=" + supportingRules +
                 '}';
     }
+
 }

http://git-wip-us.apache.org/repos/asf/marmotta/blob/8e97ffc5/libraries/kiwi/kiwi-reasoner/src/test/java/org/apache/marmotta/kiwi/reasoner/test/engine/JustificationResolutionTest.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-reasoner/src/test/java/org/apache/marmotta/kiwi/reasoner/test/engine/JustificationResolutionTest.java b/libraries/kiwi/kiwi-reasoner/src/test/java/org/apache/marmotta/kiwi/reasoner/test/engine/JustificationResolutionTest.java
index 3f1aa48..8229e68 100644
--- a/libraries/kiwi/kiwi-reasoner/src/test/java/org/apache/marmotta/kiwi/reasoner/test/engine/JustificationResolutionTest.java
+++ b/libraries/kiwi/kiwi-reasoner/src/test/java/org/apache/marmotta/kiwi/reasoner/test/engine/JustificationResolutionTest.java
@@ -51,10 +51,8 @@ public class JustificationResolutionTest {
 
     private Map<Statement,Set<Justification>> baseJustifications;
 
-
     protected static Random rnd = new Random();
 
-
     private KiWiTriple t1, t2, t3, t4, t5; // base
     private KiWiTriple i1, i2, i3, i4, i5, i6; // inferred
     private Justification j1, j2, j3, j4, j5, tj1, tj2, tj3;
@@ -68,7 +66,6 @@ public class JustificationResolutionTest {
 
         baseJustifications = StatementCommons.newQuadrupleMap();
 
-
         KiWiUriResource s1 = randomURI();
         KiWiUriResource s2 = randomURI();
         KiWiUriResource s3 = randomURI();
@@ -88,7 +85,6 @@ public class JustificationResolutionTest {
         t4 = new KiWiTriple(s1,p1,o1, randomURI());
         t5 = new KiWiTriple(s3,p1,o1, randomURI());
 
-
         i1 = new KiWiTriple(s1,p2,o1, ctx_inferred); i1.setInferred(true);
         i2 = new KiWiTriple(s1,p1,o2, ctx_inferred); i2.setInferred(true);
         i3 = new KiWiTriple(s3,p1,o3, ctx_inferred); i3.setInferred(true);
@@ -144,8 +140,7 @@ public class JustificationResolutionTest {
         tj2.setTriple(i4);
         tj2.getSupportingTriples().add(i1);
         tj2.getSupportingTriples().add(i2);
-
-
+        
         // i6 is justified by i2 and i5 (so multiplexing needed)
         tj3 = new Justification();
         tj3.setTriple(i6);
@@ -172,9 +167,6 @@ public class JustificationResolutionTest {
         Assert.assertTrue(tj1r.getSupportingTriples().contains(t1));
         Assert.assertTrue(tj1r.getSupportingTriples().contains(t2));
         Assert.assertTrue(tj1r.getSupportingTriples().contains(t3));
-
-
-
     }
 
     /**
@@ -228,7 +220,6 @@ public class JustificationResolutionTest {
         Assert.assertThat(r4,Matchers.<Justification>hasItem(hasProperty("supportingTriples", allOf(hasItems(t2, t4, t5), not(hasItem(t3))))));
     }
 
-
     // TODO: a test taking into account transaction justifications
 
     /**
@@ -240,7 +231,6 @@ public class JustificationResolutionTest {
 
     }
 
-
     /**
      * Return a random URI, with a 10% chance of returning a URI that has already been used.
      * @return
@@ -276,12 +266,11 @@ public class JustificationResolutionTest {
         return object;
     }
 
-
-
     private class MockReasoningEngine extends ReasoningEngine {
+
         private MockReasoningEngine() {
-        }
 
+        }
 
         /**
          * Return the justifications for the triple passed as argument.
@@ -312,5 +301,7 @@ public class JustificationResolutionTest {
         public Set<Justification> getBaseJustifications(KiWiReasoningConnection connection, Set<Justification> justifications) throws SQLException, ReasoningException {
             return super.getBaseJustifications(connection, justifications);
         }
+
     }
+
 }


[9/9] marmotta git commit: re-applied another patch (MARMOTTA-578) that also got lost in a merge during gsoc

Posted by wi...@apache.org.
re-applied another patch (MARMOTTA-578) that also got lost in a merge during gsoc


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

Branch: refs/heads/MARMOTTA-584
Commit: 87a037ddc709bda16f35903a04ed4fb3a5847b58
Parents: 9f88ede
Author: Sergio Fernández <wi...@apache.org>
Authored: Mon Oct 12 16:03:43 2015 +0200
Committer: Sergio Fernández <wi...@apache.org>
Committed: Mon Oct 12 16:03:43 2015 +0200

----------------------------------------------------------------------
 .../apache/marmotta/kiwi/sparql/builder/SQLBuilder.java | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/87a037dd/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/builder/SQLBuilder.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/builder/SQLBuilder.java b/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/builder/SQLBuilder.java
index 18e9e10..3165e8c 100644
--- a/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/builder/SQLBuilder.java
+++ b/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/builder/SQLBuilder.java
@@ -813,6 +813,18 @@ public class SQLBuilder {
                     groupClause.append(", ");
                 }
             }
+
+            if (orderby.size() > 0) {
+                groupClause.append(", ");
+                for(Iterator<OrderElem> it = orderby.iterator(); it.hasNext(); ) {
+                    OrderElem elem = it.next();
+                    groupClause.append(evaluateExpression(elem.getExpr(), ValueType.STRING));
+                    if (it.hasNext()) {
+                        groupClause.append(", ");
+                    }
+                }
+            }
+
             groupClause.append(" \n");
         }
 


[6/9] marmotta git commit: more cleanup

Posted by wi...@apache.org.
more cleanup


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

Branch: refs/heads/MARMOTTA-584
Commit: adefed448a9cb1de3329f8b69b1733c1e5b38c05
Parents: 8e97ffc
Author: Sergio Fernández <wi...@apache.org>
Authored: Mon Oct 12 15:40:19 2015 +0200
Committer: Sergio Fernández <wi...@apache.org>
Committed: Mon Oct 12 15:40:19 2015 +0200

----------------------------------------------------------------------
 .../kiwi/reasoner/test/model/JustificationTest.java         | 9 ---------
 .../kiwi/sparql/evaluation/KiWiEvaluationStrategy.java      | 1 -
 .../apache/marmotta/kiwi/sparql/test/KiWiSparqlTest.java    | 8 --------
 3 files changed, 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/adefed44/libraries/kiwi/kiwi-reasoner/src/test/java/org/apache/marmotta/kiwi/reasoner/test/model/JustificationTest.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-reasoner/src/test/java/org/apache/marmotta/kiwi/reasoner/test/model/JustificationTest.java b/libraries/kiwi/kiwi-reasoner/src/test/java/org/apache/marmotta/kiwi/reasoner/test/model/JustificationTest.java
index f3a1cb7..c354465 100644
--- a/libraries/kiwi/kiwi-reasoner/src/test/java/org/apache/marmotta/kiwi/reasoner/test/model/JustificationTest.java
+++ b/libraries/kiwi/kiwi-reasoner/src/test/java/org/apache/marmotta/kiwi/reasoner/test/model/JustificationTest.java
@@ -39,7 +39,6 @@ public class JustificationTest {
 
     protected static Random rnd = new Random();
 
-
     private KiWiTriple t1, t2, t3, t4; // base
     private KiWiTriple i1, i2, i3, i4; // inferred
     private Rule r1, r2;
@@ -71,11 +70,8 @@ public class JustificationTest {
         i2 = new KiWiTriple(s1,p1,o2, ctx_inferred); i2.setInferred(true);
         i3 = new KiWiTriple(s3,p1,o3, ctx_inferred); i3.setInferred(true);
         i4 = new KiWiTriple(s1,p2,o1, ctx_inferred); i4.setInferred(true);
-
-
     }
 
-
     @Test
     public void testJustificationEquals() {
         Justification j1 = new Justification();
@@ -107,7 +103,6 @@ public class JustificationTest {
         Assert.assertNotEquals(j1, j4);
     }
 
-
     @Test
     public void testJustificationSet() {
         Set<Justification> set = new HashSet<>();
@@ -129,7 +124,6 @@ public class JustificationTest {
 
         Assert.assertEquals(1, set.size());
 
-
         // j3 differs in the inferred triple
         Justification j3 = new Justification();
         j3.setTriple(i2);
@@ -142,7 +136,6 @@ public class JustificationTest {
 
         Assert.assertEquals(2, set.size());
 
-
         // j4 differs in the supporting triples
         Justification j4 = new Justification();
         j4.setTriple(i1);
@@ -156,8 +149,6 @@ public class JustificationTest {
         Assert.assertEquals(3, set.size());
     }
 
-
-
     /**
      * Return a random URI, with a 10% chance of returning a URI that has already been used.
      * @return

http://git-wip-us.apache.org/repos/asf/marmotta/blob/adefed44/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/evaluation/KiWiEvaluationStrategy.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/evaluation/KiWiEvaluationStrategy.java b/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/evaluation/KiWiEvaluationStrategy.java
index bc9b188..6315886 100644
--- a/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/evaluation/KiWiEvaluationStrategy.java
+++ b/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/evaluation/KiWiEvaluationStrategy.java
@@ -136,7 +136,6 @@ public class KiWiEvaluationStrategy extends EvaluationStrategyImpl{
         }
     }
 
-
     @Override
     public CloseableIteration<BindingSet, QueryEvaluationException> evaluate(LeftJoin join, BindingSet bindings) throws QueryEvaluationException {
         if(isSupported(join)) {

http://git-wip-us.apache.org/repos/asf/marmotta/blob/adefed44/libraries/kiwi/kiwi-sparql/src/test/java/org/apache/marmotta/kiwi/sparql/test/KiWiSparqlTest.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-sparql/src/test/java/org/apache/marmotta/kiwi/sparql/test/KiWiSparqlTest.java b/libraries/kiwi/kiwi-sparql/src/test/java/org/apache/marmotta/kiwi/sparql/test/KiWiSparqlTest.java
index 6f34750..c3a2868 100644
--- a/libraries/kiwi/kiwi-sparql/src/test/java/org/apache/marmotta/kiwi/sparql/test/KiWiSparqlTest.java
+++ b/libraries/kiwi/kiwi-sparql/src/test/java/org/apache/marmotta/kiwi/sparql/test/KiWiSparqlTest.java
@@ -18,28 +18,20 @@
 package org.apache.marmotta.kiwi.sparql.test;
 
 import com.google.common.base.Function;
-import com.google.common.collect.Collections2;
 import com.google.common.collect.Lists;
 import info.aduna.iteration.Iterations;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.io.IOUtils;
-import org.apache.marmotta.commons.sesame.model.StatementCommons;
-import org.apache.marmotta.commons.vocabulary.FOAF;
 import org.apache.marmotta.kiwi.config.KiWiConfiguration;
 import org.apache.marmotta.kiwi.sail.KiWiStore;
-import org.apache.marmotta.kiwi.sparql.function.NativeFunctionRegistry;
 import org.apache.marmotta.kiwi.sparql.sail.KiWiSparqlSail;
 import org.apache.marmotta.kiwi.test.junit.KiWiDatabaseRunner;
-import org.apache.marmotta.kiwi.vocabulary.FN_MARMOTTA;
-import org.hamcrest.Matchers;
 import org.junit.*;
 import org.junit.rules.TestWatcher;
 import org.junit.runner.Description;
 import org.junit.runner.RunWith;
 import org.openrdf.model.*;
-import org.openrdf.model.impl.URIImpl;
 import org.openrdf.query.*;
-import org.openrdf.query.impl.DatasetImpl;
 import org.openrdf.repository.Repository;
 import org.openrdf.repository.RepositoryConnection;
 import org.openrdf.repository.RepositoryException;


[5/9] marmotta git commit: Merge branch 'develop' into MARMOTTA-584

Posted by wi...@apache.org.
Merge branch 'develop' into MARMOTTA-584


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

Branch: refs/heads/MARMOTTA-584
Commit: 0b44731fb986cb8296df85fac043dd6d9d77f1d5
Parents: 7a87c9d 8e97ffc
Author: Sergio Fernández <wi...@apache.org>
Authored: Mon Oct 12 11:59:21 2015 +0200
Committer: Sergio Fernández <wi...@apache.org>
Committed: Mon Oct 12 11:59:21 2015 +0200

----------------------------------------------------------------------
 .../marmotta-model-vocabs/pom.xml                |  2 +-
 .../reasoner/model/program/Justification.java    |  3 ++-
 .../test/engine/JustificationResolutionTest.java | 19 +++++--------------
 3 files changed, 8 insertions(+), 16 deletions(-)
----------------------------------------------------------------------



[8/9] marmotta git commit: re-applied the MARMOTTA-608 patch I don't know why got lost in a merge during gsoc

Posted by wi...@apache.org.
re-applied the MARMOTTA-608 patch I don't know why got lost in a merge during gsoc


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

Branch: refs/heads/MARMOTTA-584
Commit: 9f88ede63448a018774974d814ee11816484d345
Parents: 648b9a1
Author: Sergio Fernández <wi...@apache.org>
Authored: Mon Oct 12 15:46:28 2015 +0200
Committer: Sergio Fernández <wi...@apache.org>
Committed: Mon Oct 12 15:46:28 2015 +0200

----------------------------------------------------------------------
 .../org/apache/marmotta/kiwi/sparql/builder/SQLBuilder.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/9f88ede6/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/builder/SQLBuilder.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/builder/SQLBuilder.java b/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/builder/SQLBuilder.java
index 31a6d83..18e9e10 100644
--- a/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/builder/SQLBuilder.java
+++ b/libraries/kiwi/kiwi-sparql/src/main/java/org/apache/marmotta/kiwi/sparql/builder/SQLBuilder.java
@@ -624,9 +624,11 @@ public class SQLBuilder {
         for(SQLVariable v : vars) {
             if(v.getProjectionType() != ValueType.NONE && (projectedVars.isEmpty() || projectedVars.contains(v.getSparqlName()))) {
                 String projectedName = v.getName();
-                String fromName = v.getExpressions().get(0);
 
-                projections.add(fromName + " AS " + projectedName);
+                if (v.getExpressions() != null && v.getExpressions().size() > 0) {
+                    String fromName = v.getExpressions().get(0);
+                    projections.add(fromName + " AS " + projectedName);
+                }
 
                 if(v.getLiteralTypeExpression() != null) {
                     projections.add(v.getLiteralTypeExpression() + " AS " + projectedName + "_TYPE");