1 Reply Latest reply: Apr 2, 2012 11:12 AM by alwu-Oracle RSS

    sparql endpoint does not recognize named graph

      Hi, I created a sem model A, and later added quads into it. while when I searched the named graph using sem_match from sql plus, it worked well, but it did not work using neither java code nor Joseki end point. For example, I simply count the number of triples, the number using sem_match is greater than that using the code. so I guess the code does not recognize the new added quads. Any ideas?
      here are the java code:

      Oracle oracle = new Oracle(szJdbcURL, szUser, szPasswd);

      DataSource ds = DatasetFactory.create();

      ModelOracleSem model = ModelOracleSem.createOracleSemModel(oracle, szModelName);
      String queryString =
      " select (count(*) as ?count) from named <http://****> " +
      " where {" +
      " graph ?g {?s ?p ?o } " +
      "} ";

      Query query = QueryFactory.create(queryString) ;
      QueryExecution qexec = QueryExecutionFactory.create(query, ds) ;

      ResultSet results = qexec.execSelect() ;
      ResultSetFormatter.out(System.out, results, query);

      So does Joseki end point, do I need to add the named graph into joseki-config.ttl?

        • 1. Re: sparql endpoint does not recognize named graph

          To deal with quads, you need to use DatasetGraphOracleSem class.
          You can search for Test11.java in the following document.


          To configure named graph support for Joseki, please take a look at oracle:allGraphs
          in Section 7.2 of the above document.

          Hope it helps,

          Zhe Wu