From ac6baffa530c7343d3ac9f4e1929f9a88cbd8b70 Mon Sep 17 00:00:00 2001 From: bkoniden Date: Wed, 9 Feb 2011 17:26:36 +0000 Subject: [PATCH] Adding timing info for CONSTRUCT vs SELECT on EntityPubCount, EntityGrantCount and CoPIGrantCount. Adding CONSTRUCT queries for PersonGrantCount --- .../CoPIGrantCountConstructQueryRunner.java | 6 + .../CoPIGrantCountQueryRunner.java | 27 ++- ...yPublicationCountConstructQueryRunner.java | 7 + .../EntityPublicationCountQueryRunner.java | 16 +- .../EntityPublicationCountRequestHandler.java | 2 +- ...EntitySubOrganizationTypesQueryRunner.java | 4 +- .../EntityGrantCountConstructQueryRunner.java | 16 +- .../EntityGrantCountQueryRunner.java | 19 +- .../EntityGrantCountRequestHandler.java | 2 +- .../PersonGrantCountConstructQueryRunner.java | 206 ++++++++++++++++++ 10 files changed, 284 insertions(+), 21 deletions(-) create mode 100644 src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/persongrantcount/PersonGrantCountConstructQueryRunner.java diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coprincipalinvestigator/CoPIGrantCountConstructQueryRunner.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coprincipalinvestigator/CoPIGrantCountConstructQueryRunner.java index 210dc91e..0b4a6051 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coprincipalinvestigator/CoPIGrantCountConstructQueryRunner.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coprincipalinvestigator/CoPIGrantCountConstructQueryRunner.java @@ -31,6 +31,8 @@ public class CoPIGrantCountConstructQueryRunner { private String egoURI; private DataSource dataSource; + + private long before, after; private Log log = LogFactory.getLog(CoPIGrantCountConstructQueryRunner.class.getName()); @@ -181,6 +183,8 @@ public class CoPIGrantCountConstructQueryRunner { Model constructedModel = ModelFactory.createDefaultModel(); + before = System.currentTimeMillis(); + for (String queryString : constructQueries) { log.debug("CONSTRUCT query string : " + queryString); @@ -204,6 +208,8 @@ public class CoPIGrantCountConstructQueryRunner { } } + after = System.currentTimeMillis(); + log.info("Time taken to execute the CONSTRUCT queries is in milliseconds: " + (after - before) ); return constructedModel; } diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coprincipalinvestigator/CoPIGrantCountQueryRunner.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coprincipalinvestigator/CoPIGrantCountQueryRunner.java index f7991250..9a6d1258 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coprincipalinvestigator/CoPIGrantCountQueryRunner.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coprincipalinvestigator/CoPIGrantCountQueryRunner.java @@ -12,6 +12,7 @@ import java.util.Set; import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import com.hp.hpl.jena.iri.IRI; import com.hp.hpl.jena.iri.IRIFactory; @@ -50,12 +51,14 @@ public class CoPIGrantCountQueryRunner implements QueryRunner { private Model dataSource; - private Log log; + private Log log = LogFactory.getLog(CoPIGrantCountQueryRunner.class.getName()); private UniqueIDGenerator nodeIDGenerator; private UniqueIDGenerator edgeIDGenerator; + private long before, after; + private static final String SPARQL_QUERY_COMMON_OPTIONAL_BLOCK_FOR_ROLE_DATE_TIME = "" + "OPTIONAL {" + " ?Role core:dateTimeInterval ?dateTimeIntervalValue . " @@ -84,7 +87,7 @@ public class CoPIGrantCountQueryRunner implements QueryRunner { this.egoURI = egoURI; this.dataSource = dataSource; - this.log = log; + // this.log = log; this.nodeIDGenerator = new UniqueIDGenerator(); this.edgeIDGenerator = new UniqueIDGenerator(); @@ -315,8 +318,7 @@ public class CoPIGrantCountQueryRunner implements QueryRunner { + "} " + "} "; - log.debug("COPI QUERY - " + sparqlQuery); - + // log.debug("COPI QUERY - " + sparqlQuery); //System.out.println("\n\nCOPI QUERY - " + sparqlQuery + "\n\n"); return sparqlQuery; @@ -351,8 +353,14 @@ public class CoPIGrantCountQueryRunner implements QueryRunner { throw new MalformedQueryParametersException("URI parameter is either null or empty."); } - ResultSet resultSet = executeQuery(generateEgoCoPIquery(this.egoURI), - this.dataSource); + before = System.currentTimeMillis(); + + ResultSet resultSet = executeQuery(generateEgoCoPIquery(this.egoURI), this.dataSource); + + after = System.currentTimeMillis(); + + log.info("Time taken to execute the SELECT queries is in milliseconds: " + (after - before) ); + return createQueryResult(resultSet); } @@ -393,7 +401,9 @@ public class CoPIGrantCountQueryRunner implements QueryRunner { CoPINode egoNode = null; Set edges = new HashSet(); - + + before = System.currentTimeMillis(); + while (resultSet.hasNext()) { QuerySolution solution = resultSet.nextSolution(); @@ -529,6 +539,9 @@ public class CoPIGrantCountQueryRunner implements QueryRunner { edgeUniqueIdentifierToVO); + after = System.currentTimeMillis(); + log.info("Time taken to iterate through the ResultSet of SELECT queries is in milliseconds: " + (after - before) ); + return new CoPIData(egoNode, nodes, edges); } diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntityPublicationCountConstructQueryRunner.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntityPublicationCountConstructQueryRunner.java index a1f3b486..9bce9451 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntityPublicationCountConstructQueryRunner.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntityPublicationCountConstructQueryRunner.java @@ -33,6 +33,8 @@ public class EntityPublicationCountConstructQueryRunner { private Log log = LogFactory.getLog(EntityPublicationCountConstructQueryRunner.class.getName()); + private long before, after; + public EntityPublicationCountConstructQueryRunner(String egoURI, DataSource dataSource, Log log){ this.egoURI = egoURI; this.dataSource = dataSource; @@ -187,6 +189,8 @@ public class EntityPublicationCountConstructQueryRunner { private Model executeQuery(Set constructQueries, DataSource dataSource) { Model constructedModel = ModelFactory.createDefaultModel(); + + before = System.currentTimeMillis(); for (String queryString : constructQueries) { @@ -212,6 +216,9 @@ public class EntityPublicationCountConstructQueryRunner { } } + + after = System.currentTimeMillis(); + log.info("Time taken to execute the CONSTRUCT queries is in milliseconds: " + (after - before) ); // constructedModel.write(System.out); return constructedModel; } diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntityPublicationCountQueryRunner.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntityPublicationCountQueryRunner.java index 91f7a5b6..95770e7e 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntityPublicationCountQueryRunner.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntityPublicationCountQueryRunner.java @@ -47,6 +47,7 @@ public class EntityPublicationCountQueryRunner implements QueryRunner { private String entityURI; private Model dataSource; private Log log = LogFactory.getLog(EntityPublicationCountQueryRunner.class.getName()); + private long before, after; private static final String SPARQL_QUERY_COMMON_SELECT_CLAUSE = "" + " (str(?Person) as ?personLit) " @@ -85,6 +86,8 @@ public class EntityPublicationCountQueryRunner implements QueryRunner { Map subentityURLToVO = new HashMap(); Map personURLToVO = new HashMap(); + before = System.currentTimeMillis(); + while (resultSet.hasNext()) { QuerySolution solution = resultSet.nextSolution(); @@ -202,7 +205,10 @@ public class EntityPublicationCountQueryRunner implements QueryRunner { } //TODO: return non-null value - log.info("Returning entity that contains the following set of subentities: "+entity.getSubEntities().toString()); + // log.info("Returning entity that contains the following set of subentities: "+entity.getSubEntities().toString()); + after = System.currentTimeMillis(); + log.info("Time taken to iterate through the ResultSet of SELECT queries is in milliseconds: " + (after - before) ); + return entity; } @@ -284,8 +290,14 @@ public class EntityPublicationCountQueryRunner implements QueryRunner { "URL parameter is either null or empty."); } + before = System.currentTimeMillis(); + ResultSet resultSet = executeQuery(this.entityURI, this.dataSource); - + + after = System.currentTimeMillis(); + + log.info("Time taken to execute the SELECT queries is in milliseconds: " + (after - before) ); + return createJavaValueObjects(resultSet); } diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntityPublicationCountRequestHandler.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntityPublicationCountRequestHandler.java index b1f68c82..e87e9924 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntityPublicationCountRequestHandler.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntityPublicationCountRequestHandler.java @@ -283,7 +283,7 @@ public class EntityPublicationCountRequestHandler implements yearPubCount.add(currentPubYear); } - log.info("entityJson.getLabel() : " + entityJson.getLabel() + " subOrganizationTypesResult " + subOrganizationTypesResult.toString()); + //log.info("entityJson.getLabel() : " + entityJson.getLabel() + " subOrganizationTypesResult " + subOrganizationTypesResult.toString()); entityJson.setYearToActivityCount(yearPubCount); entityJson.getOrganizationType().addAll(subOrganizationTypesResult.get(entityJson.getLabel())); diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntitySubOrganizationTypesQueryRunner.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntitySubOrganizationTypesQueryRunner.java index bcd1b8a4..9cda75e4 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntitySubOrganizationTypesQueryRunner.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitycomparison/EntitySubOrganizationTypesQueryRunner.java @@ -99,7 +99,7 @@ public class EntitySubOrganizationTypesQueryRunner implements QueryRunner " + subOrganizationLabelToTypes.size()); // System.out.println("\n\nPeople Label Types Size --> " + personLabelToTypes.size()); - log.info("Sub Organization Label Types Size : " + subEntityLabelToTypes.size()); +// log.info("Sub Organization Label Types Size : " + subEntityLabelToTypes.size()); return subEntityLabelToTypes; //return (subOrganizationLabelToTypes.size() != 0 )? subOrganizationLabelToTypes : personLabelToTypes ; diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitygrantcount/EntityGrantCountConstructQueryRunner.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitygrantcount/EntityGrantCountConstructQueryRunner.java index ef98530f..543cce6e 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitygrantcount/EntityGrantCountConstructQueryRunner.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitygrantcount/EntityGrantCountConstructQueryRunner.java @@ -31,6 +31,8 @@ public class EntityGrantCountConstructQueryRunner { private String egoURI; private DataSource dataSource; + + private long before, after; private Log log = LogFactory.getLog(EntityGrantCountConstructQueryRunner.class.getName()); @@ -266,7 +268,9 @@ public class EntityGrantCountConstructQueryRunner { private Model executeQuery(Set constructQueries, DataSource dataSource) { Model constructedModel = ModelFactory.createDefaultModel(); - + + before = System.currentTimeMillis(); + for (String queryString : constructQueries) { log.debug("CONSTRUCT query string : " + queryString); @@ -290,9 +294,13 @@ public class EntityGrantCountConstructQueryRunner { qe.close(); } - } - log.debug("Statements for constructed model of EntityGrantCount : "+ constructedModel.listStatements().toString()); - // constructedModel.write(System.out); + } + + after = System.currentTimeMillis(); + + // log.debug("Statements for constructed model of EntityGrantCount : "+ constructedModel.listStatements().toString()); + log.info("Time taken to execute the CONSTRUCT queries is in milliseconds: " + (after - before) ); + // constructedModel.write(System.out); return constructedModel; } diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitygrantcount/EntityGrantCountQueryRunner.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitygrantcount/EntityGrantCountQueryRunner.java index 3485f267..9d709a91 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitygrantcount/EntityGrantCountQueryRunner.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitygrantcount/EntityGrantCountQueryRunner.java @@ -47,6 +47,7 @@ public class EntityGrantCountQueryRunner implements QueryRunner { private String entityURI; private Model dataSource; private Log log = LogFactory.getLog(EntityGrantCountQueryRunner.class.getName()); + private long before, after; private static final String SPARQL_QUERY_COMMON_SELECT_CLAUSE = "SELECT " @@ -109,7 +110,9 @@ public class EntityGrantCountQueryRunner implements QueryRunner { Map grantURIToVO = new HashMap(); Map subentityURLToVO = new HashMap(); Map personURLToVO = new HashMap(); - + + before = System.currentTimeMillis(); + while (resultSet.hasNext()) { // log.info("Checking whether EntityGrantCount produced any resultset against the Constructed Model"); QuerySolution solution = resultSet.nextSolution(); @@ -227,7 +230,9 @@ public class EntityGrantCountQueryRunner implements QueryRunner { } else */if (subentityURLToVO.size() == 0 && personURLToVO.size() == 0) { entity = new Entity(this.entityURI, "no-label"); } - + + after = System.currentTimeMillis(); + log.info("Time taken to iterate through the ResultSet of SELECT queries is in milliseconds: " + (after - before) ); return entity; } @@ -321,9 +326,15 @@ public class EntityGrantCountQueryRunner implements QueryRunner { throw new MalformedQueryParametersException( "URL parameter is either null or empty."); } - + + before = System.currentTimeMillis(); + ResultSet resultSet = executeQuery(this.entityURI, this.dataSource); - + + after = System.currentTimeMillis(); + + log.info("Time taken to execute the SELECT queries is in milliseconds: " + (after - before) ); + return createJavaValueObjects(resultSet); } } \ No newline at end of file diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitygrantcount/EntityGrantCountRequestHandler.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitygrantcount/EntityGrantCountRequestHandler.java index 6199fc0d..f322cd91 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitygrantcount/EntityGrantCountRequestHandler.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/entitygrantcount/EntityGrantCountRequestHandler.java @@ -279,7 +279,7 @@ public class EntityGrantCountRequestHandler implements yearGrantCount.add(currentGrantYear); } - log.info("entityJson.getLabel() : " + entityJson.getLabel() + " subOrganizationTypesResult " + subOrganizationTypesResult.toString()); + // log.info("entityJson.getLabel() : " + entityJson.getLabel() + " subOrganizationTypesResult " + subOrganizationTypesResult.toString()); entityJson.setYearToActivityCount(yearGrantCount); entityJson.getOrganizationType().addAll(subOrganizationTypesResult.get(entityJson.getLabel())); diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/persongrantcount/PersonGrantCountConstructQueryRunner.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/persongrantcount/PersonGrantCountConstructQueryRunner.java new file mode 100644 index 00000000..5443dd4d --- /dev/null +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/persongrantcount/PersonGrantCountConstructQueryRunner.java @@ -0,0 +1,206 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.vitro.webapp.visualization.freemarker.persongrantcount; + +import java.util.HashSet; +import java.util.Set; + +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import com.hp.hpl.jena.iri.IRI; +import com.hp.hpl.jena.iri.IRIFactory; +import com.hp.hpl.jena.iri.Violation; +import com.hp.hpl.jena.query.DataSource; +import com.hp.hpl.jena.query.Query; +import com.hp.hpl.jena.query.QueryExecution; +import com.hp.hpl.jena.query.QueryExecutionFactory; +import com.hp.hpl.jena.query.QueryFactory; +import com.hp.hpl.jena.query.Syntax; +import com.hp.hpl.jena.rdf.model.Model; +import com.hp.hpl.jena.rdf.model.ModelFactory; + +import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants; +import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException; + +public class PersonGrantCountConstructQueryRunner { + + protected static final Syntax SYNTAX = Syntax.syntaxARQ; + + private String egoURI; + + private DataSource dataSource; + + private Log log = LogFactory.getLog(PersonGrantCountConstructQueryRunner.class.getName()); + + public PersonGrantCountConstructQueryRunner(String egoURI, DataSource dataSource, Log log){ + this.egoURI = egoURI; + this.dataSource = dataSource; + //this.log = log; + } + + private String generateConstructQueryForInvestigatorLabel(String queryURI) { + + String sparqlQuery = + "CONSTRUCT { " + + "<"+queryURI+ "> rdfs:label ?investigatorLabel ." + + "}" + + "WHERE {" + + "<"+queryURI+ "> rdfs:label ?investigatorLabel " + + "}"; + + return sparqlQuery; + } + + private String generateConstructQueryForInvestigatorGrants(String queryURI){ + + String sparqlQuery = "" + + "CONSTRUCT { " + + "<"+queryURI+ "> ?preboundProperty ?Role . " + + "?Role core:roleIn ?Grant ." + + "?Grant rdfs:label ?GrantLabel " + + "} " + + "WHERE { " + + "<"+queryURI+ "> ?preboundProperty ?Role . " + + "?Role core:roleIn ?Grant ." + + "?Grant rdfs:label ?GrantLabel " + + "} "; + + return sparqlQuery; + + } + + private String generateConstructQueryForDateTimeValueofRole(String queryURI){ + + String sparqlQuery = + "CONSTRUCT { " + + "<"+queryURI+ "> ?preboundProperty ?Role . " + + "?Role core:dateTimeInterval ?dateTimeIntervalValue . " + + "?dateTimeIntervalValue core:start ?startDate . " + + "?startDate core:dateTime ?startDateTimeValue . " + + "?dateTimeIntervalValue core:end ?endDate . " + + "?endDate core:dateTime ?endDateTimeValue . " + + "}" + + "WHERE { " + + "{" + + "<"+queryURI+ "> ?preboundProperty ?Role . " + + "?Role core:dateTimeInterval ?dateTimeIntervalValue . " + + "?dateTimeIntervalValue core:start ?startDate . " + + "?startDate core:dateTime ?startDateTimeValue . " + + "} UNION " + + "{" + + "<"+queryURI+ "> ?preboundProperty ?Role . " + + "?Role core:dateTimeInterval ?dateTimeIntervalValue . " + + "?dateTimeIntervalValue core:end ?endDate . " + + "?endDate core:dateTime ?endDateTimeValue . " + + "}" + + "}"; + + return sparqlQuery; + } + + private String generateConstructQueryForDateTimeValueofGrant(String queryURI){ + + String sparqlQuery = + "CONSTRUCT { " + + "<"+queryURI+ "> ?preboundProperty ?Role . " + + "?Role core:roleIn ?Grant ." + + "?Grant core:dateTimeInterval ?dateTimeIntervalValueForGrant . " + + "?dateTimeIntervalValueForGrant core:start ?startDateForGrant . " + + "?startDateForGrant core:dateTime ?startDateTimeValueForGrant . " + + "?dateTimeIntervalValueForGrant core:end ?endDateForGrant . " + + "?endDateForGrant core:dateTime ?endDateTimeValueForGrant . " + + "}" + + "WHERE { " + + "{" + + "<"+queryURI+ "> ?preboundProperty ?Role . " + + "?Role core:roleIn ?Grant ." + + "?Grant core:dateTimeInterval ?dateTimeIntervalValueForGrant . " + + "?dateTimeIntervalValueForGrant core:start ?startDateForGrant . " + + "?startDateForGrant core:dateTime ?startDateTimeValueForGrant . " + + "} UNION " + + "{" + + "<"+queryURI+ "> ?preboundProperty ?Role . " + + "?Role core:roleIn ?Grant ." + + "?Grant core:dateTimeInterval ?dateTimeIntervalValueForGrant . " + + "?dateTimeIntervalValueForGrant core:end ?endDateForGrant . " + + "?endDateForGrant core:dateTime ?endDateTimeValueForGrant . " + + "}" + + "}"; + + return sparqlQuery; + } + + private Model executeQuery(Set constructQueries, DataSource dataSource) { + + Model constructedModel = ModelFactory.createDefaultModel(); + + for (String queryString : constructQueries) { + + log.debug("CONSTRUCT query string : " + queryString); + + Query query = null; + + try{ + query = QueryFactory.create(QueryConstants.getSparqlPrefixQuery() + queryString, SYNTAX); + }catch(Throwable th){ + log.error("Could not create CONSTRUCT SPARQL query for query " + + "string. " + th.getMessage()); + log.error(queryString); + } + + QueryExecution qe = QueryExecutionFactory.create( + query, dataSource); + try { + qe.execConstruct(constructedModel); + } finally { + qe.close(); + } + + } + + return constructedModel; + } + + public Model getConstructedModel() + throws MalformedQueryParametersException { + + if (StringUtils.isNotBlank(this.egoURI)) { + /* + * To test for the validity of the URI submitted. + * */ + IRIFactory iRIFactory = IRIFactory.jenaImplementation(); + IRI iri = iRIFactory.create(this.egoURI); + if (iri.hasViolation(false)) { + String errorMsg = ((Violation) iri.violations(false).next()).getShortMessage(); + log.error("Person Grant Count Construct Query " + errorMsg); + throw new MalformedQueryParametersException( + "URI provided for an individual is malformed."); + } + } else { + throw new MalformedQueryParametersException("URI parameter is either null or empty."); + } + + Set constructQueries = new HashSet(); + + populateConstructQueries(constructQueries); + + Model model = executeQuery(constructQueries, + this.dataSource); + + return model; + + } + + private void populateConstructQueries(Set constructQueries) { + + constructQueries.add(generateConstructQueryForInvestigatorLabel(this.egoURI)); + constructQueries.add(generateConstructQueryForInvestigatorGrants(this.egoURI)); + constructQueries.add(generateConstructQueryForDateTimeValueofRole(this.egoURI)); + constructQueries.add(generateConstructQueryForDateTimeValueofGrant(this.egoURI)); + + + } + +}