VIVO-400, VIVO-398 and VIVO-399

This commit is contained in:
tworrall 2013-10-22 16:57:42 -04:00
parent 2d728af10b
commit 3ac664dd7e
4 changed files with 158 additions and 88 deletions

View file

@ -28,15 +28,16 @@
WHERE { WHERE {
?subject ?property ?advisorRole . ?subject ?property ?advisorRole .
?advisorRole core:relatedBy ?advisingRel . ?advisorRole core:relatedBy ?advisingRel .
?subject core:relatedBy ?advisingRel .
LET ( ?localName := afn:localname(?advisingRel) ) LET ( ?localName := afn:localname(?advisingRel) )
OPTIONAL { ?advisingRel rdfs:label ?advisingRelLabel } OPTIONAL { ?advisingRel rdfs:label ?advisingRelLabel }
OPTIONAL { ?advisingRel core:relates ?advisee . OPTIONAL { ?advisingRel core:relates ?advisee .
?advisee a foaf:Person . ?advisee a foaf:Person .
?advisee <http://purl.obolibrary.org/obo/RO_0000053> ?adviseeRole .
?adviseeRole a core:AdviseeRole .
OPTIONAL { ?advisee rdfs:label ?adviseeLabel } OPTIONAL { ?advisee rdfs:label ?adviseeLabel }
} }
OPTIONAL { ?advisingRel core:degreeCandidacy ?degree . OPTIONAL { ?advisingRel core:degreeCandidacy ?degree .
?degree rdfs:label ?degreeLabel . OPTIONAL { ?degree rdfs:label ?degreeLabel }
OPTIONAL { ?degree core:abbreviation ?degreeAbbr } OPTIONAL { ?degree core:abbreviation ?degreeAbbr }
} }
<collated> <collated>
@ -61,9 +62,15 @@
<query-construct> <query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
CONSTRUCT { CONSTRUCT {
?advisingRel vitro:mostSpecificType ?subclass .
?subclass rdfs:subClassOf core:AdvisingRelationship ?subclass rdfs:subClassOf core:AdvisingRelationship
} WHERE { } WHERE {
?subject ?property ?advisorRole .
?advisorRole core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
?advisingRel vitro:mostSpecificType ?subclass .
?subclass rdfs:subClassOf core:AdvisingRelationship ?subclass rdfs:subClassOf core:AdvisingRelationship
} }
</query-construct> </query-construct>
@ -73,7 +80,10 @@
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT { CONSTRUCT {
?subject ?property ?advisorRole . ?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel . ?advisorRole core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
?advisingRel ?advisingRelProperty ?advisingRelValue .
?advisingRel rdfs:label ?advisingRelLabel . ?advisingRel rdfs:label ?advisingRelLabel .
} WHERE { } WHERE {
{ {
@ -81,6 +91,11 @@
?advisorRole a core:AdvisorRole . ?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel . ?advisorRole core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship ?advisingRel a core:AdvisingRelationship
} UNION {
?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
} UNION { } UNION {
?subject ?property ?advisorRole . ?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole . ?advisorRole a core:AdvisorRole .
@ -104,10 +119,11 @@
?advisingRel a core:AdvisingRelationship . ?advisingRel a core:AdvisingRelationship .
?advisingRel core:relates ?advisee . ?advisingRel core:relates ?advisee .
?advisee a foaf:Person . ?advisee a foaf:Person .
?advisee rdfs:label ?adviseeLabel .
?advisee &lt;http://purl.obolibrary.org/obo/RO_0000053&gt; ?adviseeRole . ?advisee &lt;http://purl.obolibrary.org/obo/RO_0000053&gt; ?adviseeRole .
?adviseeRole a core:AdviseeRole . ?adviseeRole a core:AdviseeRole .
?advisee rdfs:label ?adviseeLabel .
?advisingRel core:degreeCandidacy ?degree . ?advisingRel core:degreeCandidacy ?degree .
?degree a core:AcademicDegree .
?degree rdfs:label ?degreeLabel . ?degree rdfs:label ?degreeLabel .
?degree core:abbreviation ?degreeAbbr ?degree core:abbreviation ?degreeAbbr
} WHERE { } WHERE {
@ -116,6 +132,15 @@
?advisorRole a core:AdvisorRole . ?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel . ?advisorRole core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship . ?advisingRel a core:AdvisingRelationship .
} UNION {
?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship .
?advisingRel core:relates ?advisee .
?advisee a foaf:Person .
?advisee &lt;http://purl.obolibrary.org/obo/RO_0000053&gt; ?adviseeRole .
?adviseeRole a core:AdviseeRole
} UNION { } UNION {
?subject ?property ?advisorRole . ?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole . ?advisorRole a core:AdvisorRole .
@ -132,6 +157,7 @@
?advisorRole core:relatedBy ?advisingRel . ?advisorRole core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship . ?advisingRel a core:AdvisingRelationship .
?advisingRel core:degreeCandidacy ?degree . ?advisingRel core:degreeCandidacy ?degree .
?degree a core:AcademicDegree .
?degree rdfs:label ?degreeLabel . ?degree rdfs:label ?degreeLabel .
} UNION { } UNION {
?subject ?property ?advisorRole . ?subject ?property ?advisorRole .
@ -139,6 +165,7 @@
?advisorRole core:relatedBy ?advisingRel . ?advisorRole core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship . ?advisingRel a core:AdvisingRelationship .
?advisingRel core:degreeCandidacy ?degree . ?advisingRel core:degreeCandidacy ?degree .
?degree a core:AcademicDegree .
?degree core:abbreviation ?degreeAbbr ?degree core:abbreviation ?degreeAbbr
} }
} }
@ -148,8 +175,8 @@
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT { CONSTRUCT {
?subject ?property ?advisorRole . ?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel . ?advisorRole core:relatedBy ?advisingRel .
?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship . ?advisingRel a core:AdvisingRelationship .
?advisingRel core:dateTimeInterval ?dateTimeInterval . ?advisingRel core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue . ?dateTimeInterval core:start ?dateTimeStartValue .
@ -157,7 +184,6 @@
} WHERE { } WHERE {
?subject ?property ?advisorRole . ?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole . ?advisorRole a core:AdvisorRole .
?subject core:relatedBy ?advisingRel .
?advisorRole core:relatedBy ?advisingRel . ?advisorRole core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship . ?advisingRel a core:AdvisingRelationship .
?advisingRel core:dateTimeInterval ?dateTimeInterval . ?advisingRel core:dateTimeInterval ?dateTimeInterval .
@ -170,8 +196,8 @@
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT { CONSTRUCT {
?subject ?property ?advisorRole . ?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole .
?advisorRole core:relatedBy ?advisingRel . ?advisorRole core:relatedBy ?advisingRel .
?subject core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship . ?advisingRel a core:AdvisingRelationship .
?advisingRel core:dateTimeInterval ?dateTimeInterval . ?advisingRel core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue . ?dateTimeInterval core:end ?dateTimeEndValue .
@ -179,7 +205,6 @@
} WHERE { } WHERE {
?subject ?property ?advisorRole . ?subject ?property ?advisorRole .
?advisorRole a core:AdvisorRole . ?advisorRole a core:AdvisorRole .
?subject core:relatedBy ?advisingRel .
?advisorRole core:relatedBy ?advisingRel . ?advisorRole core:relatedBy ?advisingRel .
?advisingRel a core:AdvisingRelationship . ?advisingRel a core:AdvisingRelationship .
?advisingRel core:dateTimeInterval ?dateTimeInterval . ?advisingRel core:dateTimeInterval ?dateTimeInterval .

View file

@ -25,6 +25,7 @@ var advisorRelUtils = {
this.form = $('#personHasAdvisingRelationship'); this.form = $('#personHasAdvisingRelationship');
this.adRelshiplabel = $('#advisingRelLabel'); this.adRelshiplabel = $('#advisingRelLabel');
this.advisee = $('#advisee'); this.advisee = $('#advisee');
this.fauxLabel = $('#maskLabelBuilding');
this.subjArea = $('#SubjectArea'); this.subjArea = $('#SubjectArea');
this.firstName = $('#firstName'); this.firstName = $('#firstName');
this.lastName = $('#lastName'); this.lastName = $('#lastName');
@ -56,6 +57,7 @@ var advisorRelUtils = {
this.form.submit(function() { this.form.submit(function() {
advisorRelUtils.resolveAdviseeNames(); advisorRelUtils.resolveAdviseeNames();
advisorRelUtils.buildAdvisingRelLabel(); advisorRelUtils.buildAdvisingRelLabel();
}); });
}, },
@ -75,9 +77,16 @@ var advisorRelUtils = {
lastName = this.advisee.val(); lastName = this.advisee.val();
name = lastName; name = lastName;
if (firstName) { if (firstName) {
name += ', ' + firstName; name += ', ' + firstName;
} }
// we don't want the user to see the label getting built, so hide the acSelector
// field and display a bogus field that just has the last name in it.
this.fauxLabel.val(lastName);
this.advisee.hide();
this.fauxLabel.show();
this.advisee.val(name); this.advisee.val(name);
this.lastName.val(lastName); this.lastName.val(lastName);
} }

View file

@ -124,6 +124,7 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
<p > <p >
<label for="advisee">${i18n().advisee_capitalized}: ${i18n().last_name} ${requiredHint}<span style="padding-left:322px">${i18n().first_name} ${requiredHint}</span></label> <label for="advisee">${i18n().advisee_capitalized}: ${i18n().last_name} ${requiredHint}<span style="padding-left:322px">${i18n().first_name} ${requiredHint}</span></label>
<input class="acSelector" size="50" type="text" acGroupName="advisee" id="advisee" name="adviseeLabel" value="${adviseeLabelValue}" > <input class="acSelector" size="50" type="text" acGroupName="advisee" id="advisee" name="adviseeLabel" value="${adviseeLabelValue}" >
<input type="text" size="50" id="maskLabelBuilding" name="maskLabelBuilding" value="" style="display:none" >
<input size="30" type="text" id="firstName" name="firstName" value="${firstNameValue}" ><br /> <input size="30" type="text" id="firstName" name="firstName" value="${firstNameValue}" ><br />
<input type="hidden" id="lastName" name="lastName" value=""> <input type="hidden" id="lastName" name="lastName" value="">
<input class="display" type="hidden" acGroupName="advisee" id="adviseeDisplay" name="adviseeLabelDisplay" value="${adviseeLabelDisplayValue}" > <input class="display" type="hidden" acGroupName="advisee" id="adviseeDisplay" name="adviseeLabelDisplay" value="${adviseeLabelDisplayValue}" >

View file

@ -93,7 +93,7 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
conf.addSparqlForExistingLiteral("endField-value", existingEndDateQuery); conf.addSparqlForExistingLiteral("endField-value", existingEndDateQuery);
conf.addSparqlForExistingUris("advisingRelType", advisingRelTypeQuery); conf.addSparqlForExistingUris("advisingRelType", advisingRelTypeQuery);
conf.addSparqlForExistingUris("advisorRole", existingAdvisorRoleQuery); conf.addSparqlForExistingUris("advisingRelationship", existingAdvisingRelQuery);
conf.addSparqlForExistingUris("adviseeRole", existingAdviseeRoleQuery); conf.addSparqlForExistingUris("adviseeRole", existingAdviseeRoleQuery);
conf.addSparqlForExistingUris("existingSubjArea", subjAreaQuery); conf.addSparqlForExistingUris("existingSubjArea", subjAreaQuery);
conf.addSparqlForExistingUris("existingAdvisee", adviseeQuery); conf.addSparqlForExistingUris("existingAdvisee", adviseeQuery);
@ -286,41 +286,63 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
/* Queries for editing an existing entry */ /* Queries for editing an existing entry */
final static String existingAdvisingRelQuery =
"SELECT ?advisingRelationship WHERE { \n" +
" ?advisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
"}";
final static String advisingRelTypeQuery = final static String advisingRelTypeQuery =
"PREFIX vitro: <" + VitroVocabulary.vitroURI + "> \n" + "PREFIX vitro: <" + VitroVocabulary.vitroURI + "> \n" +
"SELECT ?advisingRelType WHERE { \n" + "SELECT ?advisingRelType WHERE { \n" +
" ?advisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
" ?advisingRelationship vitro:mostSpecificType ?advisingRelType . \n" + " ?advisingRelationship vitro:mostSpecificType ?advisingRelType . \n" +
"}"; "}";
final static String advisingRelLabelQuery =
"SELECT ?existingAdvisingRelLabel WHERE { \n" +
" ?advisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
" ?advisingRelationship <" + label + "> ?existingAdvisingRelLabel . \n" +
"}";
final static String adviseeQuery = final static String adviseeQuery =
"SELECT ?existingAdvisee WHERE { \n" + "SELECT ?existingAdvisee WHERE { \n" +
" ?advisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingAdvisee . \n" + " ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingAdvisee . \n" +
" ?existingAdvisee <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?existingAdvisee a <" + adviseeClass + "> . \n" + " ?existingAdvisee a <" + adviseeClass + "> . \n" +
" FILTER (?person != ?existingAdvisee) . \n" + " ?existingAdvisee <http://purl.obolibrary.org/obo/RO_0000053> ?existingAdviseeRole . \n" +
"}";
final static String existingAdvisorRoleQuery =
"SELECT ?existingAdvisorRole WHERE { \n" +
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingAdvisorRole . \n" +
"?existingAdvisorRole a <" + advisorRoleClass + "> . \n" +
"}";
final static String existingAdviseeRoleQuery =
"SELECT ?existingAdviseeRole WHERE { \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingAdviseeRole . \n" +
" ?existingAdviseeRole a <" + adviseeRoleClass + "> . \n" + " ?existingAdviseeRole a <" + adviseeRoleClass + "> . \n" +
"}"; "}";
final static String adviseeLabelQuery = final static String adviseeLabelQuery =
"SELECT ?existingAdviseeLabel WHERE { \n" + "SELECT ?existingAdviseeLabel WHERE { \n" +
" ?advisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingAdvisee . \n" + " ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingAdvisee . \n" +
" ?existingAdvisee <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?existingAdvisee a <" + adviseeClass + "> . \n" + " ?existingAdvisee a <" + adviseeClass + "> . \n" +
" ?existingAdvisee <" + label + "> ?existingAdviseeLabel . \n" + " ?existingAdvisee <" + label + "> ?existingAdviseeLabel . \n" +
" FILTER (?person != ?existingAdvisee) . \n" + " ?existingAdvisee <http://purl.obolibrary.org/obo/RO_0000053> ?existingAdviseeRole . \n" +
" ?existingAdviseeRole a <" + adviseeRoleClass + "> . \n" +
"}";
final static String existingAdviseeRoleQuery =
"SELECT ?existingAdviseeRole WHERE { \n" +
" ?advisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingAdviseeRole . \n" +
" ?existingAdviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?existingAdviseeRole a <" + adviseeRoleClass + "> . \n" +
"}"; "}";
final static String subjAreaQuery = final static String subjAreaQuery =
"SELECT ?existingSubjArea WHERE { \n" + "SELECT ?existingSubjArea WHERE { \n" +
" ?advisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#hasSubjectArea> ?existingSubjArea . \n" + " ?advisingRelationship <http://vivoweb.org/ontology/core#hasSubjectArea> ?existingSubjArea . \n" +
" ?existingSubjArea a <http://www.w3.org/2004/02/skos/core#Concept> . \n" + " ?existingSubjArea a <http://www.w3.org/2004/02/skos/core#Concept> . \n" +
" ?existingSubjArea <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> ?type \n" + " ?existingSubjArea <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> ?type \n" +
@ -328,25 +350,26 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
final static String subjAreaLabelQuery = final static String subjAreaLabelQuery =
"SELECT ?existingSubjAreaLabel WHERE { \n" + "SELECT ?existingSubjAreaLabel WHERE { \n" +
" ?advisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#hasSubjectArea> ?existingSubjArea . \n" + " ?advisingRelationship <http://vivoweb.org/ontology/core#hasSubjectArea> ?existingSubjArea . \n" +
" ?existingSubjArea a <http://www.w3.org/2004/02/skos/core#Concept> . \n" + " ?existingSubjArea a <http://www.w3.org/2004/02/skos/core#Concept> . \n" +
" ?existingSubjArea <" + label + "> ?existingSubjAreaLabel . \n" + " ?existingSubjArea <" + label + "> ?existingSubjAreaLabel . \n" +
" ?existingSubjArea <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> ?type \n" + " ?existingSubjArea <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> ?type \n" +
"}"; "}";
final static String advisingRelLabelQuery =
"SELECT ?existingAdvisingRelLabel WHERE { \n" +
" ?advisingRelationship <" + label + "> ?existingAdvisingRelLabel . \n" +
"}";
final static String degreeQuery = final static String degreeQuery =
"SELECT ?existingDegree WHERE {\n"+ "SELECT ?existingDegree WHERE {\n"+
" ?advisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#degreeCandidacy> ?existingDegree . \n" + " ?advisingRelationship <http://vivoweb.org/ontology/core#degreeCandidacy> ?existingDegree . \n" +
" ?existingDegree a <" + degreeClass + "> . \n" + " ?existingDegree a <" + degreeClass + "> . \n" +
"}"; "}";
final static String existingStartDateQuery = final static String existingStartDateQuery =
"SELECT ?existingDateStart WHERE { \n" + "SELECT ?existingDateStart WHERE { \n" +
" ?advisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
" ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" + " ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" + " ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToStart + "> ?startNode . \n" + " ?intervalNode <" + intervalToStart + "> ?startNode . \n" +
@ -355,6 +378,8 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
final static String existingEndDateQuery = final static String existingEndDateQuery =
"SELECT ?existingEndDate WHERE { \n" + "SELECT ?existingEndDate WHERE { \n" +
" ?advisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
" ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" + " ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n " + " ?intervalNode a <" + intervalType + "> . \n " +
" ?intervalNode <" + intervalToEnd + "> ?endNode . \n" + " ?intervalNode <" + intervalToEnd + "> ?endNode . \n" +
@ -363,11 +388,15 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
final static String existingIntervalNodeQuery = final static String existingIntervalNodeQuery =
"SELECT ?existingIntervalNode WHERE { \n" + "SELECT ?existingIntervalNode WHERE { \n" +
" ?advisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
" ?advisingRelationship <" + advisingRelToInterval + "> ?existingIntervalNode . \n" + " ?advisingRelationship <" + advisingRelToInterval + "> ?existingIntervalNode . \n" +
" ?existingIntervalNode a <" + intervalType + "> . }"; " ?existingIntervalNode a <" + intervalType + "> . }";
final static String existingStartNodeQuery = final static String existingStartNodeQuery =
"SELECT ?existingStartNode WHERE { \n" + "SELECT ?existingStartNode WHERE { \n" +
" ?advisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
" ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" + " ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" + " ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToStart + "> ?existingStartNode . \n" + " ?intervalNode <" + intervalToStart + "> ?existingStartNode . \n" +
@ -375,6 +404,8 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
final static String existingEndNodeQuery = final static String existingEndNodeQuery =
"SELECT ?existingEndNode WHERE { \n" + "SELECT ?existingEndNode WHERE { \n" +
" ?advisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
" ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" + " ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" + " ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToEnd + "> ?existingEndNode . \n" + " ?intervalNode <" + intervalToEnd + "> ?existingEndNode . \n" +
@ -382,6 +413,8 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
final static String existingStartPrecisionQuery = final static String existingStartPrecisionQuery =
"SELECT ?existingStartPrecision WHERE { \n" + "SELECT ?existingStartPrecision WHERE { \n" +
" ?advisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
" ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" + " ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" + " ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToStart + "> ?startNode . \n" + " ?intervalNode <" + intervalToStart + "> ?startNode . \n" +
@ -390,6 +423,8 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
final static String existingEndPrecisionQuery = final static String existingEndPrecisionQuery =
"SELECT ?existingEndPrecision WHERE { \n" + "SELECT ?existingEndPrecision WHERE { \n" +
" ?advisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
" ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" + " ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" +
" ?intervalNode a <" + intervalType + "> . \n" + " ?intervalNode a <" + intervalType + "> . \n" +
" ?intervalNode <" + intervalToEnd + "> ?endNode . \n" + " ?intervalNode <" + intervalToEnd + "> ?endNode . \n" +