VIVO-112: ISF updates for advising relationship plus a couple of fixes

This commit is contained in:
tworrall 2013-09-11 15:50:15 -04:00
parent 17b90964d0
commit e05f5d6fb4
5 changed files with 359 additions and 243 deletions

View file

@ -1,159 +1,183 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query-select>
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&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;
SELECT DISTINCT <collated>?subclass</collated>
?advisory
?advisoryLabel
?localName
?advisee
?adviseeLabel
?degreeLabel
?degreeAbbr
?dateTimeStart
?dateTimeEnd
WHERE {
?subject ?property ?advisory
LET ( ?localName := afn:localname(?advisory) )
OPTIONAL { ?advisory rdfs:label ?advisoryLabel }
OPTIONAL { ?advisory core:advisee ?advisee
OPTIONAL { ?advisee rdfs:label ?adviseeLabel }
}
OPTIONAL { ?advisory core:degreeCandidacy ?degree
OPTIONAL { ?degree rdfs:label ?degreeLabel }
OPTIONAL { ?degree core:abbreviation ?degreeAbbr }
}
<collated>
OPTIONAL { ?advisory vitro:mostSpecificType ?subclass .
?subclass rdfs:subClassOf core:AdvisingRelationship
}
</collated>
OPTIONAL { ?advisory core:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
}
}
OPTIONAL { ?advisory core:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
}
} ORDER BY <collated>?subclass</collated> DESC(?dateTimeEnd)
</query-select>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subclass rdfs:subClassOf core:AdvisingRelationship
} WHERE {
?subclass rdfs:subClassOf core:AdvisingRelationship
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?advisory .
?advisory ?advisoryProperty ?advisoryValue .
?advisory rdfs:label ?advisoryLabel
} WHERE {
{
?subject ?property ?advisory
} UNION {
?subject ?property ?advisory .
?advisory ?advisoryProperty ?advisoryValue
} UNION {
?subject ?property ?advisory .
?advisory ?advisoryProperty ?advisoryValue .
?advisory rdfs:label ?advisoryLabel
}
}
</query-construct>
<query-construct>
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
CONSTRUCT {
?subject ?property ?advisory .
?advisory core:advisee ?advisee .
?advisee rdfs:label ?adviseeLabel .
?advisory core:degreeCandidacy ?degree .
?degree rdfs:label ?degreeLabel .
?degree core:abbreviation ?degreeAbbr
} WHERE {
{
?subject ?property ?advisory
} UNION {
?subject ?property ?advisory.
?advisory core:advisee ?advisee
} UNION {
?subject ?property ?advisory .
?advisory core:advisee ?advisee .
?advisee rdfs:label ?adviseeLabel
} UNION {
?subject ?property ?advisory .
?advisory core:degreeCandidacy ?degree
} UNION {
?subject ?property ?advisory .
?advisory core:degreeCandidacy ?degree .
?degree rdfs:label ?degreeLabel
} UNION {
?subject ?property ?advisory .
?advisory core:degreeCandidacy ?degree .
?degree rdfs:label ?degreeLabel .
?degree core:abbreviation ?degreeAbbr
}
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?award .
?award core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
} WHERE {
?subject ?property ?award .
?award core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?award .
?award core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
} WHERE {
?subject ?property ?award .
?award core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
</query-construct>
<template>propStatement-advisorIn.ftl</template>
</list-view-config>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query-select>
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&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;
SELECT DISTINCT <collated>?subclass</collated>
?advisory
?advisoryLabel
?localName
?advisee
?adviseeLabel
?degreeLabel
?degreeAbbr
?dateTimeStart
?dateTimeEnd
WHERE {
?subject ?property ?advisory
LET ( ?localName := afn:localname(?advisory) )
OPTIONAL { ?advisory rdfs:label ?advisoryLabel }
OPTIONAL { ?advisory core:relates ?advisee .
?advisee a foaf:Person .
OPTIONAL { ?advisee rdfs:label ?adviseeLabel }
}
OPTIONAL { ?advisory core:relates ?degree .
?degree a core:AcademicDegree .
OPTIONAL { ?degree rdfs:label ?degreeLabel }
OPTIONAL { ?degree core:abbreviation ?degreeAbbr }
}
<collated>
OPTIONAL { ?advisory vitro:mostSpecificType ?subclass .
?subclass rdfs:subClassOf core:AdvisingRelationship
}
</collated>
OPTIONAL { ?advisory core:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
}
}
OPTIONAL { ?advisory core:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
}
FILTER ( ?subject != ?advisee )
} ORDER BY <collated>?subclass</collated> DESC(?dateTimeEnd)
</query-select>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subclass rdfs:subClassOf core:AdvisingRelationship
} WHERE {
?subclass rdfs:subClassOf core:AdvisingRelationship
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
CONSTRUCT {
?subject ?property ?advisory .
?advisory a core:AdvisingRelationship .
?advisory ?advisoryProperty ?advisoryValue .
?advisory rdfs:label ?advisoryLabel
} WHERE {
{
?subject ?property ?advisory .
?advisory a core:AdvisingRelationship
} UNION {
?subject ?property ?advisory .
?advisory a core:AdvisingRelationship .
?advisory ?advisoryProperty ?advisoryValue
} UNION {
?subject ?property ?advisory .
?advisory a core:AdvisingRelationship .
?advisory ?advisoryProperty ?advisoryValue .
?advisory rdfs:label ?advisoryLabel
}
}
</query-construct>
<query-construct>
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
CONSTRUCT {
?subject ?property ?advisory .
?advisory a core:AdvisingRelationship .
?advisory core:relates ?advisee .
?advisee a foaf:Person .
?advisee rdfs:label ?adviseeLabel .
?advisory core:relates ?degree .
?degree a core:AcademicDegree .
?degree rdfs:label ?degreeLabel .
?degree core:abbreviation ?degreeAbbr
} WHERE {
{
?subject ?property ?advisory .
?advisory a core:AdvisingRelationship .
} UNION {
?subject ?property ?advisory.
?advisory a core:AdvisingRelationship .
?advisory core:relates ?advisee .
?advisee a foaf:Person .
} UNION {
?subject ?property ?advisory .
?advisory a core:AdvisingRelationship .
?advisory core:relates ?advisee .
?advisee a foaf:Person .
?advisee rdfs:label ?adviseeLabel
} UNION {
?subject ?property ?advisory .
?advisory a core:AdvisingRelationship .
?advisory core:relates ?degree .
?degree a core:AcademicDegree .
} UNION {
?subject ?property ?advisory .
?advisory a core:AdvisingRelationship .
?advisory core:relates ?degree .
?degree a core:AcademicDegree .
?degree rdfs:label ?degreeLabel
} UNION {
?subject ?property ?advisory .
?advisory a core:AdvisingRelationship .
?advisory core:relates ?degree .
?degree a core:AcademicDegree .
?degree rdfs:label ?degreeLabel .
?degree core:abbreviation ?degreeAbbr
}
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?advisory .
?advisory a core:AdvisingRelationship .
?award core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
} WHERE {
?subject ?property ?advisory .
?advisory a core:AdvisingRelationship .
?award core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?advisory .
?advisory a core:AdvisingRelationship .
?award core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
} WHERE {
?subject ?property ?advisory .
?advisory a core:AdvisingRelationship .
?award core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
</query-construct>
<template>propStatement-advisorIn.ftl</template>
</list-view-config>

View file

@ -29,5 +29,5 @@
</#if>
</#local>
${linkedIndividual} <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
${linkedIndividual} <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
</#macro>

View file

@ -61,6 +61,7 @@ local:authorInAuthorshipConfig a :ObjectPropertyDisplayConfig ;
local:hasServiceProviderRoleContext a :ConfigContext ;
:hasConfiguration local:hasServiceProviderRoleConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://purl.obolibrary.org/obo/ERO_0000012> .
local:hasServiceProviderRoleConfig a :ObjectPropertyDisplayConfig ;
@ -75,6 +76,7 @@ local:hasServiceProviderRoleConfig a :ObjectPropertyDisplayConfig ;
local:hasClinicalRoleContext a :ConfigContext ;
:hasConfiguration local:hasClinicalRoleConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://vivoweb.org/ontology/core#ClinicalRole> .
local:hasClinicalRoleConfig a :ObjectPropertyDisplayConfig ;
@ -89,6 +91,7 @@ local:hasClinicalRoleConfig a :ObjectPropertyDisplayConfig ;
local:hasLeaderRoleContext a :ConfigContext ;
:hasConfiguration local:hasLeaderRoleConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://vivoweb.org/ontology/core#LeaderRole> .
local:hasLeaderRoleConfig a :ObjectPropertyDisplayConfig ;
@ -103,6 +106,7 @@ local:hasLeaderRoleConfig a :ObjectPropertyDisplayConfig ;
local:hasMemberRoleContext a :ConfigContext ;
:hasConfiguration local:hasMemberRoleConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://vivoweb.org/ontology/core#MemberRole> .
local:hasMemberRoleConfig a :ObjectPropertyDisplayConfig ;
@ -117,6 +121,7 @@ local:hasMemberRoleConfig a :ObjectPropertyDisplayConfig ;
local:hasTeacherRoleContext a :ConfigContext ;
:hasConfiguration local:hasTeacherRoleConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://vivoweb.org/ontology/core#TeacherRole> .
local:hasTeacherRoleConfig a :ObjectPropertyDisplayConfig ;
@ -131,6 +136,7 @@ local:hasTeacherRoleConfig a :ObjectPropertyDisplayConfig ;
local:hasEditorRoleContext a :ConfigContext ;
:hasConfiguration local:hasEditorRoleConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://vivoweb.org/ontology/core#EditorRole> .
local:hasEditorRoleConfig a :ObjectPropertyDisplayConfig ;
@ -145,6 +151,7 @@ local:hasEditorRoleConfig a :ObjectPropertyDisplayConfig ;
local:hasReviewerRoleContext a :ConfigContext ;
:hasConfiguration local:hasReviewerRoleConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://vivoweb.org/ontology/core#ReviewerRole> .
local:hasReviewerRoleConfig a :ObjectPropertyDisplayConfig ;
@ -159,6 +166,7 @@ local:hasReviewerRoleConfig a :ObjectPropertyDisplayConfig ;
local:hasOrganizerRoleContext a :ConfigContext ;
:hasConfiguration local:hasOrganizerRoleConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://vivoweb.org/ontology/core#OrganizerRole> .
local:hasOrganizerRoleConfig a :ObjectPropertyDisplayConfig ;
@ -173,6 +181,7 @@ local:hasOrganizerRoleConfig a :ObjectPropertyDisplayConfig ;
local:hasOutreachProviderRoleContext a :ConfigContext ;
:hasConfiguration local:hasOutreachProviderRoleConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://vivoweb.org/ontology/core#OutreachProviderRole> .
local:hasOutreachProviderRoleConfig a :ObjectPropertyDisplayConfig ;
@ -187,6 +196,7 @@ local:hasOutreachProviderRoleConfig a :ObjectPropertyDisplayConfig ;
local:hasAttendeeRoleContext a :ConfigContext ;
:hasConfiguration local:hasAttendeeRoleConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://vivoweb.org/ontology/core#AttendeeRole> .
local:hasAttendeeRoleConfig a :ObjectPropertyDisplayConfig ;
@ -201,6 +211,7 @@ local:hasAttendeeRoleConfig a :ObjectPropertyDisplayConfig ;
local:hasResearcherRoleContext a :ConfigContext ;
:hasConfiguration local:hasResearcherRoleConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://vivoweb.org/ontology/core#ResearcherRole> .
local:hasResearcherRoleConfig a :ObjectPropertyDisplayConfig ;
@ -215,6 +226,7 @@ local:hasResearcherRoleConfig a :ObjectPropertyDisplayConfig ;
local:hasInvestigatorRoleContext a :ConfigContext ;
:hasConfiguration local:hasInvestigatorRoleConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://vivoweb.org/ontology/core#InvestigatorRole> .
local:hasInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
@ -229,6 +241,7 @@ local:hasInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
local:hasPrincipalInvestigatorRoleContext a :ConfigContext ;
:hasConfiguration local:hasPrincipalInvestigatorRoleConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://vivoweb.org/ontology/core#PrincipalInvestigatorRole> .
local:hasPrincipalInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
@ -243,6 +256,7 @@ local:hasPrincipalInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
local:hasCo-PrincipalInvestigatorRoleContext a :ConfigContext ;
:hasConfiguration local:hasCo-PrincipalInvestigatorRoleConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://vivoweb.org/ontology/core#CoPrincipalInvestigatorRole> .
local:hasCo-PrincipalInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
@ -257,6 +271,7 @@ local:hasCo-PrincipalInvestigatorRoleConfig a :ObjectPropertyDisplayConfig ;
local:hasPresenterRoleContext a :ConfigContext ;
:hasConfiguration local:hasPresenterRoleConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000053> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://vivoweb.org/ontology/core#PresenterRole> .
local:hasPresenterRoleConfig a :ObjectPropertyDisplayConfig ;
@ -271,6 +286,7 @@ local:hasPresenterRoleConfig a :ObjectPropertyDisplayConfig ;
local:awardOrHonorContext a :ConfigContext ;
:hasConfiguration local:awardOrHonorConfig ;
:configContextFor <http://vivoweb.org/ontology/core#relatedBy> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://vivoweb.org/ontology/core#AwardorHonorReceipt> .
local:awardOrHonorConfig a :ObjectPropertyDisplayConfig ;
@ -285,6 +301,7 @@ local:awardOrHonorConfig a :ObjectPropertyDisplayConfig ;
local:educationalTrainingContext a :ConfigContext ;
:hasConfiguration local:educationalTrainingConfig ;
:configContextFor <http://purl.obolibrary.org/obo/RO_0000056> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://vivoweb.org/ontology/core#EducationalProcess> .
local:educationalTrainingConfig a :ObjectPropertyDisplayConfig ;
@ -296,6 +313,22 @@ local:educationalTrainingConfig a :ObjectPropertyDisplayConfig ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasEducationalTraining"^^<http://www.w3.org/2001/XMLSchema#string> ;
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupbiography> .
local:advisorRoleContext a :ConfigContext ;
:hasConfiguration local:advisorRoleConfig ;
:configContextFor <http://vivoweb.org/ontology/core#relatedBy> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://vivoweb.org/ontology/core#AdvisingRelationship> .
local:advisorRoleConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-advisorIn.xml"^^xsd:string ;
:displayName "advisees" ;
vitro:displayRankAnnot 40;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasAdvisingRelationshipGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupteaching> .
local:informationResourceInAuthorshipContext a :ConfigContext ;
:hasConfiguration local:informationResourceInAuthorshipConfig ;
:configContextFor <http://vivoweb.org/ontology/core#relatedBy> ;
@ -310,3 +343,19 @@ local:informationResourceInAuthorshipConfig a :ObjectPropertyDisplayConfig ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddAuthorsToInformationResourceGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupoverview> .
### vcard properties ###
local:mailingAddressContext a :ConfigContext ;
:hasConfiguration local:mailingAddressConfig ;
:configContextFor <http://vivoweb.org/ontology/core#relatedBy> ;
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
:qualifiedBy <http://www.w3.org/2006/vcard/ns#Address> .
local:mailingAddressConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-personHasMailingAddress.xml"^^xsd:string ;
:displayName "mailing address" ;
vitro:displayRankAnnot 80;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasMailingAddressGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupaddress> .

View file

@ -1,61 +1,61 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators;
import java.util.HashMap;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
public class AddClinicalRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
private static String template = "addClinicalRoleToPerson.ftl";
//Should this be overridden
@Override
String getTemplate() {
return template;
}
@Override
String getRoleType() {
return "http://vivoweb.org/ontology/core#ClinicalRole";
}
/** Clinical role involves hard-coded options for the "right side" of the role or activity. */
@Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ConstantFieldOptions(
"", "Select one",
"http://vivoweb.org/ontology/core#Project", "Project",
"http://vivoweb.org/ontology/core#Service", "Service"
);
}
//isShowRoleLabelField remains true for this so doesn't need to be overwritten
@Override
boolean isShowRoleLabelField(){
return true;
}
/*
* Use the methods below to change the date/time precision in the
* custom form associated with this generator. When not used, the
* precision will be YEAR. The other precisons are MONTH, DAY, HOUR,
* MINUTE, TIME and NONE.
*/
/*
public String getStartDatePrecision() {
String precision = VitroVocabulary.Precision.MONTH.uri();
return precision;
}
public String getEndDatePrecision() {
String precision = VitroVocabulary.Precision.DAY.uri();
return precision;
}
*/
}
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators;
import java.util.HashMap;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
public class AddClinicalRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
private static String template = "addClinicalRoleToPerson.ftl";
//Should this be overridden
@Override
String getTemplate() {
return template;
}
@Override
String getRoleType() {
return "http://vivoweb.org/ontology/core#ClinicalRole";
}
/** Clinical role involves hard-coded options for the "right side" of the role or activity. */
@Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ConstantFieldOptions(
"", "Select one",
"http://vivoweb.org/ontology/core#Project", "Project",
"http://purl.obolibrary.org/obo/ERO_0000005", "Service"
);
}
//isShowRoleLabelField remains true for this so doesn't need to be overwritten
@Override
boolean isShowRoleLabelField(){
return true;
}
/*
* Use the methods below to change the date/time precision in the
* custom form associated with this generator. When not used, the
* precision will be YEAR. The other precisons are MONTH, DAY, HOUR,
* MINUTE, TIME and NONE.
*/
/*
public String getStartDatePrecision() {
String precision = VitroVocabulary.Precision.MONTH.uri();
return precision;
}
public String getEndDatePrecision() {
String precision = VitroVocabulary.Precision.DAY.uri();
return precision;
}
*/
}

