VIVO-563
This commit is contained in:
parent
ef4a628b1a
commit
c90fa71bb1
7 changed files with 153 additions and 82 deletions
|
@ -875,4 +875,5 @@ name_suffix = Sufijo de nombre
|
||||||
administering_organization_for = administración de la organización para
|
administering_organization_for = administración de la organización para
|
||||||
missing_credential = falta credencial
|
missing_credential = falta credencial
|
||||||
grant_administered_by = conceder administrado por
|
grant_administered_by = conceder administrado por
|
||||||
missing_grant = falta de subvención
|
missing_grant = falta de subvención
|
||||||
|
editor_of_entry = editor de para
|
|
@ -50,7 +50,7 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
|
||||||
<#assign yearHint = "<span class='hint'>(${i18n().year_hint_format})</span>" />
|
<#assign yearHint = "<span class='hint'>(${i18n().year_hint_format})</span>" />
|
||||||
|
|
||||||
|
|
||||||
<h2>${titleVerb} ${i18n().educational_training_for} ${editConfiguration.subjectName}</h2>
|
<h2>${titleVerb} ${i18n().editor_of_entry} ${editConfiguration.subjectName}</h2>
|
||||||
|
|
||||||
<#--Display error messages if any-->
|
<#--Display error messages if any-->
|
||||||
<#if submissionErrors?has_content>
|
<#if submissionErrors?has_content>
|
||||||
|
|
|
@ -22,7 +22,8 @@ roleExamples-->
|
||||||
<#assign typeSelectorLabel = "${i18n().reviewer_of}" />
|
<#assign typeSelectorLabel = "${i18n().reviewer_of}" />
|
||||||
<#assign genericLabel = "${i18n().item_capitalized}" />
|
<#assign genericLabel = "${i18n().item_capitalized}" />
|
||||||
|
|
||||||
<#assign acTypes = "{activity: 'http://purl.org/ontology/bibo/Document'}" />
|
<#assign acMultipleTypes = "'true'" />
|
||||||
|
<#assign acTypes = "{activity: 'http://purl.org/ontology/bibo/Document,http://purl.org/ontology/bibo/Collection'}" />
|
||||||
|
|
||||||
<#--Each of the two stage forms will include the form below-->
|
<#--Each of the two stage forms will include the form below-->
|
||||||
<#include "addRoleToPersonTwoStage.ftl">
|
<#include "addRoleToPersonTwoStage.ftl">
|
||||||
|
|
|
@ -1,75 +1,75 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators;
|
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions;
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesWithParent;
|
||||||
/**
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
|
||||||
* Generates the edit configuration for adding a Role to a Person.
|
/**
|
||||||
|
* Generates the edit configuration for adding a Role to a Person.
|
||||||
Stage one is selecting the type of the non-person thing
|
|
||||||
associated with the Role with the intention of reducing the
|
Stage one is selecting the type of the non-person thing
|
||||||
number of Individuals that the user has to select from.
|
associated with the Role with the intention of reducing the
|
||||||
Stage two is selecting the non-person Individual to associate
|
number of Individuals that the user has to select from.
|
||||||
with the Role.
|
Stage two is selecting the non-person Individual to associate
|
||||||
|
with the Role.
|
||||||
This is intended to create a set of statements like:
|
|
||||||
|
This is intended to create a set of statements like:
|
||||||
?person core:hasResearchActivityRole ?newRole.
|
|
||||||
?newRole rdf:type core:ResearchActivityRole ;
|
?person core:hasResearchActivityRole ?newRole.
|
||||||
roleToActivityPredicate ?someActivity .
|
?newRole rdf:type core:ResearchActivityRole ;
|
||||||
?someActivity rdf:type core:ResearchActivity .
|
roleToActivityPredicate ?someActivity .
|
||||||
?someActivity rdfs:label "activity title" .
|
?someActivity rdf:type core:ResearchActivity .
|
||||||
|
?someActivity rdfs:label "activity title" .
|
||||||
|
|
||||||
Each subclass of the abstract two stage Generator class will have the option of overriding certain
|
|
||||||
methods, and must always implement the following methods:
|
Each subclass of the abstract two stage Generator class will have the option of overriding certain
|
||||||
getRoleType
|
methods, and must always implement the following methods:
|
||||||
getRoleActivityTypeOptionsType
|
getRoleType
|
||||||
getRoleActivityTypeObjectClassUri
|
getRoleActivityTypeOptionsType
|
||||||
getRoleActivityTypeLiteralOptions
|
getRoleActivityTypeObjectClassUri
|
||||||
|
getRoleActivityTypeLiteralOptions
|
||||||
*
|
|
||||||
*/
|
*
|
||||||
public class AddEditorRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
|
*/
|
||||||
private static String TEMPLATE = "addEditorRoleToPerson.ftl";
|
public class AddEditorRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
|
||||||
private static String OPTION_CLASS_URI = "http://purl.org/ontology/bibo/Collection";
|
private static String TEMPLATE = "addEditorRoleToPerson.ftl";
|
||||||
|
private static String OPTION_CLASS_URI = "http://purl.org/ontology/bibo/Collection";
|
||||||
@Override
|
|
||||||
String getTemplate(){ return TEMPLATE; }
|
@Override
|
||||||
|
String getTemplate(){ return TEMPLATE; }
|
||||||
@Override
|
|
||||||
String getRoleType() {
|
@Override
|
||||||
return "http://vivoweb.org/ontology/core#EditorRole";
|
String getRoleType() {
|
||||||
}
|
return "http://vivoweb.org/ontology/core#EditorRole";
|
||||||
|
}
|
||||||
@Override
|
|
||||||
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
|
@Override
|
||||||
return new
|
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
|
||||||
ChildVClassesOptions(OPTION_CLASS_URI)
|
return new ChildVClassesOptions(OPTION_CLASS_URI)
|
||||||
.setDefaultOptionLabel("Select type");
|
.setDefaultOptionLabel("Select type");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Do not show the role label field for the AddEditorRoleToPerson form */
|
/** Do not show the role label field for the AddEditorRoleToPerson form */
|
||||||
@Override
|
@Override
|
||||||
boolean isShowRoleLabelField() { return false; }
|
boolean isShowRoleLabelField() { return false; }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Use the methods below to change the date/time precision in the
|
* Use the methods below to change the date/time precision in the
|
||||||
* custom form associated with this generator. When not used, the
|
* custom form associated with this generator. When not used, the
|
||||||
* precision will be YEAR. The other precisons are MONTH, DAY, HOUR,
|
* precision will be YEAR. The other precisons are MONTH, DAY, HOUR,
|
||||||
* MINUTE, TIME and NONE.
|
* MINUTE, TIME and NONE.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
public String getStartDatePrecision() {
|
public String getStartDatePrecision() {
|
||||||
String precision = VitroVocabulary.Precision.MONTH.uri();
|
String precision = VitroVocabulary.Precision.MONTH.uri();
|
||||||
return precision;
|
return precision;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getEndDatePrecision() {
|
public String getEndDatePrecision() {
|
||||||
String precision = VitroVocabulary.Precision.DAY.uri();
|
String precision = VitroVocabulary.Precision.DAY.uri();
|
||||||
return precision;
|
return precision;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,14 +213,12 @@ public class AddEditorshipToPersonGenerator extends VivoBaseGenerator implements
|
||||||
List<List<String>> literalOptions = new ArrayList<List<String>>();
|
List<List<String>> literalOptions = new ArrayList<List<String>>();
|
||||||
literalOptions.add(list("http://purl.org/ontology/bibo/Book", "Book"));
|
literalOptions.add(list("http://purl.org/ontology/bibo/Book", "Book"));
|
||||||
literalOptions.add(list("http://purl.org/ontology/bibo/Chapter", "Chapter"));
|
literalOptions.add(list("http://purl.org/ontology/bibo/Chapter", "Chapter"));
|
||||||
literalOptions.add(list("http://purl.org/ontology/bibo/Collection", "Collection"));
|
|
||||||
literalOptions.add(list("http://purl.org/ontology/bibo/EditedBook", "Edited Book"));
|
literalOptions.add(list("http://purl.org/ontology/bibo/EditedBook", "Edited Book"));
|
||||||
literalOptions.add(list("http://purl.org/ontology/bibo/Film", "Film"));
|
literalOptions.add(list("http://purl.org/ontology/bibo/Film", "Film"));
|
||||||
literalOptions.add(list("http://purl.org/ontology/bibo/Magazine", "Magazine"));
|
literalOptions.add(list("http://purl.org/ontology/bibo/Magazine", "Magazine"));
|
||||||
literalOptions.add(list("http://vivoweb.org/ontology/core#Newsletter", "Newsletter"));
|
literalOptions.add(list("http://vivoweb.org/ontology/core#Newsletter", "Newsletter"));
|
||||||
literalOptions.add(list("http://purl.org/ontology/bibo/Newspaper", "Newspaper"));
|
literalOptions.add(list("http://purl.org/ontology/bibo/Newspaper", "Newspaper"));
|
||||||
literalOptions.add(list("http://vivoweb.org/ontology/core#NewsRelease", "News Release"));
|
literalOptions.add(list("http://vivoweb.org/ontology/core#NewsRelease", "News Release"));
|
||||||
literalOptions.add(list("http://purl.org/ontology/bibo/Periodical", "Periodical"));
|
|
||||||
literalOptions.add(list("http://purl.org/ontology/bibo/Report", "Report"));
|
literalOptions.add(list("http://purl.org/ontology/bibo/Report", "Report"));
|
||||||
literalOptions.add(list("http://vivoweb.org/ontology/core#Video", "Video"));
|
literalOptions.add(list("http://vivoweb.org/ontology/core#Video", "Video"));
|
||||||
literalOptions.add(list("http://purl.org/ontology/bibo/Webpage", "Webpage"));
|
literalOptions.add(list("http://purl.org/ontology/bibo/Webpage", "Webpage"));
|
||||||
|
|
|
@ -4,6 +4,7 @@ package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions;
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions;
|
||||||
|
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.FieldOptions;
|
||||||
|
|
||||||
public class AddReviewerRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
|
public class AddReviewerRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
|
||||||
|
@ -34,8 +35,77 @@ public class AddReviewerRoleToPersonGenerator extends AddRoleToPersonTwoStageGen
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
|
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
|
||||||
return new ChildVClassesOptions(OBJECT_VCLASS_URI)
|
return new ConstantFieldOptions(
|
||||||
.setDefaultOptionLabel("Select type");
|
"", "Select type",
|
||||||
|
"http://purl.org/ontology/bibo/AcademicArticle", "Academic Article",
|
||||||
|
"http://purl.org/ontology/bibo/Article", "Article",
|
||||||
|
"http://purl.org/ontology/bibo/AudioDocument", "Audio Document",
|
||||||
|
"http://purl.org/ontology/bibo/AudioVisualDocument", "Audio-Visual Document",
|
||||||
|
"http://purl.org/ontology/bibo/Bill", "Bill",
|
||||||
|
"http://vivoweb.org/ontology/core#Blog", "Blog",
|
||||||
|
"http://vivoweb.org/ontology/core#BlogPosting", "Blog Posting",
|
||||||
|
"http://purl.org/ontology/bibo/Book", "Book",
|
||||||
|
"http://purl.org/ontology/bibo/BookSection", "Book Section",
|
||||||
|
"http://purl.org/ontology/bibo/Brief", "Brief",
|
||||||
|
"http://vivoweb.org/ontology/core#CaseStudy", "Case Study",
|
||||||
|
"http://vivoweb.org/ontology/core#Catalog", "Catalog",
|
||||||
|
"http://purl.org/ontology/bibo/Chapter", "Chapter",
|
||||||
|
"http://purl.org/spar/fabio/ClinicalGuideline", "Clinical Guideline",
|
||||||
|
"http://purl.org/ontology/bibo/Code", "Code",
|
||||||
|
"http://purl.org/ontology/bibo/CollectedDocument", "Collected Document",
|
||||||
|
"http://purl.org/spar/fabio/Comment", "Comment",
|
||||||
|
"http://vivoweb.org/ontology/core#ConferencePaper", "Conference Paper",
|
||||||
|
"http://vivoweb.org/ontology/core#ConferencePoster", "Conference Poster",
|
||||||
|
"http://purl.org/ontology/bibo/CourtReporter", "Court Reporter",
|
||||||
|
"http://vivoweb.org/ontology/core#Database", "Database",
|
||||||
|
"http://purl.org/ontology/bibo/LegalDecision", "Decision",
|
||||||
|
"http://purl.org/ontology/bibo/DocumentPart", "Document Part",
|
||||||
|
"http://purl.org/ontology/bibo/EditedBook", "Edited Book",
|
||||||
|
"http://vivoweb.org/ontology/core#EditorialArticle", "Editorial Article",
|
||||||
|
"http://purl.org/spar/fabio/Erratum", "Erratum",
|
||||||
|
"http://purl.org/ontology/bibo/Excerpt", "Excerpt",
|
||||||
|
"http://purl.org/ontology/bibo/Film", "Film",
|
||||||
|
"http://purl.org/ontology/bibo/Image", "Image",
|
||||||
|
"http://purl.org/ontology/bibo/Issue", "Issue",
|
||||||
|
"http://purl.org/ontology/bibo/Journal", "Journal",
|
||||||
|
"http://purl.obolibrary.org/obo/IAO_0000013", "Journal Article",
|
||||||
|
"http://purl.org/ontology/bibo/LegalCaseDocument", "Legal Case Document",
|
||||||
|
"http://purl.org/ontology/bibo/LegalDocument", "Legal Document",
|
||||||
|
"http://purl.org/ontology/bibo/Legislation", "Legislation",
|
||||||
|
"http://purl.org/ontology/bibo/Letter", "Letter",
|
||||||
|
"http://purl.org/ontology/bibo/Magazine", "Magazine",
|
||||||
|
"http://purl.org/ontology/bibo/Manual", "Manual",
|
||||||
|
"http://purl.org/ontology/bibo/Manuscript", "Manuscript",
|
||||||
|
"http://purl.org/ontology/bibo/Map", "Map",
|
||||||
|
"http://vivoweb.org/ontology/core#Newsletter", "Newsletter",
|
||||||
|
"http://purl.org/ontology/bibo/Newspaper", "Newspaper",
|
||||||
|
"http://vivoweb.org/ontology/core#NewsRelease", "News Release",
|
||||||
|
"http://purl.org/ontology/bibo/Note", "Note",
|
||||||
|
"http://purl.org/ontology/bibo/Patent", "Patent",
|
||||||
|
"http://purl.org/ontology/bibo/Periodical", "Periodical",
|
||||||
|
"http://purl.org/ontology/bibo/PersonalCommunicationDocument", "Personal Communication Document",
|
||||||
|
"http://purl.org/ontology/bibo/Proceedings", "Proceedings",
|
||||||
|
"http://purl.obolibrary.org/obo/OBI_0000272", "protocol",
|
||||||
|
"http://purl.org/ontology/bibo/Quote", "Quote",
|
||||||
|
"http://purl.org/ontology/bibo/ReferenceSource", "Reference Source",
|
||||||
|
"http://purl.org/ontology/bibo/Report", "Report",
|
||||||
|
"http://vivoweb.org/ontology/core#ResearchProposal", "Research Proposal",
|
||||||
|
"http://vivoweb.org/ontology/core#Review", "Review",
|
||||||
|
"http://vivoweb.org/ontology/core#Score", "Score",
|
||||||
|
"http://vivoweb.org/ontology/core#Screenplay", "Screenplay",
|
||||||
|
"http://purl.org/ontology/bibo/Series", "Series",
|
||||||
|
"http://purl.org/ontology/bibo/Slide", "Slide",
|
||||||
|
"http://purl.org/ontology/bibo/Slideshow", "Slideshow",
|
||||||
|
"http://vivoweb.org/ontology/core#Speech", "Speech",
|
||||||
|
"http://purl.org/ontology/bibo/Standard", "Standard",
|
||||||
|
"http://purl.org/ontology/bibo/Statute", "Statute",
|
||||||
|
"http://purl.org/ontology/bibo/Thesis", "Thesis",
|
||||||
|
"http://vivoweb.org/ontology/core#Translation", "Translation",
|
||||||
|
"http://vivoweb.org/ontology/core#Video", "Video",
|
||||||
|
"http://purl.org/ontology/bibo/Webpage", "Webpage",
|
||||||
|
"http://purl.org/ontology/bibo/Website", "Website",
|
||||||
|
"http://vivoweb.org/ontology/core#WorkingPaper", "Working Paper"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//isShowRoleLabelField remains true for this so doesn't need to be overwritten
|
//isShowRoleLabelField remains true for this so doesn't need to be overwritten
|
||||||
|
|
|
@ -882,3 +882,4 @@ administering_organization_for = administering organization for
|
||||||
missing_credential = missing credential
|
missing_credential = missing credential
|
||||||
grant_administered_by = grant being administered by
|
grant_administered_by = grant being administered by
|
||||||
missing_grant = missing grant
|
missing_grant = missing grant
|
||||||
|
editor_of_entry = editor of entry for
|
Loading…
Add table
Reference in a new issue