Merge branch 'develop' of https://github.com/vivo-project/Vitro into develop

This commit is contained in:
brianjlowe 2013-10-08 09:41:02 -04:00
commit 32be076e29
8 changed files with 405 additions and 252 deletions

View file

@ -1144,7 +1144,15 @@
The "Site Name" you assign in the "Site Information" form under the <strong>Site Admin</strong>
area will be inserted into the "Terms of Use"
statement. If you want to edit the text content more than just the
"Site Name", the file can be found here:<pre>[vitro_source_dir]/webapp/web/templates/freemarker/body/termsOfUse.ftl</pre>
"Site Name", the file can be found here:
<pre>[vitro_source_dir]/webapp/web/templates/freemarker/body/termsOfUse.ftl</pre>
</p>
<p>
Your "Terms of Use" statement is also referenced in the Linked Open Data (RDF)
that your site produces, so you should be sure that it accurately reflects
the way that your data may be used.
</p>
<p>
Be sure to make the changes in your source files and deploy them to your
tomcat so you don't lose your changes next time you deploy for another reason.
</p>

View file

@ -1,6 +1,9 @@
# $This file is distributed under the terms of the license in /doc/license.txt$
#Data getter type labels
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.ClassGroupPageData> rdfs:label "Class Group Page" .
<java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.BrowseDataGetter> rdfs:label "Browse Page" .
<java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.IndividualsForClassesDataGetter> rdfs:label "Class Group Page - Selected Classes" .

View file

@ -1,7 +1,7 @@
# $This file is distributed under the terms of the license in /doc/license.txt$
# This file is for the portions of the pageList that should not be editable, i.e.
that it cannot be deleted and that it requires certain permissions #
# that it cannot be deleted and that it requires certain permissions
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix display: <http://vitro.mannlib.cornell.edu/ontologies/display/1.1#> .

View file

@ -224,5 +224,11 @@ public class VitroRequest extends HttpServletRequestWrapper {
return (Collator) getAttribute("collator");
}
public void setLanguageNeutralWebappDaoFactory(WebappDaoFactory wadf) {
setAttribute("languageNeutralWebappDaoFactory", wadf);
}
public WebappDaoFactory getLanguageNeutralWebappDaoFactory() {
return (WebappDaoFactory) getAttribute("languageNeutralWebappDaoFactory");
}
}

View file

@ -45,6 +45,8 @@ import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactoryConfig;
import edu.cornell.mannlib.vitro.webapp.dao.filtering.WebappDaoFactoryFiltering;
import edu.cornell.mannlib.vitro.webapp.dao.filtering.filters.HideFromDisplayByPolicyFilter;
import edu.cornell.mannlib.vitro.webapp.dao.jena.OntModelSelector;
import edu.cornell.mannlib.vitro.webapp.dao.jena.OntModelSelectorImpl;
import edu.cornell.mannlib.vitro.webapp.dao.jena.RDFServiceDataset;
import edu.cornell.mannlib.vitro.webapp.dao.jena.SpecialBulkUpdateHandlerGraph;
import edu.cornell.mannlib.vitro.webapp.dao.jena.WebappDaoFactorySDB;
@ -146,9 +148,12 @@ public class RequestModelsPrep implements Filter {
setRawModels(vreq, dataset);
// We need access to the language-ignorant version of this model.
// Grab it before it gets wrapped in language awareness.
// We need access to some language-neutral items - either because we need to see all
// contents regardless of language, or because we need to see the blank nodes that
// are removed during language filtering.
vreq.setLanguageNeutralUnionFullModel(ModelAccess.on(vreq).getOntModel(ModelID.UNION_FULL));
vreq.setLanguageNeutralWebappDaoFactory(new WebappDaoFactorySDB(
rdfService, createLanguageNeutralOntModelSelector(vreq), createWadfConfig(vreq)));
wrapModelsWithLanguageAwareness(vreq);
@ -234,6 +239,19 @@ public class RequestModelsPrep implements Filter {
return ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, unionModel);
}
/** Create an OntModelSelector that will hold the un-language-filtered models. */
private OntModelSelector createLanguageNeutralOntModelSelector(
VitroRequest vreq) {
OntModelSelectorImpl oms = new OntModelSelectorImpl();
oms.setABoxModel(ModelAccess.on(vreq).getOntModel(ModelID.UNION_ABOX));
oms.setTBoxModel(ModelAccess.on(vreq).getOntModel(ModelID.UNION_TBOX));
oms.setFullModel(ModelAccess.on(vreq).getOntModel(ModelID.UNION_FULL));
oms.setApplicationMetadataModel(ModelAccess.on(vreq).getOntModel(ModelID.APPLICATION_METADATA));
oms.setDisplayModel(ModelAccess.on(vreq).getOntModel(ModelID.DISPLAY));
oms.setUserAccountsModel(ModelAccess.on(vreq).getOntModel(ModelID.USER_ACCOUNTS));
return oms;
}
private void wrapModelsWithLanguageAwareness(VitroRequest vreq) {
wrapModelWithLanguageAwareness(vreq, ModelID.DISPLAY);
wrapModelWithLanguageAwareness(vreq, ModelID.APPLICATION_METADATA);
@ -276,6 +294,10 @@ public class RequestModelsPrep implements Filter {
// a different version if requested by parameters
WebappDaoFactory switchedWadf = new ModelSwitcher()
.checkForModelSwitching(vreq, wadf);
// Switch the language-neutral one also.
vreq.setLanguageNeutralWebappDaoFactory(new ModelSwitcher()
.checkForModelSwitching(vreq,
vreq.getLanguageNeutralWebappDaoFactory()));
HideFromDisplayByPolicyFilter filter = new HideFromDisplayByPolicyFilter(
RequestIdentifiers.getIdBundleForRequest(vreq),

View file

@ -142,6 +142,9 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
+ " prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \n"
+ " prefix core: <http://vivoweb.org/ontology/core#> \n"
+ " prefix foaf: <http://xmlns.com/foaf/0.1/> \n"
+ " prefix obo: <http://purl.obolibrary.org/obo/> \n"
+ " prefix vcard: <http://www.w3.org/2006/vcard/ns#> \n"
+ " prefix event: <http://purl.org/NET/c4dm/event.owl#> \n"
+ " prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n"
+ " prefix localNav: <http://vitro.mannlib.cornell.edu/ns/localnav#> \n"
+ " prefix bibo: <http://purl.org/ontology/bibo/> \n";
@ -151,30 +154,39 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
// If a person changes then update
// organizations for positions
multiValuedQueriesForAgent.add(prefix +
"SELECT \n" +
"SELECT DISTINCT \n" +
" (str(?i) as ?positionInOrganization) \n" +
" WHERE {\n"
+ "?uri rdf:type foaf:Agent ; ?b ?c . \n"
+ "?uri rdf:type foaf:Agent ; core:relatedBy ?c . \n"
+ " ?c rdf:type core:Position . \n"
+ " OPTIONAL { ?c core:positionInOrganization ?i . } . \n"
+ " OPTIONAL { ?c core:relates ?i . ?i rdf:type foaf:Organization } . \n"
+ " }");
// If a person changes then update
// advisee, linkedAuthor and informationResource
multiValuedQueriesForAgent.add(prefix +
"SELECT (str(?d) as ?advisee) \n" +
" (str(?f) as ?linkedAuthor) (str(?h) as ?linkedInformationResource) WHERE {\n"
" (str(?f) as ?linkedAuthor) (str(?h) as ?linkedInformationResource) WHERE { {\n"
+ "?uri rdf:type foaf:Agent ; ?b ?c . \n"
+ " ?c rdf:type core:Relationship . \n"
+ " OPTIONAL { ?c core:advisee ?d . } . \n"
+ " OPTIONAL { ?c core:linkedAuthor ?f . } . \n"
+ " OPTIONAL { ?c core:linkedInformationResource ?h . } . \n"
+ " } ");
+ "?uri rdf:type foaf:Agent . \n"
+ "?uri core:relatedBy ?c . \n"
+ "?c rdf:type core:AdvisingRelationship . \n"
+ "?c core:relates ?d . \n"
+ "?d rdf:type core:AdviseeRole . \n"
+ "?d obo:RO_0000052 ?e . \n"
+ "?e rdf:type foaf:Person . \n"
+ "} \n"
+ "UNION { \n"
+ " ?uri rdf:type foaf:Agent . \n"
+ " ?uri core:relatedBy ?c . \n"
+ " ?c rdf:type core:Authorship . \n"
+ " OPTIONAL {?c core:relates ?f . \n"
+ " ?f rdf:type foaf:Person . } \n"
+ " OPTIONAL { ?c core:relates ?h . \n"
+ " ?h rdf:type obo:IAO_0000030 . } \n"
+ " } } ");
// If a person changes then update
// award giver
@ -185,7 +197,7 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
+ "?uri rdf:type foaf:Agent ; ?b ?c . \n"
+ " ?c rdf:type core:AwardReceipt . \n"
+ " OPTIONAL { ?c core:awardConferredBy ?d . } . \n"
+ " OPTIONAL { ?c core:assignedBy ?d . } . \n"
+ " }");
// If a person changes then update
@ -195,7 +207,7 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
"WHERE {\n"
+ "?uri rdf:type foaf:Agent ; ?b ?c . \n"
+ " ?c rdf:type core:Role ; core:roleIn ?Organization .\n"
+ " ?c rdf:type obo:BFO_0000023 ; obo:BFO_0000054 ?Organization .\n"
+ " }");
// If a person changes then update
@ -205,12 +217,13 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
"(str(?e) as ?trainingAtOrganization) WHERE {\n"
+ " ?uri rdf:type foaf:Agent ; ?b ?c . \n"
+ " ?c rdf:type core:EducationalTraining . \n"
+ " ?c rdf:type core:EducationalProcess . \n"
+ " OPTIONAL { ?c core:trainingAtOrganization ?e . } . \n"
+ " OPTIONAL { ?c obo:RO_0000057 ?e . \n"
+ " ?e rdf:type foaf:Organization . } . "
+"}");
// If an organizatoin changes then update
// If an organization changes then update
// people in head of relations
multiValuedQueriesForAgent.add(
" # for organization, get leader \n" +
@ -218,14 +231,14 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
"SELECT \n" +
"(str(?e) as ?LeaderPerson ) WHERE {\n"
+ " ?uri rdf:type foaf:Agent ; ?b ?c . \n"
+ " ?uri rdf:type foaf:Agent . \n"
+ " ?uri core:contributingRole ?c . \n"
+ " ?c rdf:type core:LeaderRole . \n"
+ " OPTIONAL { ?c core:leaderRoleOf ?e . } . \n"
+ " OPTIONAL { ?c obo:RO_0000052 ?e . \n"
+ " ?e rdf:type foaf:Person . } . "
+"}");
}
//multivalued query for core:InformationResource
@ -233,21 +246,27 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
multiValuedQueryForInformationResource = prefix +
"SELECT (str(?b) as ?linkedAuthor) (str(?d) as ?linkedInformationResource) \n"
+ "(str(?e) as ?editor) \n" +
+ "(str(?f) as ?editor) \n" +
"(str(?i) as ?features) WHERE {\n"
+ " ?uri rdf:type core:InformationResource . \n"
+ " ?uri rdf:type obo:IAO_0000030 . \n"
+ "OPTIONAL { ?uri core:informationResourceInAuthorship ?a . ?a core:linkedAuthor ?b ; core:linkedInformationResource ?d .\n" +
"} . "
+ "OPTIONAL { ?uri bibo:editor ?e . } .\n"
+ " OPTIONAL { ?uri core:relatedBy ?a . \n"
+ " ?a rdf:type core:Authorship . \n"
+ " ?a core:relates ?b . ?b rdf:type foaf:Person .\n"
+ " ?a core:relates ?d . ?d rdf:type obo:IAO_0000030 .\n"
+ "} . "
+ " OPTIONAL { ?uri core:relatedBy ?e . \n"
+ " ?e rdf:type core:Editorship . \n"
+ " ?e core:relates ?f . ?f rdf:type foaf:Person .\n"
+ "} . "
+ " OPTIONAL { ?uri core:features ?i . } . \n"
+"}" ;
}
protected static List<String> queriesForAuthorship(){
List<String> queries = new ArrayList<String>();
@ -257,8 +276,9 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
+ "SELECT (str(?a) as ?infoResource) WHERE {\n"
+ " ?uri rdf:type foaf:Person . \n"
+ " ?uri core:authorInAuthorship ?aship .\n"
+ "OPTIONAL { ?aship core:linkedInformationResource ?a } .\n"
+ " ?uri core:relatedBy ?aship .\n"
+ " ?aship rdf:type core:Authorship .\n"
+ "OPTIONAL { ?aship core:relates ?a . ?a rdf:type obo:IAO_0000030 } .\n"
+"}" );
//get additional URIs of authors from information resource side
@ -266,9 +286,9 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
prefix
+ "SELECT (str(?a) as ?author ) WHERE {\n"
+ " ?uri rdf:type core:InformationResource . \n"
+ " ?uri core:informationResourceInAuthorship ?aship .\n"
+ "OPTIONAL { ?aship core:linkedAuthor ?a } .\n"
+ " ?uri rdf:type obo:IAO_0000030 . \n"
+ " ?uri core:relatedBy ?aship . ?aship rdf:type core:Authorship . \n"
+ "OPTIONAL { ?aship core:relates ?a . ?a rdf:type foaf:Person } .\n"
+"}" );
return queries;
}
@ -281,8 +301,9 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
prefix
+ "SELECT (str(?x) as ?individual) WHERE {\n"
+ " ?uri rdf:type core:URLLink . \n"
+ " ?uri core:webpageOf ?x .\n"
+ " ?i rdf:type vcard:Individual . \n"
+ " ?i vcard:hasURL ?uri . \n"
+ " ?i obo:ARG_2000029 ?x . \n"
+"}" );
return queries;
@ -302,8 +323,10 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
+ " SELECT (str(?person) as ?personUri) WHERE {\n"
+ " ?uri rdf:type core:AcademicDegree . \n"
+ " ?uri core:degreeOutcomeOf ?edTrainingNode .\n"
+ " ?edTrainingNode core:educationalTrainingOf ?person . \n"
+ " ?uri core:relatedBy ?awardedDegree .\n"
+ " ?awardedDegree rdf:type core:AwardedDegree .\n"
+ " ?awardedDegree core:relates ?person .\n"
+ " ?person rdf:type foaf:Person .\n"
+"}" );
//if the organization changes the person needs to be updated
@ -313,8 +336,10 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
+ " SELECT (str(?person) as ?personUri) WHERE {\n"
+ " ?uri rdf:type foaf:Organization . \n"
+ " ?uri core:organizationGrantingDegree ?edTrainingNode .\n"
+ " ?edTrainingNode core:educationalTrainingOf ?person . \n"
+ " ?uri obo:RO_0000056 ?edTrainingNode .\n"
+ " ?edTrainingNode rdf:type core:EducationalProcess . \n"
+ " ?edTrainingNode obo:RO_0000057 ?person . \n"
+ " ?person rdf:type foaf:Person ."
+"}" );
return queries;
}
@ -328,8 +353,10 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
+ " SELECT (str(?person) as ?personUri) WHERE {\n"
+ " ?uri rdf:type foaf:Organization . \n"
+ " ?uri core:organizationForPosition ?positionNode .\n"
+ " ?person core:personInPosition ?positionNode . \n"
+ " ?uri core:relatedBy ?positionNode .\n"
+ " ?positionNode rdf:type core:Position .\n"
+ " ?positionNode core:relates ?person . \n"
+ " ?person rdf:type foaf:Person .\n"
+"}" );
@ -339,8 +366,10 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
+ " SELECT (str(?org) as ?orgUri) WHERE {\n"
+ " ?uri rdf:type foaf:Person . \n"
+ " ?uri core:personInPosition ?positionNode .\n"
+ " ?org core:organizationForPosition ?positionNode . \n"
+ " ?uri core:relatedBy ?positionNode .\n"
+ " ?positionNode rdf:type core:Position .\n"
+ " ?positionNode core:relates ?org . \n"
+ " ?org rdf:type foaf:Organization .\n"
+"}" );
return queries;
}
@ -348,21 +377,28 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
static{
// core:AttendeeRole
// If the person changes, update the attendee role in organization
// core:AttendeeRole applies to events, not organizations; updating accordingly - tlw72
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?organization) \n " +
"SELECT (str(?d) as ?event) \n " +
"WHERE {\n"
+ "?uri rdf:type foaf:Person ; ?b ?c . \n"
+ " ?c rdf:type core:AttendeeRole ; core:roleIn ?d .\n"
+ "?uri rdf:type foaf:Person . \n"
+ "?uri obo:RO_0000053 ?c . \n"
+ "?c rdf:type core:AttendeeRole . \n"
+ "?c obo:BFO_0000054 ?d . \n"
+ "?d rdf:type event:Event .\n"
+ " }");
// If the organization changes, update the attendee role of person
// core:AttendeeRole applies to events, not organizations; updating accordingly - tlw72
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?person) \n" +
"WHERE {\n"
+ "?uri rdf:type foaf:Organization ; ?b ?c . \n"
+ " ?c rdf:type core:AttendeeRole ; core:roleOf ?d .\n"
+ "?uri rdf:type event:Event . \n"
+ "?uri obo:BFO_0000055 ?c . \n"
+ "?c rdf:type core:AttendeeRole . \n"
+ "?c obo:RO_0000052 ?d . \n"
+ "?d rdf:type foaf:Person .\n"
+ " }");
// core:ClinicalRole -- core:clinicalRoleOf
@ -371,48 +407,67 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?project) \n" +
"WHERE {\n"
+ "?uri rdf:type foaf:Person . \n"
+ "?uri obo:RO_0000053 ?c . \n"
+ "?c rdf:type core:ClinicalRole . \n"
+ "?c obo:BFO_0000054 ?d .\n"
+ "?d rdf:type core:Project .\n"
+ " }");
+ "?uri rdf:type foaf:Person ; ?b ?c . \n"
+ " ?c rdf:type core:ClinicalRole ; core:roleIn ?d .\n"
// If the person changes, update the clinical role in service
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?service) \n" +
"WHERE {\n"
+ "?uri rdf:type foaf:Person . \n"
+ "?uri obo:RO_0000053 ?c . \n"
+ "?c rdf:type core:ClinicalRole . \n"
+ "?c core:roleContributesTo ?d .\n"
+ "?d rdf:type obo:ERO_0000005 .\n"
+ " }");
// If the project changes, update the clinical role of person
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?person) \n" +
"WHERE {\n"
+ "?uri rdf:type core:Project ; ?b ?c . \n"
+ " ?c rdf:type core:ClinicalRole ; core:clinicalRoleOf ?d .\n "
+ "?uri rdf:type core:Project . \n"
+ "?uri obo:BFO_0000055 ?c . \n"
+ "?c rdf:type core:ClinicalRole . \n"
+ "?c obo:RO_0000052 ?d .\n "
+ "?d rdf:type foaf:Person .\n "
+ " }");
// If the service changes, update the clinical role of person
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?person) \n" +
"WHERE {\n"
+ "?uri rdf:type core:Service ; ?b ?c . \n"
+ " ?c rdf:type core:ClinicalRole ; core:clinicalRoleOf ?d .\n "
+ "?uri rdf:type obo:ERO_0000005 . \n"
+ "?uri core:contributingRole ?c . \n"
+ "?c rdf:type core:ClinicalRole . \n"
+ "?c obo:RO_0000052 ?d .\n "
+ "?d rdf:type foaf:Person .\n "
+ " }");
// core:LeaderRole -- core:leaderRoleOf
// If the person changes, update the leader role in organization
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?organization) \n" +
"WHERE {\n"
+ "?uri rdf:type foaf:Person ; ?b ?c . \n"
+ " ?c rdf:type core:LeaderRole ; core:roleIn ?d .\n"
+ "?uri rdf:type foaf:Person . \n"
+ "?uri obo:RO_0000053 ?c . \n"
+ "?c rdf:type core:LeaderRole . \n"
+ "?c core:roleContributesTo ?d .\n"
+ "?d rdf:type foaf:Organization .\n "
+ " }");
// If the organization changes, update the leader role of person
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?person) \n" +
"WHERE {\n"
+ "?uri rdf:type foaf:Organization ; ?b ?c . \n"
+ " ?c rdf:type core:LeaderRole ; core:leaderRoleOf ?d .\n"
+ "?uri rdf:type foaf:Organization . \n"
+ "?uri core:contributingRole ?c . \n"
+ "?c rdf:type core:LeaderRole . \n"
+ "?c obo:RO_0000052 ?d .\n "
+ "?d rdf:type foaf:Person .\n "
+ " }");
// core:MemberRole -- core:memberRoleOf
@ -421,115 +476,142 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?organization) \n" +
"WHERE \n{"
+ "?uri rdf:type foaf:Person ; ?b ?c . \n"
+ " ?c rdf:type core:MemberRole ; core:roleIn ?d .\n"
+ "?uri rdf:type foaf:Person . \n"
+ "?uri obo:RO_0000053 ?c . \n"
+ "?c rdf:type core:MemberRole . \n"
+ "?c core:roleContributesTo ?d .\n"
+ "?d rdf:type foaf:Organization .\n "
+ " }");
// If the organization changes, update the member role of person
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?person) \n" +
"WHERE {"
+ "?uri rdf:type foaf:Organization ; ?b ?c . \n"
+ " ?c rdf:type core:MemberRole ; core:memberRoleOf ?d .\n"
+ "?uri rdf:type foaf:Organization . \n"
+ "?uri core:contributingRole ?c . \n"
+ "?c rdf:type core:MemberRole . \n"
+ "?c obo:RO_0000052 ?d .\n "
+ "?d rdf:type foaf:Person .\n "
+ " }");
// core:OrganizerRole -- core:organizerRoleOf
// If the person changes, update the organizer role in organization
// organizerRole appplies to events not organizations; updating accordingly - tlw72
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?organization) \n" +
"SELECT (str(?d) as ?event) \n" +
"WHERE {"
+ "?uri rdf:type foaf:Person ; ?b ?c . \n"
+ " ?c rdf:type core:OrganizerRole ; core:roleIn ?d .\n"
+ "?uri rdf:type foaf:Person . \n"
+ "?uri obo:RO_0000053 ?c . \n"
+ "?c rdf:type core:OrganizerRole .\n"
+ "?c obo:BFO_0000054 ?d .\n"
+ "?d rdf:type event:Event .\n "
+ " }");
// If the organization changes, update the organizer role of person
// organizerRole appplies to events not organizations; updating accordingly - tlw72
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?person) \n" +
"WHERE {\n"
+ "?uri rdf:type foaf:Organization ; ?b ?c . \n"
+ " ?c rdf:type core:OrganizerRole ; core:organizerRoleOf ?d .\n"
+ "?uri rdf:type event:Event . \n"
+ "?uri obo:BFO_0000055 ?c . \n"
+ "?c rdf:type core:OrganizerRole . \n"
+ "?c obo:RO_0000052 ?d .\n "
+ "?d rdf:type foaf:Person .\n "
+ " }");
// core:OutreachProviderRole -- core:outreachProviderRoleOf
// If the person changes, update the outreach provider role in organization
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?organization) \n" +
"WHERE {\n"
+ "?uri rdf:type foaf:Person ; ?b ?c . \n"
+ " ?c rdf:type core:OutreachProviderRole ; core:roleIn ?d .\n"
+ "?uri rdf:type foaf:Person . \n"
+ "?uri obo:RO_0000053 ?c . \n"
+ "?c rdf:type core:OutreachProviderRole .\n"
+ "?c core:roleContributesTo ?d .\n"
+ "?d rdf:type foaf:Organization .\n "
+ " }");
// If the organization changes, update the outreach provider role of person
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?person) \n" +
"WHERE {\n"
+ "?uri rdf:type foaf:Organization ; ?b ?c . \n"
+ " ?c rdf:type core:OutreachProviderRole ; core:outreachProviderRoleOf ?d .\n"
+ "?uri rdf:type foaf:Organization . \n"
+ "?uri core:contributingRole ?c . \n"
+ "?c rdf:type core:OutreachProviderRole . \n"
+ "?c obo:RO_0000052 ?d .\n "
+ "?d rdf:type foaf:Person .\n "
+ " }");
// core:PresenterRole -- core:presenterRoleOf
// If the person changes, update the presentation
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?organization) \n" +
"SELECT (str(?d) as ?presentation) \n" +
"WHERE {\n"
+ "?uri rdf:type foaf:Person ; ?b ?c . \n"
+ " ?c rdf:type core:PresenterRole ; core:roleIn ?d .\n"
+ "?uri rdf:type foaf:Person . \n"
+ "?uri obo:RO_0000053 ?c . \n"
+ " ?c rdf:type core:PresenterRole . \n"
+ " ?c obo:BFO_0000054 ?d .\n"
+ " ?d rdf:type core:Presentation . \n"
+ " }");
// If the presentation changes, update the person
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?person) \n" +
"WHERE {\n"
+ "?uri rdf:type core:Presentation ; ?b ?c . \n"
+ " ?c rdf:type core:PresenterRole ; core:presenterRoleOf ?d .\n"
+ "?uri rdf:type core:Presentation . \n"
+ "?uri obo:BFO_0000055 ?c . \n"
+ " ?c rdf:type core:PresenterRole . \n "
+ "?c obo:RO_0000052 ?d .\n "
+ "?d rdf:type foaf:Person .\n "
+ " }");
// core:ResearcherRole -- core:researcherRoleOf
// If the person changes, update the grant
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?organization) \n" +
"SELECT (str(?d) as ?grant) \n" +
"WHERE {\n"
+ "?uri rdf:type foaf:Person ; ?b ?c . \n"
+ " ?c rdf:type core:ResearcherRole ; core:roleIn ?d .\n"
+ "?uri rdf:type foaf:Person . \n"
+ "?uri obo:RO_0000053 ?c . \n"
+ " ?c rdf:type core:ResearcherRole . \n "
+ " ?c core:relatedBy ?d .\n"
+ " ?d rdf:type core:Grant . \n"
+ " }");
// If the grant changes, update the researcher
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?person) \n" +
"WHERE {\n"
+ "?uri rdf:type core:Grant ; ?b ?c . \n"
+ " ?c rdf:type core:ResearcherRole ; core:researcherRoleOf ?d .\n"
+ "?uri rdf:type core:Grant . \n"
+ "?uri core:relates ?c . \n"
+ " ?c rdf:type core:ResearcherRole . \n "
+ " ?c obo:RO_0000052 ?d .\n"
+ "?d rdf:type foaf:Person .\n "
+ " }");
// If the grant changes, update the principal investigator
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?person) \n" +
"WHERE {\n"
+ "?uri rdf:type core:Grant ; ?b ?c . \n"
+ " ?c rdf:type core:PrincipalInvestigatorRole ; core:principalInvestigatorRoleOf ?d .\n"
+ "?uri rdf:type core:Grant . \n"
+ " ?uri core:relates ?c . \n"
+ " ?c rdf:type core:PrincipalInvestigatorRole . \n "
+ " ?c obo:RO_0000052 ?d .\n"
+ "?d rdf:type foaf:Person .\n "
+ " }");
// If the grant changes, update the co-principal investigator
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?person) \n" +
"WHERE {\n"
+ "?uri rdf:type core:Grant ; ?b ?c . \n"
+ " ?c rdf:type core:CoPrincipalInvestigatorRole ; core:co-PrincipalInvestigatorRoleOf ?d .\n"
+ "?uri rdf:type core:Grant . \n"
+ " ?uri core:relates ?c . \n"
+ " ?c rdf:type core:CoPrincipalInvestigatorRole . \n "
+ " ?c obo:RO_0000052 ?d .\n"
+ "?d rdf:type foaf:Person .\n "
+ " }");
@ -537,45 +619,65 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?person) \n" +
"WHERE {\n"
+ "?uri rdf:type core:Grant . \n"
+ " ?uri core:relates ?c . \n"
+ " ?c rdf:type core:InvestigatorRole . \n "
+ " ?c obo:RO_0000052 ?d .\n"
+ "?d rdf:type foaf:Person .\n "
+ " }");
+ "?uri rdf:type core:Grant ; ?b ?c . \n"
+ " ?c rdf:type core:InvestigatorRole ; core:investigatorRoleOf ?d .\n"
// If the person changes, update the project
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?project) \n" +
"WHERE {\n"
+ "?uri rdf:type foaf:Person . \n"
+ "?uri obo:RO_0000053 ?c . \n"
+ " ?c rdf:type core:ResearcherRole . \n "
+ " ?c obo:BFO_0000054 ?d .\n"
+ " ?d rdf:type core:Project . \n"
+ " }");
// If the project changes, update the researcher
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?person) \n" +
"WHERE {\n"
+ "?uri rdf:type core:Project ; ?b ?c . \n"
+ " ?c rdf:type core:ResearcherRole ; core:researcherRoleOf ?d .\n"
+ "?uri rdf:type core:Project . \n"
+ " ?uri obo:BFO_0000055 ?c .\n"
+ " ?c rdf:type core:ResearcherRole . \n "
+ " ?c obo:RO_0000052 ?d .\n"
+ "?d rdf:type foaf:Person .\n "
+ " }");
// core:EditorRole -- core:editorRoleOf, core:forInformationResource (person, informationresource)
// If the person changes, update the editor role in organization
// If the person changes, update the editor role of the info resource
// changing foaf:Organization to info content entity. Org no longer applies here - tlw72
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?organization) \n" +
"SELECT (str(?d) as ?informationResource) \n" +
"WHERE {\n"
+ "?uri rdf:type foaf:Person ; ?b ?c . \n"
+ " ?c rdf:type core:EditorRole ; core:roleIn ?d .\n"
+ "?uri rdf:type foaf:Person . \n"
+ "?uri obo:RO_0000053 ?c . \n"
+ " ?c rdf:type core:EditorRole . \n "
+ " ?c core:roleContributesTo ?d .\n"
+ "?d rdf:type obo:IAO_0000030 .\n "
+ " }");
// If the organization changes, update the editor role of person
// If the info respource changes, update the editor role of person
// changing foaf:Organization to info content entity. Org no longer applies here - tlw72
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?person) \n" +
"WHERE {\n"
+ "?uri rdf:type foaf:Organization ; ?b ?c . \n"
+ " ?c rdf:type core:EditorRole ; core:editorRoleOf ?d .\n"
+ "?uri rdf:type obo:IAO_0000030 . \n"
+ "?uri core:contributingRole ?c . \n"
+ " ?c rdf:type core:EditorRole . \n "
+ " ?c obo:RO_0000052 ?d .\n"
+ "?d rdf:type foaf:Person .\n "
+ " }");
// Next two queries are covered by the previous two. Commenting them out - tlw72
// If the person changes, update the information resource associated with editor role
multiValuedQueriesForRole.add(prefix +
/* multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?informationResource) \n" +
"WHERE {\n"
@ -591,46 +693,56 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
+ "?uri rdf:type foaf:Organization ; ?b ?c . \n"
+ " ?c rdf:type core:EditorRole ; core:forInformationResource ?d .\n"
+ " }");
*/
// core:ServiceProviderRole -- core:serviceProviderRoleOf
// If the person changes, update the service provider role in organization
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?organization) \n" +
"WHERE {\n"
+ "?uri rdf:type foaf:Person ; ?b ?c . \n"
+ " ?c rdf:type core:ServiceProviderRole ; core:roleIn ?d .\n"
+ "?uri rdf:type foaf:Person . \n"
+ "?uri obo:RO_0000053 ?c . \n"
+ " ?c rdf:type obo:ERO_0000012 . \n"
+ " ?c core:roleContributesTo ?d .\n"
+ " ?d rdf:type foaf:Organization .\n "
+ " }");
// If the organization changes, update the service provider role of person
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?person) \n" +
"WHERE {\n"
+ "?uri rdf:type foaf:Organization ; ?b ?c . \n"
+ " ?c rdf:type core:ServiceProviderRole ; core:serviceProviderRoleOf ?d .\n"
+ "?uri rdf:type foaf:Organization . \n"
+ "?uri core:contributingRole ?c . \n"
+ " ?c rdf:type obo:ERO_0000012 . \n "
+ " ?c obo:RO_0000052 ?d .\n"
+ "?d rdf:type foaf:Person .\n "
+ " }");
// core:TeacherRole -- core:teacherRoleOf
// If the person changes, update the teacher role in organization
// updated to make this an Event (e.g., a course) not an organization - tlw72
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?organization) \n" +
"SELECT (str(?d) as ?event) \n" +
"WHERE {\n"
+ "?uri rdf:type foaf:Person ; ?b ?c . \n"
+ " ?c rdf:type core:TeacherRole ; core:roleIn ?d .\n"
+ "?uri rdf:type foaf:Person . \n"
+ "?uri obo:RO_0000053 ?c . \n"
+ " ?c rdf:type core:TeacherRole . \n"
+ " ?c obo:BFO_0000054 ?d .\n"
+ " ?d rdf:type event:Event .\n "
+ " }");
// If the organization changes, update the teacher role of person
// updated to make this an Event (e.g., a course) not an organization - tlw72
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?person) \n" +
"WHERE {\n"
+ "?uri rdf:type foaf:Organization ; ?b ?c . \n"
+ " ?c rdf:type core:TeacherRole ; core:teacherRoleOf ?d .\n"
+ "?uri rdf:type event:Event . \n"
+ "?uri obo:BFO_0000055 ?c . \n"
+ " ?c rdf:type core:TeacherRole . \n "
+ " ?c obo:RO_0000052 ?d .\n"
+ "?d rdf:type foaf:Person .\n "
+ " }");
@ -638,7 +750,9 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
// core:PeerReviewerRole -- core:forInformationResource, core:reviewerRoleOf
// If the person changes, update the reviewer role in organization
multiValuedQueriesForRole.add(prefix +
// There is no relationship between a reviewerRole and an organization; commenting
// the next two queries out - tlw72
/* multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?organization) \n" +
"WHERE {\n"
@ -656,23 +770,27 @@ public class AdditionalURIsForContextNodes implements StatementToURIsToUpdate {
+ "?uri rdf:type foaf:Organization ; ?b ?c . \n"
+ " ?c rdf:type core:ReviewerRole ; core:reviewerRoleOf ?d .\n"
+ " }");
*/
// If the person changes, update the information resource associated with reviewer role
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?informationResource) \n " +
"WHERE {\n"
+ "?uri rdf:type foaf:Person ; ?b ?c . \n"
+ " ?c rdf:type core:ReviewerRole ; core:forInformationResource ?d .\n"
+ "?uri rdf:type foaf:Person . \n"
+ "?uri obo:RO_0000053 ?c . \n"
+ " ?c rdf:type core:ReviewerRole . \n"
+ " ?c core:roleContributesTo ?d .\n"
+ " ?d rdf:type obo:IAO_0000030 .\n "
+ " }");
// If the organization changes, update the information resource associated with reviewer role
multiValuedQueriesForRole.add(prefix +
"SELECT (str(?d) as ?informationResource) \n" +
"WHERE {\n"
+ "?uri rdf:type foaf:Organization ; ?b ?c . \n"
+ " ?c rdf:type core:ReviewerRole ; core:forInformationResource ?d .\n"
+ "?uri rdf:type obo:IAO_0000030 . \n"
+ "?uri core:contributingRole ?c . \n"
+ " ?c rdf:type core:ReviewerRole. \n "
+ " ?c obo:RO_0000052 ?d .\n"
+ "?d rdf:type foaf:Person .\n "
+ " }");
}

