VIVO-208: all fields now displayed when custom forms are rendered; customized 2-stage forms will still work as before

This commit is contained in:
tworrall 2013-08-05 14:57:59 -04:00
parent 9fda9d2922
commit be11fc589f
26 changed files with 149 additions and 188 deletions

View file

@ -9,7 +9,7 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
public class AddAttendeeRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
private static String TEMPLATE = "addAttendeeRoleToPerson.ftl";
@Override
String getTemplate(){ return TEMPLATE; }
@ -28,7 +28,10 @@ public class AddAttendeeRoleToPersonGenerator extends AddRoleToPersonTwoStageGen
"http://purl.org/ontology/bibo/Conference", "Conference",
"http://vivoweb.org/ontology/core#Course", "Course",
"http://vivoweb.org/ontology/core#Exhibit", "Exhibit",
"http://purl.org/ontology/bibo/Hearing", "Hearing",
"http://purl.org/ontology/bibo/Interview", "Interview",
"http://vivoweb.org/ontology/core#Meeting", "Meeting",
"http://purl.org/ontology/bibo/Performance", "Performance",
"http://vivoweb.org/ontology/core#Presentation", "Presentation",
"http://vivoweb.org/ontology/core#InvitedTalk", "Invited Talk",
"http://purl.org/ontology/bibo/Workshop", "Workshop",

View file

@ -4,12 +4,13 @@ package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
public class AddHeadOfRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
private static String template = "addHeadOfRoleToPerson.ftl";
private static String OPTION_CLASS_URI = "http://xmlns.com/foaf/0.1/Organization";
//Should this be overridden
@Override
@ -26,37 +27,9 @@ public class AddHeadOfRoleToPersonGenerator extends AddRoleToPersonTwoStageGener
@Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ConstantFieldOptions(
"", "Select type",
"http://vivoweb.org/ontology/core#Association", "Association",
"http://vivoweb.org/ontology/core#Center", "Center",
"http://vivoweb.org/ontology/core#ClinicalOrganization", "Clinical Organization",
"http://vivoweb.org/ontology/core#College", "College",
"http://vivoweb.org/ontology/core#Committee", "Committee",
"http://vivoweb.org/ontology/core#Consortium", "Consortium",
"http://vivoweb.org/ontology/core#Department", "Department",
"http://vivoweb.org/ontology/core#Division", "Division",
"http://purl.org/NET/c4dm/event.owl#Event", "Event",
"http://vivoweb.org/ontology/core#ExtensionUnit", "Extension Unit",
"http://vivoweb.org/ontology/core#Foundation", "Foundation",
"http://vivoweb.org/ontology/core#FundingOrganization", "Funding Organization",
"http://vivoweb.org/ontology/core#GovernmentAgency", "Government Agency",
"http://vivoweb.org/ontology/core#Hospital", "Hospital",
"http://vivoweb.org/ontology/core#Institute", "Institute",
"http://vivoweb.org/ontology/core#Laboratory", "Laboratory",
"http://vivoweb.org/ontology/core#Library", "Library",
"http://vivoweb.org/ontology/core#Museum", "Museum",
"http://xmlns.com/foaf/0.1/Organization", "Organization",
"http://vivoweb.org/ontology/core#PrivateCompany", "Private Company",
"http://vivoweb.org/ontology/core#Program", "Program",
"http://vivoweb.org/ontology/core#Project", "Project",
"http://vivoweb.org/ontology/core#Publisher", "Publisher",
"http://vivoweb.org/ontology/core#ResearchOrganization", "Research Organization",
"http://vivoweb.org/ontology/core#School", "School",
"http://vivoweb.org/ontology/core#Service", "Service",
"http://vivoweb.org/ontology/core#Team", "Team",
"http://vivoweb.org/ontology/core#StudentOrganization", "Student Organization",
"http://vivoweb.org/ontology/core#University", "University");
return new
ChildVClassesOptions(OPTION_CLASS_URI)
.setDefaultOptionLabel("Select type");
}
@Override

View file

@ -26,19 +26,22 @@ public class AddOrganizerRoleToPersonGenerator extends AddRoleToPersonTwoStageGe
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ConstantFieldOptions(
"","Select type",
"http://purl.org/NET/c4dm/event.owl#Event","Event",
"http://vivoweb.org/ontology/core#Competition","Competition",
"http://purl.org/ontology/bibo/Conference","Conference",
"http://vivoweb.org/ontology/core#Course","Course",
"http://vivoweb.org/ontology/core#Exhibit","Exhibit",
"http://vivoweb.org/ontology/core#Meeting","Meeting",
"http://vivoweb.org/ontology/core#Presentation","Presentation",
"http://vivoweb.org/ontology/core#InvitedTalk","Invited Talk",
"http://purl.org/ontology/bibo/Workshop","Workshop",
"http://vivoweb.org/ontology/core#EventSeries","Event Series",
"http://vivoweb.org/ontology/core#ConferenceSeries","Conference Series",
"http://vivoweb.org/ontology/core#SeminarSeries","Seminar Series",
"http://vivoweb.org/ontology/core#WorkshopSeries","Workshop Series");
"http://purl.org/NET/c4dm/event.owl#Event", "Event",
"http://vivoweb.org/ontology/core#Competition", "Competition",
"http://purl.org/ontology/bibo/Conference", "Conference",
"http://vivoweb.org/ontology/core#Course", "Course",
"http://vivoweb.org/ontology/core#Exhibit", "Exhibit",
"http://purl.org/ontology/bibo/Hearing", "Hearing",
"http://purl.org/ontology/bibo/Interview", "Interview",
"http://vivoweb.org/ontology/core#Meeting", "Meeting",
"http://purl.org/ontology/bibo/Performance", "Performance",
"http://vivoweb.org/ontology/core#Presentation", "Presentation",
"http://vivoweb.org/ontology/core#InvitedTalk", "Invited Talk",
"http://purl.org/ontology/bibo/Workshop", "Workshop",
"http://vivoweb.org/ontology/core#EventSeries", "Event Series",
"http://vivoweb.org/ontology/core#ConferenceSeries", "Conference Series",
"http://vivoweb.org/ontology/core#SeminarSeries", "Seminar Series",
"http://vivoweb.org/ontology/core#WorkshopSeries", "Workshop Series");
}
@Override

View file

@ -3,12 +3,13 @@
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators;
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.ChildVClassesOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
public class AddOutreachProviderRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
private static String template = "addOutreachProviderRoleToPerson.ftl";
private static String OPTION_CLASS_URI = "http://xmlns.com/foaf/0.1/Organization";
@Override
String getTemplate() {
@ -23,38 +24,9 @@ public class AddOutreachProviderRoleToPersonGenerator extends AddRoleToPersonTwo
//Outreach Provider role involves hard-coded options for the "right side" of the role or activity
@Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ConstantFieldOptions(
"","Select type",
"http://vivoweb.org/ontology/core#Association","Association",
"http://vivoweb.org/ontology/core#Center","Center",
"http://vivoweb.org/ontology/core#ClinicalOrganization","Clinical Organization",
"http://vivoweb.org/ontology/core#College","College",
"http://vivoweb.org/ontology/core#Committee","Committee",
"http://vivoweb.org/ontology/core#Consortium","Consortium",
"http://vivoweb.org/ontology/core#Department","Department",
"http://vivoweb.org/ontology/core#Division","Division",
"http://purl.org/NET/c4dm/event.owl#Event","Event",
"http://vivoweb.org/ontology/core#ExtensionUnit","Extension Unit",
"http://vivoweb.org/ontology/core#Foundation","Foundation",
"http://vivoweb.org/ontology/core#FundingOrganization","Funding Organization",
"http://vivoweb.org/ontology/core#GovernmentAgency","Government Agency",
"http://vivoweb.org/ontology/core#Hospital","Hospital",
"http://vivoweb.org/ontology/core#Institute","Institute",
"http://vivoweb.org/ontology/core#Laboratory","Laboratory",
"http://vivoweb.org/ontology/core#Library","Library",
"http://vivoweb.org/ontology/core#Museum","Museum",
"http://xmlns.com/foaf/0.1/Organization","Organization",
"http://vivoweb.org/ontology/core#PrivateCompany","Private Company",
"http://vivoweb.org/ontology/core#Program","Program",
"http://vivoweb.org/ontology/core#Project","Project",
"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#Service","Service",
"http://vivoweb.org/ontology/core#StudentOrganization","Student Organization",
"http://vivoweb.org/ontology/core#University","University");
return new
ChildVClassesOptions(OPTION_CLASS_URI)
.setDefaultOptionLabel("Select type");
}
@Override

View file

@ -3,11 +3,13 @@
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators;
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.ChildVClassesOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
public class AddServiceProviderRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
private static String OPTION_CLASS_URI = "http://xmlns.com/foaf/0.1/Organization";
@Override
String getTemplate() { return "addServiceProviderRoleToPerson.ftl"; }
@ -20,38 +22,9 @@ public class AddServiceProviderRoleToPersonGenerator extends AddRoleToPersonTwoS
* "right side" of the role or activity. */
@Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new ConstantFieldOptions(
"","Select one",
"http://purl.org/ontology/bibo/Conference","Conference",
"http://vivoweb.org/ontology/core#Association","Association",
"http://vivoweb.org/ontology/core#Center","Center",
"http://vivoweb.org/ontology/core#ClinicalOrganization","Clinical Organization",
"http://vivoweb.org/ontology/core#College","College",
"http://vivoweb.org/ontology/core#Committee","Committee",
"http://vivoweb.org/ontology/core#Consortium","Consortium",
"http://vivoweb.org/ontology/core#Department","Department",
"http://vivoweb.org/ontology/core#Division","Division",
"http://purl.org/NET/c4dm/event.owl#Event","Event",
"http://vivoweb.org/ontology/core#ExtensionUnit","Extension Unit",
"http://vivoweb.org/ontology/core#Foundation","Foundation",
"http://vivoweb.org/ontology/core#FundingOrganization","Funding Organization",
"http://vivoweb.org/ontology/core#GovernmentAgency","Government Agency",
"http://vivoweb.org/ontology/core#Hospital","Hospital",
"http://vivoweb.org/ontology/core#Institute","Institute",
"http://vivoweb.org/ontology/core#Laboratory","Laboratory",
"http://vivoweb.org/ontology/core#Library","Library",
"http://vivoweb.org/ontology/core#Museum","Museum",
"http://xmlns.com/foaf/0.1/Organization","Organization",
"http://vivoweb.org/ontology/core#PrivateCompany","Private Company",
"http://vivoweb.org/ontology/core#Program","Program",
"http://vivoweb.org/ontology/core#Project","Project",
"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#Service","Service",
"http://vivoweb.org/ontology/core#StudentOrganization","Student Organization",
"http://vivoweb.org/ontology/core#University","University");
return new
ChildVClassesOptions(OPTION_CLASS_URI)
.setDefaultOptionLabel("Select type");
}
@Override