VIVO-112 ongoing updates and VIVO-256 ORCID iD changes
This commit is contained in:
parent
0896b37c3c
commit
791db61269
13 changed files with 386 additions and 113 deletions
|
@ -29,7 +29,7 @@
|
||||||
WHERE {
|
WHERE {
|
||||||
?subject ?property ?authorship .
|
?subject ?property ?authorship .
|
||||||
?authorship core:relates ?infoResource .
|
?authorship core:relates ?infoResource .
|
||||||
?infoResource a bibo:Document .
|
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
|
||||||
?infoResource rdfs:label ?infoResourceName .
|
?infoResource rdfs:label ?infoResourceName .
|
||||||
|
|
||||||
OPTIONAL { ?infoResource bibo:volume ?volume }
|
OPTIONAL { ?infoResource bibo:volume ?volume }
|
||||||
|
@ -72,13 +72,13 @@
|
||||||
?subject ?property ?authorship .
|
?subject ?property ?authorship .
|
||||||
?authorship a core:Authorship .
|
?authorship a core:Authorship .
|
||||||
?authorship core:relates ?infoResource .
|
?authorship core:relates ?infoResource .
|
||||||
?infoResource a bibo:Document .
|
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
|
||||||
?infoResource vitro:mostSpecificType ?subclass
|
?infoResource vitro:mostSpecificType ?subclass
|
||||||
} WHERE {
|
} WHERE {
|
||||||
?subject ?property ?authorship .
|
?subject ?property ?authorship .
|
||||||
?authorship a core:Authorship .
|
?authorship a core:Authorship .
|
||||||
?authorship core:relates ?infoResource .
|
?authorship core:relates ?infoResource .
|
||||||
?infoResource a bibo:Document .
|
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
|
||||||
?infoResource vitro:mostSpecificType ?subclass
|
?infoResource vitro:mostSpecificType ?subclass
|
||||||
}
|
}
|
||||||
</query-construct>
|
</query-construct>
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
?subject ?property ?authorship .
|
?subject ?property ?authorship .
|
||||||
?authorship ?authorshipProperty ?authorshipValue .
|
?authorship ?authorshipProperty ?authorshipValue .
|
||||||
?authorship core:relates ?infoResource .
|
?authorship core:relates ?infoResource .
|
||||||
?infoResource a bibo:Document .
|
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
|
||||||
?infoResource rdfs:label ?infoResourceName .
|
?infoResource rdfs:label ?infoResourceName .
|
||||||
?infoResource core:hasPublicationVenue ?publishedIn .
|
?infoResource core:hasPublicationVenue ?publishedIn .
|
||||||
?publishedIn rdfs:label ?journal
|
?publishedIn rdfs:label ?journal
|
||||||
|
@ -108,24 +108,24 @@
|
||||||
?subject ?property ?authorship .
|
?subject ?property ?authorship .
|
||||||
?authorship a core:Authorship .
|
?authorship a core:Authorship .
|
||||||
?authorship core:relates ?infoResource .
|
?authorship core:relates ?infoResource .
|
||||||
?infoResource a bibo:Document
|
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030>
|
||||||
} UNION {
|
} UNION {
|
||||||
?subject ?property ?authorship .
|
?subject ?property ?authorship .
|
||||||
?authorship a core:Authorship .
|
?authorship a core:Authorship .
|
||||||
?authorship core:relates ?infoResource .
|
?authorship core:relates ?infoResource .
|
||||||
?infoResource a bibo:Document .
|
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
|
||||||
?infoResource rdfs:label ?infoResourceName
|
?infoResource rdfs:label ?infoResourceName
|
||||||
} UNION {
|
} UNION {
|
||||||
?subject ?property ?authorship .
|
?subject ?property ?authorship .
|
||||||
?authorship a core:Authorship .
|
?authorship a core:Authorship .
|
||||||
?authorship core:relates ?infoResource .
|
?authorship core:relates ?infoResource .
|
||||||
?infoResource a bibo:Document .
|
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
|
||||||
?infoResource core:hasPublicationVenue ?publishedIn
|
?infoResource core:hasPublicationVenue ?publishedIn
|
||||||
} UNION {
|
} UNION {
|
||||||
?subject ?property ?authorship .
|
?subject ?property ?authorship .
|
||||||
?authorship a core:Authorship .
|
?authorship a core:Authorship .
|
||||||
?authorship core:relates ?infoResource .
|
?authorship core:relates ?infoResource .
|
||||||
?infoResource a bibo:Document .
|
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
|
||||||
?infoResource core:hasPublicationVenue ?publishedIn .
|
?infoResource core:hasPublicationVenue ?publishedIn .
|
||||||
?publishedIn rdfs:label ?journal
|
?publishedIn rdfs:label ?journal
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@
|
||||||
?authorship a core:Authorship .
|
?authorship a core:Authorship .
|
||||||
?authorship ?authorshipProperty ?authorshipValue .
|
?authorship ?authorshipProperty ?authorshipValue .
|
||||||
?authorship core:relates ?infoResource .
|
?authorship core:relates ?infoResource .
|
||||||
?infoResource a bibo:Document .
|
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
|
||||||
?infoResource ?infoResourceProperty ?infoResourceValue .
|
?infoResource ?infoResourceProperty ?infoResourceValue .
|
||||||
?infoResource bibo:reproducedIn ?appearsInObj .
|
?infoResource bibo:reproducedIn ?appearsInObj .
|
||||||
?infoResource core:publisher ?publisherObj .
|
?infoResource core:publisher ?publisherObj .
|
||||||
|
@ -169,32 +169,32 @@
|
||||||
?subject ?property ?authorship .
|
?subject ?property ?authorship .
|
||||||
?authorship a core:Authorship .
|
?authorship a core:Authorship .
|
||||||
?authorship core:relates ?infoResource .
|
?authorship core:relates ?infoResource .
|
||||||
?infoResource a bibo:Document .
|
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
|
||||||
} UNION {
|
} UNION {
|
||||||
?subject ?property ?authorship .
|
?subject ?property ?authorship .
|
||||||
?authorship a core:Authorship .
|
?authorship a core:Authorship .
|
||||||
?authorship core:relates ?infoResource .
|
?authorship core:relates ?infoResource .
|
||||||
?infoResource a bibo:Document .
|
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
|
||||||
?infoResource ?infoResourceProperty ?infoResourceValue
|
?infoResource ?infoResourceProperty ?infoResourceValue
|
||||||
} UNION {
|
} UNION {
|
||||||
?subject ?property ?authorship .
|
?subject ?property ?authorship .
|
||||||
?authorship a core:Authorship .
|
?authorship a core:Authorship .
|
||||||
?authorship core:relates ?infoResource .
|
?authorship core:relates ?infoResource .
|
||||||
?infoResource a bibo:Document .
|
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
|
||||||
?infoResource bibo:reproducedIn ?appearsInObj .
|
?infoResource bibo:reproducedIn ?appearsInObj .
|
||||||
?appearsInObj rdfs:label ?appearsIn
|
?appearsInObj rdfs:label ?appearsIn
|
||||||
} UNION {
|
} UNION {
|
||||||
?subject ?property ?authorship .
|
?subject ?property ?authorship .
|
||||||
?authorship a core:Authorship .
|
?authorship a core:Authorship .
|
||||||
?authorship core:relates ?infoResource .
|
?authorship core:relates ?infoResource .
|
||||||
?infoResource a bibo:Document .
|
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
|
||||||
?infoResource core:publisher ?publisherObj .
|
?infoResource core:publisher ?publisherObj .
|
||||||
?publisherObj rdfs:label ?publisher
|
?publisherObj rdfs:label ?publisher
|
||||||
} UNION {
|
} UNION {
|
||||||
?subject ?property ?authorship .
|
?subject ?property ?authorship .
|
||||||
?authorship a core:Authorship .
|
?authorship a core:Authorship .
|
||||||
?authorship core:relates ?infoResource .
|
?authorship core:relates ?infoResource .
|
||||||
?infoResource a bibo:Document .
|
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
|
||||||
?infoResource core:relatedBy ?editorship .
|
?infoResource core:relatedBy ?editorship .
|
||||||
?editorship core:relates ?editorObj .
|
?editorship core:relates ?editorObj .
|
||||||
?editorObj rdfs:label ?editor
|
?editorObj rdfs:label ?editor
|
||||||
|
@ -202,7 +202,7 @@
|
||||||
?subject ?property ?authorship .
|
?subject ?property ?authorship .
|
||||||
?authorship a core:Authorship .
|
?authorship a core:Authorship .
|
||||||
?authorship core:relates ?infoResource .
|
?authorship core:relates ?infoResource .
|
||||||
?infoResource a bibo:Document .
|
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
|
||||||
?infoResource core:partOf ?partOfObj .
|
?infoResource core:partOf ?partOfObj .
|
||||||
?partOfObj rdfs:label ?partOf
|
?partOfObj rdfs:label ?partOf
|
||||||
}
|
}
|
||||||
|
@ -217,14 +217,14 @@
|
||||||
?subject ?property ?authorship .
|
?subject ?property ?authorship .
|
||||||
?authorship a core:Authorship .
|
?authorship a core:Authorship .
|
||||||
?authorship core:relates ?infoResource .
|
?authorship core:relates ?infoResource .
|
||||||
?infoResource a bibo:Document .
|
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
|
||||||
?infoResource core:dateTimeValue ?dateTimeValue .
|
?infoResource core:dateTimeValue ?dateTimeValue .
|
||||||
?dateTimeValue core:dateTime ?dateTime
|
?dateTimeValue core:dateTime ?dateTime
|
||||||
} WHERE {
|
} WHERE {
|
||||||
?subject ?property ?authorship .
|
?subject ?property ?authorship .
|
||||||
?authorship a core:Authorship .
|
?authorship a core:Authorship .
|
||||||
?authorship core:relates ?infoResource .
|
?authorship core:relates ?infoResource .
|
||||||
?infoResource a bibo:Document .
|
?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .
|
||||||
?infoResource core:dateTimeValue ?dateTimeValue .
|
?infoResource core:dateTimeValue ?dateTimeValue .
|
||||||
?dateTimeValue core:dateTime ?dateTime
|
?dateTimeValue core:dateTime ?dateTime
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
SELECT DISTINCT <collated> ?subclass </collated>
|
SELECT DISTINCT <collated> ?subclass </collated>
|
||||||
?edTraining
|
?edTraining
|
||||||
?trainingType
|
|
||||||
?typeName
|
?typeName
|
||||||
?org ?orgName
|
?org ?orgName
|
||||||
?degreeName ?degreeAbbr
|
?degreeName ?degreeAbbr
|
||||||
|
@ -22,7 +21,7 @@
|
||||||
WHERE {
|
WHERE {
|
||||||
?subject ?property ?edTraining .
|
?subject ?property ?edTraining .
|
||||||
?edTraining a core:EducationalProcess
|
?edTraining a core:EducationalProcess
|
||||||
OPTIONAL {?edTraining vitro:mostSpecificType ?trainingType .
|
OPTIONAL {?edTraining vitro:mostSpecificType ?subclass .
|
||||||
?trainingType rdfs:subClassOf core:EducationalProcess .
|
?trainingType rdfs:subClassOf core:EducationalProcess .
|
||||||
?trainingType rdfs:label ?typeName
|
?trainingType rdfs:label ?typeName
|
||||||
}
|
}
|
||||||
|
@ -32,13 +31,9 @@
|
||||||
OPTIONAL { ?degree rdfs:label ?degreeName }
|
OPTIONAL { ?degree rdfs:label ?degreeName }
|
||||||
OPTIONAL { ?degree core:abbreviation ?degreeAbbr }
|
OPTIONAL { ?degree core:abbreviation ?degreeAbbr }
|
||||||
}
|
}
|
||||||
OPTIONAL { ?awardedDegree core:assignedBy ?org .
|
OPTIONAL { ?edTraining <http://purl.obolibrary.org/obo/RO_0000057> ?org .
|
||||||
|
?org a foaf:Organization .
|
||||||
?org rdfs:label ?orgName
|
?org rdfs:label ?orgName
|
||||||
<collated>
|
|
||||||
OPTIONAL { ?org vitro:mostSpecificType ?subclass .
|
|
||||||
?subclass rdfs:subClassOf foaf:Organization
|
|
||||||
}
|
|
||||||
</collated>
|
|
||||||
}
|
}
|
||||||
OPTIONAL { ?edTraining core:majorField ?majorField }
|
OPTIONAL { ?edTraining core:majorField ?majorField }
|
||||||
OPTIONAL { ?edTraining core:departmentOrSchool ?deptOrSchool }
|
OPTIONAL { ?edTraining core:departmentOrSchool ?deptOrSchool }
|
||||||
|
@ -57,12 +52,11 @@
|
||||||
<query-construct>
|
<query-construct>
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
|
||||||
|
|
||||||
CONSTRUCT {
|
CONSTRUCT {
|
||||||
?subclass rdfs:subClassOf foaf:Organization .
|
?subclass rdfs:subClassOf core:EducationalProcess .
|
||||||
} WHERE {
|
} WHERE {
|
||||||
?subclass rdfs:subClassOf foaf:Organization .
|
?subclass rdfs:subClassOf core:EducationalProcess .
|
||||||
}
|
}
|
||||||
</query-construct>
|
</query-construct>
|
||||||
|
|
||||||
|
@ -75,8 +69,6 @@
|
||||||
?edTraining a core:EducationalProcess .
|
?edTraining a core:EducationalProcess .
|
||||||
?edTraining ?edTrainingProp ?edTrainingValue .
|
?edTraining ?edTrainingProp ?edTrainingValue .
|
||||||
?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?awardedDegree .
|
?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?awardedDegree .
|
||||||
?awardedDegree core:assignedBy ?org .
|
|
||||||
?org rdfs:label ?orgName .
|
|
||||||
?awardedDegree core:relates ?degree .
|
?awardedDegree core:relates ?degree .
|
||||||
?edTraining core:dateTimeInterval ?dateTimeInterval
|
?edTraining core:dateTimeInterval ?dateTimeInterval
|
||||||
} WHERE {
|
} WHERE {
|
||||||
|
@ -98,8 +90,6 @@
|
||||||
?subject ?property ?edTraining .
|
?subject ?property ?edTraining .
|
||||||
?edTraining a core:EducationalProcess .
|
?edTraining a core:EducationalProcess .
|
||||||
?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?awardedDegree .
|
?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?awardedDegree .
|
||||||
?awardedDegree core:assignedBy ?org .
|
|
||||||
?org rdfs:label ?orgName
|
|
||||||
}
|
}
|
||||||
UNION {
|
UNION {
|
||||||
?subject ?property ?edTraining .
|
?subject ?property ?edTraining .
|
||||||
|
@ -115,6 +105,44 @@
|
||||||
}
|
}
|
||||||
</query-construct>
|
</query-construct>
|
||||||
|
|
||||||
|
<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 ?edTraining .
|
||||||
|
?edTraining a core:EducationalProcess .
|
||||||
|
?edTraining ?edTrainingProp ?edTrainingValue .
|
||||||
|
?edTraining <http://purl.obolibrary.org/obo/RO_0000057> ?org .
|
||||||
|
?org a foaf:Organization .
|
||||||
|
?org rdfs:label ?orgName .
|
||||||
|
} WHERE {
|
||||||
|
{
|
||||||
|
?subject ?property ?edTraining .
|
||||||
|
?edTraining a core:EducationalProcess
|
||||||
|
}
|
||||||
|
UNION {
|
||||||
|
?subject ?property ?edTraining .
|
||||||
|
?edTraining a core:EducationalProcess .
|
||||||
|
?edTraining ?edTrainingProp ?edTrainingValue
|
||||||
|
}
|
||||||
|
UNION {
|
||||||
|
?subject ?property ?edTraining .
|
||||||
|
?edTraining a core:EducationalProcess .
|
||||||
|
?edTraining <http://purl.obolibrary.org/obo/RO_0000057> ?org .
|
||||||
|
?org a foaf:Organization .
|
||||||
|
}
|
||||||
|
UNION {
|
||||||
|
?subject ?property ?edTraining .
|
||||||
|
?edTraining a core:EducationalProcess .
|
||||||
|
?edTraining <http://purl.obolibrary.org/obo/RO_0000057> ?org .
|
||||||
|
?org a foaf:Organization .
|
||||||
|
?org rdfs:label ?orgName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</query-construct>
|
||||||
|
|
||||||
<query-construct>
|
<query-construct>
|
||||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||||
|
|
28
productMods/config/listViewConfig-orcidId.xml
Normal file
28
productMods/config/listViewConfig-orcidId.xml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||||
|
|
||||||
|
<!-- VIVO-specific default list view config file for object properties
|
||||||
|
|
||||||
|
See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||||
|
|
||||||
|
<list-view-config>
|
||||||
|
<query-select>
|
||||||
|
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||||
|
SELECT ?value ?localName
|
||||||
|
WHERE {
|
||||||
|
?subject ?property ?value
|
||||||
|
LET (?localName := afn:localname(?value))
|
||||||
|
} LIMIT 1
|
||||||
|
</query-select>
|
||||||
|
|
||||||
|
<query-construct>
|
||||||
|
|
||||||
|
CONSTRUCT {
|
||||||
|
?subject ?property ?value
|
||||||
|
} WHERE {
|
||||||
|
?subject ?property ?value
|
||||||
|
}
|
||||||
|
</query-construct>
|
||||||
|
|
||||||
|
<template>propStatement-orcidId.ftl</template>
|
||||||
|
</list-view-config>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||||
|
|
||||||
|
<#-- VIVO-specific default data property statement template.
|
||||||
|
|
||||||
|
This template must be self-contained and not rely on other variables set for the individual page, because it
|
||||||
|
is also used to generate the property statement during a deletion.
|
||||||
|
-->
|
||||||
|
<@showStatement statement />
|
||||||
|
|
||||||
|
<#macro showStatement statement>
|
||||||
|
<a href="${statement.value!}" title="ORCID iD" target="_blank">${statement.localName!statement.value!}</a>
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,87 @@
|
||||||
|
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||||
|
|
||||||
|
<#-- this is in request.subject.name -->
|
||||||
|
|
||||||
|
<#-- leaving this edit/add mode code in for reference in case we decide we need it -->
|
||||||
|
|
||||||
|
<#import "lib-vivo-form.ftl" as lvf>
|
||||||
|
|
||||||
|
<#--Retrieve certain edit configuration information-->
|
||||||
|
<#if editConfiguration.objectUri?has_content>
|
||||||
|
<#assign editMode = "edit">
|
||||||
|
<#else>
|
||||||
|
<#assign editMode = "add">
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#assign htmlForElements = editConfiguration.pageData.htmlForElements />
|
||||||
|
|
||||||
|
<#--Retrieve variables needed-->
|
||||||
|
<#assign orcidIdFromConf = lvf.getFormFieldValue(editSubmission, editConfiguration, "orcidId") />
|
||||||
|
<#assign orcidIdValue = orcidIdFromConf?replace("http://www.orcid.org/","") />
|
||||||
|
<#--If edit submission exists, then retrieve validation errors if they exist-->
|
||||||
|
<#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content>
|
||||||
|
<#assign submissionErrors = editSubmission.validationErrors/>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#if editMode == "edit">
|
||||||
|
<#assign titleVerb="${i18n().edit_capitalized}">
|
||||||
|
<#assign submitButtonText="${titleVerb}" + " ORCID iD">
|
||||||
|
<#assign disabledVal="disabled">
|
||||||
|
<#else>
|
||||||
|
<#assign titleVerb="${i18n().create_capitalized}">
|
||||||
|
<#assign submitButtonText="${titleVerb}" + " ORCID iD">
|
||||||
|
<#assign disabledVal=""/>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#assign requiredHint = "<span class='requiredHint'> *</span>" />
|
||||||
|
|
||||||
|
<h2>${titleVerb} ORCID iD ${i18n().for} ${editConfiguration.subjectName}</h2>
|
||||||
|
|
||||||
|
<#--Display error messages if any-->
|
||||||
|
<#if submissionErrors?has_content>
|
||||||
|
<section id="error-alert" role="alert">
|
||||||
|
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="${i18n().error_alert_icon}" />
|
||||||
|
<p>
|
||||||
|
<#--Checking if any required fields are empty-->
|
||||||
|
<#if lvf.submissionErrorExists(editSubmission, "orcidId")>
|
||||||
|
${i18n().required_fields}: ORCID iD<br />
|
||||||
|
</#if>
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<@lvf.unsupportedBrowser urls.base />
|
||||||
|
|
||||||
|
<section id="personHasOrcidId" role="region">
|
||||||
|
|
||||||
|
<form id="personHasOrcidId" class="customForm noIE67" action="${submitUrl}" role="add/edit orcidId">
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<label for="orcidId">ORCID iD ${requiredHint}</label>
|
||||||
|
<input size="35" type="text" id="orcidId" name="orcidId" value="${orcidIdValue}" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<input type="hidden" id="editKey" name="editKey" value="${editKey}"/>
|
||||||
|
|
||||||
|
<p class="submit">
|
||||||
|
<input type="submit" id="submit" value="${submitButtonText}"/><span class="or"> ${i18n().or} </span>
|
||||||
|
<a class="cancel" href="${cancelUrl}" title="${i18n().cancel_title}">${i18n().cancel_link}</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p id="requiredLegend" class="requiredHint">* ${i18n().required_fields}</p>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.8.9.custom.css" />')}
|
||||||
|
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/templates/freemarker/edit/forms/css/customForm.css" />')}
|
||||||
|
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/templates/freemarker/edit/forms/css/customFormWithAutocomplete.css" />')}
|
||||||
|
|
||||||
|
${scripts.add('<script type="text/javascript" src="${urls.base}/js/jquery-ui/js/jquery-ui-1.8.9.custom.min.js"></script>',
|
||||||
|
'<script type="text/javascript" src="${urls.base}/js/extensions/String.js"></script>',
|
||||||
|
'<script type="text/javascript" src="${urls.base}/js/browserUtils.js"></script>',
|
||||||
|
'<script type="text/javascript" src="${urls.base}/templates/freemarker/edit/forms/js/addOrcidIdToPersonUtils.js"></script>',
|
||||||
|
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/jquery.bgiframe.pack.js"></script>')}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
|
|
||||||
|
var addOrcidIdToPersonUtils = {
|
||||||
|
|
||||||
|
onLoad: function() {
|
||||||
|
this.initObjectReferences();
|
||||||
|
this.bindEventListeners();
|
||||||
|
},
|
||||||
|
|
||||||
|
initObjectReferences: function() {
|
||||||
|
|
||||||
|
this.form = $('#personHasOrcidId');
|
||||||
|
this.orcidId = $('#orcidId');
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
bindEventListeners: function() {
|
||||||
|
|
||||||
|
this.form.submit(function() {
|
||||||
|
addOrcidIdToPersonUtils.buildOrcidIdURL();
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
buildOrcidIdURL: function() {
|
||||||
|
|
||||||
|
var orcidBase = "http://www.orcid.org/";
|
||||||
|
var orcidIdVal = "";
|
||||||
|
if ( this.orcidId.val().length > 0 ) {
|
||||||
|
orcidIdVal = orcidBase + this.orcidId.val();
|
||||||
|
this.orcidId.val(orcidIdVal);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
$(document).ready(function() {
|
||||||
|
addOrcidIdToPersonUtils.onLoad();
|
||||||
|
});
|
|
@ -105,7 +105,6 @@ var awardReceiptUtils = {
|
||||||
rdfsLabel += " (" + this.subjectName + ")";
|
rdfsLabel += " (" + this.subjectName + ")";
|
||||||
}
|
}
|
||||||
this.recLabel.val(rdfsLabel);
|
this.recLabel.val(rdfsLabel);
|
||||||
alert(this.recLabel.val());
|
|
||||||
},
|
},
|
||||||
|
|
||||||
setYearAwardedValue: function() {
|
setYearAwardedValue: function() {
|
||||||
|
|
|
@ -37,9 +37,10 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
|
||||||
<#assign awardedDegreeLabelValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "awardedDegreeLabel") />
|
<#assign awardedDegreeLabelValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "awardedDegreeLabel") />
|
||||||
<#assign existingOrgValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "existingOrg") />
|
<#assign existingOrgValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "existingOrg") />
|
||||||
<#assign trainingTypeValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "trainingType")/>
|
<#assign trainingTypeValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "trainingType")/>
|
||||||
<#assign existingADLabelValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "existingAwardedDegreeLabel") />
|
<#--
|
||||||
|
<#assign existingADLabelValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "existingAwardedDegreeLabel") />
|
||||||
<#--If edit submission exists, then retrieve validation errors if they exist-->
|
-->
|
||||||
|
<#-- If edit submission exists, then retrieve validation errors if they exist-->
|
||||||
<#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content>
|
<#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content>
|
||||||
<#assign submissionErrors = editSubmission.validationErrors/>
|
<#assign submissionErrors = editSubmission.validationErrors/>
|
||||||
</#if>
|
</#if>
|
||||||
|
@ -164,12 +165,15 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
|
||||||
<option value="${key}" <#if degreeValue = key>selected</#if>>${degreeOpts[key]}</option>
|
<option value="${key}" <#if degreeValue = key>selected</#if>>${degreeOpts[key]}</option>
|
||||||
</#list>
|
</#list>
|
||||||
</select>
|
</select>
|
||||||
|
<#--
|
||||||
<#if editMode == "edit" || editMode == "repair">
|
<#if editMode == "edit" || editMode == "repair">
|
||||||
<input type="hidden" id="newAwardedDegreeLabel" name="awardedDegreeLabel" value=""/>
|
<input type="hidden" id="newAwardedDegreeLabel" name="awardedDegreeLabel" value=""/>
|
||||||
<input type="hidden" id="awardedDegreeLabel" name="existingAwardedDegreeLabel" value="${existingADLabelValue!}"/>
|
<input type="hidden" id="awardedDegreeLabel" name="existingAwardedDegreeLabel" value="${existingADLabelValue!}"/>
|
||||||
<#else>
|
<#else>
|
||||||
<input type="hidden" id="awardedDegreeLabel" name="awardedDegreeLabel" value=""/>
|
<input type="hidden" id="awardedDegreeLabel" name="awardedDegreeLabel" value=""/>
|
||||||
</#if>
|
</#if>
|
||||||
|
-->
|
||||||
|
<input type="hidden" id="awardedDegreeLabel" name="awardedDegreeLabel" value=""/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -358,6 +358,21 @@ local:informationResourceInEditorshipConfig a :ObjectPropertyDisplayConfig ;
|
||||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddEditorsToInformationResourceGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddEditorsToInformationResourceGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupbibobscure> .
|
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupbibobscure> .
|
||||||
|
|
||||||
|
local:editorOfContext a :ConfigContext ;
|
||||||
|
:hasConfiguration local:editorOfConfig ;
|
||||||
|
:configContextFor <http://vivoweb.org/ontology/core#relatedBy> ;
|
||||||
|
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
||||||
|
:qualifiedBy <http://vivoweb.org/ontology/core#Editorship> .
|
||||||
|
|
||||||
|
local:editorOfConfig a :ObjectPropertyDisplayConfig ;
|
||||||
|
:listViewConfigFile "listViewConfig-editorship.xml"^^xsd:string ;
|
||||||
|
:displayName "editor of" ;
|
||||||
|
vitro:displayRankAnnot 20;
|
||||||
|
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||||
|
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||||
|
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddEditorshipToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||||
|
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupbibliographic> .
|
||||||
|
|
||||||
### vcard properties ###
|
### vcard properties ###
|
||||||
|
|
||||||
local:mailingAddressContext a :ConfigContext ;
|
local:mailingAddressContext a :ConfigContext ;
|
||||||
|
@ -450,21 +465,6 @@ local:fullNameConfig a :ObjectPropertyDisplayConfig ;
|
||||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddFullNameToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddFullNameToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupaddress> .
|
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupaddress> .
|
||||||
|
|
||||||
local:editorOfContext a :ConfigContext ;
|
|
||||||
:hasConfiguration local:editorOfConfig ;
|
|
||||||
:configContextFor <http://vivoweb.org/ontology/core#relatedBy> ;
|
|
||||||
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Person> ;
|
|
||||||
:qualifiedBy <http://vivoweb.org/ontology/core#Editorship> .
|
|
||||||
|
|
||||||
local:editorOfConfig a :ObjectPropertyDisplayConfig ;
|
|
||||||
:listViewConfigFile "listViewConfig-editorship.xml"^^xsd:string ;
|
|
||||||
:displayName "editor of" ;
|
|
||||||
vitro:displayRankAnnot 20;
|
|
||||||
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
|
||||||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
|
||||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AddEditorshipToPersonGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
|
||||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupbibliographic> .
|
|
||||||
|
|
||||||
### properties using default editing form ##
|
### properties using default editing form ##
|
||||||
|
|
||||||
local:eventWithinContext a :ConfigContext ;
|
local:eventWithinContext a :ConfigContext ;
|
||||||
|
|
|
@ -96,6 +96,10 @@
|
||||||
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-hasAssociatedConcept.xml</display:listViewConfigFile>
|
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-hasAssociatedConcept.xml</display:listViewConfigFile>
|
||||||
</rdf:Description>
|
</rdf:Description>
|
||||||
|
|
||||||
|
<rdf:Description rdf:about="http://vivoweb.org/ontology/core#orcidId">
|
||||||
|
<display:listViewConfigFile rdf:datatype="http://www.w3.org/2001/XMLSchema#string">listViewConfig-orcidId.xml</display:listViewConfigFile>
|
||||||
|
</rdf:Description>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
******************************************************************
|
******************************************************************
|
||||||
data property custom list views
|
data property custom list views
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class AddEditorshipToPersonGenerator extends VivoBaseGenerator implements
|
||||||
"PREFIX bibo: <http://purl.org/ontology/bibo/> . \n" +
|
"PREFIX bibo: <http://purl.org/ontology/bibo/> . \n" +
|
||||||
"SELECT ?documentType WHERE { \n" +
|
"SELECT ?documentType WHERE { \n" +
|
||||||
" ?editorship vivo:relates ?existingDocument . \n" +
|
" ?editorship vivo:relates ?existingDocument . \n" +
|
||||||
" ?existingDocument a bibo:Document . \n" +
|
" ?existingDocument a <http://purl.obolibrary.org/obo/IAO_0000030> . \n" +
|
||||||
" ?existingDocument vitro:mostSpecificType ?documentType . \n" +
|
" ?existingDocument vitro:mostSpecificType ?documentType . \n" +
|
||||||
"}";
|
"}";
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ public class AddEditorshipToPersonGenerator extends VivoBaseGenerator implements
|
||||||
"PREFIX bibo: <http://purl.org/ontology/bibo/> . \n" +
|
"PREFIX bibo: <http://purl.org/ontology/bibo/> . \n" +
|
||||||
"SELECT ?documentLabel WHERE { \n" +
|
"SELECT ?documentLabel WHERE { \n" +
|
||||||
" ?editorship vivo:relates ?existingDocument . \n" +
|
" ?editorship vivo:relates ?existingDocument . \n" +
|
||||||
" ?existingDocument a bibo:Document . \n" +
|
" ?existingDocument a <http://purl.obolibrary.org/obo/IAO_0000030> . \n" +
|
||||||
" ?existingDocument <" + label + "> ?documentLabel . \n" +
|
" ?existingDocument <" + label + "> ?documentLabel . \n" +
|
||||||
"}";
|
"}";
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ public class AddEditorshipToPersonGenerator extends VivoBaseGenerator implements
|
||||||
"PREFIX bibo: <http://purl.org/ontology/bibo/> . \n" +
|
"PREFIX bibo: <http://purl.org/ontology/bibo/> . \n" +
|
||||||
"SELECT existingDocument WHERE { \n" +
|
"SELECT existingDocument WHERE { \n" +
|
||||||
" ?editorship vivo:relates ?existingDocument . \n" +
|
" ?editorship vivo:relates ?existingDocument . \n" +
|
||||||
" ?existingDocument a bibo:Document . \n" +
|
" ?existingDocument a <http://purl.obolibrary.org/obo/IAO_0000030> . \n" +
|
||||||
"}";
|
"}";
|
||||||
|
|
||||||
//Adding form specific data such as edit mode
|
//Adding form specific data such as edit mode
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
/* $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.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpSession;
|
||||||
|
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
|
import com.hp.hpl.jena.vocabulary.XSD;
|
||||||
|
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.IndividualsViaVClassOptions;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation;
|
||||||
|
|
||||||
|
public class AddOrcidIdToPersonGenerator extends VivoBaseGenerator implements
|
||||||
|
EditConfigurationGenerator {
|
||||||
|
private Log log = LogFactory.getLog(AddOrcidIdToPersonGenerator.class);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq,
|
||||||
|
HttpSession session) throws Exception {
|
||||||
|
|
||||||
|
EditConfigurationVTwo conf = new EditConfigurationVTwo();
|
||||||
|
|
||||||
|
initBasics(conf, vreq);
|
||||||
|
initPropertyParameters(vreq, session, conf);
|
||||||
|
initObjectPropForm(conf, vreq);
|
||||||
|
|
||||||
|
conf.setTemplate("addOrcidIdToPerson.ftl");
|
||||||
|
|
||||||
|
conf.setVarNameForSubject("person");
|
||||||
|
conf.setVarNameForPredicate("predicate");
|
||||||
|
conf.setVarNameForObject("orcidId");
|
||||||
|
|
||||||
|
conf.setN3Required( Arrays.asList( n3ForOrcidId ) );
|
||||||
|
|
||||||
|
conf.addNewResource("orcidId", DEFAULT_NS_FOR_NEW_RESOURCE);
|
||||||
|
|
||||||
|
conf.setUrisOnform(Arrays.asList("orcidId"));
|
||||||
|
|
||||||
|
// conf.addSparqlForAdditionalUrisInScope("orcidId", orcidIdQuery);
|
||||||
|
conf.addSparqlForExistingUris("orcidId", orcidIdQuery);
|
||||||
|
|
||||||
|
conf.addField( new FieldVTwo().
|
||||||
|
setName("orcidId").
|
||||||
|
setValidators( list("nonempty") ));
|
||||||
|
|
||||||
|
conf.addValidator(new AntiXssValidation());
|
||||||
|
|
||||||
|
prepare(vreq, conf);
|
||||||
|
return conf;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* N3 assertions */
|
||||||
|
|
||||||
|
final static String n3ForOrcidId =
|
||||||
|
"@prefix owl: <http://www.w3.org/2002/07/owl#> .\n"+
|
||||||
|
"?person <http://vivoweb.org/ontology/core#orcidId> ?orcidId . \n" +
|
||||||
|
"?orcidId a owl:Thing . " ;
|
||||||
|
|
||||||
|
/* Queries for editing an existing entry */
|
||||||
|
|
||||||
|
final static String orcidIdQuery =
|
||||||
|
"SELECT ?existingOrcidId WHERE { \n" +
|
||||||
|
"?person <http://vivoweb.org/ontology/core#orcidId> ?existingOrcidId . \n" +
|
||||||
|
"}";
|
||||||
|
|
||||||
|
}
|
|
@ -89,14 +89,11 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
|
||||||
conf.setVarNameForObject("edTraining");
|
conf.setVarNameForObject("edTraining");
|
||||||
|
|
||||||
conf.setN3Required( Arrays.asList( n3ForNewEdTraining, trainingTypeAssertion ) );
|
conf.setN3Required( Arrays.asList( n3ForNewEdTraining, trainingTypeAssertion ) );
|
||||||
conf.setN3Optional(Arrays.asList(
|
conf.setN3Optional(Arrays.asList( majorFieldAssertion, n3ForAwardedDegree, n3ForNewOrganization, n3ForExistingOrganization,
|
||||||
n3ForNewOrgExistingAwardedDegree, n3ForExistingOrgExistingAwardedDegree, n3ForNewAwardedDegreeNewOrg,
|
n3ForNewOrgAwardedDegree, n3ForExistingOrgAwardedDegree, deptAssertion, infoAssertion, n3ForStart, n3ForEnd ));
|
||||||
majorFieldAssertion, n3ForNewAwardedDegreeExistingOrg,
|
|
||||||
//existingDegreeTypeAssertion,
|
|
||||||
existingAwardedDegreeLabel, deptAssertion, infoAssertion, n3ForStart, n3ForEnd ));
|
|
||||||
|
|
||||||
conf.addNewResource("edTraining", DEFAULT_NS_FOR_NEW_RESOURCE);
|
conf.addNewResource("edTraining", DEFAULT_NS_FOR_NEW_RESOURCE);
|
||||||
conf.addNewResource("newAwardedDegree",DEFAULT_NS_FOR_NEW_RESOURCE);
|
conf.addNewResource("awardedDegree",DEFAULT_NS_FOR_NEW_RESOURCE);
|
||||||
conf.addNewResource("newOrg",DEFAULT_NS_FOR_NEW_RESOURCE);
|
conf.addNewResource("newOrg",DEFAULT_NS_FOR_NEW_RESOURCE);
|
||||||
conf.addNewResource("intervalNode",DEFAULT_NS_FOR_NEW_RESOURCE);
|
conf.addNewResource("intervalNode",DEFAULT_NS_FOR_NEW_RESOURCE);
|
||||||
conf.addNewResource("startNode",DEFAULT_NS_FOR_NEW_RESOURCE);
|
conf.addNewResource("startNode",DEFAULT_NS_FOR_NEW_RESOURCE);
|
||||||
|
@ -105,12 +102,12 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
|
||||||
//uris in scope: none
|
//uris in scope: none
|
||||||
//literals in scope: none
|
//literals in scope: none
|
||||||
|
|
||||||
conf.setUrisOnform( Arrays.asList( "existingOrg", "orgType", "existingAwardedDegree", "degreeType", "trainingType"));
|
conf.setUrisOnform( Arrays.asList( "existingOrg", "orgType", "degreeType", "trainingType"));
|
||||||
conf.setLiteralsOnForm( Arrays.asList("orgLabel", "orgLabelDisplay", "awardedDegreeLabel", "existingAwardedDegreeLabel",
|
conf.setLiteralsOnForm( Arrays.asList("orgLabel", "orgLabelDisplay", "awardedDegreeLabel",
|
||||||
"majorField", "dept", "info"));
|
"majorField", "dept", "info"));
|
||||||
|
|
||||||
conf.addSparqlForExistingLiteral("orgLabel", orgLabelQuery);
|
conf.addSparqlForExistingLiteral("orgLabel", orgLabelQuery);
|
||||||
conf.addSparqlForExistingLiteral("existingAwardedDegreeLabel", existingAwardedDegreeLabelQuery);
|
// conf.addSparqlForExistingLiteral("existingAwardedDegreeLabel", existingAwardedDegreeLabelQuery);
|
||||||
conf.addSparqlForExistingLiteral("majorField", majorFieldQuery);
|
conf.addSparqlForExistingLiteral("majorField", majorFieldQuery);
|
||||||
conf.addSparqlForExistingLiteral("dept", deptQuery);
|
conf.addSparqlForExistingLiteral("dept", deptQuery);
|
||||||
conf.addSparqlForExistingLiteral("info", infoQuery);
|
conf.addSparqlForExistingLiteral("info", infoQuery);
|
||||||
|
@ -118,7 +115,7 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
|
||||||
conf.addSparqlForExistingLiteral("endField-value", existingEndDateQuery);
|
conf.addSparqlForExistingLiteral("endField-value", existingEndDateQuery);
|
||||||
|
|
||||||
|
|
||||||
conf.addSparqlForExistingUris("existingAwardedDegree", existingAwardedDegreeQuery);
|
conf.addSparqlForExistingUris("awardedDegree", existingAwardedDegreeQuery);
|
||||||
conf.addSparqlForExistingUris("existingOrg", existingOrgQuery);
|
conf.addSparqlForExistingUris("existingOrg", existingOrgQuery);
|
||||||
conf.addSparqlForExistingUris("orgType", orgTypeQuery);
|
conf.addSparqlForExistingUris("orgType", orgTypeQuery);
|
||||||
conf.addSparqlForExistingUris("trainingType", trainingTypeQuery);
|
conf.addSparqlForExistingUris("trainingType", trainingTypeQuery);
|
||||||
|
@ -147,7 +144,7 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
|
||||||
);
|
);
|
||||||
|
|
||||||
conf.addField( new FieldVTwo().
|
conf.addField( new FieldVTwo().
|
||||||
setName("existingAwardedDegree")
|
setName("awardedDegree")
|
||||||
//options will be added in browser by auto complete JS
|
//options will be added in browser by auto complete JS
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -216,7 +213,6 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
|
||||||
prepare(vreq, conf);
|
prepare(vreq, conf);
|
||||||
return conf;
|
return conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* N3 assertions for working with educational training */
|
/* N3 assertions for working with educational training */
|
||||||
|
|
||||||
|
@ -229,56 +225,41 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
|
||||||
final static String trainingTypeAssertion =
|
final static String trainingTypeAssertion =
|
||||||
"?edTraining a ?trainingType .";
|
"?edTraining a ?trainingType .";
|
||||||
|
|
||||||
final static String n3ForNewAwardedDegreeNewOrg =
|
final static String n3ForAwardedDegree =
|
||||||
"@prefix core: <"+ vivoCore +"> .\n"+
|
"@prefix core: <"+ vivoCore +"> .\n"+
|
||||||
"?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?newAwardedDegree . \n" +
|
"?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?awardedDegree . \n" +
|
||||||
"?newAwardedDegree <http://purl.obolibrary.org/obo/RO_0002353> ?edTraining . \n" +
|
"?awardedDegree <http://purl.obolibrary.org/obo/RO_0002353> ?edTraining . \n" +
|
||||||
"?newAwardedDegree <http://vivoweb.org/ontology/core#relates> ?person . \n" +
|
"?awardedDegree <http://vivoweb.org/ontology/core#relates> ?person . \n" +
|
||||||
"?person <http://vivoweb.org/ontology/core#relatedBy> ?newAwardedDegree . \n" +
|
"?person <http://vivoweb.org/ontology/core#relatedBy> ?awardedDegree . \n" +
|
||||||
"?newAwardedDegree <"+ label +"> ?awardedDegreeLabel . \n" +
|
"?awardedDegree <"+ label +"> ?awardedDegreeLabel . \n" +
|
||||||
"?newAwardedDegree <http://vivoweb.org/ontology/core#assignedBy> ?newOrg . \n" +
|
"?awardedDegree <http://vivoweb.org/ontology/core#relates> ?degreeType .\n"+
|
||||||
"?newOrg <http://vivoweb.org/ontology/core#assigns> ?newAwardedDegree . \n" +
|
"?degreeType <http://vivoweb.org/ontology/core#relatedBy> ?awardedDegree . \n"+
|
||||||
"?newOrg a ?orgType . \n" +
|
"?awardedDegree a core:AwardedDegree .";
|
||||||
"?newOrg <"+ label +"> ?orgLabel . \n" +
|
|
||||||
|
final static String n3ForNewOrganization =
|
||||||
"?edTraining <http://purl.obolibrary.org/obo/RO_0000057> ?newOrg . \n" +
|
"?edTraining <http://purl.obolibrary.org/obo/RO_0000057> ?newOrg . \n" +
|
||||||
"?newOrg <http://purl.obolibrary.org/obo/RO_0000056> ?edTraining . \n" +
|
"?newOrg <http://purl.obolibrary.org/obo/RO_0000056> ?edTraining . \n" +
|
||||||
"?newAwardedDegree <http://vivoweb.org/ontology/core#relates> ?degreeType .\n"+
|
"?newOrg a ?orgType . \n" +
|
||||||
"?degreeType <http://vivoweb.org/ontology/core#relatedBy> ?newAwardedDegree . \n"+
|
"?newOrg <"+ label +"> ?orgLabel . ";
|
||||||
"?newAwardedDegree a core:AwardedDegree .";
|
|
||||||
|
|
||||||
final static String n3ForNewAwardedDegreeExistingOrg =
|
final static String n3ForExistingOrganization =
|
||||||
"@prefix core: <"+ vivoCore +"> .\n"+
|
|
||||||
"?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?newAwardedDegree . \n" +
|
|
||||||
"?newAwardedDegree <http://purl.obolibrary.org/obo/RO_0002353> ?edTraining . \n" +
|
|
||||||
"?newAwardedDegree <http://vivoweb.org/ontology/core#relates> ?person . \n" +
|
|
||||||
"?person <http://vivoweb.org/ontology/core#relatedBy> ?newAwardedDegree . \n" +
|
|
||||||
"?newAwardedDegree <"+ label +"> ?awardedDegreeLabel . \n" +
|
|
||||||
"?existingOrg <http://vivoweb.org/ontology/core#assigns> ?newAwardedDegree . \n" +
|
|
||||||
"?newAwardedDegree <http://vivoweb.org/ontology/core#assignedBy> ?existingOrg . \n" +
|
|
||||||
"?newAwardedDegree <http://vivoweb.org/ontology/core#relates> ?degreeType .\n"+
|
|
||||||
"?edTraining <http://purl.obolibrary.org/obo/RO_0000057> ?existingOrg . \n" +
|
"?edTraining <http://purl.obolibrary.org/obo/RO_0000057> ?existingOrg . \n" +
|
||||||
"?existingOrg <http://purl.obolibrary.org/obo/RO_0000056> ?edTraining . \n" +
|
"?existingOrg <http://purl.obolibrary.org/obo/RO_0000056> ?edTraining . \n" +
|
||||||
"?degreeType <http://vivoweb.org/ontology/core#relatedBy> ?newAwardedDegree . \n"+
|
|
||||||
"?newAwardedDegree a core:AwardedDegree .";
|
|
||||||
|
|
||||||
final static String existingAwardedDegreeLabel =
|
|
||||||
"?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?existingAwardedDegree . \n" +
|
|
||||||
"?existingAwardedDegree <http://purl.obolibrary.org/obo/RO_0002353> ?edTraining . \n" +
|
|
||||||
"?existingAwardedDegree <http://vivoweb.org/ontology/core#relates> ?degreeType .\n"+
|
|
||||||
"?degreeType <http://vivoweb.org/ontology/core#relatedBy> ?existingAwardedDegree . \n"+
|
|
||||||
"?existingAwardedDegree <"+ label +"> ?existingAwardedDegreeLabel . " ;
|
|
||||||
|
|
||||||
final static String n3ForNewOrgExistingAwardedDegree =
|
|
||||||
"?existingAwardedDegree <http://vivoweb.org/ontology/core#assignedBy> ?newOrg . \n" +
|
|
||||||
"?newOrg <http://vivoweb.org/ontology/core#assigns> ?existingAwardedDegree . \n" +
|
|
||||||
"?newOrg <"+ label +"> ?orgLabel . \n" +
|
|
||||||
"?newOrg a ?orgType .";
|
|
||||||
|
|
||||||
final static String n3ForExistingOrgExistingAwardedDegree =
|
|
||||||
"?existingAwardedDegree <http://vivoweb.org/ontology/core#assignedBy> ?existingOrg . \n" +
|
|
||||||
"?existingOrg <http://vivoweb.org/ontology/core#assigns> ?existingAwardedDegree . \n" +
|
|
||||||
"?existingOrg a ?orgType . ";
|
"?existingOrg a ?orgType . ";
|
||||||
|
|
||||||
|
final static String n3ForNewOrgAwardedDegree =
|
||||||
|
"?awardedDegree <http://vivoweb.org/ontology/core#assignedBy> ?newOrg . \n" +
|
||||||
|
"?newOrg <http://vivoweb.org/ontology/core#assigns> ?awardedDegree . \n" +
|
||||||
|
"?newOrg a ?orgType . \n" +
|
||||||
|
"?awardedDegree <"+ label +"> ?awardedDegreeLabel . \n" +
|
||||||
|
"?newOrg <"+ label +"> ?orgLabel . ";
|
||||||
|
|
||||||
|
final static String n3ForExistingOrgAwardedDegree =
|
||||||
|
"?awardedDegree <http://vivoweb.org/ontology/core#assignedBy> ?existingOrg . \n" +
|
||||||
|
"?existingOrg <http://vivoweb.org/ontology/core#assigns> ?awardedDegree . \n" +
|
||||||
|
"?awardedDegree <"+ label +"> ?awardedDegreeLabel . \n" +
|
||||||
|
"?existingOrg a ?orgType . ";
|
||||||
|
|
||||||
final static String majorFieldAssertion =
|
final static String majorFieldAssertion =
|
||||||
"?edTraining <"+ majorFieldPred +"> ?majorField .";
|
"?edTraining <"+ majorFieldPred +"> ?majorField .";
|
||||||
|
|
||||||
|
@ -316,16 +297,21 @@ public class PersonHasEducationalTraining extends VivoBaseGenerator implements
|
||||||
"?existingAwardedDegree <"+ label +"> ?existingAwardedDegreeLabel }\n";
|
"?existingAwardedDegree <"+ label +"> ?existingAwardedDegreeLabel }\n";
|
||||||
|
|
||||||
final static String existingOrgQuery =
|
final static String existingOrgQuery =
|
||||||
|
"PREFIX rdfs: <"+ rdfs +"> \n"+
|
||||||
"SELECT ?existingOrg WHERE {\n"+
|
"SELECT ?existingOrg WHERE {\n"+
|
||||||
"?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?existingAwardedDegree . \n" +
|
"?edTraining <http://purl.obolibrary.org/obo/RO_0000057> ?existingOrg . \n" +
|
||||||
"?existingAwardedDegree <http://vivoweb.org/ontology/core#assignedBy> ?existingOrg . }\n";
|
"?existingOrg <http://purl.obolibrary.org/obo/RO_0000056> ?edTraining . \n" +
|
||||||
|
"?existingOrg a ?existingOrgType . \n " +
|
||||||
|
"?existingOrgType rdfs:subClassOf <"+ orgClass +"> . }";
|
||||||
|
|
||||||
final static String orgLabelQuery =
|
final static String orgLabelQuery =
|
||||||
|
"PREFIX rdfs: <"+ rdfs +"> \n"+
|
||||||
"SELECT ?existingOrgLabel WHERE {\n"+
|
"SELECT ?existingOrgLabel WHERE {\n"+
|
||||||
"?edTraining <http://purl.obolibrary.org/obo/RO_0002234> ?existingAwardedDegree . \n" +
|
"?edTraining <http://purl.obolibrary.org/obo/RO_0000057> ?existingOrg . \n" +
|
||||||
"?existingAwardedDegree <http://vivoweb.org/ontology/core#assignedBy> ?existingOrg .\n"+
|
"?existingOrg <http://purl.obolibrary.org/obo/RO_0000056> ?edTraining .\n"+
|
||||||
"?existingOrg <"+ label +"> ?existingOrgLabel .\n"+
|
"?existingOrg <"+ label +"> ?existingOrgLabel .\n"+
|
||||||
"}";
|
"?existingOrg a ?existingOrgType . \n " +
|
||||||
|
"?existingOrgType rdfs:subClassOf <"+ orgClass +"> . }";
|
||||||
|
|
||||||
/* Limit type to subclasses of foaf:Organization. Otherwise, sometimes owl:Thing or another
|
/* Limit type to subclasses of foaf:Organization. Otherwise, sometimes owl:Thing or another
|
||||||
type is returned and we don't get a match to the select element options. */
|
type is returned and we don't get a match to the select element options. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue