issued credential was using dateTimeValue not dateIssued; also property config changes for VIVO-408

This commit is contained in:
tworrall 2013-10-24 17:18:13 -04:00
parent ae80d6c63d
commit cb611da8ad
6 changed files with 104 additions and 6 deletions

View file

@ -869,4 +869,10 @@ select_credential_or_enter_name = Por favor, introduzca o seleccione un valor en
type_of_credential = Tipo de Credencial
credential_name = Nombre de Credencial
selected_credential = Credential seleccionado
year_issued = Año de Emisión
year_issued = Año de Emisión
year_awarded_for = año otorgado por
create_year_awarded = Crear año concede
edit_year_awarded = Editar año concede
publication_date_for = fecha de publicación de
create_publication_date = Crear fecha de publicación
edit_publication_date = Editar fecha de publicación

View file

@ -44,7 +44,7 @@
?dateTimeEndValue core:dateTime ?dateTimeEnd
}
}
OPTIONAL { ?issuedCredential core:dateTimeValue ?dateTimeValue
OPTIONAL { ?issuedCredential core:dateIssued ?dateTimeValue
OPTIONAL { ?dateTimeValue core:dateTime ?dateTime }
}
} ORDER BY DESC(?dateTime) DESC(?dateTimeEnd)
@ -136,12 +136,12 @@
CONSTRUCT {
?subject ?property ?issuedCredential .
?issuedCredential a core:IssuedCredential .
?issuedCredential core:dateTimeValue ?dateTimeValue .
?issuedCredential core:dateIssued ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime
} WHERE {
?subject ?property ?issuedCredential .
?issuedCredential a core:IssuedCredential .
?issuedCredential core:dateTimeValue ?dateTimeValue .
?issuedCredential core:dateIssued ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime
}
</query-construct>

View file

@ -0,0 +1,58 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Template for adding/editing time values -->
<#--Retrieve certain edit configuration information-->
<#assign editMode = editConfiguration.pageData.editMode />
<#assign htmlForElements = editConfiguration.pageData.htmlForElements />
<#assign domainUri = editConfiguration.pageData.domainUri!"" />
<#if editMode == "edit">
<#assign titleVerb="${i18n().edit_capitalized}">
<#assign disabledVal="disabled">
<#assign submitButtonText="${i18n().edit_date_time_value}">
<#else>
<#assign titleVerb="${i18n().create_capitalized}">
<#assign submitButtonText="${i18n().create_date_time_value}">
<#assign disabledVal=""/>
</#if>
<#if domainUri?contains("IAO_0000030")>
<#assign titleObject="${i18n().publication_date_for}">
<#if editMode == "edit">
<#assign submitButtonText="${i18n().edit_publication_date}">
<#else>
<#assign submitButtonText="${i18n().create_publication_date}">
</#if>
<#elseif domainUri?contains("AwardReceipt")>
<#assign titleObject="${i18n().year_awarded_for}">
<#if editMode == "edit">
<#assign submitButtonText="${i18n().edit_year_awarded}">
<#else>
<#assign submitButtonText="${i18n().create_year_awarded}">
</#if>
<#else>
<#assign titleObject="${i18n().date_time_value_for}">
</#if>
<h2>${titleVerb} ${titleObject} ${editConfiguration.subjectName}</h2>
<form class="customForm" action ="${submitUrl}" class="customForm">
<#--Need to draw edit elements for dates here-->
<#if htmlForElements?keys?seq_contains("dateTimeField")>
${htmlForElements["dateTimeField"]}
</#if>
<p class="submit">
<input type="hidden" name="editKey" value="${editKey}" />
<input type="submit" id="submit" value="${submitButtonText}" role="button" />
<span class="or"> ${i18n().or} </span>
<a class="cancel" href="${editConfiguration.cancelUrl}" title="${i18n().cancel_title}">${i18n().cancel_link}</a>
</p>
</form>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/customForm.css" />',
'<link rel="stylesheet" href="${urls.base}/edit/forms/css/personHasEducationalTraining.css" />')}
${scripts.add('<script type="text/javascript" src="${urls.base}/js/utils.js"></script>',
'<script type="text/javascript" src="${urls.base}/js/customFormUtils.js"></script>')}

View file

@ -710,5 +710,32 @@ local:grantRelatesConfig a :ObjectPropertyDisplayConfig ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGroupbiography> .
### faux properties for dateTimeValue ###
local:publicationDateContext a :ConfigContext ;
:hasConfiguration local:publicationDateConfig ;
:configContextFor <http://vivoweb.org/ontology/core#dateTimeValue> ;
:qualifiedByDomain <http://purl.obolibrary.org/obo/IAO_0000030> ;
:qualifiedBy <http://vivoweb.org/ontology/core#DateTimeValue> .
local:publicationDateConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-dateTimeValue.xml"^^xsd:string ;
:displayName "publication date" ;
vitro:displayRankAnnot 10;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGrouptime> .
local:yearAwardedContext a :ConfigContext ;
:hasConfiguration local:yearAwardedConfig ;
:configContextFor <http://vivoweb.org/ontology/core#dateTimeValue> ;
:qualifiedByDomain <http://vivoweb.org/ontology/core#AwardReceipt> ;
:qualifiedBy <http://vivoweb.org/ontology/core#DateTimeValue> .
local:yearAwardedConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-dateTimeValue.xml"^^xsd:string ;
:displayName "year awarded" ;
vitro:displayRankAnnot 10;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;
vitro:prohibitedFromUpdateBelowRoleLevelAnnot role:public ;
:propertyGroup <http://vivoweb.org/ontology#vitroPropertyGrouptime> .

View file

@ -28,7 +28,7 @@ public class PersonHasIssuedCredentialGenerator extends VivoBaseGenerator implem
final static String issuedCredentialTypeClass = vivoCore + "IssuedCredential";
final static String credentialTypeClass = vivoCore + "Credential";
final static String yearCredentialedPred = vivoCore + "dateTimeValue";
final static String yearCredentialedPred = vivoCore + "dateIssued";
final static String issuedCredentialToInterval = vivoCore + "dateTimeInterval";
final static String intervalType = vivoCore + "DateTimeInterval";
final static String intervalToStart = vivoCore + "start";

View file

@ -876,4 +876,11 @@ select_credential_or_enter_name = Please enter or select a value in the Credenti
type_of_credential = Type of Credential
credential_name = Credential Name
selected_credential = Selected Credential
year_issued = Year Issued
year_issued = Year Issued
year_awarded_for = year awarded for
create_year_awarded = Create year awarded
edit_year_awarded = Edit year awarded
publication_date_for = publication date for
create_publication_date = Create publication date
edit_publication_date = Edit publication date