3

我使用 Java 代码中的 Jena 和 Blazegraph 作为服务器,我尝试查询某个类的路径中的第一个超类,当然,我没有使用任何一个*+与 predicate 一起使用rdfs:subClassOf

该查询在 Blazegraph 界面中运行良好,但是当我尝试从 Jena 和 Java 应用查询时,它返回所有超类!

以下是查询和代码:

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();

我注意到这一点,当我使用带有 URL“localhost”的 Blazegraph 的 Web 界面时,查询运行良好,但如果我使用 IP 地址而不是 localhost,查询将返回所有超类,但从 Java 代码中,使用 localhost 或 IP 都不会发生变化。

编辑:以下是属性文件:

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
4

0 回答 0