From 9e9876cd436b98f86ac7715e26657692713f921d Mon Sep 17 00:00:00 2001 From: bdc34 Date: Mon, 5 Jul 2010 19:16:50 +0000 Subject: [PATCH] Removing vitro:citation from back end editing and front end display. NIHVIVO-503 --- .../serializers/EntitySerializer.java | 4 +--- webapp/config/web.xml | 5 ++++- .../mannlib/vitro/webapp/beans/Individual.java | 3 --- .../vitro/webapp/beans/IndividualImpl.java | 6 +----- .../controller/edit/CloneEntityServlet.java | 3 +-- .../dao/filtering/IndividualFiltering.java | 12 ++---------- .../vitro/webapp/dao/jena/IndividualDaoJena.java | 5 +---- .../vitro/webapp/dao/jena/IndividualJena.java | 16 +--------------- .../webapp/search/beans/VitroHighlighter.java | 5 ----- .../search/controller/PagedSearchController.java | 3 --- .../webapp/search/lucene/Entity2LuceneDoc.java | 1 - .../templatemodels/IndividualTemplateModel.java | 6 +----- .../edit/specific/entity_retry_init.jsp | 7 ------- webapp/web/templates/entity/entityBasic.jsp | 2 +- webapp/web/templates/entity/entityCitation.jsp | 8 +++++++- webapp/web/themes/default/jsp/dashboard.jsp | 3 +-- webapp/web/themes/enhanced/jsp/dashboard.jsp | 3 +-- 17 files changed, 22 insertions(+), 70 deletions(-) diff --git a/services/src/edu/cornell/mannlib/vitro/webservices/serializers/EntitySerializer.java b/services/src/edu/cornell/mannlib/vitro/webservices/serializers/EntitySerializer.java index db5b254c9..4dadcef71 100644 --- a/services/src/edu/cornell/mannlib/vitro/webservices/serializers/EntitySerializer.java +++ b/services/src/edu/cornell/mannlib/vitro/webservices/serializers/EntitySerializer.java @@ -37,8 +37,7 @@ public class EntitySerializer implements Serializer { //public static final String MODTIME_MBER= "modTime"; public static final String IMAGEFILE_MBER= "imageFile"; public static final String ANCHOR_MBER= "anchor"; - public static final String BLURB_MBER= "blurb"; - public static final String CITATION_MBER= "citation"; + public static final String BLURB_MBER= "blurb"; public static final String STATUS_MBER= "status"; public static final String PROPERTYLIST_MBER= "propertyList"; public static final String LINKSLIST_MBER= "linksList"; @@ -84,7 +83,6 @@ public class EntitySerializer implements Serializer { context.serialize(new QName("", IMAGEFILE_MBER), null, ent.getMainImageUri()); context.serialize(new QName("", ANCHOR_MBER), null, ent.getAnchor()); context.serialize(new QName("", BLURB_MBER), null, ent.getBlurb()); - context.serialize(new QName("", CITATION_MBER), null, ent.getCitation()); context.serialize(new QName("", STATUS_MBER), null, ent.getStatus()); context.serialize(new QName("", LINKSLIST_MBER), null, ent.getLinksList()); context.serialize(new QName("", KEYWORDS_MBER), null, ent.getKeywords()); diff --git a/webapp/config/web.xml b/webapp/config/web.xml index cb7672f79..fce712432 100644 --- a/webapp/config/web.xml +++ b/webapp/config/web.xml @@ -86,7 +86,7 @@ - + edu.cornell.mannlib.vitro.webapp.servlet.setup.UpdateUploadedFiles @@ -295,6 +295,8 @@ /SearchIndex + TestController diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/beans/Individual.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/beans/Individual.java index 8bd5bf425..92200a2e6 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/beans/Individual.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/beans/Individual.java @@ -87,9 +87,6 @@ public interface Individual extends ResourceBean, VitroTimeWindowedResource, Com String getBlurb(); void setBlurb(String in); - String getCitation(); - void setCitation(String in); - int getStatusId(); void setStatusId(int in); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/beans/IndividualImpl.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/beans/IndividualImpl.java index 48d6f2918..79b7c15c2 100755 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/beans/IndividualImpl.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/beans/IndividualImpl.java @@ -50,7 +50,6 @@ public class IndividualImpl extends BaseResourceBean implements Individual, Comp protected String mainImageUri = NOT_INITIALIZED; protected String imageUrl; protected String thumbUrl; - protected String citation = null; protected int statusId = 0; protected String status = null; protected List linksList = null; @@ -262,10 +261,7 @@ public class IndividualImpl extends BaseResourceBean implements Individual, Comp public String getBlurb(){return blurb;} public void setBlurb(String in){blurb=in;} - - public String getCitation(){return citation;} - public void setCitation(String in){citation=in;} - + public int getStatusId(){return statusId;} public void setStatusId(int in){statusId=in;} diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/CloneEntityServlet.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/CloneEntityServlet.java index 6cdfb43c5..409157a72 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/CloneEntityServlet.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/CloneEntityServlet.java @@ -112,8 +112,7 @@ public class CloneEntityServlet extends BaseEditController { ind.setSunrise(new DateTime().toDate()); // cannot set these values to null because they will still be copies ind.setBlurb(""); - ind.setDescription(""); - ind.setCitation(""); + ind.setDescription(""); String cloneURI=individualDao.insertNewIndividual(ind); if (cloneURI == null){ log.error("Error inserting cloned individual"); return; } diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/filtering/IndividualFiltering.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/filtering/IndividualFiltering.java index 48f688e31..8ded4c455 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/filtering/IndividualFiltering.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/filtering/IndividualFiltering.java @@ -192,12 +192,8 @@ public class IndividualFiltering implements Individual { public String getBlurb() { return _innerIndividual.getBlurb(); - } - - public String getCitation() { - return _innerIndividual.getCitation(); - } - + } + public String getDescription() { return _innerIndividual.getDescription(); } @@ -356,10 +352,6 @@ public class IndividualFiltering implements Individual { _innerIndividual.setBlurb(in); } - public void setCitation(String in) { - _innerIndividual.setCitation(in); - } - public void setDatatypePropertyList(List datatypePropertyList) { _innerIndividual.setDatatypePropertyList(datatypePropertyList); } diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualDaoJena.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualDaoJena.java index b2d711ade..63a47511e 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualDaoJena.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualDaoJena.java @@ -306,7 +306,6 @@ public class IndividualDaoJena extends JenaBaseDao implements IndividualDao { addPropertyStringValue(ind,MONIKER,ent.getMoniker(),ontModel); addPropertyStringValue(ind,BLURB,ent.getBlurb(),ontModel); addPropertyStringValue(ind,DESCRIPTION,ent.getDescription(),ontModel); - addPropertyStringValue(ind,CITATION,ent.getCitation(),ontModel); addPropertyDateTimeValue(ind,SUNRISE,ent.getSunrise(), ontModel); addPropertyDateTimeValue(ind,SUNSET,ent.getSunset(), ontModel); addPropertyDateTimeValue(ind,TIMEKEY,ent.getTimekey(), ontModel); @@ -369,7 +368,6 @@ public class IndividualDaoJena extends JenaBaseDao implements IndividualDao { private void initInd(Individual ent) { ent.getAnchor(); ent.getBlurb(); - ent.getCitation(); ent.getClass(); ent.getVClasses(false); ent.getDataPropertyList(); @@ -468,8 +466,7 @@ public class IndividualDaoJena extends JenaBaseDao implements IndividualDao { } updatePropertyStringValue(ind,MONIKER,ent.getMoniker(),ontModel); updatePropertyStringValue(ind,BLURB,ent.getBlurb(),ontModel); - updatePropertyStringValue(ind,DESCRIPTION,ent.getDescription(),ontModel); - updatePropertyStringValue(ind,CITATION,ent.getCitation(),ontModel); + updatePropertyStringValue(ind,DESCRIPTION,ent.getDescription(),ontModel); updatePropertyDateTimeValue(ind,SUNRISE,ent.getSunrise(), ontModel); updatePropertyDateTimeValue(ind,SUNSET,ent.getSunset(), ontModel); updatePropertyDateTimeValue(ind,TIMEKEY,ent.getTimekey(), ontModel); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualJena.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualJena.java index 021f1e901..72044505b 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualJena.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/IndividualJena.java @@ -457,21 +457,7 @@ public class IndividualJena extends IndividualImpl implements Individual { ind.getOntModel().leaveCriticalSection(); } } - } - - public String getCitation() { - if (this.citation != null) { - return citation; - } else { - ind.getOntModel().enterCriticalSection(Lock.READ); - try { - citation = webappDaoFactory.getJenaBaseDao().getPropertyStringValue(ind,webappDaoFactory.getJenaBaseDao().CITATION); - return citation; - } finally { - ind.getOntModel().leaveCriticalSection(); - } - } - } + } @Override public String getMainImageUri() { diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/search/beans/VitroHighlighter.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/search/beans/VitroHighlighter.java index 06776d66b..fa39757c1 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/search/beans/VitroHighlighter.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/search/beans/VitroHighlighter.java @@ -55,7 +55,6 @@ public abstract class VitroHighlighter extends UnaryFunctor { ent.setName( this.highlight(ent.getName())); ent.setMoniker( this.highlight(ent.getMoniker())); ent.setDescription( this.highlight(ent.getDescription())); - ent.setCitation(this.highlight(ent.getCitation())); Iterator edIt = ent.getDataPropertyStatements().iterator(); while (edIt.hasNext()) { DataPropertyStatement dataPropertyStmt = (DataPropertyStatement)edIt.next(); @@ -99,10 +98,6 @@ public abstract class VitroHighlighter extends UnaryFunctor { sb.append(ent.getDescription()); sb.append(' '); } - if(ent.getCitation() != null){ - sb.append(ent.getCitation()); - sb.append(' '); - } if(ent.getDataPropertyStatements() != null) { Iterator edIt = ent.getDataPropertyStatements().iterator(); while (edIt.hasNext()) { diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/search/controller/PagedSearchController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/search/controller/PagedSearchController.java index 93f754e8b..9e63dba9e 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/search/controller/PagedSearchController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/search/controller/PagedSearchController.java @@ -620,9 +620,6 @@ public class PagedSearchController extends VitroHttpServlet implements Searcher{ if(ent.getDescription() != null ) sb.append(ent.getDescription()).append(' '); - if(ent.getCitation() != null) - sb.append(ent.getCitation()).append(' '); - if(ent.getDataPropertyList() != null) { Iterator edIt = ent.getDataPropertyList().iterator(); while (edIt.hasNext()) { diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/search/lucene/Entity2LuceneDoc.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/search/lucene/Entity2LuceneDoc.java index dfe6d531c..39b70a539 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/search/lucene/Entity2LuceneDoc.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/search/lucene/Entity2LuceneDoc.java @@ -211,7 +211,6 @@ public class Entity2LuceneDoc implements Obj2DocIface{ value+= " "+ ( ((t=ent.getMoniker()) == null)?"":t ); value+= " "+ ( ((t=ent.getDescription()) == null)?"":t ); value+= " "+ ( ((t=ent.getBlurb()) == null)?"":t ); - value+= " "+ ( ((t=ent.getCitation()) == null)?"":t ); value+= " "+ getKeyterms(ent); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/IndividualTemplateModel.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/IndividualTemplateModel.java index 7f220db67..10835ad24 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/IndividualTemplateModel.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/templatemodels/IndividualTemplateModel.java @@ -105,11 +105,7 @@ public class IndividualTemplateModel extends BaseTemplateModel { public String getBlurb() { return individual.getBlurb(); - } - - public String getCitation() { - return individual.getBlurb(); - } + } public List getKeywords() { return individual.getKeywords(); diff --git a/webapp/web/templates/edit/specific/entity_retry_init.jsp b/webapp/web/templates/edit/specific/entity_retry_init.jsp index 2c9b45906..12f860f35 100644 --- a/webapp/web/templates/edit/specific/entity_retry_init.jsp +++ b/webapp/web/templates/edit/specific/entity_retry_init.jsp @@ -65,13 +65,6 @@ - - - Citation Optional; max 255 chars; use also for image caption for news release - " size="80" maxlength="255" /> - - - Sunrise, or date first visible (e.g., 2004-09-17) Optional; populated primarily for entities such as new releases that are auto-linked to tabs for a spcified number of days following their release date diff --git a/webapp/web/templates/entity/entityBasic.jsp b/webapp/web/templates/entity/entityBasic.jsp index 460afb3ef..5bf7b9e04 100644 --- a/webapp/web/templates/entity/entityBasic.jsp +++ b/webapp/web/templates/entity/entityBasic.jsp @@ -186,7 +186,7 @@ if (VitroRequestPrep.isSelfEditing(request) || LoginFormBean.loggedIn(request, L - <%-- Thumbnail (with citation) --%> + <%-- Thumbnail --%> diff --git a/webapp/web/templates/entity/entityCitation.jsp b/webapp/web/templates/entity/entityCitation.jsp index 2b3a41854..8176a78e6 100644 --- a/webapp/web/templates/entity/entityCitation.jsp +++ b/webapp/web/templates/entity/entityCitation.jsp @@ -2,7 +2,11 @@ <%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary" %> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> - + +<%-- vitro:citation is no longer being used see NIHVIVO-503 if there is a different property for + the citation it may be added here. --%> + +<%--
@@ -12,3 +16,5 @@
+ + --%> \ No newline at end of file diff --git a/webapp/web/themes/default/jsp/dashboard.jsp b/webapp/web/themes/default/jsp/dashboard.jsp index 246327602..06bc3663b 100644 --- a/webapp/web/themes/default/jsp/dashboard.jsp +++ b/webapp/web/themes/default/jsp/dashboard.jsp @@ -25,8 +25,7 @@ - -
${entity.citation}
+