3

I use Jena from Java code and Blazegraph as a server, I have tried to query the first superclass in a path of a certain class, and of course, I didn't use either * or + with the predicate rdfs:subClassOf.

The query works well from the Blazegraph interface, but when I try to apply the query from Jena and Java, it returns all superclasses!

The followings are the query and the code:

PREFIX snomed-ct: <http://ihtsdo.org/snomedct/clinicalFinding#> 
SELECT DISTINCT * 
WHERE { 

  snomed-ct:47686007 rdfs:subClassOf  ?Identifier. 
}

Query query = QueryFactory.create(queryString); 
QueryExecution qExe = QueryExecutionFactory.sparqlService("http://localhost:9999/blazegraph/namespace/snomed/sparql", query);
ResultSet results = qExe.execSelect();

I noted this, when I use the web interface of Blazegraph with URL "localhost" the query work well, but if I put the IP address instead of localhost the query returns all superclasses, but from Java code neither change using localhost or IP.

Edit: what follows is the properties file:

com.bigdata.rwstore.RWStore.readBlobsAsync=false
com.bigdata.journal.AbstractJournal.file=blazegraph.jnl

com.bigdata.journal.AbstractJournal.bufferMode=DiskRW

com.bigdata.service.AbstractTransactionService.minReleaseAge=1

com.bigdata.journal.Journal.groupCommit=false

com.bigdata.btree.writeRetentionQueue.capacity=4000
com.bigdata.btree.BTree.branchingFactor=128

com.bigdata.journal.AbstractJournal.initialExtent=209715200
com.bigdata.journal.AbstractJournal.maximumExtent=209715200

##
## Setup for QUADS mode without the full text index.
##
com.bigdata.rdf.sail.truthMaintenance=false
com.bigdata.rdf.store.AbstractTripleStore.quads=false
com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiers=false
com.bigdata.rdf.store.AbstractTripleStore.textIndex=false
com.bigdata.rdf.store.AbstractTripleStore.axiomsClass=com.bigdata.rdf.axioms.NoAxioms


com.bigdata.namespace.kb.lex.com.bigdata.btree.BTree.branchingFactor=400

com.bigdata.namespace.kb.spo.com.bigdata.btree.BTree.branchingFactor=1024
Mario Raw
  • 41
  • 6
  • 2
    That means inference is enabled by default, or not? I mean, is there only one asserted super class? If so, clearly in the Blazegraph interface reasoning might be disabled, but not when using the URL, i.e. the materialized super classes will be returned as well. You'Re the only person that knows about the configuration of your Blazegraph instance... – UninformedUser May 01 '18 at 07:11
  • I think "inference" is disabled in the properties file. I edited the question by adding the contents of the file. – Mario Raw May 01 '18 at 09:56
  • And you're sure that it has only one super class? I don't know the ontology nor am I a domain expert, but I looked at the [Snomed-CT page of the class](https://phinvads.cdc.gov/vads/ViewCodeSystemConcept.action?oid=2.16.840.1.113883.6.96&code=47686007) – UninformedUser May 01 '18 at 10:04
  • the query, in the question, must return 2 rows without inference and 56 rows with inference. – Mario Raw May 01 '18 at 10:09

0 Answers0