switching QR codes to use new getUnfilteredWebappDaoFactory() method

This commit is contained in:
brianjlowe 2011-07-18 17:49:05 +00:00
parent 8a5e548fe3
commit 3c31cb77f3

View file

@ -19,6 +19,7 @@ import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.ParamMa
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.Route;
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
import edu.cornell.mannlib.vitro.webapp.dao.jena.ModelContext;
import edu.cornell.mannlib.vitro.webapp.dao.jena.SimpleOntModelSelector;
import edu.cornell.mannlib.vitro.webapp.dao.jena.WebappDaoFactorySDB;
@ -45,15 +46,7 @@ public class IndividualTemplateModel extends BaseIndividualTemplateModel {
Map<String,String> qrData = new HashMap<String,String>();
// BJL23 - Apparently this needs a special DAO factory because the
// normal one (usually) filters the contact info.
// We don't want to use getAssertionsWebappDaoFactory() - that will
// reduce load scalability and miss out on data in different named
// graphs. Instead, we will make a DAO factory from the main
// model and dataset associated with the request.
WebappDaoFactory wdf = new WebappDaoFactorySDB(
new SimpleOntModelSelector(
vreq.getJenaOntModel()),vreq.getDataset());
WebappDaoFactory wdf = vreq.getUnfilteredWebappDaoFactory();
Collection<DataPropertyStatement> firstNames = wdf.getDataPropertyStatementDao().getDataPropertyStatementsForIndividualByDataPropertyURI(individual, FOAF + "firstName");
Collection<DataPropertyStatement> lastNames = wdf.getDataPropertyStatementDao().getDataPropertyStatementsForIndividualByDataPropertyURI(individual, FOAF + "lastName");