View file

@ -28,12 +28,8 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im
final static String subjAreaClass = "http://www.w3.org/2004/02/skos/core#Concept";
final static String degreeClass = vivoCore+"AcademicDegree";
final static String adviseeClass = foaf + "Person";
final static String advisorInPred = vivoCore + "advisorIn";
final static String adviseeInPred = vivoCore + "adviseeIn";
final static String advisorPred = vivoCore + "advisor";
final static String adviseePred = vivoCore + "advisee" ;
final static String subjAreaPred = vivoCore + "hasSubjectArea" ;
final static String degreePred = vivoCore + "degreeCandidacy" ;
final static String adviseeRoleClass = "http://vivoweb.org/ontology/core#AdviseeRole";
final static String advisorRoleClass = "http://vivoweb.org/ontology/core#AdvisorRole";
final static String advisingRelToInterval = vivoCore + "dateTimeInterval";
final static String intervalType = vivoCore + "DateTimeInterval";
final static String intervalToStart = vivoCore + "start";
@ -62,7 +58,7 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im
conf.setN3Required( Arrays.asList( n3ForNewAdvisingRelationship,
advisingRelLabelAssertion,
advisingRelTypeAssertion ) );
advisingRelTypeAssertion ) );
conf.setN3Optional( Arrays.asList( n3ForNewAdviseeAssertion,
n3ForExistingAdviseeAssertion,
degreeAssertion,
@ -75,6 +71,8 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im
conf.addNewResource("advisingRelationship", DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("newAdvisee", DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("advisorRole", DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("adviseeRole", DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("newSubjArea", DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("intervalNode", DEFAULT_NS_FOR_NEW_RESOURCE);
conf.addNewResource("startNode", DEFAULT_NS_FOR_NEW_RESOURCE);
@ -93,6 +91,8 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im
conf.addSparqlForExistingLiteral("endField-value", existingEndDateQuery);
conf.addSparqlForExistingUris("advisingRelType", advisingRelTypeQuery);
conf.addSparqlForExistingUris("advisorRole", existingAdvisorRoleQuery);
conf.addSparqlForExistingUris("adviseeRole", existingAdviseeRoleQuery);
conf.addSparqlForExistingUris("existingSubjArea", subjAreaQuery);
conf.addSparqlForExistingUris("existingAdvisee", adviseeQuery);
conf.addSparqlForExistingUris("degree", degreeQuery);
@ -193,9 +193,14 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im
final static String n3ForNewAdvisingRelationship =
"@prefix vivo: <" + vivoCore + "> . \n\n" +
"?person <" + advisorInPred + "> ?advisingRelationship . \n" +
"?person <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
"?advisingRelationship a <" + advisingRelClass + "> . \n" +
"?advisingRelationship <" + advisorPred + "> ?person . \n" ;
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?person . \n" +
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?advisorRole . \n" +
"?advisorRole a <" + advisorRoleClass + "> . \n" +
"?advisorRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
"?person <http://purl.obolibrary.org/obo/RO_0000053> ?advisorRole . \n" +
"?advisorRole <http://purl.obolibrary.org/obo/RO_0000052> ?person . ";
final static String advisingRelLabelAssertion =
"?advisingRelationship <"+ label + "> ?advisingRelLabel .";
@ -204,14 +209,24 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im
"?advisingRelationship a ?advisingRelType .";
final static String n3ForNewAdviseeAssertion =
"?advisingRelationship <" + adviseePred + "> ?newAdvisee . \n" +
"?newAdvisee <" + adviseeInPred + "> ?advisingRelationship . \n" +
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?newAdvisee . \n" +
"?newAdvisee <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
"?newAdvisee <" + label + "> ?adviseeLabel . \n" +
"?newAdvisee a <" + adviseeClass + "> . ";
"?newAdvisee a <" + adviseeClass + "> . \n" +
"?newAdvisee <http://purl.obolibrary.org/obo/RO_0000053> ?adviseeRole . \n" +
"?adviseeRole <http://purl.obolibrary.org/obo/RO_0000052> ?newAdvisee . \n" +
"?adviseeRole a <" + adviseeRoleClass + "> . \n" +
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
"?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . ";
final static String n3ForExistingAdviseeAssertion =
"?advisingRelationship <" + adviseePred + "> ?existingAdvisee . \n" +
"?existingAdvisee <" + adviseeInPred + "> ?advisingRelationship . ";
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingAdvisee . \n" +
"?existingAdvisee <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
"?existingAdvisee <http://purl.obolibrary.org/obo/RO_0000053> ?adviseeRole . \n" +
"?adviseeRole <http://purl.obolibrary.org/obo/RO_0000052> ?existingAdvisee . \n" +
"?adviseeRole a <" + adviseeRoleClass + "> . \n" +
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
"?adviseeRole <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . ";
final static String firstNameAssertion =
"@prefix foaf: <" + foaf + "> . \n" +
@ -222,19 +237,22 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im
"?newAdvisee foaf:lastName ?lastName .";
final static String degreeAssertion =
"?advisingRelationship <"+ degreePred +"> ?degree .";
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?degree . \n" +
"?degree <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . ";
//This is for an existing subject area
//Where we only need the existing subject area label
final static String n3ForExistingSubjAreaAssertion =
"?advisingRelationship <"+ subjAreaPred +"> ?existingSubjArea .";
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingSubjArea . \n" +
"?existingSubjArea <http://vivoweb.org/ontology/core#relatedBy> ?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 <"+ subjAreaPred +"> ?newSubjArea . \n" +
"?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?newSubjArea . \n" +
"?newSubjArea <http://vivoweb.org/ontology/core#relatedBy> ?advisingRelationship . \n" +
"?newSubjArea <"+ label + "> ?subjAreaLabel . \n" +
"?newSubjArea a <" + subjAreaClass + "> . ";
@ -264,24 +282,46 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im
final static String adviseeQuery =
"SELECT ?existingAdvisee WHERE { \n" +
" ?advisingRelationship <" + adviseePred + "> ?existingAdvisee . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingAdvisee . \n" +
" ?existingAdvisee a <" + adviseeClass + "> . \n" +
" FILTER (?person != ?existingAdvisee) . \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 existingAdviseeRoleQuery =
"SELECT ?adviseeRole WHERE { \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?adviseeRole . \n" +
" ?adviseeRole a <" + adviseeRoleClass + "> . \n" +
"}";
final static String adviseeLabelQuery =
"SELECT ?existingAdviseeLabel WHERE { \n" +
" ?advisingRelationship <" + adviseePred + "> ?existingAdvisee . \n" +
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingAdvisee . \n" +
" ?existingAdvisee a <" + adviseeClass + "> . \n" +
" ?existingAdvisee <" + label + "> ?existingAdviseeLabel . \n" +
" FILTER (?person != ?existingAdvisee) . \n" +
"}";
final static String subjAreaQuery =
"SELECT ?existingSubjArea WHERE { \n" +
" ?advisingRelationship <" + subjAreaPred + "> ?existingSubjArea . \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 <" + subjAreaPred + "> ?existingSubjArea . \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" +
"}";
final static String advisingRelLabelQuery =
@ -291,7 +331,10 @@ public class PersonHasAdvisingRelationshipGenerator extends VivoBaseGenerator im
final static String degreeQuery =
"SELECT ?existingDegree WHERE {\n"+
" ?advisingRelationship <"+ degreePred +"> ?existingDegree . }";
" ?advisingRelationship <http://vivoweb.org/ontology/core#relates> ?existingDegree . \n" +
" ?existingDegree a <" + degreeClass + "> . \n" +
"}";
final static String existingStartDateQuery =
"SELECT ?existingDateStart WHERE { \n" +