From 15c78c74d4edd01fe4b003ac47bad16413b94eaa Mon Sep 17 00:00:00 2001 From: hjkhjk54 Date: Wed, 2 Nov 2011 14:55:37 +0000 Subject: [PATCH] --- .../vitro/webapp/controller/JsonServlet.java | 3 ++- .../webapp/dao/jena/WebappDaoFactoryJena.java | 16 ++++++++++++---- .../BaseEditSubmissionPreprocessorVTwo.java | 18 ++++++++++++++++++ 3 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/BaseEditSubmissionPreprocessorVTwo.java diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/JsonServlet.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/JsonServlet.java index 8a648f2d6..ef7583e2c 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/JsonServlet.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/JsonServlet.java @@ -97,7 +97,8 @@ public class JsonServlet extends VitroHttpServlet { } } - private void getVClassesForVClassGroup(HttpServletRequest req, HttpServletResponse resp) throws IOException, JSONException { + + private void getVClassesForVClassGroup(HttpServletRequest req, HttpServletResponse resp) throws IOException, JSONException { JSONObject map = new JSONObject(); VitroRequest vreq = new VitroRequest(req); String vcgUri = vreq.getParameter("classgroupUri"); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/WebappDaoFactoryJena.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/WebappDaoFactoryJena.java index 1e0a46ede..e34b3344d 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/WebappDaoFactoryJena.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/WebappDaoFactoryJena.java @@ -597,10 +597,18 @@ public class WebappDaoFactoryJena implements WebappDaoFactory { this.nonuserNamespaces = base.nonuserNamespaces; this.preferredLanguages = base.preferredLanguages; this.userURI = base.userURI; - this.flag2ValueMap = new HashMap(); - this.flag2ValueMap.putAll(base.flag2ValueMap); - this.flag2ClassLabelMap = new HashMap(); - this.flag2ClassLabelMap.putAll(base.flag2ClassLabelMap); + if(base.flag2ValueMap != null) { + this.flag2ValueMap = new HashMap(); + this.flag2ValueMap.putAll(base.flag2ValueMap); + } else { + this.flag2ValueMap = null; + } + if(base.flag2ClassLabelMap != null) { + this.flag2ClassLabelMap = new HashMap(); + this.flag2ClassLabelMap.putAll(base.flag2ClassLabelMap); + } else { + this.flag2ClassLabelMap = null; + } this.dwf = base.dwf; } diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/BaseEditSubmissionPreprocessorVTwo.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/BaseEditSubmissionPreprocessorVTwo.java new file mode 100644 index 000000000..1a3f8911e --- /dev/null +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/BaseEditSubmissionPreprocessorVTwo.java @@ -0,0 +1,18 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo; + +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.EditConfiguration; + + +public abstract class BaseEditSubmissionPreprocessorVTwo implements + EditSubmissionVTwoPreprocessor { + + protected EditConfigurationVTwo editConfiguration; + + public BaseEditSubmissionPreprocessorVTwo(EditConfigurationVTwo editConfig) { + editConfiguration = editConfig; + } + + +}