View file

@ -20,7 +20,6 @@ import edu.cornell.mannlib.vitro.webapp.beans.PropertyGroup;
import edu.cornell.mannlib.vitro.webapp.beans.PropertyInstance;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.dao.DataPropertyDao;
import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess;
import edu.cornell.mannlib.vitro.webapp.dao.ObjectPropertyDao;
import edu.cornell.mannlib.vitro.webapp.dao.PropertyGroupDao;
import edu.cornell.mannlib.vitro.webapp.dao.PropertyInstanceDao;
@ -159,7 +158,6 @@ public class GroupedPropertyList extends BaseTemplateModel {
}
}
@SuppressWarnings("unchecked")
protected void sort(List<Property> propertyList) {
try {
Collections.sort(propertyList, new PropertyRanker(vreq));
@ -177,14 +175,9 @@ public class GroupedPropertyList extends BaseTemplateModel {
// DataPropertyDao.getAllPossibleDatapropsForIndividual(). The comparable method for object properties
// is defined using PropertyInstance rather than ObjectProperty.
// Getting WebappDaoFactory from the session because we can't have the filtering
// that gets applied to the request. This breaks blank node structures in the
// restrictions that determine applicable properties.
WebappDaoFactory wadf = ModelAccess.on(vreq.getSession().getServletContext()).getWebappDaoFactory();
//Allowing model switching for display model
if(vreq.getAttribute("specialWriteModel") != null) {
wadf = ModelAccess.on(vreq).getWebappDaoFactory();
}
// Getting Language-neutral WebappDaoFactory because the language-filtering
// breaks blank node structures in the restrictions that determine applicable properties.
WebappDaoFactory wadf = vreq.getLanguageNeutralWebappDaoFactory();
PropertyInstanceDao piDao = wadf.getPropertyInstanceDao();
Collection<PropertyInstance> allPropInstColl = piDao

View file

@ -20,7 +20,7 @@ public class AdditionalURIsForContextNodesTest {
@Test
public void testPositionChanges(){
String n3 =
"<http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n5423> <http://vivoweb.org/ontology/core#organizationForPosition> <http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n5431> . \n" +
"<http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n5423> <http://vivoweb.org/ontology/core#relatedBy> <http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n5431> . \n" +
"<http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n5423> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#AcademicDepartment> . \n" +
"<http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n5423> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Department> . \n" +
"<http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n5423> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> . \n" +
@ -33,8 +33,10 @@ public class AdditionalURIsForContextNodesTest {
"<http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n5431> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Position> . \n" +
"<http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n5431> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n" +
"<http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n5431> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#FacultyPosition> . \n" +
"<http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n5431> <http://vivoweb.org/ontology/core#relates> <http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n5423> . \n" +
"<http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n5431> <http://vivoweb.org/ontology/core#relates> <http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n932> . \n" +
"<http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n932> <http://vivoweb.org/ontology/core#personInPosition> <http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n5431> . \n" +
"<http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n932> <http://vivoweb.org/ontology/core#relatedBy> <http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n5431> . \n" +
"<http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n932> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#FacultyMember> . \n" +
"<http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n932> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> . \n" +
"<http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n932> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> . \n" +
@ -86,6 +88,7 @@ public class AdditionalURIsForContextNodesTest {
"@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . \n" +
"@prefix core: <http://vivoweb.org/ontology/core#> . \n" +
"@prefix vivo: <http://vivo.library.cornell.edu/ns/0.1#> . \n" +
"@prefix obo: <http://purl.obolibrary.org/obo/> . \n" +
" " +
"<http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n2577> \n" +
" a owl:Thing , core:Role , core:LeaderRole ; \n" +
@ -94,14 +97,15 @@ public class AdditionalURIsForContextNodesTest {
" core:LeaderRole ; \n" +
" core:dateTimeInterval \n" +
" <http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n2594> ; \n" +
" core:leaderRoleOf <http://vivo.scripps.edu/individual/n14979> ; \n" +
" core:roleIn <http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n2592> . \n" +
" obo:RO_0000052 <http://vivo.scripps.edu/individual/n14979> ; \n" +
" core:roleContributesTo <http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n2592> . \n" +
"<http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n2592> \n" +
" a <http://xmlns.com/foaf/0.1/Organization> , owl:Thing , <http://xmlns.com/foaf/0.1/Agent> , core:ClinicalOrganization ; \n" +
" rdfs:label \"Organization XYZ\"^^xsd:string ; \n" +
" vitro:mostSpecificType \n" +
" core:ClinicalOrganization ; \n" +
" core:relatedRole <http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n2577> . \n";
" core:contributingRole <http://caruso-laptop.mannlib.cornell.edu:8090/vivo/individual/n2577> . \n" +
" <http://vivo.scripps.edu/individual/n14979> a <http://xmlns.com/foaf/0.1/Person> , owl:Thing , <http://xmlns.com/foaf/0.1/Agent> . \n";
//make a test model with an person, an authorship context node and a book
@ -124,26 +128,25 @@ public class AdditionalURIsForContextNodesTest {
String n3=
"<http://vivo.scripps.edu/individual/n2027> <http://www.w3.org/2000/01/rdf-schema#label> \"1, Test\" . \n " +
"<http://vivo.scripps.edu/individual/n2027> <http://xmlns.com/foaf/0.1/lastName> \"1\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
"<http://vivo.scripps.edu/individual/n2027> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
// "<http://vivo.scripps.edu/individual/n2027> <http://xmlns.com/foaf/0.1/lastName> \"1\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
// "<http://vivo.scripps.edu/individual/n2027> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
"<http://vivo.scripps.edu/individual/n2027> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://xmlns.com/foaf/0.1/Person> . \n " +
"<http://vivo.scripps.edu/individual/n2027> <http://vivoweb.org/ontology/core#hasLeaderRole> <http://vivo.scripps.edu/individual/n7067> . \n " +
"<http://vivo.scripps.edu/individual/n2027> <http://purl.obolibrary.org/obo/RO_0000053> <http://vivo.scripps.edu/individual/n7067> . \n " +
"<http://vivo.scripps.edu/individual/n2027> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> . \n " +
"<http://vivo.scripps.edu/individual/n2027> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> . \n " +
"<http://vivo.scripps.edu/individual/n2027> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n " +
"<http://vivo.scripps.edu/individual/n7067> <http://www.w3.org/2000/01/rdf-schema#label> \"Leader Role\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
"<http://vivo.scripps.edu/individual/n7067> <http://vivoweb.org/ontology/core#leaderRoleOf> <http://vivo.scripps.edu/individual/n2027> . \n " +
"<http://vivo.scripps.edu/individual/n7067> <http://purl.obolibrary.org/obo/RO_0000052> <http://vivo.scripps.edu/individual/n2027> . \n " +
"<http://vivo.scripps.edu/individual/n7067> <http://vivoweb.org/ontology/core#dateTimeInterval> <http://vivo.scripps.edu/individual/n7083> . \n " +
"<http://vivo.scripps.edu/individual/n7067> <http://vivoweb.org/ontology/core#roleIn> <http://vivo.scripps.edu/individual/n7080> . \n " +
"<http://vivo.scripps.edu/individual/n7067> <http://vivoweb.org/ontology/core#roleContributesTo> <http://vivo.scripps.edu/individual/n7080> . \n " +
"<http://vivo.scripps.edu/individual/n7067> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#LeaderRole> . \n " +
"<http://vivo.scripps.edu/individual/n7067> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Role> . \n " +
"<http://vivo.scripps.edu/individual/n7067> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#LeaderRole> . \n " +
"<http://vivo.scripps.edu/individual/n7067> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n " +
"<http://vivo.scripps.edu/individual/n7080> <http://www.w3.org/2000/01/rdf-schema#label> \"University1\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
"<http://vivo.scripps.edu/individual/n7080> <http://vivoweb.org/ontology/core#relatedRole> <http://vivo.scripps.edu/individual/n7067> . \n " +
"<http://vivo.scripps.edu/individual/n7080> <http://vivoweb.org/ontology/core#contributingRole> <http://vivo.scripps.edu/individual/n7067> . \n " +
"<http://vivo.scripps.edu/individual/n7080> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#University> .\n " +
"<http://vivo.scripps.edu/individual/n7080> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#University> . \n " +
"<http://vivo.scripps.edu/individual/n7080> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> . \n " +
@ -174,10 +177,10 @@ public class AdditionalURIsForContextNodesTest {
public void testMemberRoleChanges(){
String n3 =
"<http://vivo.scripps.edu/individual/n4519> <http://vivoweb.org/ontology/core#hasMemberRole> <http://vivo.scripps.edu/individual/n6040> . \n " +
"<http://vivo.scripps.edu/individual/n4519> <http://purl.obolibrary.org/obo/RO_0000053> <http://vivo.scripps.edu/individual/n6040> . \n " +
"<http://vivo.scripps.edu/individual/n4519> <http://www.w3.org/2000/01/rdf-schema#label> \"2, Test\" . \n " +
"<http://vivo.scripps.edu/individual/n4519> <http://xmlns.com/foaf/0.1/lastName> \"2\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
"<http://vivo.scripps.edu/individual/n4519> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
// "<http://vivo.scripps.edu/individual/n4519> <http://xmlns.com/foaf/0.1/lastName> \"2\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
// "<http://vivo.scripps.edu/individual/n4519> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
"<http://vivo.scripps.edu/individual/n4519> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://xmlns.com/foaf/0.1/Person> . \n " +
"<http://vivo.scripps.edu/individual/n4519> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> . \n " +
"<http://vivo.scripps.edu/individual/n4519> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> . \n " +
@ -185,16 +188,16 @@ public class AdditionalURIsForContextNodesTest {
"<http://vivo.scripps.edu/individual/n6040> <http://www.w3.org/2000/01/rdf-schema#label> \"Member Role\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
"<http://vivo.scripps.edu/individual/n6040> <http://vivoweb.org/ontology/core#dateTimeInterval> <http://vivo.scripps.edu/individual/n6031> . \n " +
"<http://vivo.scripps.edu/individual/n6040> <http://vivoweb.org/ontology/core#roleIn> <http://vivo.scripps.edu/individual/n6004> . \n " +
"<http://vivo.scripps.edu/individual/n6040> <http://vivoweb.org/ontology/core#roleContributesTo> <http://vivo.scripps.edu/individual/n6004> . \n " +
"<http://vivo.scripps.edu/individual/n6040> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#MemberRole> . \n " +
"<http://vivo.scripps.edu/individual/n6040> <http://vivoweb.org/ontology/core#memberRoleOf> <http://vivo.scripps.edu/individual/n4519> . \n " +
"<http://vivo.scripps.edu/individual/n6040> <http://purl.obolibrary.org/obo/RO_0000052> <http://vivo.scripps.edu/individual/n4519> . \n " +
"<http://vivo.scripps.edu/individual/n6040> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#MemberRole> . \n " +
"<http://vivo.scripps.edu/individual/n6040> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Role> . \n " +
"<http://vivo.scripps.edu/individual/n6040> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n " +
"<http://vivo.scripps.edu/individual/n6004> <http://www.w3.org/2000/01/rdf-schema#label> \"University2\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
"<http://vivo.scripps.edu/individual/n6004> <http://vivoweb.org/ontology/core#relatedRole> <http://vivo.scripps.edu/individual/n6040> . \n " +
"<http://vivo.scripps.edu/individual/n6004> <http://vivoweb.org/ontology/core#contributingRole> <http://vivo.scripps.edu/individual/n6040> . \n " +
"<http://vivo.scripps.edu/individual/n6004> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#University> . \n " +
"<http://vivo.scripps.edu/individual/n6004> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#University> . \n " +
"<http://vivo.scripps.edu/individual/n6004> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> . \n " +
@ -228,25 +231,25 @@ public class AdditionalURIsForContextNodesTest {
String n3 =
"<http://vivo.scripps.edu/individual/n4858> <http://www.w3.org/2000/01/rdf-schema#label> \"3, Test\" . \n" +
"<http://vivo.scripps.edu/individual/n4858> <http://xmlns.com/foaf/0.1/lastName> \"3\"^^<http://www.w3.org/2001/XMLSchema#string> .\n" +
"<http://vivo.scripps.edu/individual/n4858> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n4858> <http://vivoweb.org/ontology/core#hasClinicalRole> <http://vivo.scripps.edu/individual/n5185> . \n" +
// "<http://vivo.scripps.edu/individual/n4858> <http://xmlns.com/foaf/0.1/lastName> \"3\"^^<http://www.w3.org/2001/XMLSchema#string> .\n" +
// "<http://vivo.scripps.edu/individual/n4858> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n4858> <http://purl.obolibrary.org/obo/RO_0000053> <http://vivo.scripps.edu/individual/n5185> . \n" +
"<http://vivo.scripps.edu/individual/n4858> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://xmlns.com/foaf/0.1/Person> . \n" +
"<http://vivo.scripps.edu/individual/n4858> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> . \n" +
"<http://vivo.scripps.edu/individual/n4858> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> . \n" +
"<http://vivo.scripps.edu/individual/n4858> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n" +
"<http://vivo.scripps.edu/individual/n5185> <http://vivoweb.org/ontology/core#clinicalRoleOf> <http://vivo.scripps.edu/individual/n4858> . \n" +
"<http://vivo.scripps.edu/individual/n5185> <http://purl.obolibrary.org/obo/RO_0000052> <http://vivo.scripps.edu/individual/n4858> . \n" +
"<http://vivo.scripps.edu/individual/n5185> <http://www.w3.org/2000/01/rdf-schema#label> \"Clinical Role\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n5185> <http://vivoweb.org/ontology/core#dateTimeInterval> <http://vivo.scripps.edu/individual/n5180> . \n" +
"<http://vivo.scripps.edu/individual/n5185> <http://vivoweb.org/ontology/core#roleIn> <http://vivo.scripps.edu/individual/n5177> . \n" +
"<http://vivo.scripps.edu/individual/n5185> <http://purl.obolibrary.org/obo/BFO_0000054> <http://vivo.scripps.edu/individual/n5177> . \n" +
"<http://vivo.scripps.edu/individual/n5185> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#ClinicalRole> . \n" +
"<http://vivo.scripps.edu/individual/n5185> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Role> . \n" +
"<http://vivo.scripps.edu/individual/n5185> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n" +
"<http://vivo.scripps.edu/individual/n5185> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#ClinicalRole> . \n" +
"<http://vivo.scripps.edu/individual/n5177> <http://www.w3.org/2000/01/rdf-schema#label> \"Project1\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n5177> <http://vivoweb.org/ontology/core#relatedRole> <http://vivo.scripps.edu/individual/n5185> . \n" +
"<http://vivo.scripps.edu/individual/n5177> <http://purl.obolibrary.org/obo/BFO_0000055> <http://vivo.scripps.edu/individual/n5185> . \n" +
"<http://vivo.scripps.edu/individual/n5177> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#Project> . \n" +
"<http://vivo.scripps.edu/individual/n5177> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Project> . \n" +
"<http://vivo.scripps.edu/individual/n5177> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n" +
@ -277,28 +280,28 @@ public class AdditionalURIsForContextNodesTest {
String n3 =
"<http://vivo.scripps.edu/individual/n5651> <http://www.w3.org/2000/01/rdf-schema#label> \"4, Test\" . \n" +
"<http://vivo.scripps.edu/individual/n5651> <http://xmlns.com/foaf/0.1/lastName> \"4\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n5651> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n5651> <http://vivoweb.org/ontology/core#hasClinicalRole> <http://vivo.scripps.edu/individual/n4428> . \n" +
// "<http://vivo.scripps.edu/individual/n5651> <http://xmlns.com/foaf/0.1/lastName> \"4\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
// "<http://vivo.scripps.edu/individual/n5651> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n5651> <http://purl.obolibrary.org/obo/RO_0000053> <http://vivo.scripps.edu/individual/n4428> . \n" +
"<http://vivo.scripps.edu/individual/n5651> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://xmlns.com/foaf/0.1/Person> . \n" +
"<http://vivo.scripps.edu/individual/n5651> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> . \n" +
"<http://vivo.scripps.edu/individual/n5651> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> . \n" +
"<http://vivo.scripps.edu/individual/n5651> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n" +
"<http://vivo.scripps.edu/individual/n4428> <http://vivoweb.org/ontology/core#clinicalRoleOf> <http://vivo.scripps.edu/individual/n5651> . \n" +
"<http://vivo.scripps.edu/individual/n4428> <http://purl.obolibrary.org/obo/RO_0000052> <http://vivo.scripps.edu/individual/n5651> . \n" +
"<http://vivo.scripps.edu/individual/n4428> <http://www.w3.org/2000/01/rdf-schema#label> \"Clinical Role 2\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n4428> <http://vivoweb.org/ontology/core#dateTimeInterval> <http://vivo.scripps.edu/individual/n4444> . \n" +
"<http://vivo.scripps.edu/individual/n4428> <http://vivoweb.org/ontology/core#roleIn> <http://vivo.scripps.edu/individual/n4442> . \n" +
"<http://vivo.scripps.edu/individual/n4428> <http://vivoweb.org/ontology/core#roleContributesTo> <http://vivo.scripps.edu/individual/n4442> . \n" +
"<http://vivo.scripps.edu/individual/n4428> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#ClinicalRole> . \n" +
"<http://vivo.scripps.edu/individual/n4428> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Role> . \n" +
"<http://vivo.scripps.edu/individual/n4428> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n" +
"<http://vivo.scripps.edu/individual/n4428> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#ClinicalRole> . \n" +
"<http://vivo.scripps.edu/individual/n4442> <http://www.w3.org/2000/01/rdf-schema#label> \"Service1\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n4442> <http://vivoweb.org/ontology/core#relatedRole> <http://vivo.scripps.edu/individual/n4428> . \n" +
"<http://vivo.scripps.edu/individual/n4442> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#Service> . \n" +
"<http://vivo.scripps.edu/individual/n4442> <http://vivoweb.org/ontology/core#contributingRole> <http://vivo.scripps.edu/individual/n4428> . \n" +
"<http://vivo.scripps.edu/individual/n4442> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://purl.obolibrary.org/obo/ERO_0000005> . \n" +
"<http://vivo.scripps.edu/individual/n4442> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n" +
"<http://vivo.scripps.edu/individual/n4442> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Service> . \n" ;
"<http://vivo.scripps.edu/individual/n4442> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.obolibrary.org/obo/ERO_0000005> . \n" ;
//make a test model with an person, a clinical role node and a service
OntModel model = ModelFactory.createOntologyModel();
@ -322,26 +325,26 @@ public class AdditionalURIsForContextNodesTest {
@Test
public void testPresenterRoleChangesForPresentation(){
String n3 =
"<http://vivo.scripps.edu/individual/n5596> <http://vivoweb.org/ontology/core#hasPresenterRole> <http://vivo.scripps.edu/individual/n1294> . \n" +
"<http://vivo.scripps.edu/individual/n5596> <http://purl.obolibrary.org/obo/RO_0000053> <http://vivo.scripps.edu/individual/n1294> . \n" +
"<http://vivo.scripps.edu/individual/n5596> <http://www.w3.org/2000/01/rdf-schema#label> \"5, Test\" . \n" +
"<http://vivo.scripps.edu/individual/n5596> <http://xmlns.com/foaf/0.1/lastName> \"5\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n5596> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
// "<http://vivo.scripps.edu/individual/n5596> <http://xmlns.com/foaf/0.1/lastName> \"5\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
// "<http://vivo.scripps.edu/individual/n5596> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n5596> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://xmlns.com/foaf/0.1/Person> . \n" +
"<http://vivo.scripps.edu/individual/n5596> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> . \n" +
"<http://vivo.scripps.edu/individual/n5596> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> . \n" +
"<http://vivo.scripps.edu/individual/n5596> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n" +
"<http://vivo.scripps.edu/individual/n1294> <http://vivoweb.org/ontology/core#presenterRoleOf> <http://vivo.scripps.edu/individual/n5596> . \n" +
"<http://vivo.scripps.edu/individual/n1294> <http://purl.obolibrary.org/obo/RO_0000052> <http://vivo.scripps.edu/individual/n5596> . \n" +
"<http://vivo.scripps.edu/individual/n1294> <http://www.w3.org/2000/01/rdf-schema#label> \"Presenter Role\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n1294> <http://vivoweb.org/ontology/core#dateTimeInterval> <http://vivo.scripps.edu/individual/n1304> . \n" +
"<http://vivo.scripps.edu/individual/n1294> <http://vivoweb.org/ontology/core#roleIn> <http://vivo.scripps.edu/individual/n1305> . \n" +
"<http://vivo.scripps.edu/individual/n1294> <http://purl.obolibrary.org/obo/BFO_0000054> <http://vivo.scripps.edu/individual/n1305> . \n" +
"<http://vivo.scripps.edu/individual/n1294> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#PresenterRole> . \n" +
"<http://vivo.scripps.edu/individual/n1294> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Role> . \n" +
"<http://vivo.scripps.edu/individual/n1294> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#PresenterRole> . \n" +
"<http://vivo.scripps.edu/individual/n1294> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n" +
"<http://vivo.scripps.edu/individual/n1305> <http://www.w3.org/2000/01/rdf-schema#label> \"Presentation 1\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n1305> <http://vivoweb.org/ontology/core#relatedRole> <http://vivo.scripps.edu/individual/n1294> . \n" +
"<http://vivo.scripps.edu/individual/n1305> <http://purl.obolibrary.org/obo/BFO_0000055> <http://vivo.scripps.edu/individual/n1294> . \n" +
"<http://vivo.scripps.edu/individual/n1305> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#Presentation> . \n" +
"<http://vivo.scripps.edu/individual/n1305> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Presentation> . \n" +
"<http://vivo.scripps.edu/individual/n1305> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/NET/c4dm/event.owl#Event> . \n" +
@ -370,26 +373,26 @@ public class AdditionalURIsForContextNodesTest {
public void testPresenterRoleChangesForInvitedTalk(){
String n3 =
"<http://vivo.scripps.edu/individual/n4112> <http://vivoweb.org/ontology/core#hasPresenterRole> <http://vivo.scripps.edu/individual/n4144> . \n " +
"<http://vivo.scripps.edu/individual/n4112> <http://purl.obolibrary.org/obo/RO_0000053> <http://vivo.scripps.edu/individual/n4144> . \n " +
"<http://vivo.scripps.edu/individual/n4112> <http://www.w3.org/2000/01/rdf-schema#label> \"6, Test\" . \n " +
"<http://vivo.scripps.edu/individual/n4112> <http://xmlns.com/foaf/0.1/lastName> \"6\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
"<http://vivo.scripps.edu/individual/n4112> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
// "<http://vivo.scripps.edu/individual/n4112> <http://xmlns.com/foaf/0.1/lastName> \"6\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
// "<http://vivo.scripps.edu/individual/n4112> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
"<http://vivo.scripps.edu/individual/n4112> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://xmlns.com/foaf/0.1/Person> . \n " +
"<http://vivo.scripps.edu/individual/n4112> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> . \n " +
"<http://vivo.scripps.edu/individual/n4112> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> . \n " +
"<http://vivo.scripps.edu/individual/n4112> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n " +
"<http://vivo.scripps.edu/individual/n4144> <http://vivoweb.org/ontology/core#presenterRoleOf> <http://vivo.scripps.edu/individual/n4112> . \n " +
"<http://vivo.scripps.edu/individual/n4144> <http://purl.obolibrary.org/obo/RO_0000052> <http://vivo.scripps.edu/individual/n4112> . \n " +
"<http://vivo.scripps.edu/individual/n4144> <http://www.w3.org/2000/01/rdf-schema#label> \"Presenter Role 2\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
"<http://vivo.scripps.edu/individual/n4144> <http://vivoweb.org/ontology/core#dateTimeInterval> <http://vivo.scripps.edu/individual/n4136> . \n " +
"<http://vivo.scripps.edu/individual/n4144> <http://vivoweb.org/ontology/core#roleIn> <http://vivo.scripps.edu/individual/n4107> . \n " +
"<http://vivo.scripps.edu/individual/n4144> <http://purl.obolibrary.org/obo/BFO_0000054> <http://vivo.scripps.edu/individual/n4107> . \n " +
"<http://vivo.scripps.edu/individual/n4144> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#PresenterRole> . \n " +
"<http://vivo.scripps.edu/individual/n4144> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Role> . \n " +
"<http://vivo.scripps.edu/individual/n4144> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#PresenterRole> . \n " +
"<http://vivo.scripps.edu/individual/n4144> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n " +
"<http://vivo.scripps.edu/individual/n4107> <http://www.w3.org/2000/01/rdf-schema#label> \"Invited Talk 1\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
"<http://vivo.scripps.edu/individual/n4107> <http://vivoweb.org/ontology/core#relatedRole> <http://vivo.scripps.edu/individual/n4144> . \n " +
"<http://vivo.scripps.edu/individual/n4107> <http://purl.obolibrary.org/obo/BFO_0000055> <http://vivo.scripps.edu/individual/n4144> . \n " +
"<http://vivo.scripps.edu/individual/n4107> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#InvitedTalk> . \n " +
"<http://vivo.scripps.edu/individual/n4107> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Presentation> . \n " +
"<http://vivo.scripps.edu/individual/n4107> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/NET/c4dm/event.owl#Event> . \n " +
@ -405,11 +408,11 @@ public class AdditionalURIsForContextNodesTest {
//if the person changes then the invited talk needs to be updated
List<String> uris = uriFinder.findAdditionalURIsToIndex( "http://vivo.scripps.edu/individual/n4112");
assertTrue("did not find service for clinical role", uris.contains("http://vivo.scripps.edu/individual/n4107" ));
assertTrue("did not find invited talk for person", uris.contains("http://vivo.scripps.edu/individual/n4107" ));
//if the invited talk changes then the person needs to be updated
uris = uriFinder.findAdditionalURIsToIndex( "http://vivo.scripps.edu/individual/n4107");
assertTrue("did not find person for clinical role", uris.contains("http://vivo.scripps.edu/individual/n4112" ));
assertTrue("did not find person for invited talk", uris.contains("http://vivo.scripps.edu/individual/n4112" ));
}
@ -420,9 +423,9 @@ public class AdditionalURIsForContextNodesTest {
String n3 =
"<http://vivo.scripps.edu/individual/n4957> <http://www.w3.org/2000/01/rdf-schema#label> \"7, Test\" . \n" +
"<http://vivo.scripps.edu/individual/n4957> <http://xmlns.com/foaf/0.1/lastName> \"7\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n4957> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n4957> <http://vivoweb.org/ontology/core#hasResearcherRole> <http://vivo.scripps.edu/individual/n4288> . \n" +
// "<http://vivo.scripps.edu/individual/n4957> <http://xmlns.com/foaf/0.1/lastName> \"7\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
// "<http://vivo.scripps.edu/individual/n4957> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n4957> <http://purl.obolibrary.org/obo/RO_0000053> <http://vivo.scripps.edu/individual/n4288> . \n" +
"<http://vivo.scripps.edu/individual/n4957> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://xmlns.com/foaf/0.1/Person> . \n" +
"<http://vivo.scripps.edu/individual/n4957> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> . \n" +
"<http://vivo.scripps.edu/individual/n4957> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> . \n" +
@ -430,15 +433,15 @@ public class AdditionalURIsForContextNodesTest {
"<http://vivo.scripps.edu/individual/n4288> <http://www.w3.org/2000/01/rdf-schema#label> \"Researcher Role\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n4288> <http://vivoweb.org/ontology/core#dateTimeInterval> <http://vivo.scripps.edu/individual/n4251> . \n" +
"<http://vivo.scripps.edu/individual/n4288> <http://vivoweb.org/ontology/core#roleIn> <http://vivo.scripps.edu/individual/n4252> . \n" +
"<http://vivo.scripps.edu/individual/n4288> <http://vivoweb.org/ontology/core#relatedBy> <http://vivo.scripps.edu/individual/n4252> . \n" +
"<http://vivo.scripps.edu/individual/n4288> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#ResearcherRole> . \n" +
"<http://vivo.scripps.edu/individual/n4288> <http://vivoweb.org/ontology/core#researcherRoleOf> <http://vivo.scripps.edu/individual/n4957> . \n" +
"<http://vivo.scripps.edu/individual/n4288> <http://purl.obolibrary.org/obo/RO_0000052> <http://vivo.scripps.edu/individual/n4957> . \n" +
"<http://vivo.scripps.edu/individual/n4288> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Role> . \n" +
"<http://vivo.scripps.edu/individual/n4288> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#ResearcherRole> . \n" +
"<http://vivo.scripps.edu/individual/n4288> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n" +
"<http://vivo.scripps.edu/individual/n4252> <http://www.w3.org/2000/01/rdf-schema#label> \"Grant1\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n4252> <http://vivoweb.org/ontology/core#relatedRole> <http://vivo.scripps.edu/individual/n4288> . \n" +
"<http://vivo.scripps.edu/individual/n4252> <http://vivoweb.org/ontology/core#relates> <http://vivo.scripps.edu/individual/n4288> . \n" +
"<http://vivo.scripps.edu/individual/n4252> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#Grant> . \n" +
"<http://vivo.scripps.edu/individual/n4252> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Agreement> . \n" +
"<http://vivo.scripps.edu/individual/n4252> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n" +
@ -469,9 +472,9 @@ public class AdditionalURIsForContextNodesTest {
String n3 =
"<http://vivo.scripps.edu/individual/n2029> <http://www.w3.org/2000/01/rdf-schema#label> \"8, Test\" . \n " +
"<http://vivo.scripps.edu/individual/n2029> <http://xmlns.com/foaf/0.1/lastName> \"8\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
"<http://vivo.scripps.edu/individual/n2029> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
"<http://vivo.scripps.edu/individual/n2029> <http://vivoweb.org/ontology/core#hasResearcherRole> <http://vivo.scripps.edu/individual/n556> . \n " +
// "<http://vivo.scripps.edu/individual/n2029> <http://xmlns.com/foaf/0.1/lastName> \"8\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
// "<http://vivo.scripps.edu/individual/n2029> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
"<http://vivo.scripps.edu/individual/n2029> <http://purl.obolibrary.org/obo/RO_0000053> <http://vivo.scripps.edu/individual/n556> . \n " +
"<http://vivo.scripps.edu/individual/n2029> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://xmlns.com/foaf/0.1/Person> . \n " +
"<http://vivo.scripps.edu/individual/n2029> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> . \n " +
"<http://vivo.scripps.edu/individual/n2029> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> . \n " +
@ -479,16 +482,16 @@ public class AdditionalURIsForContextNodesTest {
"<http://vivo.scripps.edu/individual/n556> <http://www.w3.org/2000/01/rdf-schema#label> \"Researcher Role 2\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
"<http://vivo.scripps.edu/individual/n556> <http://vivoweb.org/ontology/core#dateTimeInterval> <http://vivo.scripps.edu/individual/n568> . \n " +
"<http://vivo.scripps.edu/individual/n556> <http://vivoweb.org/ontology/core#roleIn> <http://vivo.scripps.edu/individual/n564> . \n " +
"<http://vivo.scripps.edu/individual/n556> <http://purl.obolibrary.org/obo/BFO_0000054> <http://vivo.scripps.edu/individual/n564> . \n " +
"<http://vivo.scripps.edu/individual/n556> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#ResearcherRole> . \n " +
"<http://vivo.scripps.edu/individual/n556> <http://vivoweb.org/ontology/core#researcherRoleOf> <http://vivo.scripps.edu/individual/n2029> . \n " +
"<http://vivo.scripps.edu/individual/n556> <http://purl.obolibrary.org/obo/RO_0000052> <http://vivo.scripps.edu/individual/n2029> . \n " +
"<http://vivo.scripps.edu/individual/n556> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Role> . \n " +
"<http://vivo.scripps.edu/individual/n556> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#ResearcherRole> . \n " +
"<http://vivo.scripps.edu/individual/n556> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n " +
"<http://vivo.scripps.edu/individual/n564> <http://www.w3.org/2000/01/rdf-schema#label> \"Project2\"^^<http://www.w3.org/2001/XMLSchema#string> . \n " +
"<http://vivo.scripps.edu/individual/n564> <http://vivoweb.org/ontology/core#relatedRole> <http://vivo.scripps.edu/individual/n556> . \n " +
"<http://vivo.scripps.edu/individual/n564> <http://purl.obolibrary.org/obo/BFO_0000055> <http://vivo.scripps.edu/individual/n556> . \n " +
"<http://vivo.scripps.edu/individual/n564> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#Project> . \n " +
"<http://vivo.scripps.edu/individual/n564> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Project> . \n " +
"<http://vivo.scripps.edu/individual/n564> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n " +
@ -519,18 +522,18 @@ public class AdditionalURIsForContextNodesTest {
String n3 =
"<http://vivo.scripps.edu/individual/n2368> <http://vivoweb.org/ontology/core#hasPrincipalInvestigatorRole> <http://vivo.scripps.edu/individual/n1740> . \n" +
"<http://vivo.scripps.edu/individual/n2368> <http://purl.obolibrary.org/obo/RO_0000053> <http://vivo.scripps.edu/individual/n1740> . \n" +
"<http://vivo.scripps.edu/individual/n2368> <http://www.w3.org/2000/01/rdf-schema#label> \"8, Test\" . \n" +
"<http://vivo.scripps.edu/individual/n2368> <http://xmlns.com/foaf/0.1/lastName> \"8\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n2368> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
// "<http://vivo.scripps.edu/individual/n2368> <http://xmlns.com/foaf/0.1/lastName> \"8\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
// "<http://vivo.scripps.edu/individual/n2368> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n2368> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://xmlns.com/foaf/0.1/Person> . \n" +
"<http://vivo.scripps.edu/individual/n2368> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> . \n" +
"<http://vivo.scripps.edu/individual/n2368> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> . \n" +
"<http://vivo.scripps.edu/individual/n2368> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n" +
"<http://vivo.scripps.edu/individual/n1740> <http://vivoweb.org/ontology/core#principalInvestigatorRoleOf> <http://vivo.scripps.edu/individual/n2368> . \n" +
"<http://vivo.scripps.edu/individual/n1740> <http://purl.obolibrary.org/obo/RO_0000052> <http://vivo.scripps.edu/individual/n2368> . \n" +
"<http://vivo.scripps.edu/individual/n1740> <http://vivoweb.org/ontology/core#dateTimeInterval> <http://vivo.scripps.edu/individual/n1756> . \n" +
"<http://vivo.scripps.edu/individual/n1740> <http://vivoweb.org/ontology/core#roleIn> <http://vivo.scripps.edu/individual/n1742> . \n" +
"<http://vivo.scripps.edu/individual/n1740> <http://vivoweb.org/ontology/core#relatedBy> <http://vivo.scripps.edu/individual/n1742> . \n" +
"<http://vivo.scripps.edu/individual/n1740> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#PrincipalInvestigatorRole> . \n" +
"<http://vivo.scripps.edu/individual/n1740> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Role> . \n" +
"<http://vivo.scripps.edu/individual/n1740> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#PrincipalInvestigatorRole> . \n" +
@ -539,7 +542,7 @@ public class AdditionalURIsForContextNodesTest {
"<http://vivo.scripps.edu/individual/n1740> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#InvestigatorRole> . \n" +
"<http://vivo.scripps.edu/individual/n1742> <http://www.w3.org/2000/01/rdf-schema#label> \"Grant 2\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n1742> <http://vivoweb.org/ontology/core#relatedRole> <http://vivo.scripps.edu/individual/n1740> . \n" +
"<http://vivo.scripps.edu/individual/n1742> <http://vivoweb.org/ontology/core#relates> <http://vivo.scripps.edu/individual/n1740> . \n" +
"<http://vivo.scripps.edu/individual/n1742> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#Grant> . \n" +
"<http://vivo.scripps.edu/individual/n1742> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Agreement> . \n" +
"<http://vivo.scripps.edu/individual/n1742> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n" +
@ -555,11 +558,11 @@ public class AdditionalURIsForContextNodesTest {
//if the person changes then the grant needs to be updated
List<String> uris = uriFinder.findAdditionalURIsToIndex( "http://vivo.scripps.edu/individual/n2368");
assertTrue("did not find service for clinical role", uris.contains("http://vivo.scripps.edu/individual/n1742" ));
assertTrue("did not find grant for pi", uris.contains("http://vivo.scripps.edu/individual/n1742" ));
//if the grant changes then the person needs to be updated
uris = uriFinder.findAdditionalURIsToIndex( "http://vivo.scripps.edu/individual/n1742");
assertTrue("did not find person for clinical role", uris.contains("http://vivo.scripps.edu/individual/n2368" ));
assertTrue("did not find pi for grant", uris.contains("http://vivo.scripps.edu/individual/n2368" ));
}
@ -570,17 +573,17 @@ public class AdditionalURIsForContextNodesTest {
String n3 =
"<http://vivo.scripps.edu/individual/n1373> <http://www.w3.org/2000/01/rdf-schema#label> \"9, Test\" . \n" +
"<http://vivo.scripps.edu/individual/n1373> <http://xmlns.com/foaf/0.1/lastName> \"9\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n1373> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
// "<http://vivo.scripps.edu/individual/n1373> <http://xmlns.com/foaf/0.1/lastName> \"9\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
// "<http://vivo.scripps.edu/individual/n1373> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n1373> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://xmlns.com/foaf/0.1/Person> . \n" +
"<http://vivo.scripps.edu/individual/n1373> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> . \n" +
"<http://vivo.scripps.edu/individual/n1373> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> . \n" +
"<http://vivo.scripps.edu/individual/n1373> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n" +
"<http://vivo.scripps.edu/individual/n1373> <http://vivoweb.org/ontology/core#hasCo-PrincipalInvestigatorRole> <http://vivo.scripps.edu/individual/n4928> . \n" +
"<http://vivo.scripps.edu/individual/n1373> <http://purl.obolibrary.org/obo/RO_0000053> <http://vivo.scripps.edu/individual/n4928> . \n" +
"<http://vivo.scripps.edu/individual/n4928> <http://vivoweb.org/ontology/core#co-PrincipalInvestigatorRoleOf> <http://vivo.scripps.edu/individual/n1373> . \n" +
"<http://vivo.scripps.edu/individual/n4928> <http://purl.obolibrary.org/obo/RO_0000052> <http://vivo.scripps.edu/individual/n1373> . \n" +
"<http://vivo.scripps.edu/individual/n4928> <http://vivoweb.org/ontology/core#dateTimeInterval> <http://vivo.scripps.edu/individual/n4895> . \n" +
"<http://vivo.scripps.edu/individual/n4928> <http://vivoweb.org/ontology/core#roleIn> <http://vivo.scripps.edu/individual/n4931> . \n" +
"<http://vivo.scripps.edu/individual/n4928> <http://vivoweb.org/ontology/core#relatedBy> <http://vivo.scripps.edu/individual/n4931> . \n" +
"<http://vivo.scripps.edu/individual/n4928> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#CoPrincipalInvestigatorRole> . \n" +
"<http://vivo.scripps.edu/individual/n4928> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#CoPrincipalInvestigatorRole> . \n" +
"<http://vivo.scripps.edu/individual/n4928> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Role> . \n" +
@ -589,7 +592,7 @@ public class AdditionalURIsForContextNodesTest {
"<http://vivo.scripps.edu/individual/n4928> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#InvestigatorRole> . \n" +
"<http://vivo.scripps.edu/individual/n4931> <http://www.w3.org/2000/01/rdf-schema#label> \"Grant 3\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n4931> <http://vivoweb.org/ontology/core#relatedRole> <http://vivo.scripps.edu/individual/n4928> . \n" +
"<http://vivo.scripps.edu/individual/n4931> <http://vivoweb.org/ontology/core#relates> <http://vivo.scripps.edu/individual/n4928> . \n" +
"<http://vivo.scripps.edu/individual/n4931> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#Grant> . \n" +
"<http://vivo.scripps.edu/individual/n4931> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Agreement> . \n" +
"<http://vivo.scripps.edu/individual/n4931> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n" +
@ -619,25 +622,25 @@ public class AdditionalURIsForContextNodesTest {
String n3 =
"<http://vivo.scripps.edu/individual/n5282> <http://www.w3.org/2000/01/rdf-schema#label> \"10, Test\" . \n" +
"<http://vivo.scripps.edu/individual/n5282> <http://xmlns.com/foaf/0.1/lastName> \"10\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n5282> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
// "<http://vivo.scripps.edu/individual/n5282> <http://xmlns.com/foaf/0.1/lastName> \"10\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
// "<http://vivo.scripps.edu/individual/n5282> <http://xmlns.com/foaf/0.1/firstName> \"Test\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n5282> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://xmlns.com/foaf/0.1/Person> . \n" +
"<http://vivo.scripps.edu/individual/n5282> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> . \n" +
"<http://vivo.scripps.edu/individual/n5282> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> . \n" +
"<http://vivo.scripps.edu/individual/n5282> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n" +
"<http://vivo.scripps.edu/individual/n5282> <http://vivoweb.org/ontology/core#hasInvestigatorRole> <http://vivo.scripps.edu/individual/n157> . \n" +
"<http://vivo.scripps.edu/individual/n5282> <http://purl.obolibrary.org/obo/RO_0000053> <http://vivo.scripps.edu/individual/n157> . \n" +
"<http://vivo.scripps.edu/individual/n157> <http://vivoweb.org/ontology/core#dateTimeInterval> <http://vivo.scripps.edu/individual/n127> . \n" +
"<http://vivo.scripps.edu/individual/n157> <http://vivoweb.org/ontology/core#roleIn> <http://vivo.scripps.edu/individual/n160> . \n" +
"<http://vivo.scripps.edu/individual/n157> <http://vivoweb.org/ontology/core#relatedBy> <http://vivo.scripps.edu/individual/n160> . \n" +
"<http://vivo.scripps.edu/individual/n157> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#InvestigatorRole> . \n" +
"<http://vivo.scripps.edu/individual/n157> <http://vivoweb.org/ontology/core#investigatorRoleOf> <http://vivo.scripps.edu/individual/n5282> . \n" +
"<http://vivo.scripps.edu/individual/n157> <http://purl.obolibrary.org/obo/RO_0000052> <http://vivo.scripps.edu/individual/n5282> . \n" +
"<http://vivo.scripps.edu/individual/n157> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Role> . \n" +
"<http://vivo.scripps.edu/individual/n157> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#ResearcherRole> . \n" +
"<http://vivo.scripps.edu/individual/n157> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n" +
"<http://vivo.scripps.edu/individual/n157> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#InvestigatorRole> . \n" +
"<http://vivo.scripps.edu/individual/n160> <http://www.w3.org/2000/01/rdf-schema#label> \"Grant 4\"^^<http://www.w3.org/2001/XMLSchema#string> . \n" +
"<http://vivo.scripps.edu/individual/n160> <http://vivoweb.org/ontology/core#relatedRole> <http://vivo.scripps.edu/individual/n157> . \n" +
"<http://vivo.scripps.edu/individual/n160> <http://vivoweb.org/ontology/core#relates> <http://vivo.scripps.edu/individual/n157> . \n" +
"<http://vivo.scripps.edu/individual/n160> <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> <http://vivoweb.org/ontology/core#Grant> . \n" +
"<http://vivo.scripps.edu/individual/n160> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Agreement> . \n" +
"<http://vivo.scripps.edu/individual/n160> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> . \n" +
@ -653,11 +656,11 @@ public class AdditionalURIsForContextNodesTest {
//if the investigator changes then the grant needs to be updated
List<String> uris = uriFinder.findAdditionalURIsToIndex( "http://vivo.scripps.edu/individual/n5282");
assertTrue("did not find grant for co-pi", uris.contains("http://vivo.scripps.edu/individual/n160" ));
assertTrue("did not find grant for investigator", uris.contains("http://vivo.scripps.edu/individual/n160" ));
//if the grant changes then the investigator needs to be updated
uris = uriFinder.findAdditionalURIsToIndex( "http://vivo.scripps.edu/individual/n160");
assertTrue("did not find co-pi for grant", uris.contains("http://vivo.scripps.edu/individual/n5282" ));
assertTrue("did not find investigator for grant", uris.contains("http://vivo.scripps.edu/individual/n5282" ));