Merge branch 'maint-rel-1.6' into develop

This commit is contained in:
tworrall 2013-12-05 10:17:54 -05:00
commit 140966bc88

View file

@ -1,51 +1,53 @@
/* $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.ConstantFieldOptions; 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 AddResearcherRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { public class AddResearcherRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
private static String template = "addResearcherRoleToPerson.ftl"; private static String template = "addResearcherRoleToPerson.ftl";
@Override @Override
String getTemplate() { String getTemplate() {
return template; return template;
} }
@Override @Override
public String getRoleType() { public String getRoleType() {
return "http://vivoweb.org/ontology/core#ResearcherRole"; return "http://vivoweb.org/ontology/core#ResearcherRole";
} }
/** Researcher role involves hard-coded options for the "right side" of the role or activity. */ /** Researcher role involves hard-coded options for the "right side" of the role or activity. */
@Override @Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception { FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ConstantFieldOptions( return new ConstantFieldOptions(
"", "Select one", "", "Select one",
"http://vivoweb.org/ontology/core#Grant", "Grant", "http://vivoweb.org/ontology/core#Grant", "Grant",
"http://vivoweb.org/ontology/core#Project", "Project"); "http://purl.obolibrary.org/obo/ERO_0000015", "Human Study",
} "http://vivoweb.org/ontology/core#Project", "Project",
"http://purl.obolibrary.org/obo/ERO_0000014", "Research Project");
@Override }
boolean isShowRoleLabelField() { return true; }
/* @Override
* Use the methods below to change the date/time precision in the boolean isShowRoleLabelField() { return true; }
* custom form associated with this generator. When not used, the /*
* precision will be YEAR. The other precisons are MONTH, DAY, HOUR, * Use the methods below to change the date/time precision in the
* MINUTE, TIME and NONE. * custom form associated with this generator. When not used, the
*/ * precision will be YEAR. The other precisons are MONTH, DAY, HOUR,
/* * MINUTE, TIME and NONE.
public String getStartDatePrecision() { */
String precision = VitroVocabulary.Precision.MONTH.uri(); /*
return precision; public String getStartDatePrecision() {
} String precision = VitroVocabulary.Precision.MONTH.uri();
return precision;
public String getEndDatePrecision() { }
String precision = VitroVocabulary.Precision.DAY.uri();
return precision; public String getEndDatePrecision() {
} String precision = VitroVocabulary.Precision.DAY.uri();
*/ return precision;
} }
*/
}