VIVO-411
This commit is contained in:
parent
042a48ea1f
commit
13feddac3d
1 changed files with 80 additions and 52 deletions
|
@ -1,52 +1,80 @@
|
||||||
/* $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.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 AddOutreachProviderRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
|
public class AddOutreachProviderRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
|
||||||
|
|
||||||
private static String template = "addOutreachProviderRoleToPerson.ftl";
|
private static String template = "addOutreachProviderRoleToPerson.ftl";
|
||||||
private static String OPTION_CLASS_URI = "http://xmlns.com/foaf/0.1/Organization";
|
private static String OPTION_CLASS_URI = "http://xmlns.com/foaf/0.1/Organization";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
String getTemplate() {
|
String getTemplate() {
|
||||||
return template;
|
return template;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
String getRoleType() {
|
String getRoleType() {
|
||||||
return "http://vivoweb.org/ontology/core#OutreachProviderRole";
|
return "http://vivoweb.org/ontology/core#OutreachProviderRole";
|
||||||
}
|
}
|
||||||
|
|
||||||
//Outreach Provider role involves hard-coded options for the "right side" of the role or activity
|
//Outreach Provider 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
|
return new ConstantFieldOptions(
|
||||||
ChildVClassesOptions(OPTION_CLASS_URI)
|
"","Select type",
|
||||||
.setDefaultOptionLabel("Select type");
|
"http://vivoweb.org/ontology/core#Association","Association",
|
||||||
}
|
"http://vivoweb.org/ontology/core#Center","Center",
|
||||||
|
"http://vivoweb.org/ontology/core#ClinicalOrganization","Clinical Organization",
|
||||||
@Override
|
"http://vivoweb.org/ontology/core#College","College",
|
||||||
boolean isShowRoleLabelField(){return true;}
|
"http://vivoweb.org/ontology/core#Committee","Committee",
|
||||||
|
"http://vivoweb.org/ontology/core#Consortium","Consortium",
|
||||||
/*
|
"http://vivoweb.org/ontology/core#CoreLaboratory","Core Laboratory",
|
||||||
* Use the methods below to change the date/time precision in the
|
"http://vivoweb.org/ontology/core#Department","Department",
|
||||||
* custom form associated with this generator. When not used, the
|
"http://vivoweb.org/ontology/core#Division","Division",
|
||||||
* precision will be YEAR. The other precisons are MONTH, DAY, HOUR,
|
"http://vivoweb.org/ontology/core#ExtensionUnit","Extension Unit",
|
||||||
* MINUTE, TIME and NONE.
|
"http://vivoweb.org/ontology/core#Foundation","Foundation",
|
||||||
*/
|
"http://vivoweb.org/ontology/core#FundingOrganization","Funding Organization",
|
||||||
/*
|
"http://vivoweb.org/ontology/core#GovernmentAgency","Government Agency",
|
||||||
public String getStartDatePrecision() {
|
"http://vivoweb.org/ontology/core#Hospital","Hospital",
|
||||||
String precision = VitroVocabulary.Precision.MONTH.uri();
|
"http://vivoweb.org/ontology/core#Institute","Institute",
|
||||||
return precision;
|
"http://vivoweb.org/ontology/core#Laboratory","Laboratory",
|
||||||
}
|
"http://vivoweb.org/ontology/core#Library","Library",
|
||||||
|
"http://vivoweb.org/ontology/core#Museum","Museum",
|
||||||
public String getEndDatePrecision() {
|
"http://xmlns.com/foaf/0.1/Organization","Organization",
|
||||||
String precision = VitroVocabulary.Precision.DAY.uri();
|
"http://vivoweb.org/ontology/core#PrivateCompany","Private Company",
|
||||||
return precision;
|
"http://vivoweb.org/ontology/core#Program","Program",
|
||||||
}
|
"http://vivoweb.org/ontology/core#Publisher","Publisher",
|
||||||
*/
|
"http://vivoweb.org/ontology/core#ResearchOrganization","Research Organization",
|
||||||
}
|
"http://vivoweb.org/ontology/core#Team","Team",
|
||||||
|
"http://vivoweb.org/ontology/core#School","School",
|
||||||
|
"http://vivoweb.org/ontology/core#ServiceProvidingLaboratory","Service Providing Lab",
|
||||||
|
"http://vivoweb.org/ontology/core#StudentOrganization","Student Organization",
|
||||||
|
"http://purl.obolibrary.org/obo/ERO_0000565","Technology Transfer Office",
|
||||||
|
"http://vivoweb.org/ontology/core#University","University");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
boolean isShowRoleLabelField(){return true;}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Use the methods below to change the date/time precision in the
|
||||||
|
* 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 getEndDatePrecision() {
|
||||||
|
String precision = VitroVocabulary.Precision.DAY.uri();
|
||||||
|
return precision;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue