added GRAPH-less pattern to type query in IndividualSDB to support triple stores that supply inferences in the unnamed graph
This commit is contained in:
parent
b0a5961f4d
commit
6f2bda9178
1 changed files with 7 additions and 2 deletions
|
@ -848,13 +848,18 @@ public class IndividualSDB extends IndividualImpl implements Individual {
|
||||||
String getTypes =
|
String getTypes =
|
||||||
"CONSTRUCT{ <" + this.individualURI + "> <" + RDF.type +
|
"CONSTRUCT{ <" + this.individualURI + "> <" + RDF.type +
|
||||||
"> ?types }\n" +
|
"> ?types }\n" +
|
||||||
"WHERE{ GRAPH ?g"
|
"WHERE{ { GRAPH ?g"
|
||||||
+ " { <" + this.individualURI +"> <" +RDF.type+ "> ?types } \n"
|
+ " { <" + this.individualURI +"> <" +RDF.type+ "> ?types } \n"
|
||||||
+ WebappDaoFactorySDB.getFilterBlock(
|
+ WebappDaoFactorySDB.getFilterBlock(
|
||||||
graphVars, (direct
|
graphVars, (direct
|
||||||
? WebappDaoFactorySDB.SDBDatasetMode
|
? WebappDaoFactorySDB.SDBDatasetMode
|
||||||
.ASSERTIONS_ONLY
|
.ASSERTIONS_ONLY
|
||||||
: datasetMode))
|
: datasetMode))
|
||||||
|
+ "} \n"
|
||||||
|
// GRAPH-less pattern to support retrieving inferred types
|
||||||
|
// from the unnamed base graph, as in Sesame and OWLIM
|
||||||
|
+ ((datasetMode.equals(WebappDaoFactorySDB.SDBDatasetMode.ASSERTIONS_ONLY))
|
||||||
|
? "" : "UNION { <" + this.individualURI +"> <" +RDF.type+ "> ?types }" )
|
||||||
+ "} \n";
|
+ "} \n";
|
||||||
RDFService service = webappDaoFactory.getRDFService();
|
RDFService service = webappDaoFactory.getRDFService();
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Reference in a new issue