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 =
|
||||
"CONSTRUCT{ <" + this.individualURI + "> <" + RDF.type +
|
||||
"> ?types }\n" +
|
||||
"WHERE{ GRAPH ?g"
|
||||
"WHERE{ { GRAPH ?g"
|
||||
+ " { <" + this.individualURI +"> <" +RDF.type+ "> ?types } \n"
|
||||
+ WebappDaoFactorySDB.getFilterBlock(
|
||||
graphVars, (direct
|
||||
? WebappDaoFactorySDB.SDBDatasetMode
|
||||
.ASSERTIONS_ONLY
|
||||
: 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";
|
||||
RDFService service = webappDaoFactory.getRDFService();
|
||||
try {
|
||||
|
|
Loading…
Add table
Reference in a new issue