Removing vitro:citation from back end editing and front end display. NIHVIVO-503

This commit is contained in:
bdc34 2010-07-05 19:16:50 +00:00
parent 26053fa33e
commit 9e9876cd43
17 changed files with 22 additions and 70 deletions

View file

@ -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());

View file

@ -86,7 +86,7 @@
<!-- Invokes a process to move any uploaded files into the new file storage system. -->
<!-- Needs to run after FileStorageSetup and JenaDataSourceSetup. -->
<!-- Should run before Pellet is set up. -->
<!-- Should run before Pellet is set up. -->
<listener>
<listener-class>
edu.cornell.mannlib.vitro.webapp.servlet.setup.UpdateUploadedFiles
@ -295,6 +295,8 @@
<url-pattern>/SearchIndex</url-pattern>
</servlet-mapping>
<!-- This is the new navigation controller. It is not ready for the 1.1 release
see http://issues.library.cornell.edu/browse/NIHVIVO-597
<servlet>
<servlet-name>NavigationController</servlet-name>
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.freemarker.NavigationController</servlet-class>
@ -303,6 +305,7 @@
<servlet-name>NavigationController</servlet-name>
<url-pattern>/nav/*</url-pattern>
</servlet-mapping>
-->
<servlet>
<servlet-name>TestController</servlet-name>

View file

@ -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);

View file

@ -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 <Link>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;}

View file

@ -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; }

View file

@ -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<DataProperty> datatypePropertyList) {
_innerIndividual.setDatatypePropertyList(datatypePropertyList);
}

View file

@ -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);

View file

@ -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() {

View file

@ -55,7 +55,6 @@ public abstract class VitroHighlighter extends UnaryFunctor<String,String> {
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<String,String> {
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()) {

View file

@ -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()) {

View file

@ -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);

View file

@ -105,11 +105,7 @@ public class IndividualTemplateModel extends BaseTemplateModel {
public String getBlurb() {
return individual.getBlurb();
}
public String getCitation() {
return individual.getBlurb();
}
}
public List<String> getKeywords() {
return individual.getKeywords();

View file

@ -65,13 +65,6 @@
<font size="2" color="red"><form:error name="Description"/></font>
</td>
</tr>
<tr class="editformcell" id='citationTr'>
<td id="citationTd" valign="bottom" colspan="2">
<b>Citation</b> <em>Optional; max 255 chars; use also for image caption for news release
<input type="text" name="Citation" value="<form:value name="Citation"/>" size="80" maxlength="255" />
<font size="2" color="red"><form:error name="Citation"/></font>
</td>
</tr>
<tr class="editformcell" id='sunriseTr'>
<td id="sunriseTd" valign="bottom">
<b>Sunrise</b>, or date first visible (e.g., 2004-09-17) <em>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</em>

View file

@ -186,7 +186,7 @@ if (VitroRequestPrep.isSelfEditing(request) || LoginFormBean.loggedIn(request, L
</div> <!-- end dprop-vitro-links -->
</c:if>
<%-- Thumbnail (with citation) --%>
<%-- Thumbnail --%>
<c:set var="isPerson" value='<%= entity.isVClass("http://xmlns.com/foaf/0.1/Person") %>' />
<c:set var="hasImage" value="${!empty entity.thumbUrl}" />
<c:set var="imageLinks"><edLnk:editLinks item="<%= VitroVocabulary.IND_MAIN_IMAGE %>" icons="false" /></c:set>

View file

@ -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. --%>
<%--
<c:if test="${!empty entity.citation}">
<div class="datatypeProperties">
<div class="datatypePropertyValue">
@ -12,3 +16,5 @@
</div>
</div>
</c:if>
--%>

View file

@ -25,8 +25,7 @@
<a class="image" href="<c:url value='${entity.imageUrl}'/>">
</c:if>
<img class="headshot" src="<c:url value='${entity.thumbUrl}'/>" title="click to view larger image in new window" alt="" width="150"/>
<c:if test="${!empty entity.imageUrl}"></a></c:if>
<c:if test="${!empty entity.citation}"><div class="citation">${entity.citation}</div></c:if>
<c:if test="${!empty entity.imageUrl}"></a></c:if>
</c:if>
<ul class="profileLinks">

View file

@ -25,8 +25,7 @@
<a class="image" href="<c:url value='${entity.imageUrl}'/>">
</c:if>
<img class="headshot" src="<c:url value='${entity.thumbUrl}'/>" title="click to view larger image in new window" alt="" width="150"/>
<c:if test="${!empty entity.imageUrl}"></a></c:if>
<c:if test="${!empty entity.citation}"><div class="citation">${entity.citation}</div></c:if>
<c:if test="${!empty entity.imageUrl}"></a></c:if>
</c:if>
<ul class="profileLinks">