Commits

Anonymous committed 5778179

Add DISTINCT keyword to SPARQL queries

Comments (0)

Files changed (1)

chempound-app/src/main/java/net/chempound/datastore/AbstractTripleStore.java

              "PREFIX ore: <" + ORE_NS + ">\n" +
              "PREFIX foaf: <" + FOAF_NS + ">\n" +
              "" +
-             "SELECT ?uri ?title ?type ?thumbnail" +
+             "SELECT DISTINCT ?uri ?title ?type ?thumbnail" +
              "  WHERE {" +
              "    ?aggregation ore:aggregates ?uri ." +
              "    OPTIONAL {" +
              "PREFIX ore: <" + ORE_NS + ">\n" +
              "PREFIX foaf: <" + FOAF_NS + ">\n" +
              "" +
-             "SELECT ?uri ?title ?type ?thumbnail" +
+             "SELECT DISTINCT ?uri ?title ?type ?thumbnail" +
              "  WHERE {" +
              "    ?uri a <http://wwmm.ch.cam.ac.uk/chempound/terms/Item> ." +
              "    OPTIONAL {" +