fixed additional uris for context node tests
This commit is contained in:
parent
5dfe858a25
commit
6ba8de8a9d
2 changed files with 89 additions and 84 deletions
|
@ -142,7 +142,7 @@ 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/> \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"
|
||||
|
@ -231,10 +231,12 @@ 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 obo:RO_0000052 ?e . } . \n"
|
||||
+ " OPTIONAL { ?c obo:RO_0000052 ?e . \n"
|
||||
+ " ?e rdf:type foaf:Person . } . "
|
||||
+"}");
|
||||
|
||||
}
|
||||
|
|
|
@ -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" ));
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue