de-GRAPHing some remaining DAO queries

This commit is contained in:
bjl23 2011-02-01 18:54:48 +00:00
parent 7b18bbe8d6
commit 4e18504ca0
3 changed files with 18 additions and 15 deletions

View file

@ -112,13 +112,16 @@ public class IndividualDaoSDB extends IndividualDaoJena {
String query =
"SELECT DISTINCT ?ind ?label ?moniker " +
"WHERE " +
"{ GRAPH ?g { \n" +
" ?ind a <" + theClass.getURI() + "> \n" +
"} \n" +
"OPTIONAL { GRAPH ?h { ?ind <" + RDFS.label.getURI() + "> ?label } }\n" +
"OPTIONAL { GRAPH ?i { ?ind <" + VitroVocabulary.MONIKER + "> ?moniker } } \n" +
WebappDaoFactorySDB.getFilterBlock(graphVars, datasetMode) +
"} ORDER BY ?label";
"{ \n" +
"{ \n" +
" ?ind a <" + theClass.getURI() + "> . \n" +
" ?ind <" + RDFS.label.getURI() + "> ?label \n" +
"} \n" +
"UNION { \n" +
" ?ind a <" + theClass.getURI() + "> . \n" +
" ?ind <" + VitroVocabulary.MONIKER + "> ?moniker \n" +
"} \n" +
"} ORDER BY ?ind ?label";
ResultSet rs =QueryExecutionFactory.create(
QueryFactory.create(query), dataset)
.execSelect();

View file

@ -190,7 +190,7 @@ public class IndividualSDB extends IndividualImpl implements Individual {
}
}
private static final boolean SKIP_INITIALIZATION = true;
static final boolean SKIP_INITIALIZATION = true;
public IndividualSDB(String individualURI,
DatasetWrapperFactory datasetWrapperFactory,

View file

@ -53,15 +53,15 @@ public class ObjectPropertyStatementDaoSDB extends
String query = "CONSTRUCT { \n" +
" <" + entity.getURI() + "> ?p ?o . \n" +
// " ?o a ?oType . \n" +
" ?o <" + RDFS.label.getURI() + "> ?oLabel . \n" +
" ?o <" + VitroVocabulary.MONIKER + "> ?oMoniker \n" +
// " ?o <" + RDFS.label.getURI() + "> ?oLabel . \n" +
// " ?o <" + VitroVocabulary.MONIKER + "> ?oMoniker \n" +
"} WHERE { \n" +
" { <" + entity.getURI() + "> ?p ?o } \n" +
// " UNION { <" + entity.getURI() + "> ?p ?o . ?o a ?oType } \n" +
" UNION { <" + entity.getURI() + "> ?p ?o . \n" +
" ?o <" + RDFS.label.getURI() + "> ?oLabel } \n" +
" UNION { <" + entity.getURI() + "> ?p ?o . \n " +
" ?o <" + VitroVocabulary.MONIKER + "> ?oMoniker } \n" +
// " UNION { <" + entity.getURI() + "> ?p ?o . \n" +
// " ?o <" + RDFS.label.getURI() + "> ?oLabel } \n" +
// " UNION { <" + entity.getURI() + "> ?p ?o . \n " +
// " ?o <" + VitroVocabulary.MONIKER + "> ?oMoniker } \n" +
"}";
long startTime = System.currentTimeMillis();
Model m = null;
@ -127,7 +127,7 @@ public class ObjectPropertyStatementDaoSDB extends
this.dwf,
datasetMode,
getWebappDaoFactory(),
m);
IndividualSDB.SKIP_INITIALIZATION);
objPropertyStmt.setObject(objInd);
}