VIVO-425, VIVO-422 and VIVO-424
This commit is contained in:
parent
f0844317a4
commit
239d075127
10 changed files with 466 additions and 7 deletions
|
@ -349,7 +349,7 @@ selected_conference = Conferencia Seleccionado
|
||||||
years_participation_in = Años de participación en
|
years_participation_in = Años de participación en
|
||||||
|
|
||||||
grant_entry_for = autorizará la entrada de
|
grant_entry_for = autorizará la entrada de
|
||||||
select_existing_pub_or_enter_new = Por favor seleccione una subvención actual en el campo de título o ingresar uno nuevo.
|
select_existing_pub_or_enter_new = Por favor seleccione una publicación actual en el campo de título o ingresar uno nuevo.
|
||||||
unable_to_handle_grant_editing = Esta forma no es capaz de manejar la edición de esta subvención, ya que se asocia con múltiples individuos subvención.
|
unable_to_handle_grant_editing = Esta forma no es capaz de manejar la edición de esta subvención, ya que se asocia con múltiples individuos subvención.
|
||||||
grant_type = concesión de la
|
grant_type = concesión de la
|
||||||
|
|
||||||
|
@ -871,3 +871,5 @@ create_publication_date = Crear fecha de publicación
|
||||||
edit_publication_date = Editar fecha de publicación
|
edit_publication_date = Editar fecha de publicación
|
||||||
name_prefix = Prefijo de nombre
|
name_prefix = Prefijo de nombre
|
||||||
name_suffix = Sufijo de nombre
|
name_suffix = Sufijo de nombre
|
||||||
|
administering_organization_for = administración de la organización para
|
||||||
|
missing_credential = falta credencial
|
57
productMods/config/listViewConfig-grantAdministeredBy.xml
Normal file
57
productMods/config/listViewConfig-grantAdministeredBy.xml
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
<?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: <http://xmlns.com/foaf/0.1/>
|
||||||
|
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||||
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
PREFIX obo: <http://purl.obolibrary.org/obo/>
|
||||||
|
|
||||||
|
SELECT DISTINCT ?administratorRole
|
||||||
|
?organization
|
||||||
|
?organizationLabel
|
||||||
|
|
||||||
|
WHERE {
|
||||||
|
?subject ?property ?administratorRole .
|
||||||
|
?administratorRole a core:AdministratorRole .
|
||||||
|
OPTIONAL { ?administratorRole obo:RO_0000052 ?organization .
|
||||||
|
?organization a foaf:Organization .
|
||||||
|
?organization obo:RO_0000053 ?administratorRole .
|
||||||
|
?organization rdfs:label ?organizationLabel .
|
||||||
|
}
|
||||||
|
} ORDER BY ?organizationLabel
|
||||||
|
</query-select>
|
||||||
|
|
||||||
|
<query-construct>
|
||||||
|
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||||
|
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||||
|
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||||
|
PREFIX obo: <http://purl.obolibrary.org/obo/>
|
||||||
|
|
||||||
|
CONSTRUCT {
|
||||||
|
?subject ?property ?administratorRole .
|
||||||
|
?administratorRole a core:AdministratorRole .
|
||||||
|
?administratorRole obo:RO_0000052 ?organization .
|
||||||
|
?organization a foaf:Organization .
|
||||||
|
?organization obo:RO_0000053 ?administratorRole .
|
||||||
|
?organization rdfs:label ?organizationLabel .
|
||||||
|
} WHERE {
|
||||||
|
{
|
||||||
|
?subject ?property ?administratorRole .
|
||||||
|
?administratorRole a core:AdministratorRole .
|
||||||
|
} UNION {
|
||||||
|
?subject ?property ?administratorRole .
|
||||||
|
?administratorRole a core:AdministratorRole .
|
||||||
|
?administratorRole obo:RO_0000052 ?organization .
|
||||||
|
?organization a foaf:Organization .
|
||||||
|
?organization obo:RO_0000053 ?administratorRole .
|
||||||
|
?organization rdfs:label ?organizationLabel .
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</query-construct>
|
||||||
|
|
||||||
|
<template>propStatement-grantAdministeredBy.ftl</template>
|
||||||
|
</list-view-config>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||||
|
|
||||||
|
<#--
|
||||||
|
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
<#import "lib-sequence.ftl" as s>
|
||||||
|
<#import "lib-datetime.ftl" as dt>
|
||||||
|
<@showAdministrator statement />
|
||||||
|
|
||||||
|
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
|
||||||
|
next statement -->
|
||||||
|
<#macro showAdministrator statement>
|
||||||
|
|
||||||
|
<#local linkedIndividual>
|
||||||
|
<#if statement.organization??>
|
||||||
|
<a href="${profileUrl(statement.uri("organization"))}" title="${i18n().organization_name}">${statement.organizationLabel!""}</a>
|
||||||
|
<#else>
|
||||||
|
<a href="${profileUrl(statement.uri("administratorRole"))}" title="${i18n().administering_organization_for}">${i18n().missing_organization}</a>
|
||||||
|
</#if>
|
||||||
|
</#local>
|
||||||
|
|
||||||
|
${linkedIndividual!}
|
||||||
|
|
||||||
|
</#macro>
|
|
@ -17,7 +17,7 @@
|
||||||
<#if statement.credential??>
|
<#if statement.credential??>
|
||||||
<a href="${profileUrl(statement.uri("credential"))}" title="${i18n().credential_name}">${statement.credentialLabel!statement.issuedCredentialLabel!statement.credentialLocal!}</a>
|
<a href="${profileUrl(statement.uri("credential"))}" title="${i18n().credential_name}">${statement.credentialLabel!statement.issuedCredentialLabel!statement.credentialLocal!}</a>
|
||||||
<#else>
|
<#else>
|
||||||
<a href="${profileUrl(statement.uri("issuedCredential"))}" title="${i18n().credential_name}">${statement.issuedCredentialLabel!"missing credential"}</a>
|
<a href="${profileUrl(statement.uri("issuedCredential"))}" title="${i18n().credential_name}">${statement.issuedCredentialLabel!"${i18n().missing_credential}"}</a>
|
||||||
</#if>
|
</#if>
|
||||||
</#local>
|
</#local>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,136 @@
|
||||||
|
<#-- $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>
|
||||||
|
|
||||||
|
<#--The blank sentinel indicates what value should be put in a URI when no autocomplete result has been selected.
|
||||||
|
If the blank value is non-null or non-empty, n3 editing for an existing object will remove the original relationship
|
||||||
|
if nothing is selected for that object-->
|
||||||
|
<#assign blankSentinel = "" />
|
||||||
|
<#if editConfigurationConstants?has_content && editConfigurationConstants?keys?seq_contains("BLANK_SENTINEL")>
|
||||||
|
<#assign blankSentinel = editConfigurationConstants["BLANK_SENTINEL"] />
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#--This flag is for clearing the label field on submission for an existing object being selected from autocomplete.
|
||||||
|
Set this flag on the input acUriReceiver where you would like this behavior to occur. -->
|
||||||
|
<#assign flagClearLabelForExisting = "flagClearLabelForExisting" />
|
||||||
|
|
||||||
|
<#assign htmlForElements = editConfiguration.pageData.htmlForElements />
|
||||||
|
|
||||||
|
<#--Retrieve variables needed-->
|
||||||
|
<#assign existingOrgValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "existingOrganization") />
|
||||||
|
<#assign orgLabelValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "orgLabel") />
|
||||||
|
<#assign orgLabelDisplayValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "orgLabelDisplay") />
|
||||||
|
|
||||||
|
<#--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="${i18n().save_changes}">
|
||||||
|
<#assign disabledVal="disabled">
|
||||||
|
<#else>
|
||||||
|
<#assign titleVerb="${i18n().create_capitalized}">
|
||||||
|
<#assign submitButtonText="${i18n().create_entry}">
|
||||||
|
<#assign disabledVal=""/>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#assign requiredHint = "<span class='requiredHint'> *</span>" />
|
||||||
|
|
||||||
|
<h2>${titleVerb} ${i18n().administering_organization_for} ${editConfiguration.subjectName}</h2>
|
||||||
|
|
||||||
|
<#--Display error messages if any-->
|
||||||
|
<#if submissionErrors?has_content>
|
||||||
|
<#if orgLabelDisplayValue?has_content >
|
||||||
|
<#assign orgLabelValue = orgLabelDisplayValue />
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<section id="error-alert" role="alert">
|
||||||
|
<img src="${urls.images}/iconAlert.png" width="24" height="24" alt="${i18n().error_alert_icon}" />
|
||||||
|
<p>
|
||||||
|
<#--Checking if any required fields are empty-->
|
||||||
|
<#if lvf.submissionErrorExists(editSubmission, "orgLabel")>
|
||||||
|
${i18n().select_or_create_organization}
|
||||||
|
</#if>
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<@lvf.unsupportedBrowser urls.base />
|
||||||
|
|
||||||
|
<section id="grantAdministeredBy" role="region">
|
||||||
|
|
||||||
|
<form id="grantAdministeredBy" class="customForm noIE67" action="${submitUrl}" role="add/edit AdministeredGrant">
|
||||||
|
<p>
|
||||||
|
<label for="relatedIndLabel">${i18n().organization_capitalized} ${requiredHint}</label>
|
||||||
|
<input class="acSelector" size="50" type="text" id="organization" acGroupName="organization" name="orgLabel" value="${orgLabelValue}">
|
||||||
|
<input class="display" type="hidden" id="organizationDisplay" acGroupName="organization" name="orgLabelDisplay" value="${orgLabelDisplayValue}">
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="acSelection" acGroupName="organization" id="organizationAcSelection">
|
||||||
|
<p class="inline">
|
||||||
|
<label>${i18n().selected_organization}:</label>
|
||||||
|
<span class="acSelectionInfo"></span>
|
||||||
|
<a href="" class="verifyMatch" title="${i18n().verify_match_capitalized}">(${i18n().verify_match_capitalized}</a> ${i18n().or}
|
||||||
|
<a href="#" class="changeSelection" id="changeSelection">${i18n().change_selection})</a>
|
||||||
|
</p>
|
||||||
|
<input class="acUriReceiver" type="hidden" id="orgUri" name="existingOrganization" value="${existingOrgValue}" ${flagClearLabelForExisting}="true" />
|
||||||
|
</div>
|
||||||
|
<#assign htmlForElements = editConfiguration.pageData.htmlForElements />
|
||||||
|
|
||||||
|
<input type="hidden" id="editKey" name="editKey" value="${editKey}"/>
|
||||||
|
|
||||||
|
<p class="submit">
|
||||||
|
<input type="submit" class="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>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var customFormData = {
|
||||||
|
acUrl: '${urls.base}/autocomplete?tokenize=true&stem=true',
|
||||||
|
acTypes: {organization: 'http://xmlns.com/foaf/0.1/Organization'},
|
||||||
|
editMode: '${editMode}',
|
||||||
|
defaultTypeName: 'organization',
|
||||||
|
baseHref: '${urls.base}/individual?uri=',
|
||||||
|
blankSentinel: '${blankSentinel}',
|
||||||
|
flagClearLabelForExisting: '${flagClearLabelForExisting}'
|
||||||
|
};
|
||||||
|
var i18nStrings = {
|
||||||
|
selectAnExisting: '${i18n().select_an_existing}',
|
||||||
|
orCreateNewOne: '${i18n().or_create_new_one}',
|
||||||
|
selectedString: '${i18n().selected}',
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
${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/customFormUtils.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}/js/jquery_plugins/jquery.bgiframe.pack.js"></script>',
|
||||||
|
'<script type="text/javascript" src="${urls.base}/templates/freemarker/edit/forms/js/customFormWithAutocomplete.js"></script>')}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
|
||||||
<#assign requiredHint = "<span class='requiredHint'> *</span>" />
|
<#assign requiredHint = "<span class='requiredHint'> *</span>" />
|
||||||
<#assign yearHint = "<span class='hint'>(${i18n().year_hint_format})</span>" />
|
<#assign yearHint = "<span class='hint'>(${i18n().year_hint_format})</span>" />
|
||||||
|
|
||||||
<h2>${titleVerb} ${i18n().credentials} ${editConfiguration.subjectName}</h2>
|
<h2>${titleVerb} ${i18n().credentials} ${i18n().for} ${editConfiguration.subjectName}</h2>
|
||||||
|
|
||||||
<#--Display error messages if any-->
|
<#--Display error messages if any-->
|
||||||
<#if submissionErrors?has_content>
|
<#if submissionErrors?has_content>
|
||||||
|
|
|
@ -411,6 +411,21 @@ local:issuedCredentialConfig a :ObjectPropertyDisplayConfig ;
|
||||||
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasIssuedCredentialGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.PersonHasIssuedCredentialGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupbiography> .
|
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupbiography> .
|
||||||
|
|
||||||
|
local:grantAdministeredByContext a :ConfigContext ;
|
||||||
|
:hasConfiguration local:grantAdministeredByConfig ;
|
||||||
|
:configContextFor vivo:relates ;
|
||||||
|
:qualifiedByDomain vivo:Grant ;
|
||||||
|
:qualifiedBy vivo:AdministratorRole .
|
||||||
|
|
||||||
|
local:grantAdministeredByConfig a :ObjectPropertyDisplayConfig ;
|
||||||
|
:listViewConfigFile "listViewConfig-grantAdministeredBy.xml"^^xsd:string ;
|
||||||
|
:displayName "grant administered by" ;
|
||||||
|
vitro:displayRankAnnot 1;
|
||||||
|
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||||
|
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||||
|
vitro:customEntryFormAnnot "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.GrantAdministeredByGenerator"^^<http://www.w3.org/2001/XMLSchema#string> ;
|
||||||
|
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupoverview> .
|
||||||
|
|
||||||
### vcard properties ###
|
### vcard properties ###
|
||||||
|
|
||||||
local:mailingAddressContext a :ConfigContext ;
|
local:mailingAddressContext a :ConfigContext ;
|
||||||
|
@ -637,6 +652,104 @@ local:inEventSeriesConfig a :ObjectPropertyDisplayConfig ;
|
||||||
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||||
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupoverview> .
|
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupoverview> .
|
||||||
|
|
||||||
|
local:eventLocationContext a :ConfigContext ;
|
||||||
|
:hasConfiguration local:eventLocationConfig ;
|
||||||
|
:configContextFor <http://purl.obolibrary.org/obo/RO_0001025> ;
|
||||||
|
:qualifiedByDomain <http://purl.org/NET/c4dm/event.owl#Event> ;
|
||||||
|
:qualifiedBy vivo:GeographicLocation .
|
||||||
|
|
||||||
|
local:eventLocationConfig a :ObjectPropertyDisplayConfig ;
|
||||||
|
:listViewConfigFile "listViewConfig-default.xml"^^xsd:string ;
|
||||||
|
:displayName "has geographic location" ;
|
||||||
|
vitro:displayRankAnnot 2;
|
||||||
|
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||||
|
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||||
|
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGrouplocation> .
|
||||||
|
|
||||||
|
local:courseOfferedByContext a :ConfigContext ;
|
||||||
|
:hasConfiguration local:courseOfferedByConfig ;
|
||||||
|
:configContextFor vivo:offeredBy ;
|
||||||
|
:qualifiedByDomain vivo:Course ;
|
||||||
|
:qualifiedBy <http://xmlns.com/foaf/0.1/Organization> .
|
||||||
|
|
||||||
|
local:courseOfferedByConfig a :ObjectPropertyDisplayConfig ;
|
||||||
|
:listViewConfigFile "listViewConfig-default.xml"^^xsd:string ;
|
||||||
|
:displayName "offered by" ;
|
||||||
|
vitro:displayRankAnnot 2;
|
||||||
|
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||||
|
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||||
|
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupoverview> .
|
||||||
|
|
||||||
|
local:orgOffersCourseContext a :ConfigContext ;
|
||||||
|
:hasConfiguration local:orgOffersCourseConfig ;
|
||||||
|
:configContextFor vivo:offers ;
|
||||||
|
:qualifiedByDomain <http://xmlns.com/foaf/0.1/Organization> ;
|
||||||
|
:qualifiedBy vivo:Course .
|
||||||
|
|
||||||
|
local:orgOffersCourseConfig a :ObjectPropertyDisplayConfig ;
|
||||||
|
:listViewConfigFile "listViewConfig-default.xml"^^xsd:string ;
|
||||||
|
:displayName "offers course" ;
|
||||||
|
vitro:displayRankAnnot 2;
|
||||||
|
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||||
|
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||||
|
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupother> .
|
||||||
|
|
||||||
|
local:collegeOffersDegreeContext a :ConfigContext ;
|
||||||
|
:hasConfiguration local:collegeOffersDegreeConfig ;
|
||||||
|
:configContextFor vivo:offers ;
|
||||||
|
:qualifiedByDomain vivo:College ;
|
||||||
|
:qualifiedBy vivo:AcademicDegree .
|
||||||
|
|
||||||
|
local:collegeOffersDegreeConfig a :ObjectPropertyDisplayConfig ;
|
||||||
|
:listViewConfigFile "listViewConfig-default.xml"^^xsd:string ;
|
||||||
|
:displayName "offers degree" ;
|
||||||
|
vitro:displayRankAnnot 2;
|
||||||
|
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||||
|
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||||
|
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupoverview> .
|
||||||
|
|
||||||
|
local:deptOffersDegreeContext a :ConfigContext ;
|
||||||
|
:hasConfiguration local:debtOffersDegreeConfig ;
|
||||||
|
:configContextFor vivo:offers ;
|
||||||
|
:qualifiedByDomain vivo:AcademicDepartment ;
|
||||||
|
:qualifiedBy vivo:AcademicDegree .
|
||||||
|
|
||||||
|
local:deptOffersDegreeConfig a :ObjectPropertyDisplayConfig ;
|
||||||
|
:listViewConfigFile "listViewConfig-default.xml"^^xsd:string ;
|
||||||
|
:displayName "offers degree" ;
|
||||||
|
vitro:displayRankAnnot 2;
|
||||||
|
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||||
|
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||||
|
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupoverview> .
|
||||||
|
|
||||||
|
local:uniOffersDegreeContext a :ConfigContext ;
|
||||||
|
:hasConfiguration local:uniOffersDegreeConfig ;
|
||||||
|
:configContextFor vivo:offers ;
|
||||||
|
:qualifiedByDomain vivo:University ;
|
||||||
|
:qualifiedBy vivo:AcademicDegree .
|
||||||
|
|
||||||
|
local:uniOffersDegreeConfig a :ObjectPropertyDisplayConfig ;
|
||||||
|
:listViewConfigFile "listViewConfig-default.xml"^^xsd:string ;
|
||||||
|
:displayName "offers degree" ;
|
||||||
|
vitro:displayRankAnnot 2;
|
||||||
|
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||||
|
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||||
|
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupoverview> .
|
||||||
|
|
||||||
|
local:grantAwardedByContext a :ConfigContext ;
|
||||||
|
:hasConfiguration local:grantAwardedByConfig ;
|
||||||
|
:configContextFor vivo:assignedBy ;
|
||||||
|
:qualifiedByDomain vivo:Grant ;
|
||||||
|
:qualifiedBy <http://xmlns.com/foaf/0.1/Organization> .
|
||||||
|
|
||||||
|
local:grantAwardedByConfig a :ObjectPropertyDisplayConfig ;
|
||||||
|
:listViewConfigFile "listViewConfig-default.xml"^^xsd:string ;
|
||||||
|
:displayName "grant awarded by" ;
|
||||||
|
vitro:displayRankAnnot 2;
|
||||||
|
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
|
||||||
|
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
|
||||||
|
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupoverview> .
|
||||||
|
|
||||||
local:awardOrHonorReceiptsContext a :ConfigContext ;
|
local:awardOrHonorReceiptsContext a :ConfigContext ;
|
||||||
:hasConfiguration local:awardOrHonorReceiptsConfig ;
|
:hasConfiguration local:awardOrHonorReceiptsConfig ;
|
||||||
:configContextFor <http://vivoweb.org/ontology/core#relatedBy> ;
|
:configContextFor <http://vivoweb.org/ontology/core#relatedBy> ;
|
||||||
|
|
|
@ -0,0 +1,123 @@
|
||||||
|
/* $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.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpSession;
|
||||||
|
|
||||||
|
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.AutocompleteRequiredInputValidator;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeIntervalValidationVTwo;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisionVTwo;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesWithParent;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
|
||||||
|
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 GrantAdministeredByGenerator extends VivoBaseGenerator implements
|
||||||
|
EditConfigurationGenerator {
|
||||||
|
|
||||||
|
public GrantAdministeredByGenerator() {}
|
||||||
|
|
||||||
|
@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("grantAdministeredBy.ftl");
|
||||||
|
|
||||||
|
conf.setVarNameForSubject("grant");
|
||||||
|
conf.setVarNameForPredicate("predicate");
|
||||||
|
conf.setVarNameForObject("adminRole");
|
||||||
|
|
||||||
|
conf.setN3Required( Arrays.asList( n3ForNewAdminRole) );
|
||||||
|
conf.setN3Optional( Arrays.asList( n3ForNewAdminOrganization,
|
||||||
|
n3ForExistingAdminOrganization ) );
|
||||||
|
|
||||||
|
conf.addNewResource("newOrganization", DEFAULT_NS_FOR_NEW_RESOURCE);
|
||||||
|
conf.addNewResource("adminRole", DEFAULT_NS_FOR_NEW_RESOURCE);
|
||||||
|
|
||||||
|
conf.setUrisOnform(Arrays.asList("existingOrganization"));
|
||||||
|
conf.setLiteralsOnForm(Arrays.asList("orgLabel", "orgLabelDisplay" ));
|
||||||
|
|
||||||
|
conf.addSparqlForExistingLiteral("orgLabel", orgLabelQuery);
|
||||||
|
conf.addSparqlForExistingUris("existingOrganization", existingOrganizationQuery);
|
||||||
|
|
||||||
|
|
||||||
|
conf.addField( new FieldVTwo(). // options will be added in browser by auto complete JS
|
||||||
|
setName("existingOrganization")
|
||||||
|
);
|
||||||
|
|
||||||
|
conf.addField( new FieldVTwo().
|
||||||
|
setName("orgLabel").
|
||||||
|
setRangeDatatypeUri(XSD.xstring.toString() ).
|
||||||
|
setValidators( list("datatype:" + XSD.xstring.toString()) )
|
||||||
|
);
|
||||||
|
|
||||||
|
conf.addField( new FieldVTwo().
|
||||||
|
setName("orgLabelDisplay").
|
||||||
|
setRangeDatatypeUri(XSD.xstring.toString() ).
|
||||||
|
setValidators( list("datatype:" + XSD.xstring.toString()))
|
||||||
|
);
|
||||||
|
|
||||||
|
conf.addValidator(new AntiXssValidation());
|
||||||
|
conf.addValidator(new AutocompleteRequiredInputValidator("existingOrganization", "orgLabel"));
|
||||||
|
|
||||||
|
// addFormSpecificData(conf, vreq);
|
||||||
|
prepare(vreq, conf);
|
||||||
|
return conf;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* N3 assertions */
|
||||||
|
|
||||||
|
final static String n3ForNewAdminRole =
|
||||||
|
"@prefix vivo: <" + vivoCore + "> . \n\n" +
|
||||||
|
"?grant vivo:relates ?adminRole . \n" +
|
||||||
|
"?adminRole a vivo:AdministratorRole . \n" +
|
||||||
|
"?adminRole vivo:relatedBy ?grant . " ;
|
||||||
|
|
||||||
|
final static String n3ForNewAdminOrganization =
|
||||||
|
"@prefix vivo: <" + vivoCore + "> . \n\n" +
|
||||||
|
"?adminRole <http://purl.obolibrary.org/obo/RO_0000052> ?newOrganization . \n" +
|
||||||
|
"?newOrganization a <http://xmlns.com/foaf/0.1/Organization> . \n" +
|
||||||
|
"?newOrganization <http://purl.obolibrary.org/obo/RO_0000053> ?adminRole . \n" +
|
||||||
|
"?newOrganization <"+ label + "> ?orgLabel .";
|
||||||
|
|
||||||
|
final static String n3ForExistingAdminOrganization =
|
||||||
|
"@prefix vivo: <" + vivoCore + "> . \n\n" +
|
||||||
|
"?adminRole <http://purl.obolibrary.org/obo/RO_0000052> ?existingOrganization . \n" +
|
||||||
|
"?existingOrganization a <http://xmlns.com/foaf/0.1/Organization> . \n" +
|
||||||
|
"?existingOrganization <http://purl.obolibrary.org/obo/RO_0000053> ?adminRole . " ;
|
||||||
|
|
||||||
|
/* Queries for editing an existing entry */
|
||||||
|
|
||||||
|
final static String existingOrganizationQuery =
|
||||||
|
"PREFIX vivo: <http://vivoweb.org/ontology/core#> \n" +
|
||||||
|
"SELECT ?existingOrganization WHERE { \n" +
|
||||||
|
" ?adminRole <http://purl.obolibrary.org/obo/RO_0000052> ?existingOrganization . \n" +
|
||||||
|
" ?existingOrganization a <http://xmlns.com/foaf/0.1/Organization> . \n" +
|
||||||
|
"}";
|
||||||
|
|
||||||
|
final static String orgLabelQuery =
|
||||||
|
"PREFIX vivo: <http://vivoweb.org/ontology/core#> \n" +
|
||||||
|
"SELECT ?existingOrganizationLabel WHERE { \n" +
|
||||||
|
" ?adminRole <http://purl.obolibrary.org/obo/RO_0000052> ?existingOrganization . \n" +
|
||||||
|
" ?existingOrganization a <http://xmlns.com/foaf/0.1/Organization> . \n" +
|
||||||
|
" ?existingOrganization <" + label + "> ?existingOrganizationLabel . \n" +
|
||||||
|
"}";
|
||||||
|
|
||||||
|
}
|
|
@ -185,7 +185,7 @@ public class PersonHasIssuedCredentialGenerator extends VivoBaseGenerator implem
|
||||||
"@prefix vivo: <" + vivoCore + "> . \n\n" +
|
"@prefix vivo: <" + vivoCore + "> . \n\n" +
|
||||||
"?issuedCredential vivo:relates ?existingCredential . \n" +
|
"?issuedCredential vivo:relates ?existingCredential . \n" +
|
||||||
"?existingCredential a <" + credentialTypeClass + "> . \n" +
|
"?existingCredential a <" + credentialTypeClass + "> . \n" +
|
||||||
"?credential a ?credentialType . \n" +
|
"?existingCredential a ?credentialType . \n" +
|
||||||
"?existingCredential vivo:relatedBy ?issuedCredential . " ;
|
"?existingCredential vivo:relatedBy ?issuedCredential . " ;
|
||||||
|
|
||||||
final static String n3ForYearCredentialed =
|
final static String n3ForYearCredentialed =
|
||||||
|
|
|
@ -355,7 +355,7 @@ selected_conference = Selected Conference
|
||||||
years_participation_in = Years of Participation in
|
years_participation_in = Years of Participation in
|
||||||
|
|
||||||
grant_entry_for = grant entry for
|
grant_entry_for = grant entry for
|
||||||
select_existing_pub_or_enter_new = Please select an existing grant in the Title field or enter a new one.
|
select_existing_pub_or_enter_new = Please select an existing publication in the Title field or enter a new one.
|
||||||
unable_to_handle_grant_editing = This form is unable to handle the editing of this grant because it is associated with multiple grant individuals.
|
unable_to_handle_grant_editing = This form is unable to handle the editing of this grant because it is associated with multiple grant individuals.
|
||||||
grant_type = grant Type
|
grant_type = grant Type
|
||||||
|
|
||||||
|
@ -877,3 +877,5 @@ create_publication_date = Create publication date
|
||||||
edit_publication_date = Edit publication date
|
edit_publication_date = Edit publication date
|
||||||
name_prefix = Name Prefix
|
name_prefix = Name Prefix
|
||||||
name_suffix = Name Suffix
|
name_suffix = Name Suffix
|
||||||
|
administering_organization_for = administering organization for
|
||||||
|
missing_credential = missing credential
|
Loading…
Add table
Reference in a new issue