miscellaneous cleanup but includes a fix for VIVO-404
This commit is contained in:
parent
15880ea3b7
commit
ae80d6c63d
9 changed files with 175 additions and 130 deletions
|
@ -28,7 +28,6 @@
|
|||
WHERE {
|
||||
?subject ?property ?adviseeRole .
|
||||
?adviseeRole core:relatedBy ?advisingRel .
|
||||
?subject core:relatedBy ?advisingRel .
|
||||
LET ( ?localName := afn:localname(?advisingRel) )
|
||||
OPTIONAL { ?advisingRel rdfs:label ?advisingRelLabel }
|
||||
OPTIONAL { ?advisingRel core:relates ?advisor .
|
||||
|
@ -37,7 +36,7 @@
|
|||
}
|
||||
OPTIONAL { ?advisingRel core:degreeCandidacy ?degree .
|
||||
?degree rdfs:label ?degreeLabel .
|
||||
?degree core:abbreviation ?degreeAbbr
|
||||
OPTIONAL { ?degree core:abbreviation ?degreeAbbr }
|
||||
}
|
||||
<collated>
|
||||
OPTIONAL { ?advisingRel vitro:mostSpecificType ?subclass .
|
||||
|
@ -60,11 +59,17 @@
|
|||
|
||||
<query-construct>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
|
||||
CONSTRUCT {
|
||||
?subclass rdfs:subClassOf core:AdvisingRelationship
|
||||
?advisingRel vitro:mostSpecificType ?subclass .
|
||||
?subclass rdfs:subClassOf core:AdvisingRelationship
|
||||
} WHERE {
|
||||
?subclass rdfs:subClassOf core:AdvisingRelationship
|
||||
?subject ?property ?adviseeRole .
|
||||
?adviseeRole core:relatedBy ?advisingRel .
|
||||
?advisingRel a core:AdvisingRelationship .
|
||||
?advisingRel vitro:mostSpecificType ?subclass .
|
||||
?subclass rdfs:subClassOf core:AdvisingRelationship
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
|
@ -74,6 +79,7 @@
|
|||
CONSTRUCT {
|
||||
?subject ?property ?adviseeRole .
|
||||
?adviseeRole core:relatedBy ?advisingRel .
|
||||
?advisingRel a core:AdvisingRelationship .
|
||||
?advisingRel rdfs:label ?advisingRelLabel .
|
||||
} WHERE {
|
||||
{
|
||||
|
@ -86,7 +92,6 @@
|
|||
?adviseeRole a core:AdviseeRole .
|
||||
?adviseeRole core:relatedBy ?advisingRel .
|
||||
?advisingRel a core:AdvisingRelationship .
|
||||
?advisingRel ?advisingRelProperty ?advisingRelValue .
|
||||
?advisingRel rdfs:label ?advisingRelLabel
|
||||
}
|
||||
}
|
||||
|
@ -105,8 +110,8 @@
|
|||
?advisingRel a core:AdvisingRelationship .
|
||||
?advisingRel core:relates ?advisor .
|
||||
?advisor a foaf:Person .
|
||||
?advisor <http://purl.obolibrary.org/obo/RO_0000053> ?advisorRole .
|
||||
?advisor rdfs:label ?advisorLabel .
|
||||
?advisor <http://purl.obolibrary.org/obo/RO_0000053> ?advisorRole .
|
||||
?advisorRole a core:AdvisorRole .
|
||||
?advisingRel core:degreeCandidacy ?degree .
|
||||
?degree rdfs:label ?degreeLabel .
|
||||
|
@ -134,7 +139,13 @@
|
|||
?advisingRel a core:AdvisingRelationship .
|
||||
?advisingRel core:degreeCandidacy ?degree .
|
||||
?degree rdfs:label ?degreeLabel .
|
||||
?degree core:abbreviation ?degreeAbbr
|
||||
} UNION {
|
||||
?subject ?property ?adviseeRole .
|
||||
?adviseeRole a core:AdviseeRole .
|
||||
?adviseeRole core:relatedBy ?advisingRel .
|
||||
?advisingRel a core:AdvisingRelationship .
|
||||
?advisingRel core:degreeCandidacy ?degree .
|
||||
?degree core:abbreviation ?degreeAbbr
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
@ -143,18 +154,16 @@
|
|||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?adviseeRole .
|
||||
?adviseeRole a core:AdviseeRole .
|
||||
?adviseeRole core:relatedBy ?advisingRel .
|
||||
?subject core:relatedBy ?advisingRel .
|
||||
?advisingRel a core:AdvisingRelationship .
|
||||
?advisingRel core:dateTimeInterval ?dateTimeInterval .
|
||||
?advisingRel core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
?dateTimeStartValue core:dateTime ?dateTimeStart
|
||||
} WHERE {
|
||||
?subject ?property ?adviseeRole .
|
||||
?adviseeRole a core:AdviseeRole .
|
||||
?adviseeRole core:relatedBy ?advisingRel .
|
||||
?subject core:relatedBy ?advisingRel .
|
||||
?advisingRel a core:AdvisingRelationship .
|
||||
?advisingRel core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:start ?dateTimeStartValue .
|
||||
|
@ -166,8 +175,8 @@
|
|||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?adviseeRole .
|
||||
?adviseeRole a core:AdviseeRole .
|
||||
?adviseeRole core:relatedBy ?advisingRel .
|
||||
?subject core:relatedBy ?advisingRel .
|
||||
?advisingRel a core:AdvisingRelationship .
|
||||
?advisingRel core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
|
@ -175,8 +184,8 @@
|
|||
} WHERE {
|
||||
?subject ?property ?adviseeRole .
|
||||
?adviseeRole a core:AdviseeRole .
|
||||
?adviseeRole a core:AdviseeRole .
|
||||
?adviseeRole core:relatedBy ?advisingRel .
|
||||
?subject core:relatedBy ?advisingRel .
|
||||
?advisingRel a core:AdvisingRelationship .
|
||||
?advisingRel core:dateTimeInterval ?dateTimeInterval .
|
||||
?dateTimeInterval core:end ?dateTimeEndValue .
|
||||
|
|
|
@ -32,12 +32,10 @@
|
|||
OPTIONAL { ?advisingRel rdfs:label ?advisingRelLabel }
|
||||
OPTIONAL { ?advisingRel core:relates ?advisee .
|
||||
?advisee a foaf:Person .
|
||||
?advisee <http://purl.obolibrary.org/obo/RO_0000053> ?adviseeRole .
|
||||
?adviseeRole a core:AdviseeRole .
|
||||
OPTIONAL { ?advisee rdfs:label ?adviseeLabel }
|
||||
}
|
||||
OPTIONAL { ?advisingRel core:degreeCandidacy ?degree .
|
||||
OPTIONAL { ?degree rdfs:label ?degreeLabel }
|
||||
?degree rdfs:label ?degreeLabel .
|
||||
OPTIONAL { ?degree core:abbreviation ?degreeAbbr }
|
||||
}
|
||||
<collated>
|
||||
|
@ -123,7 +121,6 @@
|
|||
?advisee <http://purl.obolibrary.org/obo/RO_0000053> ?adviseeRole .
|
||||
?adviseeRole a core:AdviseeRole .
|
||||
?advisingRel core:degreeCandidacy ?degree .
|
||||
?degree a core:AcademicDegree .
|
||||
?degree rdfs:label ?degreeLabel .
|
||||
?degree core:abbreviation ?degreeAbbr
|
||||
} WHERE {
|
||||
|
@ -132,15 +129,6 @@
|
|||
?advisorRole a core:AdvisorRole .
|
||||
?advisorRole core:relatedBy ?advisingRel .
|
||||
?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 <http://purl.obolibrary.org/obo/RO_0000053> ?adviseeRole .
|
||||
?adviseeRole a core:AdviseeRole
|
||||
} UNION {
|
||||
?subject ?property ?advisorRole .
|
||||
?advisorRole a core:AdvisorRole .
|
||||
|
@ -157,7 +145,6 @@
|
|||
?advisorRole core:relatedBy ?advisingRel .
|
||||
?advisingRel a core:AdvisingRelationship .
|
||||
?advisingRel core:degreeCandidacy ?degree .
|
||||
?degree a core:AcademicDegree .
|
||||
?degree rdfs:label ?degreeLabel .
|
||||
} UNION {
|
||||
?subject ?property ?advisorRole .
|
||||
|
@ -165,7 +152,6 @@
|
|||
?advisorRole core:relatedBy ?advisingRel .
|
||||
?advisingRel a core:AdvisingRelationship .
|
||||
?advisingRel core:degreeCandidacy ?degree .
|
||||
?degree a core:AcademicDegree .
|
||||
?degree core:abbreviation ?degreeAbbr
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,67 +12,73 @@
|
|||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX obo: <http://purl.obolibrary.org/obo/>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
|
||||
SELECT DISTINCT
|
||||
?person
|
||||
?personName
|
||||
?posnLabel
|
||||
?org
|
||||
?orgLabel
|
||||
?type
|
||||
?personType
|
||||
?title
|
||||
WHERE {
|
||||
?subject ?property ?person .
|
||||
?person core:personInPosition ?position .
|
||||
OPTIONAL { ?person rdfs:label ?personName }
|
||||
OPTIONAL { ?person core:preferredTitle ?title }
|
||||
OPTIONAL { ?person vitro:mostSpecificType ?personType .
|
||||
?personType rdfs:subClassOf foaf:Person
|
||||
OPTIONAL { ?person core:relatedBy ?position .
|
||||
?position a core:Position
|
||||
OPTIONAL { ?position rdfs:label ?posnLabel }
|
||||
}
|
||||
OPTIONAL { ?position rdfs:label ?posnLabel }
|
||||
OPTIONAL { ?position core:positionInOrganization ?org .
|
||||
OPTIONAL { ?person rdfs:label ?personName }
|
||||
OPTIONAL { ?person obo:ARG_2000028 ?vcard .
|
||||
?vcard vcard:hasTitle ?titleObj .
|
||||
?titleObj vcard:title ?title
|
||||
}
|
||||
OPTIONAL { ?position core:relates ?org .
|
||||
?org a foaf:Organization .
|
||||
?org rdfs:label ?orgLabel
|
||||
}
|
||||
OPTIONAL { ?position core:hrJobTitle ?hrJobTitle }
|
||||
OPTIONAL { ?position core:rank ?rank }
|
||||
}
|
||||
ORDER BY ?personName ?type
|
||||
ORDER BY ?personName
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
|
||||
CONSTRUCT {
|
||||
?subject ?property ?person .
|
||||
?person core:personInPosition ?position .
|
||||
?position rdfs:label ?positionLabel .
|
||||
?position core:positionInOrganization ?org .
|
||||
?person core:relatedBy ?position .
|
||||
?position a core:Position .
|
||||
?position rdfs:label ?posnLabel .
|
||||
?position core:relates ?org .
|
||||
?org a foaf:Organization .
|
||||
?org rdfs:label ?orgName .
|
||||
?position core:hrJobTitle ?hrJobTitle
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?person
|
||||
} UNION {
|
||||
?subject ?property ?person .
|
||||
?person core:personInPosition ?position
|
||||
?person core:relatedBy ?position .
|
||||
?position a core:Position .
|
||||
} UNION {
|
||||
?subject ?property ?person .
|
||||
?person core:personInPosition ?position .
|
||||
?position rdfs:label ?positionLabel
|
||||
?person core:relatedBy ?position .
|
||||
?position a core:Position .
|
||||
?position rdfs:label ?posnLabel
|
||||
} UNION {
|
||||
?subject ?property ?person .
|
||||
?person core:personInPosition ?position .
|
||||
?position core:positionInOrganization ?org
|
||||
?person core:relatedBy ?position .
|
||||
?position a core:Position .
|
||||
?position core:relates ?org .
|
||||
?org a foaf:Organization .
|
||||
} UNION {
|
||||
?subject ?property ?person .
|
||||
?person core:personInPosition ?position .
|
||||
?position core:positionInOrganization ?org .
|
||||
?person core:relatedBy ?position .
|
||||
?position a core:Position .
|
||||
?position core:relates ?org .
|
||||
?org a foaf:Organization .
|
||||
?org rdfs:label ?orgName
|
||||
} UNION {
|
||||
?subject ?property ?person .
|
||||
?person core:personInPosition ?position .
|
||||
?position core:hrJobTitle ?hrJobTitle
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
@ -82,26 +88,26 @@
|
|||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
|
||||
PREFIX obo: <http://purl.obolibrary.org/obo/>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
|
||||
CONSTRUCT {
|
||||
?subject ?property ?person .
|
||||
?person rdfs:label ?label .
|
||||
?person core:preferredTitle ?title .
|
||||
?person vitro:mostSpecificType ?personType .
|
||||
?personType rdfs:subClassOf foaf:Person
|
||||
?person rdfs:label ?personName .
|
||||
?person obo:ARG_2000028 ?vcard .
|
||||
?vcard vcard:hasTitle ?titleObj .
|
||||
?titleObj vcard:title ?title
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?person
|
||||
} UNION {
|
||||
?subject ?property ?person .
|
||||
?person rdfs:label ?label
|
||||
} UNION {
|
||||
?person rdfs:label ?personName
|
||||
} UNION {
|
||||
?subject ?property ?person .
|
||||
?person core:preferredTitle ?title
|
||||
} UNION {
|
||||
?subject ?property ?person .
|
||||
?person vitro:mostSpecificType ?personType .
|
||||
?personType rdfs:subClassOf foaf:Person
|
||||
?person obo:ARG_2000028 ?vcard .
|
||||
?vcard vcard:hasTitle ?titleObj .
|
||||
?titleObj vcard:title ?title
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
|
|
@ -13,13 +13,18 @@
|
|||
next statement -->
|
||||
<#macro showResearchers statement>
|
||||
<#local linkedIndividual>
|
||||
<a href="${profileUrl(statement.uri("person"))}" title="${i18n().person_name}">${statement.personName}</a>
|
||||
<a href="${profileUrl(statement.uri("person"))}" title="${i18n().person_name}">${statement.personName!}</a>
|
||||
</#local>
|
||||
<#if statement.title?has_content >
|
||||
<#local posnTitle = statement.title>
|
||||
<#else>
|
||||
<#local posnTitle = statement.posnLabel!statement.personType>
|
||||
<#elseif statement.posnLabel?has_content>
|
||||
<#local posnTitle = statement.posnLabel>
|
||||
</#if>
|
||||
<#if statement.org??>
|
||||
<#local orgString>
|
||||
<a href="${profileUrl(statement.uri("org"))}" title="${i18n().organization_name}">${statement.orgLabel!""}</a>
|
||||
</#local>
|
||||
</#if>
|
||||
|
||||
<@s.join [ linkedIndividual, posnTitle, statement.orgLabel!"" ] /> ${statement.type!}
|
||||
<@s.join [ linkedIndividual, posnTitle!, orgString! ] />
|
||||
</#macro>
|
||||
|
|
|
@ -25,6 +25,7 @@ var adviseeRelUtils = {
|
|||
this.form = $('#personHasAdvisingRelationship');
|
||||
this.adRelshiplabel = $('#advisingRelLabel');
|
||||
this.advisor = $('#advisor');
|
||||
this.fauxLabel = $('#maskLabelBuilding');
|
||||
this.subjArea = $('#SubjectArea');
|
||||
this.firstName = $('#firstName');
|
||||
this.lastName = $('#lastName');
|
||||
|
@ -56,8 +57,6 @@ var adviseeRelUtils = {
|
|||
this.form.submit(function() {
|
||||
adviseeRelUtils.resolveAdvisorNames();
|
||||
adviseeRelUtils.buildAdvisingRelLabel();
|
||||
alert(this.adRelshiplabel.val());
|
||||
return false;
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -80,6 +79,12 @@ var adviseeRelUtils = {
|
|||
if (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.advisor.val(name);
|
||||
this.lastName.val(lastName);
|
||||
}
|
||||
|
@ -91,7 +96,6 @@ var adviseeRelUtils = {
|
|||
},
|
||||
|
||||
buildAdvisingRelLabel: function() {
|
||||
alert("here");
|
||||
if ( this.advisor.val() != "" ) {
|
||||
this.adRelshiplabel.val(this.advisor.val() + " " + adviseeRelUtils.advisingString + " " + this.subjName);
|
||||
}
|
||||
|
|
|
@ -124,6 +124,7 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
|
|||
<p >
|
||||
<label for="advisor">${i18n().advisor_capitalized}: ${i18n().last_name} ${requiredHint}<span style="padding-left:322px">${i18n().first_name} ${requiredHint}</span></label>
|
||||
<input class="acSelector" size="50" type="text" acGroupName="advisor" id="advisor" name="advisorLabel" value="${advisorLabelValue}" >
|
||||
<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 type="hidden" id="lastName" name="lastName" value="">
|
||||
<input class="display" type="hidden" acGroupName="advisor" id="advisorDisplay" name="advisorLabelDisplay" value="${advisorLabelDisplayValue}" >
|
||||
|
|
|
@ -27,6 +27,7 @@ local:personInPositionConfig a :ObjectPropertyDisplayConfig ;
|
|||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupaffiliation> ;
|
||||
vitro:displayRankAnnot 40;
|
||||
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasPositionHistoryGenerator"^^xsd:string .
|
||||
|
||||
local:organizationForPositionContext a :ConfigContext ;
|
||||
|
@ -41,6 +42,7 @@ local:organizationForPositionConfig a :ObjectPropertyDisplayConfig ;
|
|||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupaffiliation> ;
|
||||
vitro:displayRankAnnot 15;
|
||||
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.OrganizationHasPositionHistoryGenerator"^^xsd:string .
|
||||
|
||||
local:authorInAuthorshipContext a :ConfigContext ;
|
||||
|
|
|
@ -93,7 +93,7 @@ public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator imp
|
|||
conf.addSparqlForExistingLiteral("endField-value", existingEndDateQuery);
|
||||
|
||||
conf.addSparqlForExistingUris("advisingRelType", advisingRelTypeQuery);
|
||||
conf.addSparqlForExistingUris("adviseeRole", existingAdviseeRoleQuery);
|
||||
conf.addSparqlForExistingUris("advisingRelationship", existingAdvisingRelQuery);
|
||||
conf.addSparqlForExistingUris("advisorRole", existingAdvisorRoleQuery);
|
||||
conf.addSparqlForExistingUris("existingSubjArea", subjAreaQuery);
|
||||
conf.addSparqlForExistingUris("existingAdvisor", advisorQuery);
|
||||
|
@ -249,22 +249,22 @@ public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator imp
|
|||
"?vcardName vcard:familyName ?lastName .";
|
||||
|
||||
final static String degreeAssertion =
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?degree . \n" +
|
||||
"?degree <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . ";
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#degreeCandidacy> ?degree . \n" +
|
||||
" ";
|
||||
|
||||
//This is for an existing subject area
|
||||
//Where we only need the existing subject area label
|
||||
final static String n3ForExistingSubjAreaAssertion =
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingSubjArea . \n" +
|
||||
"?existingSubjArea <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . ";
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#hasSubjectArea> ?existingSubjArea . \n" +
|
||||
"?existingSubjArea <http://vivoweb.org/ontology/core#subjectAreaOf> ?advisingRelationship . ";
|
||||
//For new subject area, we include all new information
|
||||
//new subject area should always be a new resource
|
||||
//and the following should only get evaluated
|
||||
//when there is something in the label
|
||||
|
||||
final static String n3ForNewSubjAreaAssertion =
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?newSubjArea . \n" +
|
||||
"?newSubjArea <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#hasSubjectArea> ?newSubjArea . \n" +
|
||||
"?newSubjArea <http://vivoweb.org/ontology/core#subjectAreaOf> ?advisingRelationship . \n" +
|
||||
"?newSubjArea <"+ label + "> ?subjAreaLabel . \n" +
|
||||
"?newSubjArea a <" + subjAreaClass + "> . ";
|
||||
|
||||
|
@ -286,70 +286,90 @@ public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator imp
|
|||
|
||||
/* Queries for editing an existing entry */
|
||||
|
||||
final static String existingAdvisingRelQuery =
|
||||
"SELECT ?advisingRelationship WHERE { \n" +
|
||||
" ?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
"}";
|
||||
|
||||
final static String advisingRelTypeQuery =
|
||||
"PREFIX vitro: <" + VitroVocabulary.vitroURI + "> \n" +
|
||||
"SELECT ?advisingRelType WHERE { \n" +
|
||||
" ?advisingRelationship vitro:mostSpecificType ?advisingRelType . \n" +
|
||||
"}";
|
||||
|
||||
final static String advisorQuery =
|
||||
"SELECT ?existingAdvisor WHERE { \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingAdvisor . \n" +
|
||||
" ?existingAdvisor a <" + advisorClass + "> . \n" +
|
||||
" FILTER (?person != ?existingAdvisor) . \n" +
|
||||
"}";
|
||||
|
||||
final static String existingAdviseeRoleQuery =
|
||||
"SELECT ?adviseeRole WHERE { \n" +
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
"?adviseeRole a <" + adviseeRoleClass + "> . \n" +
|
||||
"}";
|
||||
|
||||
final static String existingAdvisorRoleQuery =
|
||||
"SELECT ?advisorRole WHERE { \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
|
||||
" ?advisorRole a <" + advisorRoleClass + "> . \n" +
|
||||
"}";
|
||||
|
||||
final static String advisorLabelQuery =
|
||||
"SELECT ?existingAdvisorLabel WHERE { \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingAdvisor . \n" +
|
||||
" ?existingAdvisor a <" + advisorClass + "> . \n" +
|
||||
" ?existingAdvisor <" + label + "> ?existingAdvisorLabel . \n" +
|
||||
" FILTER (?person != ?existingAdvisor) . \n" +
|
||||
"}";
|
||||
|
||||
final static String subjAreaQuery =
|
||||
"SELECT ?existingSubjArea WHERE { \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingSubjArea . \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" +
|
||||
" FILTER (?type != <http://vivoweb.org/ontology/core#AcademicDegree>) . \n" +
|
||||
"}";
|
||||
|
||||
final static String subjAreaLabelQuery =
|
||||
"SELECT ?existingSubjAreaLabel WHERE { \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingSubjArea . \n" +
|
||||
" ?existingSubjArea a <http://www.w3.org/2004/02/skos/core#Concept> . \n" +
|
||||
" ?existingSubjArea <" + label + "> ?existingSubjAreaLabel . \n" +
|
||||
" ?existingSubjArea <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> ?type \n" +
|
||||
" FILTER (?type != <http://vivoweb.org/ontology/core#AcademicDegree>) . \n" +
|
||||
"SELECT ?advisingRelType WHERE { \n" +
|
||||
" ?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
" ?advisingRelationship vitro:mostSpecificType ?advisingRelType . \n" +
|
||||
"}";
|
||||
|
||||
final static String advisingRelLabelQuery =
|
||||
"SELECT ?existingAdvisingRelLabel WHERE { \n" +
|
||||
" ?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
" ?advisingRelationship <" + label + "> ?existingAdvisingRelLabel . \n" +
|
||||
"}";
|
||||
|
||||
final static String advisorQuery =
|
||||
"SELECT ?existingAdvisor WHERE { \n" +
|
||||
" ?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingAdvisor . \n" +
|
||||
" ?existingAdvisor <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?existingAdvisor a <" + advisorClass + "> . \n" +
|
||||
" ?existingAdvisor <http://purl.obolibrary.org/obo/RO_0000053> ?existingAdvisorRole . \n" +
|
||||
" ?existingAdvisorRole a <" + advisorRoleClass + "> . \n" +
|
||||
"}";
|
||||
|
||||
final static String advisorLabelQuery =
|
||||
"SELECT ?existingAdvisorLabel WHERE { \n" +
|
||||
" ?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingAdvisor . \n" +
|
||||
" ?existingAdvisor <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?existingAdvisor a <" + advisorClass + "> . \n" +
|
||||
" ?existingAdvisor <" + label + "> ?existingAdvisorLabel . \n" +
|
||||
" ?existingAdvisor <http://purl.obolibrary.org/obo/RO_0000053> ?existingAdvisorRole . \n" +
|
||||
" ?existingAdvisorRole a <" + advisorRoleClass + "> . \n" +
|
||||
"}";
|
||||
|
||||
final static String existingAdvisorRoleQuery =
|
||||
"SELECT ?existingAdvisorRole WHERE { \n" +
|
||||
" ?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingAdvisorRole . \n" +
|
||||
" ?existingAdvisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?existingAdvisorRole a <" + advisorRoleClass + "> . \n" +
|
||||
"}";
|
||||
|
||||
final static String subjAreaQuery =
|
||||
"SELECT ?existingSubjArea WHERE { \n" +
|
||||
" ?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#hasSubjectArea> ?existingSubjArea . \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" +
|
||||
"}";
|
||||
|
||||
final static String subjAreaLabelQuery =
|
||||
"SELECT ?existingSubjAreaLabel WHERE { \n" +
|
||||
" ?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#hasSubjectArea> ?existingSubjArea . \n" +
|
||||
" ?existingSubjArea a <http://www.w3.org/2004/02/skos/core#Concept> . \n" +
|
||||
" ?existingSubjArea <" + label + "> ?existingSubjAreaLabel . \n" +
|
||||
" ?existingSubjArea <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> ?type \n" +
|
||||
"}";
|
||||
|
||||
final static String degreeQuery =
|
||||
"SELECT ?existingDegree WHERE {\n"+
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingDegree . \n" +
|
||||
" ?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#degreeCandidacy> ?existingDegree . \n" +
|
||||
" ?existingDegree a <" + degreeClass + "> . \n" +
|
||||
"}";
|
||||
|
||||
|
||||
final static String existingStartDateQuery =
|
||||
"SELECT ?existingDateStart WHERE { \n" +
|
||||
" ?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
" ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" +
|
||||
" ?intervalNode a <" + intervalType + "> . \n" +
|
||||
" ?intervalNode <" + intervalToStart + "> ?startNode . \n" +
|
||||
|
@ -358,6 +378,8 @@ public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator imp
|
|||
|
||||
final static String existingEndDateQuery =
|
||||
"SELECT ?existingEndDate WHERE { \n" +
|
||||
" ?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
" ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" +
|
||||
" ?intervalNode a <" + intervalType + "> . \n " +
|
||||
" ?intervalNode <" + intervalToEnd + "> ?endNode . \n" +
|
||||
|
@ -366,11 +388,15 @@ public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator imp
|
|||
|
||||
final static String existingIntervalNodeQuery =
|
||||
"SELECT ?existingIntervalNode WHERE { \n" +
|
||||
" ?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
" ?advisingRelationship <" + advisingRelToInterval + "> ?existingIntervalNode . \n" +
|
||||
" ?existingIntervalNode a <" + intervalType + "> . }";
|
||||
|
||||
final static String existingStartNodeQuery =
|
||||
"SELECT ?existingStartNode WHERE { \n" +
|
||||
" ?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
" ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" +
|
||||
" ?intervalNode a <" + intervalType + "> . \n" +
|
||||
" ?intervalNode <" + intervalToStart + "> ?existingStartNode . \n" +
|
||||
|
@ -378,6 +404,8 @@ public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator imp
|
|||
|
||||
final static String existingEndNodeQuery =
|
||||
"SELECT ?existingEndNode WHERE { \n" +
|
||||
" ?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
" ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" +
|
||||
" ?intervalNode a <" + intervalType + "> . \n" +
|
||||
" ?intervalNode <" + intervalToEnd + "> ?existingEndNode . \n" +
|
||||
|
@ -385,6 +413,8 @@ public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator imp
|
|||
|
||||
final static String existingStartPrecisionQuery =
|
||||
"SELECT ?existingStartPrecision WHERE { \n" +
|
||||
" ?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
" ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" +
|
||||
" ?intervalNode a <" + intervalType + "> . \n" +
|
||||
" ?intervalNode <" + intervalToStart + "> ?startNode . \n" +
|
||||
|
@ -393,6 +423,8 @@ public class PersonHasAdviseeRelationshipGenerator extends VivoBaseGenerator imp
|
|||
|
||||
final static String existingEndPrecisionQuery =
|
||||
"SELECT ?existingEndPrecision WHERE { \n" +
|
||||
" ?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
|
||||
" ?advisingRelationship <" + advisingRelToInterval + "> ?intervalNode . \n" +
|
||||
" ?intervalNode a <" + intervalType + "> . \n" +
|
||||
" ?intervalNode <" + intervalToEnd + "> ?endNode . \n" +
|
||||
|
|
|
@ -263,8 +263,8 @@ public class PersonHasAdvisorRelationshipGenerator extends VivoBaseGenerator imp
|
|||
//when there is something in the label
|
||||
|
||||
final static String n3ForNewSubjAreaAssertion =
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?newSubjArea . \n" +
|
||||
"?newSubjArea <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
|
||||
"?advisingRelationship <http://vivoweb.org/ontology/core#hasSubjectArea> ?newSubjArea . \n" +
|
||||
"?newSubjArea <http://vivoweb.org/ontology/core#subjectAreaOf> ?advisingRelationship . \n" +
|
||||
"?newSubjArea <"+ label + "> ?subjAreaLabel . \n" +
|
||||
"?newSubjArea a <" + subjAreaClass + "> . ";
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue