From 8f7ebc67811b6796a1d12e04cb5ffc6600a41d7f Mon Sep 17 00:00:00 2001 From: tworrall Date: Tue, 1 Nov 2011 20:12:02 +0000 Subject: [PATCH] temporarily backing out generators --- .../AddEditorRoleToPersonGenerator.java | 131 --------------- .../AddHeadOfRoleToPersonGenerator.java | 150 ----------------- .../AddMemberRoleToPersonGenerator.java | 122 -------------- .../AddOrganizerRoleToPersonGenerator.java | 137 ---------------- ...OutreachProviderRoleToPersonGenerator.java | 149 ----------------- .../AddPresenterRoleToPersonGenerator.java | 122 -------------- .../AddResearcherRoleToPersonGenerator.java | 122 -------------- .../AddReviewerRoleToPersonGenerator.java | 131 --------------- ...dServiceProviderRoleToPersonGenerator.java | 151 ------------------ .../AddTeacherRoleToPersonGenerator.java | 124 -------------- 10 files changed, 1339 deletions(-) delete mode 100644 src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddEditorRoleToPersonGenerator.java delete mode 100644 src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddHeadOfRoleToPersonGenerator.java delete mode 100644 src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddMemberRoleToPersonGenerator.java delete mode 100644 src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddOrganizerRoleToPersonGenerator.java delete mode 100644 src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddOutreachProviderRoleToPersonGenerator.java delete mode 100644 src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddPresenterRoleToPersonGenerator.java delete mode 100644 src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddResearcherRoleToPersonGenerator.java delete mode 100644 src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddReviewerRoleToPersonGenerator.java delete mode 100644 src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddServiceProviderRoleToPersonGenerator.java delete mode 100644 src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddTeacherRoleToPersonGenerator.java diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddEditorRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddEditorRoleToPersonGenerator.java deleted file mode 100644 index 59c2c149..00000000 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddEditorRoleToPersonGenerator.java +++ /dev/null @@ -1,131 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.apache.commons.lang.StringUtils; -import javax.servlet.http.HttpSession; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisionVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; -import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils; - -import com.hp.hpl.jena.rdf.model.Literal; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.vocabulary.RDFS; -import com.hp.hpl.jena.vocabulary.RDF; -import com.hp.hpl.jena.vocabulary.XSD; -import com.hp.hpl.jena.ontology.OntModel; -import edu.cornell.mannlib.vitro.webapp.beans.DataProperty; -import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement; -import edu.cornell.mannlib.vitro.webapp.beans.Individual; -import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty; -import edu.cornell.mannlib.vitro.webapp.beans.VClass; -import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues; -import edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.Field; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.processEdit.RdfLiteralHash; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditN3GeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.SelectListGeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.FieldVTwo; -import edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils; -import edu.cornell.mannlib.vitro.webapp.search.beans.ProhibitedFromSearch; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.DateTimeIntervalValidation; -/** - * 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 - number of Individuals that the user has to select from. - Stage two is selecting the non-person Individual to associate - with the Role. - - This is intended to create a set of statements like: - - ?person core:hasResearchActivityRole ?newRole. - ?newRole rdf:type core:ResearchActivityRole ; - roleToActivityPredicate ?someActivity . - ?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: - getRoleType - getRoleActivityTypeOptionsType - getRoleActivityTypeObjectClassUri - getRoleActivityTypeLiteralOptions - - * - */ -public class AddEditorRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { - - private Log log = LogFactory.getLog(AddEditorRoleToPersonGenerator.class); - private static String template = "addEditorRoleToPerson.ftl"; - - //Should this be overridden - @Override - protected void setTemplate(EditConfigurationVTwo editConfiguration, - VitroRequest vreq) { - editConfiguration.setTemplate(template); - } - - - //The default activityToRolePredicate and roleToActivityPredicates are - //correct for this subclass so they don't need to be overwritten - public String getActivityToRolePredicate(VitroRequest vreq) { - return "http://vivoweb.org/ontology/core#linkedRole"; - } - - public String getRoleToActivityPredicate(VitroRequest vreq) { - return "http://vivoweb.org/ontology/core#forInformationResource"; - } - - //role type will always be set based on particular form - public String getRoleType(VitroRequest vreq) { - //TODO: Get dynamic way of including vivoweb ontology - return "http://vivoweb.org/ontology/core#EditorRole"; - } - - //Each subclass generator will return its own type of option here: - //whether literal hardcoded, based on class group, or subclasses of a specific class - //The latter two will apparently lend some kind of uri to objectClassUri ? - public RoleActivityOptionTypes getRoleActivityTypeOptionsType(VitroRequest vreq) { - return RoleActivityOptionTypes.CHILD_VCLASSES; - } - - //This too will depend on the specific subclass of generator - public String getRoleActivityTypeObjectClassUri(VitroRequest vreq) { - return "http://purl.org/ontology/bibo/Collection"; - } - - - //Editor role involves hard-coded options for the "right side" of the role or activity - protected HashMap getRoleActivityTypeLiteralOptions(VitroRequest vreq) { - HashMap literalOptions = new HashMap(); - literalOptions.put("", "Select type"); - return literalOptions; - } - - //isShowRoleLabelField remains true for this so doesn't need to be overwritten - public boolean isShowRoleLabelField(VitroRequest vreq) { - return false; - } - - -} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddHeadOfRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddHeadOfRoleToPersonGenerator.java deleted file mode 100644 index afa6c933..00000000 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddHeadOfRoleToPersonGenerator.java +++ /dev/null @@ -1,150 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.apache.commons.lang.StringUtils; -import javax.servlet.http.HttpSession; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisionVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; -import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils; - -import com.hp.hpl.jena.rdf.model.Literal; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.vocabulary.RDFS; -import com.hp.hpl.jena.vocabulary.RDF; -import com.hp.hpl.jena.vocabulary.XSD; -import com.hp.hpl.jena.ontology.OntModel; -import edu.cornell.mannlib.vitro.webapp.beans.DataProperty; -import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement; -import edu.cornell.mannlib.vitro.webapp.beans.Individual; -import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty; -import edu.cornell.mannlib.vitro.webapp.beans.VClass; -import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues; -import edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.Field; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.processEdit.RdfLiteralHash; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditN3GeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.SelectListGeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.FieldVTwo; -import edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils; -import edu.cornell.mannlib.vitro.webapp.search.beans.ProhibitedFromSearch; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.DateTimeIntervalValidation; -/** - * 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 - number of Individuals that the user has to select from. - Stage two is selecting the non-person Individual to associate - with the Role. - - This is intended to create a set of statements like: - - ?person core:hasResearchActivityRole ?newRole. - ?newRole rdf:type core:ResearchActivityRole ; - roleToActivityPredicate ?someActivity . - ?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: - getRoleType - getRoleActivityTypeOptionsType - getRoleActivityTypeObjectClassUri - getRoleActivityTypeLiteralOptions - - * - */ -public class AddHeadOfRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { - - private Log log = LogFactory.getLog(AddHeadOfRoleToPersonGenerator.class); - private static String template = "addHeadOfRoleToPerson.ftl"; - - //Should this be overridden - @Override - protected void setTemplate(EditConfigurationVTwo editConfiguration, - VitroRequest vreq) { - editConfiguration.setTemplate(template); - } - - - //The default activityToRolePredicate and roleToActivityPredicates are - //correct for this subclass so they don't need to be overwritten - - //role type will always be set based on particular form - public String getRoleType(VitroRequest vreq) { - //TODO: Get dynamic way of including vivoweb ontology - return "http://vivoweb.org/ontology/core#LeaderRole"; - } - - //Each subclass generator will return its own type of option here: - //whether literal hardcoded, based on class group, or subclasses of a specific class - //The latter two will apparently lend some kind of uri to objectClassUri ? - public RoleActivityOptionTypes getRoleActivityTypeOptionsType(VitroRequest vreq) { - return RoleActivityOptionTypes.HARDCODED_LITERALS; - } - - //This too will depend on the specific subclass of generator - public String getRoleActivityTypeObjectClassUri(VitroRequest vreq) { - return null; - } - - - //Head Of role involves hard-coded options for the "right side" of the role or activity - protected HashMap getRoleActivityTypeLiteralOptions(VitroRequest vreq) { - HashMapliteralOptions.put( literalOptions = new HashMap(); - literalOptions.put("", "Select type"); - literalOptions.put("http://vivoweb.org/ontology/core#Association", "Association"); - literalOptions.put("http://vivoweb.org/ontology/core#Center", "Center"); - literalOptions.put("http://vivoweb.org/ontology/core#ClinicalOrganization", "Clinical Organization"); - literalOptions.put("http://vivoweb.org/ontology/core#College", "College"); - literalOptions.put("http://vivoweb.org/ontology/core#Committee", "Committee"); - literalOptions.put("http://vivoweb.org/ontology/core#Consortium", "Consortium"); - literalOptions.put("http://vivoweb.org/ontology/core#Department", "Department"); - literalOptions.put("http://vivoweb.org/ontology/core#Division", "Division"); - literalOptions.put("http://purl.org/NET/c4dm/event.owl#Event", "Event"); - literalOptions.put("http://vivoweb.org/ontology/core#ExtensionUnit", "Extension Unit"); - literalOptions.put("http://vivoweb.org/ontology/core#Foundation", "Foundation"); - literalOptions.put("http://vivoweb.org/ontology/core#FundingOrganization", "Funding Organization"); - literalOptions.put("http://vivoweb.org/ontology/core#GovernmentAgency", "Government Agency"); - literalOptions.put("http://vivoweb.org/ontology/core#Hospital", "Hospital"); - literalOptions.put("http://vivoweb.org/ontology/core#Institute", "Institute"); - literalOptions.put("http://vivoweb.org/ontology/core#Laboratory", "Laboratory"); - literalOptions.put("http://vivoweb.org/ontology/core#Library", "Library"); - literalOptions.put("http://vivoweb.org/ontology/core#Museum", "Museum"); - literalOptions.put("http://xmlns.com/foaf/0.1/Organization", "Organization"); - literalOptions.put("http://vivoweb.org/ontology/core#PrivateCompany", "Private Company"); - literalOptions.put("http://vivoweb.org/ontology/core#Program", "Program"); - literalOptions.put("http://vivoweb.org/ontology/core#Project", "Project"); - literalOptions.put("http://vivoweb.org/ontology/core#Publisher", "Publisher"); - literalOptions.put("http://vivoweb.org/ontology/core#ResearchOrganization", "Research Organization"); - literalOptions.put("http://vivoweb.org/ontology/core#School", "School"); - literalOptions.put("http://vivoweb.org/ontology/core#Service","Service"); - literalOptions.put("http://vivoweb.org/ontology/core#Team", "Team"); - literalOptions.put("http://vivoweb.org/ontology/core#StudentOrganization", "Student Organization"); - literalOptions.put("http://vivoweb.org/ontology/core#University", "University"); - return literalOptions; - } - - //isShowRoleLabelField remains true for this so doesn't need to be overwritten - - -} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddMemberRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddMemberRoleToPersonGenerator.java deleted file mode 100644 index 563530b7..00000000 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddMemberRoleToPersonGenerator.java +++ /dev/null @@ -1,122 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.apache.commons.lang.StringUtils; -import javax.servlet.http.HttpSession; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisionVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; -import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils; - -import com.hp.hpl.jena.rdf.model.Literal; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.vocabulary.RDFS; -import com.hp.hpl.jena.vocabulary.RDF; -import com.hp.hpl.jena.vocabulary.XSD; -import com.hp.hpl.jena.ontology.OntModel; -import edu.cornell.mannlib.vitro.webapp.beans.DataProperty; -import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement; -import edu.cornell.mannlib.vitro.webapp.beans.Individual; -import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty; -import edu.cornell.mannlib.vitro.webapp.beans.VClass; -import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues; -import edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary;Member -import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.Field; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.processEdit.RdfLiteralHash; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditN3GeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.SelectListGeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.FieldVTwo; -import edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils; -import edu.cornell.mannlib.vitro.webapp.search.beans.ProhibitedFromSearch; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.DateTimeIntervalValidation; -/** - * 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 - number of Individuals that the user has to select from. - Stage two is selecting the non-person Individual to associate - with the Role. - - This is intended to create a set of statements like: - - ?person core:hasResearchActivityRole ?newRole. - ?newRole rdf:type core:ResearchActivityRole ; - roleToActivityPredicate ?someActivity . - ?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: - getRoleType - getRoleActivityTypeOptionsType - getRoleActivityTypeObjectClassUri - getRoleActivityTypeLiteralOptions - - * - */ -public class AddMemberRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { - - private Log log = LogFactory.getLog(AddMemberRoleToPersonGenerator.class); - private static String template = "addMemberRoleToPerson.ftl"; - - //Should this be overridden - @Override - protected void setTemplate(EditConfigurationVTwo editConfiguration, - VitroRequest vreq) { - editConfiguration.setTemplate(template); - } - - - //The default activityToRolePredicate and roleToActivityPredicates are - //correct for this subclass so they don't need to be overwritten - - - //role type will always be set based on particular form - public String getRoleType(VitroRequest vreq) { - //TODO: Get dynamic way of including vivoweb ontology - return "http://vivoweb.org/ontology/core#MemberRole"; - } - - //Each subclass generator will return its own type of option here: - //whether literal hardcoded, based on class group, or subclasses of a specific class - //The latter two will apparently lend some kind of uri to objectClassUri ? - public RoleActivityOptionTypes getRoleActivityTypeOptionsType(VitroRequest vreq) { - return RoleActivityOptionTypes.VCLASSGROUP; - } - - //This too will depend on the specific subclass of generator - public String getRoleActivityTypeObjectClassUri(VitroRequest vreq) { - return "http://vivoweb.org/ontology#vitroClassGrouporganizations"; - } - - - //Member role involves hard-coded options for the "right side" of the role or activity - protected HashMap getRoleActivityTypeLiteralOptions(VitroRequest vreq) { - HashMap literalOptions = new HashMap(); - literalOptions.put("", "Select type"); - return literalOptions; - } - - //isShowRoleLabelField remains true for this so doesn't need to be overwritten - - -} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddOrganizerRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddOrganizerRoleToPersonGenerator.java deleted file mode 100644 index bdbce378..00000000 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddOrganizerRoleToPersonGenerator.java +++ /dev/null @@ -1,137 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.apache.commons.lang.StringUtils; -import javax.servlet.http.HttpSession; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisionVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; -import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils; - -import com.hp.hpl.jena.rdf.model.Literal; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.vocabulary.RDFS; -import com.hp.hpl.jena.vocabulary.RDF; -import com.hp.hpl.jena.vocabulary.XSD; -import com.hp.hpl.jena.ontology.OntModel; -import edu.cornell.mannlib.vitro.webapp.beans.DataProperty; -import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement; -import edu.cornell.mannlib.vitro.webapp.beans.Individual; -import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty; -import edu.cornell.mannlib.vitro.webapp.beans.VClass; -import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues; -import edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.Field; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.processEdit.RdfLiteralHash; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditN3GeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.SelectListGeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.FieldVTwo; -import edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils; -import edu.cornell.mannlib.vitro.webapp.search.beans.ProhibitedFromSearch; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.DateTimeIntervalValidation; -/** - * 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 - number of Individuals that the user has to select from. - Stage two is selecting the non-person Individual to associate - with the Role. - - This is intended to create a set of statements like: - - ?person core:hasResearchActivityRole ?newRole. - ?newRole rdf:type core:ResearchActivityRole ; - roleToActivityPredicate ?someActivity . - ?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: - getRoleType - getRoleActivityTypeOptionsType - getRoleActivityTypeObjectClassUri - getRoleActivityTypeLiteralOptions - - * - */ -public class AddOrganizerRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { - - private Log log = LogFactory.getLog(AddOrganizerRoleToPersonGenerator.class); - private static String template = "addOrganizerRoleToPerson.ftl"; - - //Should this be overridden - @Override - protected void setTemplate(EditConfigurationVTwo editConfiguration, - VitroRequest vreq) { - editConfiguration.setTemplate(template); - } - - - //The default activityToRolePredicate and roleToActivityPredicates are - //correct for this subclass so they don't need to be overwritten - - //role type will always be set based on particular form - public String getRoleType(VitroRequest vreq) { - //TODO: Get dynamic way of including vivoweb ontology - return "http://vivoweb.org/ontology/core#OrganizerRole"; - } - - //Each subclass generator will return its own type of option here: - //whether literal hardcoded, based on class group, or subclasses of a specific class - //The latter two will apparently lend some kind of uri to objectClassUri ? - public RoleActivityOptionTypes getRoleActivityTypeOptionsType(VitroRequest vreq) { - return RoleActivityOptionTypes.HARDCODED_LITERALS; - } - - //This too will depend on the specific subclass of generator - public String getRoleActivityTypeObjectClassUri(VitroRequest vreq) { - return null; - } - - - //Organizer role involves hard-coded options for the "right side" of the role or activity - protected HashMap getRoleActivityTypeLiteralOptions(VitroRequest vreq) { - HashMapliteralOptions.put( literalOptions = new HashMap(); - literalOptions.put("", "Select type"); - literalOptions.put("http://purl.org/NET/c4dm/event.owl#Event", "Event"); - literalOptions.put("http://vivoweb.org/ontology/core#Competition", "Competition"); - literalOptions.put("http://purl.org/ontology/bibo/Conference", "Conference"); - literalOptions.put("http://vivoweb.org/ontology/core#Course", "Course"); - literalOptions.put("http://vivoweb.org/ontology/core#Exhibit", "Exhibit"); - literalOptions.put("http://vivoweb.org/ontology/core#Meeting", "Meeting"); - literalOptions.put("http://vivoweb.org/ontology/core#Presentation", "Presentation"); - literalOptions.put("http://vivoweb.org/ontology/core#InvitedTalk", "Invited Talk"); - literalOptions.put("http://purl.org/ontology/bibo/Workshop", "Workshop"); - literalOptions.put("http://vivoweb.org/ontology/core#EventSeries", "Event Series"); - literalOptions.put("http://vivoweb.org/ontology/core#ConferenceSeries", "Conference Series"); - literalOptions.put("http://vivoweb.org/ontology/core#SeminarSeries", "Seminar Series"); - literalOptions.put("http://vivoweb.org/ontology/core#WorkshopSeries", "Workshop Series"); - return literalOptions; - } - - //isShowRoleLabelField remains true for this so doesn't need to be overwritten - public boolean isShowRoleLabelField(VitroRequest vreq) { - return false; - } - - -} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddOutreachProviderRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddOutreachProviderRoleToPersonGenerator.java deleted file mode 100644 index 8055f025..00000000 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddOutreachProviderRoleToPersonGenerator.java +++ /dev/null @@ -1,149 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.apache.commons.lang.StringUtils; -import javax.servlet.http.HttpSession; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisionVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; -import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils; - -import com.hp.hpl.jena.rdf.model.Literal; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.vocabulary.RDFS; -import com.hp.hpl.jena.vocabulary.RDF; -import com.hp.hpl.jena.vocabulary.XSD; -import com.hp.hpl.jena.ontology.OntModel; -import edu.cornell.mannlib.vitro.webapp.beans.DataProperty; -import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement; -import edu.cornell.mannlib.vitro.webapp.beans.Individual; -import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty; -import edu.cornell.mannlib.vitro.webapp.beans.VClass; -import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues; -import edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.Field; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.processEdit.RdfLiteralHash; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditN3GeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.SelectListGeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.FieldVTwo; -import edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils; -import edu.cornell.mannlib.vitro.webapp.search.beans.ProhibitedFromSearch; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.DateTimeIntervalValidation; -/** - * 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 - number of Individuals that the user has to select from. - Stage two is selecting the non-person Individual to associate - with the Role. - - This is intended to create a set of statements like: - - ?person core:hasResearchActivityRole ?newRole. - ?newRole rdf:type core:ResearchActivityRole ; - roleToActivityPredicate ?someActivity . - ?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: - getRoleType - getRoleActivityTypeOptionsType - getRoleActivityTypeObjectClassUri - getRoleActivityTypeLiteralOptions - - * - */ -public class AddOutreachProviderRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { - - private Log log = LogFactory.getLog(AddOutreachProviderRoleToPersonGenerator.class); - private static String template = "addOutreachProviderRoleToPerson.ftl"; - - //Should this be overridden - @Override - protected void setTemplate(EditConfigurationVTwo editConfiguration, - VitroRequest vreq) { - editConfiguration.setTemplate(template); - } - - - //The default activityToRolePredicate and roleToActivityPredicates are - //correct for this subclass so they don't need to be overwritten - - //role type will always be set based on particular form - public String getRoleType(VitroRequest vreq) { - //TODO: Get dynamic way of including vivoweb ontology - return "http://vivoweb.org/ontology/core#OutreachProviderRole"; - } - - //Each subclass generator will return its own type of option here: - //whether literal hardcoded, based on class group, or subclasses of a specific class - //The latter two will apparently lend some kind of uri to objectClassUri ? - public RoleActivityOptionTypes getRoleActivityTypeOptionsType(VitroRequest vreq) { - return RoleActivityOptionTypes.HARDCODED_LITERALS; - } - - //This too will depend on the specific subclass of generator - public String getRoleActivityTypeObjectClassUri(VitroRequest vreq) { - return null; - } - - - //Outreach Provider role involves hard-coded options for the "right side" of the role or activity - protected HashMap getRoleActivityTypeLiteralOptions(VitroRequest vreq) { - HashMapliteralOptions.put( literalOptions = new HashMap(); - literalOptions.put("", "Select type"); - literalOptions.put("http://vivoweb.org/ontology/core#Association", "Association"); - literalOptions.put("http://vivoweb.org/ontology/core#Center", "Center"); - literalOptions.put("http://vivoweb.org/ontology/core#ClinicalOrganization", "Clinical Organization"); - literalOptions.put("http://vivoweb.org/ontology/core#College", "College"); - literalOptions.put("http://vivoweb.org/ontology/core#Committee", "Committee"); - literalOptions.put("http://vivoweb.org/ontology/core#Consortium", "Consortium"); - literalOptions.put("http://vivoweb.org/ontology/core#Department", "Department"); - literalOptions.put("http://vivoweb.org/ontology/core#Division", "Division"); - literalOptions.put("http://purl.org/NET/c4dm/event.owl#Event", "Event"); - literalOptions.put("http://vivoweb.org/ontology/core#ExtensionUnit", "Extension Unit"); - literalOptions.put("http://vivoweb.org/ontology/core#Foundation", "Foundation"); - literalOptions.put("http://vivoweb.org/ontology/core#FundingOrganization", "Funding Organization"); - literalOptions.put("http://vivoweb.org/ontology/core#GovernmentAgency", "Government Agency"); - literalOptions.put("http://vivoweb.org/ontology/core#Hospital", "Hospital"); - literalOptions.put("http://vivoweb.org/ontology/core#Institute", "Institute"); - literalOptions.put("http://vivoweb.org/ontology/core#Laboratory", "Laboratory"); - literalOptions.put("http://vivoweb.org/ontology/core#Library", "Library"); - literalOptions.put("http://vivoweb.org/ontology/core#Museum", "Museum"); - literalOptions.put("http://xmlns.com/foaf/0.1/Organization", "Organization"); - literalOptions.put("http://vivoweb.org/ontology/core#PrivateCompany", "Private Company"); - literalOptions.put("http://vivoweb.org/ontology/core#Program", "Program"); - literalOptions.put("http://vivoweb.org/ontology/core#Project", "Project"); - literalOptions.put("http://vivoweb.org/ontology/core#Publisher", "Publisher"); - literalOptions.put("http://vivoweb.org/ontology/core#ResearchOrganization", "Research Organization"); - literalOptions.put("http://vivoweb.org/ontology/core#Team", "Team"); - literalOptions.put("http://vivoweb.org/ontology/core#School", "School"); - literalOptions.put("http://vivoweb.org/ontology/core#Service","Service"); - literalOptions.put("http://vivoweb.org/ontology/core#StudentOrganization", "Student Organization"); - literalOptions.put("http://vivoweb.org/ontology/core#University", "University"); - return literalOptions; - } - - //isShowRoleLabelField remains true for this so doesn't need to be overwritten - -} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddPresenterRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddPresenterRoleToPersonGenerator.java deleted file mode 100644 index 71e47c24..00000000 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddPresenterRoleToPersonGenerator.java +++ /dev/null @@ -1,122 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.apache.commons.lang.StringUtils; -import javax.servlet.http.HttpSession; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisionVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; -import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils; - -import com.hp.hpl.jena.rdf.model.Literal; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.vocabulary.RDFS; -import com.hp.hpl.jena.vocabulary.RDF; -import com.hp.hpl.jena.vocabulary.XSD; -import com.hp.hpl.jena.ontology.OntModel; -import edu.cornell.mannlib.vitro.webapp.beans.DataProperty; -import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement; -import edu.cornell.mannlib.vitro.webapp.beans.Individual; -import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty; -import edu.cornell.mannlib.vitro.webapp.beans.VClass; -import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues; -import edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.Field; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.processEdit.RdfLiteralHash; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditN3GeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.SelectListGeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.FieldVTwo; -import edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils; -import edu.cornell.mannlib.vitro.webapp.search.beans.ProhibitedFromSearch; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.DateTimeIntervalValidation; -/** - * 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 - number of Individuals that the user has to select from. - Stage two is selecting the non-person Individual to associate - with the Role. - - This is intended to create a set of statements like: - - ?person core:hasResearchActivityRole ?newRole. - ?newRole rdf:type core:ResearchActivityRole ; - roleToActivityPredicate ?someActivity . - ?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: - getRoleType - getRoleActivityTypeOptionsType - getRoleActivityTypeObjectClassUri - getRoleActivityTypeLiteralOptions - - * - */ -public class AddPresenterRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { - - private Log log = LogFactory.getLog(AddPresenterRoleToPersonGenerator.class); - private static String template = "addPresenterRoleToPerson.ftl"; - - //Should this be overridden - @Override - protected void setTemplate(EditConfigurationVTwo editConfiguration, - VitroRequest vreq) { - editConfiguration.setTemplate(template); - } - - - //The default activityToRolePredicate and roleToActivityPredicates are - //correct for this subclass so they don't need to be overwritten - - //role type will always be set based on particular form - public String getRoleType(VitroRequest vreq) { - //TODO: Get dynamic way of including vivoweb ontology - return "http://vivoweb.org/ontology/core#PresenterRole"; - } - - //Each subclass generator will return its own type of option here: - //whether literal hardcoded, based on class group, or subclasses of a specific class - //The latter two will apparently lend some kind of uri to objectClassUri ? - public RoleActivityOptionTypes getRoleActivityTypeOptionsType(VitroRequest vreq) { - return RoleActivityOptionTypes.HARDCODED_LITERALS; - } - - //This too will depend on the specific subclass of generator - public String getRoleActivityTypeObjectClassUri(VitroRequest vreq) { - return null; - } - - - //Presenter role involves hard-coded options for the "right side" of the role or activity - protected HashMap getRoleActivityTypeLiteralOptions(VitroRequest vreq) { - HashMapliteralOptions.put( literalOptions = new HashMap(); - literalOptions.put("", "Select type"); - literalOptions.put("http://vivoweb.org/ontology/core#Presentation", "Presentation"); - literalOptions.put("http://vivoweb.org/ontology/core#InvitedTalk","Invited Talk"); - return literalOptions; - } - - //isShowRoleLabelField remains true for this so doesn't need to be overwritten - -} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddResearcherRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddResearcherRoleToPersonGenerator.java deleted file mode 100644 index e1565c99..00000000 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddResearcherRoleToPersonGenerator.java +++ /dev/null @@ -1,122 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.apache.commons.lang.StringUtils; -import javax.servlet.http.HttpSession; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisionVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; -import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils; - -import com.hp.hpl.jena.rdf.model.Literal; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.vocabulary.RDFS; -import com.hp.hpl.jena.vocabulary.RDF; -import com.hp.hpl.jena.vocabulary.XSD; -import com.hp.hpl.jena.ontology.OntModel; -import edu.cornell.mannlib.vitro.webapp.beans.DataProperty; -import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement; -import edu.cornell.mannlib.vitro.webapp.beans.Individual; -import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty; -import edu.cornell.mannlib.vitro.webapp.beans.VClass; -import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues; -import edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.Field; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.processEdit.RdfLiteralHash; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditN3GeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.SelectListGeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.FieldVTwo; -import edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils; -import edu.cornell.mannlib.vitro.webapp.search.beans.ProhibitedFromSearch; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.DateTimeIntervalValidation; -/** - * 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 - number of Individuals that the user has to select from. - Stage two is selecting the non-person Individual to associate - with the Role. - - This is intended to create a set of statements like: - - ?person core:hasResearchActivityRole ?newRole. - ?newRole rdf:type core:ResearchActivityRole ; - roleToActivityPredicate ?someActivity . - ?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: - getRoleType - getRoleActivityTypeOptionsType - getRoleActivityTypeObjectClassUri - getRoleActivityTypeLiteralOptions - - * - */ -public class AddResearcherRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { - - private Log log = LogFactory.getLog(AddResearcherRoleToPersonGenerator.class); - private static String template = "addResearcherRoleToPerson.ftl"; - - //Should this be overridden - @Override - protected void setTemplate(EditConfigurationVTwo editConfiguration, - VitroRequest vreq) { - editConfiguration.setTemplate(template); - } - - - //The default activityToRolePredicate and roleToActivityPredicates are - //correct for this subclass so they don't need to be overwritten - - //role type will always be set based on particular form - public String getRoleType(VitroRequest vreq) { - //TODO: Get dynamic way of including vivoweb ontology - return "http://vivoweb.org/ontology/core#ResearcherRole"; - } - - //Each subclass generator will return its own type of option here: - //whether literal hardcoded, based on class group, or subclasses of a specific class - //The latter two will apparently lend some kind of uri to objectClassUri ? - public RoleActivityOptionTypes getRoleActivityTypeOptionsType(VitroRequest vreq) { - return RoleActivityOptionTypes.HARDCODED_LITERALS; - } - - //This too will depend on the specific subclass of generator - public String getRoleActivityTypeObjectClassUri(VitroRequest vreq) { - return null; - } - - - //Researcher role involves hard-coded options for the "right side" of the role or activity - protected HashMap getRoleActivityTypeLiteralOptions(VitroRequest vreq) { - HashMapliteralOptions.put( literalOptions = new HashMap(); - literalOptions.put("", "Select one"); - literalOptions.put("http://vivoweb.org/ontology/core#Grant", "Grant"); - literalOptions.put("http://vivoweb.org/ontology/core#Project","Project"); - return literalOptions; - } - - //isShowRoleLabelField remains true for this so doesn't need to be overwritten - -} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddReviewerRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddReviewerRoleToPersonGenerator.java deleted file mode 100644 index 17459c69..00000000 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddReviewerRoleToPersonGenerator.java +++ /dev/null @@ -1,131 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.apache.commons.lang.StringUtils; -import javax.servlet.http.HttpSession; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisionVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; -import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils; - -import com.hp.hpl.jena.rdf.model.Literal; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.vocabulary.RDFS; -import com.hp.hpl.jena.vocabulary.RDF; -import com.hp.hpl.jena.vocabulary.XSD; -import com.hp.hpl.jena.ontology.OntModel; -import edu.cornell.mannlib.vitro.webapp.beans.DataProperty; -import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement; -import edu.cornell.mannlib.vitro.webapp.beans.Individual; -import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty; -import edu.cornell.mannlib.vitro.webapp.beans.VClass; -import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues; -import edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.Field; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.processEdit.RdfLiteralHash; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditN3GeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.SelectListGeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.FieldVTwo; -import edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils; -import edu.cornell.mannlib.vitro.webapp.search.beans.ProhibitedFromSearch; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.DateTimeIntervalValidation; -/** - * 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 - number of Individuals that the user has to select from. - Stage two is selecting the non-person Individual to associate - with the Role. - - This is intended to create a set of statements like: - - ?person core:hasResearchActivityRole ?newRole. - ?newRole rdf:type core:ResearchActivityRole ; - roleToActivityPredicate ?someActivity . - ?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: - getRoleType - getRoleActivityTypeOptionsType - getRoleActivityTypeObjectClassUri - getRoleActivityTypeLiteralOptions - - * - */ -public class AddReviewerRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { - - private Log log = LogFactory.getLog(AddReviewerRoleToPersonGenerator.class); - private static String template = "addReviewerRoleToPerson.ftl"; - - //Should this be overridden - @Override - protected void setTemplate(EditConfigurationVTwo editConfiguration, - VitroRequest vreq) { - editConfiguration.setTemplate(template); - } - - - //The default activityToRolePredicate and roleToActivityPredicates are - //correct for this subclass so they don't need to be overwritten - public String getActivityToRolePredicate(VitroRequest vreq) { - return "http://vivoweb.org/ontology/core#linkedRole"; - } - - public String getRoleToActivityPredicate(VitroRequest vreq) { - return "http://vivoweb.org/ontology/core#forInformationResource"; - } - - //role type will always be set based on particular form - public String getRoleType(VitroRequest vreq) { - //TODO: Get dynamic way of including vivoweb ontology - return "http://vivoweb.org/ontology/core#ReviewerRole"; - } - - //Each subclass generator will return its own type of option here: - //whether literal hardcoded, based on class group, or subclasses of a specific class - //The latter two will apparently lend some kind of uri to objectClassUri ? - public RoleActivityOptionTypes getRoleActivityTypeOptionsType(VitroRequest vreq) { - return RoleActivityOptionTypes.CHILD_VCLASSES; - } - - //This too will depend on the specific subclass of generator - public String getRoleActivityTypeObjectClassUri(VitroRequest vreq) { - return "http://vivoweb.org/ontology/core#InformationResource"; - } - - - //Reviewer role involves hard-coded options for the "right side" of the role or activity - protected HashMap getRoleActivityTypeLiteralOptions(VitroRequest vreq) { - HashMap literalOptions = new HashMap(); - literalOptions.put("", "Select type"); - return literalOptions; - } - - //isShowRoleLabelField remains true for this so doesn't need to be overwritten - public boolean isShowRoleLabelField(VitroRequest vreq) { - return false; - } - - -} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddServiceProviderRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddServiceProviderRoleToPersonGenerator.java deleted file mode 100644 index 0f3abfa3..00000000 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddServiceProviderRoleToPersonGenerator.java +++ /dev/null @@ -1,151 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.apache.commons.lang.StringUtils; -import javax.servlet.http.HttpSession; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisionVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; -import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils; - -import com.hp.hpl.jena.rdf.model.Literal; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.vocabulary.RDFS; -import com.hp.hpl.jena.vocabulary.RDF; -import com.hp.hpl.jena.vocabulary.XSD; -import com.hp.hpl.jena.ontology.OntModel; -import edu.cornell.mannlib.vitro.webapp.beans.DataProperty; -import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement; -import edu.cornell.mannlib.vitro.webapp.beans.Individual; -import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty; -import edu.cornell.mannlib.vitro.webapp.beans.VClass; -import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues; -import edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.Field; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.processEdit.RdfLiteralHash; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditN3GeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.SelectListGeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.FieldVTwo; -import edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils; -import edu.cornell.mannlib.vitro.webapp.search.beans.ProhibitedFromSearch; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.DateTimeIntervalValidation; -/** - * 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 - number of Individuals that the user has to select from. - Stage two is selecting the non-person Individual to associate - with the Role. - - This is intended to create a set of statements like: - - ?person core:hasResearchActivityRole ?newRole. - ?newRole rdf:type core:ResearchActivityRole ; - roleToActivityPredicate ?someActivity . - ?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: - getRoleType - getRoleActivityTypeOptionsType - getRoleActivityTypeObjectClassUri - getRoleActivityTypeLiteralOptions - - * - */ -public class AddServiceProviderRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { - - private Log log = LogFactory.getLog(AddServiceProviderRoleToPersonGenerator.class); - private static String template = "addServiceProviderRoleToPerson.ftl"; - - //Should this be overridden - @Override - protected void setTemplate(EditConfigurationVTwo editConfiguration, - VitroRequest vreq) { - editConfiguration.setTemplate(template); - } - - - //The default activityToRolePredicate and roleToActivityPredicates are - //correct for this subclass so they don't need to be overwritten - - //role type will always be set based on particular form - public String getRoleType(VitroRequest vreq) { - //TODO: Get dynamic way of including vivoweb ontology - return "http://vivoweb.org/ontology/core#ServiceProviderRole"; - } - - //Each subclass generator will return its own type of option here: - //whether literal hardcoded, based on class group, or subclasses of a specific class - //The latter two will apparently lend some kind of uri to objectClassUri ? - public RoleActivityOptionTypes getRoleActivityTypeOptionsType(VitroRequest vreq) { - return RoleActivityOptionTypes.HARDCODED_LITERALS; - } - - //This too will depend on the specific subclass of generator - public String getRoleActivityTypeObjectClassUri(VitroRequest vreq) { - return null; - } - - - //Service Provider role involves hard-coded options for the "right side" of the role or activity - protected HashMap getRoleActivityTypeLiteralOptions(VitroRequest vreq) { - HashMap literalOptions = new HashMap(); - literalOptions.put("", "Select one"); - literalOptions.put("http://purl.org/ontology/bibo/Conference", "Conference"); - literalOptions.put("http://vivoweb.org/ontology/core#Association", "Association"); - literalOptions.put("http://vivoweb.org/ontology/core#Center", "Center"); - literalOptions.put("http://vivoweb.org/ontology/core#ClinicalOrganization", "Clinical Organization"); - literalOptions.put("http://vivoweb.org/ontology/core#College", "College"); - literalOptions.put("http://vivoweb.org/ontology/core#Committee", "Committee"); - literalOptions.put("http://vivoweb.org/ontology/core#Consortium", "Consortium"); - literalOptions.put("http://vivoweb.org/ontology/core#Department", "Department"); - literalOptions.put("http://vivoweb.org/ontology/core#Division", "Division"); - literalOptions.put("http://purl.org/NET/c4dm/event.owl#Event", "Event"); - literalOptions.put("http://vivoweb.org/ontology/core#ExtensionUnit", "Extension Unit"); - literalOptions.put("http://vivoweb.org/ontology/core#Foundation", "Foundation"); - literalOptions.put("http://vivoweb.org/ontology/core#FundingOrganization", "Funding Organization"); - literalOptions.put("http://vivoweb.org/ontology/core#GovernmentAgency", "Government Agency"); - literalOptions.put("http://vivoweb.org/ontology/core#Hospital", "Hospital"); - literalOptions.put("http://vivoweb.org/ontology/core#Institute", "Institute"); - literalOptions.put("http://vivoweb.org/ontology/core#Laboratory", "Laboratory"); - literalOptions.put("http://vivoweb.org/ontology/core#Library", "Library"); - literalOptions.put("http://vivoweb.org/ontology/core#Museum", "Museum"); - literalOptions.put("http://xmlns.com/foaf/0.1/Organization", "Organization"); - literalOptions.put("http://vivoweb.org/ontology/core#PrivateCompany", "Private Company"); - literalOptions.put("http://vivoweb.org/ontology/core#Program", "Program"); - literalOptions.put("http://vivoweb.org/ontology/core#Project", "Project"); - literalOptions.put("http://vivoweb.org/ontology/core#Publisher", "Publisher"); - literalOptions.put("http://vivoweb.org/ontology/core#ResearchOrganization", "Research Organization"); - literalOptions.put("http://vivoweb.org/ontology/core#Team", "Team"); - literalOptions.put("http://vivoweb.org/ontology/core#School", "School"); - literalOptions.put("http://vivoweb.org/ontology/core#Service","Service"); - literalOptions.put("http://vivoweb.org/ontology/core#StudentOrganization", "Student Organization"); - literalOptions.put("http://vivoweb.org/ontology/core#University", "University"); - return literalOptions; - } - - //isShowRoleLabelField remains true for this so doesn't need to be overwritten - - -} diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddTeacherRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddTeacherRoleToPersonGenerator.java deleted file mode 100644 index 1c17a72c..00000000 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddTeacherRoleToPersonGenerator.java +++ /dev/null @@ -1,124 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; - -import java.util.Arrays; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.apache.commons.lang.StringUtils; -import javax.servlet.http.HttpSession; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.DateTimeWithPrecisionVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; -import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils; - -import com.hp.hpl.jena.rdf.model.Literal; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.vocabulary.RDFS; -import com.hp.hpl.jena.vocabulary.RDF; -import com.hp.hpl.jena.vocabulary.XSD; -import com.hp.hpl.jena.ontology.OntModel; -import edu.cornell.mannlib.vitro.webapp.beans.DataProperty; -import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement; -import edu.cornell.mannlib.vitro.webapp.beans.Individual; -import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty; -import edu.cornell.mannlib.vitro.webapp.beans.VClass; -import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues; -import edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.Field; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.processEdit.RdfLiteralHash; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditN3GeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.SelectListGeneratorVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.FieldVTwo; -import edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils; -import edu.cornell.mannlib.vitro.webapp.search.beans.ProhibitedFromSearch; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils; -import edu.cornell.mannlib.vitro.webapp.utils.FrontEndEditingUtils.EditMode; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.DateTimeIntervalValidation; -/** - * 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 - number of Individuals that the user has to select from. - Stage two is selecting the non-person Individual to associate - with the Role. - - This is intended to create a set of statements like: - - ?person core:hasResearchActivityRole ?newRole. - ?newRole rdf:type core:ResearchActivityRole ; - roleToActivityPredicate ?someActivity . - ?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: - getRoleType - getRoleActivityTypeOptionsType - getRoleActivityTypeObjectClassUri - getRoleActivityTypeLiteralOptions - - * - */ -public class AddTeacherRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator { - - private Log log = LogFactory.getLog(AddTeacherRoleToPersonGenerator.class); - private static String template = "addTeacherRoleToPerson.ftl"; - - //Should this be overridden - @Override - protected void setTemplate(EditConfigurationVTwo editConfiguration, - VitroRequest vreq) { - editConfiguration.setTemplate(template); - } - - - //The default activityToRolePredicate and roleToActivityPredicates are - //correct for this subclass so they don't need to be overwritten - - //role type will always be set based on particular form - public String getRoleType(VitroRequest vreq) { - //TODO: Get dynamic way of including vivoweb ontology - return "http://vivoweb.org/ontology/core#TeacherRole"; - } - - //Each subclass generator will return its own type of option here: - //whether literal hardcoded, based on class group, or subclasses of a specific class - //The latter two will apparently lend some kind of uri to objectClassUri ? - public RoleActivityOptionTypes getRoleActivityTypeOptionsType(VitroRequest vreq) { - return RoleActivityOptionTypes.HARDCODED_LITERALS; - } - - //This too will depend on the specific subclass of generator - public String getRoleActivityTypeObjectClassUri(VitroRequest vreq) { - return null; - } - - - //Teacher role involves hard-coded options for the "right side" of the role or activity - protected HashMap getRoleActivityTypeLiteralOptions(VitroRequest vreq) { - HashMap literalOptions = new HashMap(); - literalOptions.put("", "Select one"); - literalOptions.put("http://purl.org/ontology/bibo/Conference", "Conference"); - literalOptions.put("http://vivoweb.org/ontology/core#Course","Course"); - literalOptions.put("http://purl.org/ontology/bibo/Workshop","Workshop"); - return literalOptions; - } - - //isShowRoleLabelField remains true for this so doesn't need to be overwritten - - -}