diff --git a/webapp/web/edit/dashboardPropsList.jsp b/webapp/web/edit/dashboardPropsList.jsp
deleted file mode 100644
index f3a0a1351..000000000
--- a/webapp/web/edit/dashboardPropsList.jsp
+++ /dev/null
@@ -1,87 +0,0 @@
-<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
-
-<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.DataProperty" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Property" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.PropertyGroup" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.PropertyGroupDao" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
-<%@ page import="java.util.ArrayList" %>
-<%@ page import="org.apache.commons.logging.Log" %>
-<%@ page import="org.apache.commons.logging.LogFactory" %>
-<%!
-public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.dashboardPropsList.jsp");
-%>
-
-<%-- just moving this into page scope for easy use --%>
-<%
- log.debug("Starting dashboardPropsList.jsp");
-
- // The goal here is to retrieve a list of object and data properties appropriate for the vclass
- // of the individual, by property group, and sorted the same way they would be in the public interface
-
- Individual subject = (Individual) request.getAttribute("entity");
- if (subject==null) {
- throw new Error("Subject individual must be in request scope for dashboardPropsList.jsp");
- }
-
- String defaultGroupName=null;
- String unassignedGroupName = (String) request.getAttribute("unassignedPropsGroupName");
- if (unassignedGroupName != null && unassignedGroupName.length()>0) {
- defaultGroupName = unassignedGroupName;
- log.debug("found temp group attribute \""+unassignedGroupName+"\" for unassigned properties");
- }
-
- VitroRequest vreq = new VitroRequest(request);
- WebappDaoFactory wdf = vreq.getWebappDaoFactory();
- PropertyGroupDao pgDao = wdf.getPropertyGroupDao();
- ArrayList groupsList = (ArrayList) request.getAttribute("groupsList");
- if (groupsList != null) {
- if (groupsList.size()>1) {%>
-
-<% }
- }%>
-
diff --git a/webapp/web/edit/editDatapropStmtRequestDispatch.jsp b/webapp/web/edit/editDatapropStmtRequestDispatch.jsp
deleted file mode 100644
index 65c7f56d2..000000000
--- a/webapp/web/edit/editDatapropStmtRequestDispatch.jsp
+++ /dev/null
@@ -1,182 +0,0 @@
-<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
-
-<%@ page import="com.hp.hpl.jena.rdf.model.Model" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.DataProperty" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.EditConfiguration" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.processEdit.RdfLiteralHash" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary" %>
-<%@ page import="java.util.HashMap" %>
-<%@ page import="org.apache.commons.logging.Log" %>
-<%@ page import="org.apache.commons.logging.LogFactory" %>
-
-<%
- //org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.editDatapropStmtRequestDispatch.jsp");
- final Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.editDatapropStmtRequestDispatch.jsp");
-%>
-
-<%@taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
-<%@page import="edu.cornell.mannlib.vitro.webapp.auth.requestedAction.usepages.UseMiscellaneousPages" %>
-<% request.setAttribute("requestedActions", new UseMiscellaneousPages()); %>
-
-
-<%
- //Check if special model, in which case forward
- if(request.getParameter("switchToDisplayModel") != null) {
- //forward to Edit Request Dispatch Controller
- String queryString = request.getQueryString();
- response.sendRedirect(request.getContextPath() + "/editRequestDispatch?" + queryString);
- }
-
- // Decide which form to forward to, set subjectUri, subjectUriJson, predicateUri, predicateUriJson in request
- // Also get the Individual for the subjectUri and put it in the request scope
- // If a datapropKey is sent it as an http parameter, then set datapropKey and datapropKeyJson in request, and
- // also get the DataPropertyStatement matching the key and put it in the request scope
- /* *************************************
- Parameters:
- subjectUri
- predicateUri
- datapropKey (optional)
- cmd (optional -- deletion)
- formParam (optional)
- ************************************** */
-
- final String DEFAULT_DATA_FORM = "defaultDatapropForm.jsp";
- final String DEFAULT_ERROR_FORM = "error.jsp";
-
- VitroRequest vreq = new VitroRequest(request);
- if( EditConfiguration.getEditKey( vreq ) == null ){
- vreq.setAttribute("editKey",EditConfiguration.newEditKey(session));
- }else{
- vreq.setAttribute("editKey", EditConfiguration.getEditKey( vreq ));
- }
-
- //set title to Edit to maintain functionality from 1.1.1 and avoid updates to Selenium tests
- request.setAttribute("title","Edit");
-
- String subjectUri = vreq.getParameter("subjectUri");
- String predicateUri = vreq.getParameter("predicateUri");
- String formParam = vreq.getParameter("editForm");
- String command = vreq.getParameter("cmd");
-
- if( subjectUri == null || subjectUri.trim().length() == 0 ) {
- log.error("required subjectUri parameter missing");
- throw new Error("subjectUri was empty, it is required by editDatapropStmtRequestDispatch");
- }
- if( predicateUri == null || predicateUri.trim().length() == 0) {
- log.error("required subjectUri parameter missing");
- throw new Error("predicateUri was empty, it is required by editDatapropStmtRequestDispatch");
- }
-
- // Since we have the URIs let's put the individual, data property, and optional data property statement in the request
- vreq.setAttribute("subjectUri", subjectUri);
- vreq.setAttribute("subjectUriJson", MiscWebUtils.escape(subjectUri));
- vreq.setAttribute("predicateUri", predicateUri);
- vreq.setAttribute("predicateUriJson", MiscWebUtils.escape(predicateUri));
-
- WebappDaoFactory wdf = vreq.getWebappDaoFactory();
-
- Individual subject = wdf.getIndividualDao().getIndividualByURI(subjectUri);
- if( subject == null ) {
- log.error("Could not find subject Individual '"+subjectUri+"' in model");
- throw new Error("editDatapropStmtRequestDispatch.jsp: Could not find subject Individual in model: '" + subjectUri + "'");
- }
- vreq.setAttribute("subject", subject);
-
- WebappDaoFactory unfilteredWdf = vreq.getUnfilteredWebappDaoFactory();
- DataProperty dataproperty = unfilteredWdf.getDataPropertyDao().getDataPropertyByURI( predicateUri );
- if( dataproperty == null) {
- // No dataproperty will be returned for rdfs:label, but we shouldn't throw an error.
- // This is controlled by the Jena layer, so we can't change the behavior.
- if (! predicateUri.equals(VitroVocabulary.LABEL)) {
- log.error("Could not find data property '"+predicateUri+"' in model");
- throw new Error("editDatapropStmtRequest.jsp: Could not find DataProperty in model: " + predicateUri);
- }
- }
- else {
- vreq.setAttribute("predicate", dataproperty);
- }
-
- String url= "/edit/editDatapropStmtRequestDispatch.jsp"; //I'd like to get this from the request but...
- vreq.setAttribute("formUrl", url + "?" + vreq.getQueryString());
-
- String datapropKeyStr = vreq.getParameter("datapropKey");
- int dataHash = 0;
- if( datapropKeyStr != null ){
- try {
- dataHash = Integer.parseInt(datapropKeyStr);
- vreq.setAttribute("datahash", dataHash);
- log.debug("Found a datapropKey in parameters and parsed it to int: " + dataHash);
- } catch (NumberFormatException ex) {
- throw new JspException("Cannot decode incoming datapropKey value "+datapropKeyStr+" as an integer hash in editDatapropStmtRequestDispatch.jsp");
- }
- }
-
- DataPropertyStatement dps = null;
- if( dataHash != 0) {
- Model model = (Model)application.getAttribute("jenaOntModel");
- dps = RdfLiteralHash.getPropertyStmtByHash(subject.getURI(), predicateUri, dataHash, model);
-
- if (dps==null) {
- log.error("No match to existing data property \""+predicateUri+"\" statement for subject \""+subjectUri+"\" via key "+datapropKeyStr);
- %> <%
- return;
- }
- vreq.setAttribute("dataprop", dps );
- }
-
- if( log.isDebugEnabled() ){
- if (dataproperty != null) {
- log.debug("predicate for DataProperty from request is " + dataproperty.getURI() + " with rangeDatatypeUri of '" + dataproperty.getRangeDatatypeURI() + "'");
- }
- if( dps == null )
- log.debug("no existing DataPropertyStatement statement was found, making a new statemet");
- else{
- log.debug("Found an existing DataPropertyStatement");
- String msg = "existing datapropstmt: ";
- msg += " subject uri: <"+dps.getIndividualURI() + ">\n";
- msg += " prop uri: <"+dps.getDatapropURI() + ">\n";
- msg += " prop data: \"" + dps.getData() + "\"\n";
- msg += " datatype: <" + dps.getDatatypeURI() + ">\n";
- msg += " hash of this stmt: " + RdfLiteralHash.makeRdfLiteralHash(dps);
- log.debug(msg);
- }
- }
-
- vreq.setAttribute("preForm", "/edit/formPrefix.jsp");
- vreq.setAttribute("postForm", "/edit/formSuffix.jsp");
-
- if( "delete".equals(command) ){ %>
-
-<% return;
- }
-
- String form = null;
- if (formParam != null) {
- form = formParam;
- }
- else if (predicateUri.equals(VitroVocabulary.LABEL)) { // dataproperty is null here
- form = "rdfsLabelForm.jsp";
- }
- else {
- form = dataproperty.getCustomEntryForm();
- if (form != null && form.length()>0) {
- log.warn("have a custom form for this data property: "+form);
- vreq.setAttribute("hasCustomForm","true");
- } else {
- form = DEFAULT_DATA_FORM;
- }
- }
- vreq.setAttribute("form", form);
-
- if( session.getAttribute("requestedFromEntity") == null ) {
- session.setAttribute("requestedFromEntity", subjectUri );
- }
-%>
-
diff --git a/webapp/web/edit/editRequestDispatch.jsp b/webapp/web/edit/editRequestDispatch.jsp
deleted file mode 100644
index 6d0801699..000000000
--- a/webapp/web/edit/editRequestDispatch.jsp
+++ /dev/null
@@ -1,279 +0,0 @@
-<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
-
-<%@page import="java.util.Map"%>
-<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.JspToGeneratorMapping"%>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.EditConfiguration" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %>
-<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
-<%@ page import="java.util.HashMap" %>
-<%@ page import="org.apache.commons.logging.Log" %>
-<%@ page import="org.apache.commons.logging.LogFactory" %>
-<%@ page errorPage="/error.jsp" %>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-
-<%!
-public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.editRequestDispatch.jsp");
-%>
-
-<%@taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
-<%@page import="edu.cornell.mannlib.vitro.webapp.auth.requestedAction.usepages.UseMiscellaneousPages" %>
-<% request.setAttribute("requestedActions", new UseMiscellaneousPages()); %>
-
-
-<%
-
- //Check if special model, in which case forward
- if(request.getParameter("switchToDisplayModel") != null) {
- //forward to Edit Request Dispatch Controller
- String queryString = request.getQueryString();
- //Instead of edit request which is what we'll do later, here we'll forward to Menu Management Controller
- response.sendRedirect(request.getContextPath() + "/editDisplayModel?" + queryString);
- }
-
- //If you find the parameter for testing the old edit, go ahead with the rest of the form
- //otherwise forward immediately to the new edit request dispatch controller
- String oldEdit = request.getParameter("oldEdit");
- if(oldEdit == null) {
- String queryString = request.getQueryString();
- response.sendRedirect(
- request.getContextPath() +
- "/editRequestDispatch?" +
- queryString);
- }
- /*
- Decide which form to forward to, set subjectUri, subjectUriJson, predicateUri, and predicateUriJson in request.
- Also get the Individual for the subjectUri and put it in the request scope.
-
- If objectUri is set as a http parameter, then set objectUri and objectUriJson in request, also get the
- Individual for the objectUri and put it in the request.
-
- /* *************************************
- Parameters:
- subjectUri
- predicateUri
- objectUri (optional)
- cmd (optional)
- typeOfNew (optional)
- ************************************** */
-
- final String DEFAULT_OBJ_FORM = "defaultObjPropForm.jsp";
- final String DEFAULT_ERROR_FORM = "error.jsp";
- final String DEFAULT_ADD_INDIVIDUAL = "defaultAddMissingIndividualForm.jsp";
-
- String editKey = (EditConfiguration.getEditKey(request) == null)
- ? EditConfiguration.newEditKey(session)
- : EditConfiguration.getEditKey(request);
- request.setAttribute("editKey", editKey);
-
- //set title to Edit to maintain functionality from 1.1.1 and avoid updates to Selenium tests
- request.setAttribute("title","Edit");
-
- // set the referrer URL, if available
- setEditReferer(editKey, request.getHeader("Referer"), request.getSession());
-
- /* Figure out what type of edit is being requested,
- setup for that type of edit OR forward to some
- thing that can do the setup */
-
- String subjectUri = request.getParameter("subjectUri");
- String predicateUri = request.getParameter("predicateUri");
- String formParam = request.getParameter("editform");
- String command = request.getParameter("cmd");
- String typeOfNew = request.getParameter("typeOfNew");
-
- //If there is no specified editForm then the subjectURI and the predicate
- //are needed to determine which form to use for this edit.
- if (formParam == null || "".equals(formParam)) {
- if (subjectUri == null || subjectUri.trim().length() == 0)
- throw new Error(
- "subjectUri was empty, it is required by editRequestDispatch");
- if ((predicateUri == null || predicateUri.trim().length() == 0)
- && (formParam == null || formParam.trim().length() == 0)) {
- throw new Error(
- "No form was specified, since both predicateUri and"
- + " editform are empty, One of these is required"
- + " by editRequestDispatch to choose a form.");
- }
- }else{
- log.debug("Found editform in http parameters.");
- }
- request.setAttribute("subjectUri", subjectUri);
- request.setAttribute("subjectUriJson", MiscWebUtils.escape(subjectUri));
- if (predicateUri != null) {
- request.setAttribute("predicateUri", predicateUri);
- request.setAttribute("predicateUriJson", MiscWebUtils.escape(predicateUri));
- }
-
- if (formParam != null && formParam.length() > 0) {
- request.setAttribute("editForm", formParam);
- } else {
- formParam = null;
- }
- String objectUri = request.getParameter("objectUri");
- if (objectUri != null) {
- request.setAttribute("objectUri", objectUri);
- request.setAttribute("objectUriJson", MiscWebUtils.escape(objectUri));
- }
- if( typeOfNew != null )
- request.setAttribute("typeOfNew", typeOfNew);
-
- request.setAttribute("urlPatternToReturnTo", request
- .getParameter("urlPattern") == null ? "/entity" : request
- .getParameter("urlPattern"));
- log.debug("setting urlPatternToReturnTo as "
- + request.getAttribute("urlPatternToReturnTo"));
-
- /* since we have the URIs lets put the individuals in the request */
- /* get some data to make the form more useful */
- VitroRequest vreq = new VitroRequest(request);
- WebappDaoFactory wdf = vreq.getWebappDaoFactory();
-
- if( subjectUri != null ){
- Individual subject = wdf.getIndividualDao().getIndividualByURI(subjectUri);
- if( subject != null ){
- request.setAttribute("subject", subject);
- }
- }
-
- boolean isEditOfExistingStmt = false;
- if (objectUri != null) {
- Individual object = wdf.getIndividualDao().getIndividualByURI(
- objectUri);
- if (object != null) {
- request.setAttribute("object", object);
- isEditOfExistingStmt = true;
- }
- }
-
- /* keep track of what form we are using so it can be returned to after a failed validation */
- String url = "/edit/editRequestDispatch.jsp"; //I'd like to get this from the request but...
- request.setAttribute("formUrl", url + "?"
- + request.getQueryString());
-
- request.setAttribute("preForm", "/edit/formPrefix.jsp");
- request.setAttribute("postForm", "/edit/formSuffix.jsp");
-
- if ("delete".equals(command)) {
- %><%
- return;
- }
-
- //Certain predicates may be annotated to change the behavior of the edit
- //link. Check for this annnotation and, if present, simply redirect
- //to the normal individual display for the object URI instead of bringing
- //up an editing form.
- //Note that we do not want this behavior for the delete link (handled above).
- if ( (predicateUri != null) && (objectUri != null) && (wdf.getObjectPropertyDao().skipEditForm(predicateUri)) ) {
- log.debug("redirecting for predicate " + predicateUri);
- %>
-
-
-
-
- <%
- return;
- }
-
- if (session.getAttribute("requestedFromEntity") == null)
- session.setAttribute("requestedFromEntity", subjectUri);
-
- ObjectProperty objectProp = null;
- String customForm = null;
- String form = DEFAULT_OBJ_FORM;
-
- if( predicateUri != null && ( formParam == null || formParam.length() == 0 ) ){
- objectProp = wdf.getObjectPropertyDao().getObjectPropertyByURI(predicateUri);
- customForm = objectProp.getCustomEntryForm();
- request.setAttribute("predicate", objectProp);
- //Offer create new and select from existing are ignored if there is a custom form
- if (customForm != null && customForm.length() > 0) {
- //bdc34: maybe this should be the custom form on the class, not the property.
- form = objectProp.getCustomEntryForm();
- }
- else {
- boolean isForwardToCreateNew =
- ( objectProp != null && objectProp.getOfferCreateNewOption() && objectProp.getSelectFromExisting() == false)
- || ( objectProp != null && objectProp.getOfferCreateNewOption() && "create".equals(command));
- if (isForwardToCreateNew) {
-
- request.setAttribute("isForwardToCreateNew", new Boolean(true));
-
- //If a objectProperty is both provideSelect and offerCreateNewOption
- // and a user goes to a defaultObjectProperty.jsp form then the user is
- // offered the option to create a new Individual and replace the
- // object in the existing objectPropertyStatement with this new individual.
- boolean isReplaceWithNew =
- isEditOfExistingStmt && "create".equals(command)
- && objectProp != null && objectProp.getOfferCreateNewOption() == true;
-
- // If an objectProperty is selectFromExisitng==false and offerCreateNewOption == true
- // the we want to forward to the create new form but edit the existing object
- // of the objPropStmt.
- boolean isForwardToCreateButEdit =
- isEditOfExistingStmt && objectProp != null
- && objectProp.getOfferCreateNewOption() == true
- && objectProp.getSelectFromExisting() == false
- && ! "create".equals(command);
-
- if( isReplaceWithNew ){
- request.setAttribute("isReplaceWithNew", new Boolean(true));
- form = DEFAULT_ADD_INDIVIDUAL;
- }else if( isForwardToCreateButEdit ){
- request.setAttribute("isForwardToCreateButEdit", new Boolean(true));
- form = DEFAULT_ADD_INDIVIDUAL;
- }else {
- form = DEFAULT_ADD_INDIVIDUAL;
- }
-
- }
-
- if( ! isForwardToCreateNew ){
- if( objectProp != null && objectProp.getCustomEntryForm() != null && objectProp.getCustomEntryForm().length() > 0){
- form = objectProp.getCustomEntryForm();
- }else{
- form = DEFAULT_OBJ_FORM ;
- }
- }
- }
-
- } else {
- //case where a form was passed as a http parameter
- form = formParam;
- }
-
- //If doing old edit, which we must be b/c otherwise we wouldn't be here
- //then get the other
- for (Map.Entry entry: JspToGeneratorMapping.jspsToGenerators.entrySet()) {
- if(form.equals(entry.getValue())) {
- //Get the jsp corresponding to the Java generator
- form = entry.getKey();
- break;
- }
- }
-
- request.setAttribute("form", form);
-%>
-
-
-
-<%!
-
- //bdc34: This isn't used anywhere, don't migrate forward to java code in 1.3
- private static synchronized void setEditReferer(String editKey, String refererUrl, HttpSession session) {
- if (refererUrl != null) {
- Object editRefererObj = session.getAttribute("editRefererMap");
- HashMap editRefererMap =
- (editRefererObj != null && (editRefererObj instanceof HashMap))
- ? (HashMap) editRefererObj
- : new HashMap();
- session.setAttribute("editRefererMap", editRefererMap);
- editRefererMap.put(editKey, refererUrl);
- }
- }
-
-%>
diff --git a/webapp/web/edit/fileUploadError.jsp b/webapp/web/edit/fileUploadError.jsp
deleted file mode 100644
index 726c534ee..000000000
--- a/webapp/web/edit/fileUploadError.jsp
+++ /dev/null
@@ -1,14 +0,0 @@
-<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
-
-
-
-
-
-
-
-