Commit 1a658afa authored by Yann Mombrun's avatar Yann Mombrun

Merge branch 'develop'

* develop:
  Bump to stable version 2.3.5
  Remove commented code and unused imports
  Implement #5 by adding an offline flag
  Bump to develop version 2.3.5-SNAP
parents b325970b 811682db
Pipeline #4139 passed with stage
in 27 seconds
......@@ -11,7 +11,7 @@
</parent>
<artifactId>weblab-metaview</artifactId>
<version>2.3.4</version>
<version>2.3.5</version>
<packaging>war</packaging>
<name>WebLab Metaview</name>
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2017 Airbus Defence and Space
* Copyright (C) 2004 - 2019 AIRBUS Defence and Space SAS
*
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
......@@ -24,8 +24,6 @@ import java.util.Map;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletRequest;
import javax.portlet.PortletURL;
import javax.portlet.ResourceRequest;
import javax.portlet.ResourceResponse;
......@@ -50,10 +48,6 @@ import org.springframework.web.portlet.bind.annotation.ActionMapping;
import org.springframework.web.portlet.bind.annotation.ResourceMapping;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.WebKeys;
import com.liferay.portal.theme.ThemeDisplay;
import com.liferay.portal.util.PortalUtil;
import com.liferay.portlet.PortletURLFactoryUtil;
/**
* The controller in charge of the edition.
......@@ -68,11 +62,11 @@ public class EditMetaController {
private static final String USE_GEOSERVER_EXPOSED_MAP = "useGeoserverExposedMap";
private static final String URL_REDIRECTION = "/web/guest/docview";
private static final String LAYERS_CONFIG = "layersConfig";
......@@ -120,6 +114,7 @@ public class EditMetaController {
public EditMetaController(final EditMetaConfBean editMetaData, final TimeConfig timeConfig, final DataTaglib dataTaglib, final ResourceSaverService resourceSaverService,
final PermissionService permissionService) {
super();
this.editMetaData = editMetaData;
this.timeConfig = timeConfig;
......@@ -127,15 +122,18 @@ public class EditMetaController {
this.resourceSaverService = resourceSaverService;
this.permissionService = permissionService;
}
@ModelAttribute("layersConfig")
public GroupLayerConfig getLayersConfig() {
return this.editMetaData.getLayersConfig();
}
@ResourceMapping("editmeta")
public ModelAndView displayEditMenu(final ResourceRequest request, final ResourceResponse response) {
response.setContentType(EditMetaController.TEXT_HTML);
response.setCharacterEncoding(EditMetaController.UTF_8);
this.logger.debug("ShowView EditMetaController called");
......@@ -168,25 +166,22 @@ public class EditMetaController {
@ResourceMapping("clearErrorAttribute")
public void clearModelAttribute(final ModelMap model) {
model.addAttribute(EditMetaController.EDIT_ERROR, Boolean.FALSE);
}
@ActionMapping(params = "action=cancel")
public void cancelEdit(final ActionRequest actionRequest, final ActionResponse response, final ModelMap model) throws IOException {
this.logger.debug("view redirect after cancel method called");
response.sendRedirect(EditMetaController.URL_REDIRECTION);
// build link to default portlet jsp
//final String portletName = (String) actionRequest.getAttribute(WebKeys.PORTLET_ID);
//final ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
//final PortletURL portletURL = PortletURLFactoryUtil.create(PortalUtil.getHttpServletRequest(actionRequest), portletName, themeDisplay.getLayout().getPlid(), PortletRequest.RENDER_PHASE);
//response.sendRedirect(portletURL.toString());
}
@ActionMapping(params = "action=save")
public void saveEdit(final ActionRequest request, final ActionResponse response, final ModelMap model) throws SystemException, IOException {
this.logger.debug("saveEdit method called");
if (!this.permissionService.hasAdminRole(request)) {
......@@ -205,7 +200,7 @@ public class EditMetaController {
final EditMetaServices editMetaServices = new EditMetaServices(editMeta, this.timeConfig);
editMetaServices.writeContent(resource, parameterMap);
try {
boolean worked = this.resourceSaverService.saveResource(resource);
final boolean worked = this.resourceSaverService.saveResource(resource);
if (!worked) {
this.logger.warn("The resource " + resource.getUri() + " may not be saved.");
}
......
......@@ -68,10 +68,19 @@ import com.liferay.portal.kernel.exception.SystemException;
@Controller
@RequestMapping(value = "VIEW")
@SessionAttributes({ "resource", "isEmptyModel", "isLoadedResource", "rdfProperties", "translations", "metaDisplay", "editMetaData", "timeConfig", "dataTaglib", "dataLanguage",
"useGeoserverExposedMap", "layersConfig", "editError" })
"useGeoserverExposedMap", "layersConfig", "editError", "offline" })
public class MetaViewController {
private static final String RESOURCE_DESC = "resourceDesc";
private static final String VIEW = "view";
/**
* Key for the resource field.
*/
protected static final String RESOURCE = "resource";
......@@ -87,6 +96,9 @@ public class MetaViewController {
protected static final String ALLOW_SOURCE_EVENTING = "allowSourceEventing";
private static final String OFFLINE = "offline";
// attributes
protected final Log logger = LogFactory.getLog(this.getClass());
......@@ -109,8 +121,13 @@ public class MetaViewController {
protected final Boolean allowSourceEventing;
protected final Boolean offline;
public MetaViewController(final MetaViewBusinessServices metaviewBusinessService, final PermissionService permissionService, final DisplayMetaConfBean metaDisplayConf,
final RDFPropertiesConfBean rdfProperties, final String sourceTypeTab, final Boolean allowSourceEventing) {
final RDFPropertiesConfBean rdfProperties, final String sourceTypeTab, final Boolean allowSourceEventing, final Boolean offline) {
super();
this.metaviewBusinessService = metaviewBusinessService;
this.permissionService = permissionService;
......@@ -118,28 +135,34 @@ public class MetaViewController {
this.rdfProperties = rdfProperties;
this.sourceTypeTab = sourceTypeTab;
this.allowSourceEventing = allowSourceEventing;
this.offline = offline;
}
@ModelAttribute("metaDisplay")
public Map<String, Boolean> getDisplayMeta() {
return this.metaDisplayConf.getProperties();
}
@ModelAttribute("useGeoserverExposedMap")
public Boolean getUseGeoserverExposedMap() {
return Boolean.valueOf(this.metaDisplayConf.isUseGeoserverExposedMap());
}
@ModelAttribute("layersConfig")
public GroupLayerConfig getLayersConfig() {
return this.metaDisplayConf.getLayersConfig();
}
@ModelAttribute("rdfProperties")
public Map<String, String> getRDFProperties() {
return this.rdfProperties.getProperties();
}
......@@ -149,6 +172,7 @@ public class MetaViewController {
// #############################################################################
@ActionMapping(params = "action=goToEntity")
public void goToEntity(final ActionResponse response, final ModelMap model) {
this.logger.debug("receiving action goToEntity");
response.setEvent(QName.valueOf("{http://weblab.ow2.org/portlet/metaview/action}sendUnloadedDocument"), (PieceOfKnowledge) model.get(MetaViewController.RESOURCE));
}
......@@ -156,6 +180,7 @@ public class MetaViewController {
@ActionMapping(params = "action=selectTranslation")
public void selectTranslation(final ActionRequest request, final ActionResponse response, final ModelMap model) {
final String lang = request.getParameter("language");
final URI service = URI.create(request.getParameter("service"));
this.logger.debug("select translation for language :" + lang + " and service" + service);
......@@ -166,6 +191,7 @@ public class MetaViewController {
@ActionMapping(params = "action=selectOriginalVersion")
public void selectOriginal(final ActionRequest request, final ActionResponse response, final ModelMap model) {
this.logger.debug("select original version");
response.setEvent(QName.valueOf("{http://weblab.ow2.org/portlet/metaview/action}selectOriginalVersion"), ((Resource) model.get(MetaViewController.RESOURCE)).getUri());
}
......@@ -173,6 +199,7 @@ public class MetaViewController {
@ActionMapping(params = "action=useAsSource")
public void useAsSource(final ActionRequest request, final ActionResponse response, final ModelMap model) throws SystemException {
this.logger.info("send event useAsSource");
if (!this.permissionService.hasAdminRole(request)) {
......@@ -180,8 +207,8 @@ public class MetaViewController {
return;
}
if ((this.allowSourceEventing == null) || !this.allowSourceEventing) {
this.logger.warn("The user does not have the authorisation to send an event to the source!");
if ((this.allowSourceEventing == null) || !this.allowSourceEventing.booleanValue()) {
this.logger.warn("The source eventing is deactivated by configuration!");
return;
}
......@@ -189,8 +216,8 @@ public class MetaViewController {
final PieceOfKnowledge pok = this.metaviewBusinessService.getPoKToUseAsSource(doc, this.sourceTypeTab);
response.setEvent(QName.valueOf("{http://weblab.ow2.org/portlet/metaview/action}useAsSource"), pok);
}
/**
* The user add the current document to the basket. An event to share this action is sent to others Portlets.
*
......@@ -201,6 +228,7 @@ public class MetaViewController {
*/
@ActionMapping(params = "action=addToBasketMeta")
public void addToBasket(final ActionResponse response, final ModelMap model) {
response.setEvent(QName.valueOf("{http://weblab.ow2.org/portlet/metaview/action}addToBasket"), (Document) model.get(MetaViewController.RESOURCE));
}
......@@ -215,6 +243,7 @@ public class MetaViewController {
*/
@ActionMapping(params = "action=pinToBasketMeta")
public void pinToBasket(final ActionResponse response, final ModelMap model) {
response.setEvent(QName.valueOf("{http://weblab.ow2.org/portlet/metaview/action}pinToBasket"), (Document) model.get(MetaViewController.RESOURCE));
}
......@@ -224,11 +253,12 @@ public class MetaViewController {
// #############################################################################
@EventMapping(value = "{http://weblab.ow2.org/portlet/metaview/reaction}displayMeta")
public void processLoadedDocumentEvent(final EventRequest request, final EventResponse response, final ModelMap model) {
// receive a event containing a document
this.logger.debug("receiving the event: {http://weblab.ow2.org/portlet/metaview/reaction}displayMeta with value " + request.getEvent());
model.addAttribute(MetaViewController.RESOURCE, request.getEvent().getValue());
model.addAttribute("resourceDesc", new HashMap<String, List<String>>());
model.addAttribute(MetaViewController.RESOURCE_DESC, new HashMap<String, List<String>>());
model.addAttribute(MetaViewController.IS_LOADED_RESOURCE, Boolean.FALSE);
model.addAttribute(MetaViewController.IS_EMPTY_MODEL, Boolean.FALSE);
}
......@@ -236,11 +266,12 @@ public class MetaViewController {
@EventMapping(value = "{http://weblab.ow2.org/portlet/metaview/reaction}loadDocumentAndDisplayMeta")
public void processNotLoadedDocumentEvent(final EventRequest request, final EventResponse response, final ModelMap model) {
// receive a event containing an unloaded document
this.logger.debug("receiving the event : {http://weblab.ow2.org/portlet/metaview/reaction}loadDocumentAndDisplayMeta with value " + request.getEvent());
model.addAttribute(MetaViewController.RESOURCE, request.getEvent().getValue());
model.addAttribute("resourceDesc", new HashMap<String, List<String>>());
model.addAttribute(MetaViewController.RESOURCE_DESC, new HashMap<String, List<String>>());
model.addAttribute(MetaViewController.IS_LOADED_RESOURCE, Boolean.FALSE);
model.addAttribute(MetaViewController.IS_EMPTY_MODEL, Boolean.FALSE);
......@@ -254,6 +285,7 @@ public class MetaViewController {
@ResourceMapping("showMetadata")
public ModelAndView serveMetadata(final ResourceRequest request, final ResourceResponse response, final ModelMap model)
throws ContentNotAvailableException, InvalidParameterException, UnexpectedException, SystemException {
response.setContentType("text/html");
response.setCharacterEncoding("UTF-8");
......@@ -273,7 +305,9 @@ public class MetaViewController {
mav.getModelMap().addAttribute(MetaViewController.ALLOW_SOURCE_EVENTING, this.allowSourceEventing);
// check admin permissions for user
mav.getModelMap().addAttribute(MetaViewController.HAS_ADMIN_ROLE, this.permissionService.hasAdminRole(request));
mav.getModelMap().addAttribute(MetaViewController.HAS_ADMIN_ROLE, Boolean.valueOf(this.permissionService.hasAdminRole(request)));
mav.getModelMap().addAttribute(MetaViewController.OFFLINE, this.offline);
// adding map to model
if (!isLoadedDocument) {
......@@ -292,7 +326,8 @@ public class MetaViewController {
// #############################################################################
@RenderMapping()
public ModelAndView showMetadata(final ModelMap model) {
final ModelAndView mav = new ModelAndView("view");
final ModelAndView mav = new ModelAndView(MetaViewController.VIEW);
mav.addAllObjects(model);
if (!model.containsAttribute(MetaViewController.IS_EMPTY_MODEL)) {
this.logger.debug("Is empty model.");
......@@ -307,8 +342,10 @@ public class MetaViewController {
// #############################################################################
@ExceptionHandler(Exception.class)
public ModelAndView getMetadataException(final Exception ex) {
final ModelAndView mav = new ModelAndView("error");
mav.addObject("message_error", ex.getMessage());
return mav;
}
}
......@@ -32,6 +32,7 @@
<constructor-arg name="rdfProperties" type="org.ow2.weblab.portlet.business.bean.RDFPropertiesConfBean" ref="rdfProperties" />
<constructor-arg name="sourceTypeTab" type="java.lang.String" value="website" />
<constructor-arg name="allowSourceEventing" type="java.lang.Boolean" value="false" />
<constructor-arg name="offline" type="java.lang.Boolean" value="false" />
</bean>
<bean id="restSaverService" class="org.ow2.weblab.portlet.business.service.impl.RestResourceSaverService">
......
......@@ -42,15 +42,13 @@
<div>
<table class="meta_data_table">
<tbody>
<c:if
test="${metaDisplay['title'] && weblab:hasValue(resource, rdfProperties['title'])}">
<c:if test="${metaDisplay['title'] && weblab:hasValue(resource, rdfProperties['title'])}">
<tr>
<th><fmt:message key="meta.title" /></th>
<td><b><i><weblab:getPropertyValues uri="${rdfProperties['title']}" /></i></b></td>
</tr>
</c:if>
<c:if
test="${metaDisplay['source'] && weblab:hasValue(resource, rdfProperties['source'])}">
<c:if test="${metaDisplay['source'] && weblab:hasValue(resource, rdfProperties['source'])}">
<tr>
<th><fmt:message key="meta.source" /></th>
<td>
......@@ -59,23 +57,36 @@
</c:set>
<c:if test="${fn:startsWith(source, 'http:') || fn:startsWith(source, 'https:')}">
<c:if test="${userHasAdminRole && allowSourceEventing}">
<span style="cursor: pointer;" onclick="jQuery.metaview.useAsSource()">
<img title="<fmt:message key="meta.useAsSource" />" src="${useAsSourceButtonImgSrc}" />
</span>
<span style="cursor: pointer;" onclick="jQuery.metaview.useAsSource()"><img title="<fmt:message key="meta.useAsSource" />" src="${useAsSourceButtonImgSrc}" /></span>
</c:if>
</c:if>
<weblab:renderValues style="anchor" cssClass="meta_link warnUserOnClick">${source}</weblab:renderValues>
<c:choose>
<c:when test="${offline}">
<c:out value="${source}" />
</c:when>
<c:otherwise>
<weblab:renderValues style="anchor" cssClass="meta_link warnUserOnClick">${source}</weblab:renderValues>
</c:otherwise>
</c:choose>
</td>
</tr>
</c:if>
<c:if
test="${metaDisplay['mainsource'] && weblab:hasValue(resource, rdfProperties['mainsource'])}">
<c:if test="${metaDisplay['mainsource'] && weblab:hasValue(resource, rdfProperties['mainsource'])}">
<tr>
<th><fmt:message key="meta.mainsource" /></th>
<td><weblab:renderValues style="anchor"
cssClass="meta_link warnUserOnClick">
<td>
<c:set var="mainsource">
<weblab:getPropertyValues uri="${rdfProperties['mainsource'] }" />
</weblab:renderValues></td>
</c:set>
<c:choose>
<c:when test="${offline}">
<c:out value="${mainsource}" />
</c:when>
<c:otherwise>
<weblab:renderValues style="anchor" cssClass="meta_link warnUserOnClick">${mainsource}</weblab:renderValues>
</c:otherwise>
</c:choose>
</td>
</tr>
</c:if>
<c:if test="${metaDisplay['format'] && weblab:hasValue(resource, rdfProperties['format'])}">
......@@ -84,12 +95,14 @@
<td>
<c:choose>
<c:when test="${metaDisplay['isExposedAs'] && weblab:hasValue(resource, rdfProperties['isExposedAs'])}">
<c:set var="nativeContentPath">
${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}<weblab:getPropertyValues uri="${rdfProperties['isExposedAs'] }" />
</c:set>
<c:set var="nativeContentPath">
${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}<weblab:getPropertyValues uri="${rdfProperties['isExposedAs'] }" />
</c:set>
<c:choose>
<c:when test="${metaDisplay['hasOriginalFileName'] && weblab:hasValue(resource, rdfProperties['hasOriginalFileName'])}">
<c:set var="hasOriginalFileNameString"><weblab:getPropertyValues uri="${rdfProperties['hasOriginalFileName'] }" /></c:set>
<c:set var="hasOriginalFileNameString">
<weblab:getPropertyValues uri="${rdfProperties['hasOriginalFileName'] }" />
</c:set>
<i><a href="${nativeContentPath}" download="${hasOriginalFileNameString}"><weblab:renderValues style="icon+text" cssClass="meta_data_formatIconText"><weblab:getPropertyValues uri="${rdfProperties['format'] }" /></weblab:renderValues></a></i>
</c:when>
<c:otherwise>
......@@ -113,55 +126,43 @@
<portlet:actionURL var="selectOriginalVersion">
<portlet:param name="action" value="selectOriginalVersion" />
</portlet:actionURL>
<a href="${selectOriginalVersion }"><weblab:renderValues style="icon+text" cssClass="meta_data_formatIconText"><weblab:getPropertyValues uri="${rdfProperties['language'] }" /></weblab:renderValues></a>
(<fmt:message key="meta.originalLanguageVersion" />)
<a href="${selectOriginalVersion }"><weblab:renderValues style="icon+text" cssClass="meta_data_formatIconText"><weblab:getPropertyValues uri="${rdfProperties['language'] }" /></weblab:renderValues></a> (<fmt:message key="meta.originalLanguageVersion" />)
</c:when>
<c:otherwise>
<weblab:renderValues style="icon+text" cssClass="meta_data_formatIconText"><weblab:getPropertyValues uri="${rdfProperties['language'] }" /></weblab:renderValues>
</c:otherwise>
</c:choose>
</td>
</tr>
</c:if>
<c:if test="${hasTraduction}">
<tr>
<th><fmt:message key="meta.availableTranslations" /></th>
<td>
<i> <c:forEach var="translation"
items="${translations }" varStatus="status">
<c:if test="${status.count != 1}">
<br />
</c:if>
<portlet:actionURL var="selectTranslation">
<portlet:param name="action" value="selectTranslation" />
<portlet:param name="language" value="${translation.key }" />
<portlet:param name="service" value="${translation.value.uri}" />
</portlet:actionURL>
<a href="${selectTranslation }"><weblab:renderValues style="icon+text" cssClass="meta_data_formatIconText">${translation.key }</weblab:renderValues></a>
(${translation.value.label })
</c:forEach>
</i>
</td>
<td><i>
<c:forEach var="translation" items="${translations }" varStatus="status">
<c:if test="${status.count != 1}">
<br />
</c:if>
<portlet:actionURL var="selectTranslation">
<portlet:param name="action" value="selectTranslation" />
<portlet:param name="language" value="${translation.key }" />
<portlet:param name="service" value="${translation.value.uri}" />
</portlet:actionURL>
<a href="${selectTranslation }"><weblab:renderValues style="icon+text" cssClass="meta_data_formatIconText">${translation.key }</weblab:renderValues></a> (${translation.value.label })
</c:forEach>
</i></td>
</tr>
</c:if>
<c:if test="${metaDisplay['created'] && weblab:hasValue(resource, rdfProperties['created'])}">
<weblab:getPropertyValues uri="${rdfProperties['created'] }"
var="createdDates" />
<weblab:getPropertyValues uri="${rdfProperties['created'] }" var="createdDates" />
<c:set var="createdDatesStr" value="" />
<c:forEach items="${createdDates}" var="createdDate"
varStatus="createdDateStatus">
<c:forEach items="${createdDates}" var="createdDate" varStatus="createdDateStatus">
<c:if test="${createdDateStatus.count != 1}">
<c:set var="createdDatesStr" value="${createdDatesStr}<br />" />
</c:if>
<c:catch var="createdDatesError">
<fmt:formatDate value="${createdDate}" type="BOTH"
dateStyle="FULL" var="createdDateStr" />
<c:set var="createdDatesStr"
value="${createdDatesStr}${createdDateStr}" />
<fmt:formatDate value="${createdDate}" type="BOTH" dateStyle="FULL" var="createdDateStr" />
<c:set var="createdDatesStr" value="${createdDatesStr}${createdDateStr}" />
</c:catch>
</c:forEach>
<c:if test="${createdDatesError == null}">
......@@ -172,21 +173,16 @@
</tr>
</c:if>
</c:if>
<c:if
test="${metaDisplay['modified'] && weblab:hasValue(resource, rdfProperties['modified'])}">
<weblab:getPropertyValues uri="${rdfProperties['modified'] }"
var="modifiedDates" />
<c:if test="${metaDisplay['modified'] && weblab:hasValue(resource, rdfProperties['modified'])}">
<weblab:getPropertyValues uri="${rdfProperties['modified'] }" var="modifiedDates" />
<c:set var="modifiedDatesStr" value="" />
<c:forEach items="${modifiedDates}" var="modifiedDate"
varStatus="modifiedDateStatus">
<c:forEach items="${modifiedDates}" var="modifiedDate" varStatus="modifiedDateStatus">
<c:if test="${modifiedDateStatus.count != 1}">
<c:set var="modifiedDatesStr" value="${modifiedDatesStr} ; " />
</c:if>
<c:catch var="modifiedDatesError">
<fmt:formatDate value="${modifiedDate}" type="BOTH"
dateStyle="FULL" var="modifiedDateStr" />
<c:set var="modifiedDatesStr"
value="${modifiedDatesStr}${modifiedDateStr}" />
<fmt:formatDate value="${modifiedDate}" type="BOTH" dateStyle="FULL" var="modifiedDateStr" />
<c:set var="modifiedDatesStr" value="${modifiedDatesStr}${modifiedDateStr}" />
</c:catch>
</c:forEach>
<c:if test="${modifiedDatesError == null}">
......@@ -197,21 +193,16 @@
</tr>
</c:if>
</c:if>
<c:if
test="${metaDisplay['gatheringDate'] && weblab:hasValue(resource, rdfProperties['gatheringDate'])}">
<weblab:getPropertyValues uri="${rdfProperties['gatheringDate'] }"
var="gatheringDates" />
<c:if test="${metaDisplay['gatheringDate'] && weblab:hasValue(resource, rdfProperties['gatheringDate'])}">
<weblab:getPropertyValues uri="${rdfProperties['gatheringDate'] }" var="gatheringDates" />
<c:set var="gatheringDatesStr" value="" />
<c:forEach items="${gatheringDates}" var="gatheringDate"
varStatus="gatheringDateStatus">
<c:forEach items="${gatheringDates}" var="gatheringDate" varStatus="gatheringDateStatus">
<c:if test="${gatheringDateStatus.count != 1}">
<c:set var="gatheringDatesStr" value="${gatheringDatesStr}<br />" />
</c:if>
<c:catch var="gatheringDatesError">
<fmt:formatDate value="${gatheringDate}" type="BOTH"
dateStyle="FULL" var="gatheringDateStr" />
<c:set var="gatheringDatesStr"
value="${gatheringDatesStr}${gatheringDateStr}" />
<fmt:formatDate value="${gatheringDate}" type="BOTH" dateStyle="FULL" var="gatheringDateStr" />
<c:set var="gatheringDatesStr" value="${gatheringDatesStr}${gatheringDateStr}" />
</c:catch>
</c:forEach>
<c:if test="${gatheringDatesError == null}">
......@@ -222,39 +213,32 @@
</tr>
</c:if>
</c:if>
<c:if
test="${metaDisplay['creator'] && weblab:hasValue(resource, rdfProperties['creator'])}">
<c:if test="${metaDisplay['creator'] && weblab:hasValue(resource, rdfProperties['creator'])}">
<tr>
<th><fmt:message key="meta.creator" /></th>
<td><i><weblab:getPropertyValues uri="${rdfProperties['creator'] }" /></i></td>
</tr>
</c:if>
<c:if
test="${metaDisplay['contributor'] && weblab:hasValue(resource, rdfProperties['contributor'])}">
<c:if test="${metaDisplay['contributor'] && weblab:hasValue(resource, rdfProperties['contributor'])}">
<tr>
<th><fmt:message key="meta.contributor" /></th>
<td><i><weblab:getPropertyValues
uri="${rdfProperties['contributor'] }" var="contributors" /> <c:forEach
var="contributor" items="${contributors}" varStatus="status">
<c:if test="${status.count != 1}">
,
</c:if>
<td><i><weblab:getPropertyValues uri="${rdfProperties['contributor'] }" var="contributors" />
<c:forEach var="contributor" items="${contributors}" varStatus="status">
<c:if test="${status.count != 1}">,</c:if>
${contributor}
</c:forEach></i></td>
</c:forEach>
</i></td>
</tr>
</c:if>
<c:if
test="${metaDisplay['date'] && weblab:hasValue(resource, rdfProperties['date'])}">
<weblab:getPropertyValues uri="${rdfProperties['date'] }"
var="dates" />
<c:if test="${metaDisplay['date'] && weblab:hasValue(resource, rdfProperties['date'])}">
<weblab:getPropertyValues uri="${rdfProperties['date'] }" var="dates" />
<c:set var="datesStr" value="" />
<c:forEach items="${dates}" var="date" varStatus="dateStatus">
<c:if test="${dateStatus.count != 1}">
<c:set var="datesStr" value="${datesStr}<br />" />
</c:if>
<c:catch var="datesError">
<fmt:formatDate value="${date}" type="BOTH" dateStyle="FULL"
var="dateStr" />
<fmt:formatDate value="${date}" type="BOTH" dateStyle="FULL" var="dateStr" />
<c:set var="datesStr" value="${datesStr}${dateStr}" />
</c:catch>
</c:forEach>
......@@ -266,180 +250,135 @@
</tr>
</c:if>
</c:if>
<c:if
test="${metaDisplay['identifier'] && weblab:hasValue(resource, rdfProperties['identifier'])}">
<c:if test="${metaDisplay['identifier'] && weblab:hasValue(resource, rdfProperties['identifier'])}">
<tr>
<th><fmt:message key="meta.identifier" /></th>
<td><i><weblab:getPropertyValues
uri="${rdfProperties['identifier'] }" /></i></td>
<td><i><weblab:getPropertyValues uri="${rdfProperties['identifier'] }" /></i></td>
</tr>
</c:if>
<c:if
test="${metaDisplay['hasScore'] && weblab:hasValue(resource, rdfProperties['hasScore'])}">
<c:if test="${metaDisplay['hasScore'] && weblab:hasValue(resource, rdfProperties['hasScore'])}">
<tr>
<th><fmt:message key="meta.hasScore" /></th>
<td><i><weblab:getPropertyValues
uri="${rdfProperties['hasScore'] }" /></i></td>
<td><i><weblab:getPropertyValues uri="${rdfProperties['hasScore'] }" /></i></td>
</tr>
</c:if>
<c:if
test="${metaDisplay['hasNativeContent'] && weblab:hasValue(resource, rdfProperties['hasNativeContent'])}">
<c:if test="${metaDisplay['hasNativeContent'] && weblab:hasValue(resource, rdfProperties['hasNativeContent'])}">
<tr>
<th><fmt:message key="meta.hasNativeContent" /></th>
<td><i><weblab:getPropertyValues
uri="${rdfProperties['hasNativeContent'] }" /></i></td>
<td><i><weblab:getPropertyValues uri="${rdfProperties['hasNativeContent'] }" /></i></td>
</tr>
</c:if>
<c:if
test="${metaDisplay['hasNormalisedContent'] && weblab:hasValue(resource, rdfProperties['hasNormalisedContent'])}">
<c:if test="${metaDisplay['hasNormalisedContent'] && weblab:hasValue(resource, rdfProperties['hasNormalisedContent'])}">
<tr>
<th><fmt:message key="meta.hasNormalisedContent" /></th>
<td><i><weblab:getPropertyValues
uri="${rdfProperties['hasNormalisedContent'] }" /></i></td>
<td><i><weblab:getPropertyValues uri="${rdfProperties['hasNormalisedContent'] }" /></i></td>
</tr>
</c:if>
<c:if
test="${metaDisplay['isGeneratedFrom'] && weblab:hasValue(resource, rdfProperties['isGeneratedFrom'])}">
<c:if test="${metaDisplay['isGeneratedFrom'] && weblab:hasValue(resource, rdfProperties['isGeneratedFrom'])}">
<tr>
<th><fmt:message key="meta.isGeneratedFrom" /></th>
<td><i><weblab:getPropertyValues
uri="${rdfProperties['isGeneratedFrom'] }" /></i></td>
<td><i><weblab:getPropertyValues uri="${rdfProperties['isGeneratedFrom'] }" /></i></td>
</tr>
</c:if>
<c:if
test="${metaDisplay['abstract'] && weblab:hasValue(resource, rdfProperties['abstract'])}">
<c:if test="${metaDisplay['abstract'] && weblab:hasValue(resource, rdfProperties['abstract'])}">
<tr>
<th><fmt:message key="meta.abstract" /></th>
<td><i><weblab:getPropertyValues
uri="${rdfProperties['abstract'] }" /></i></td>
<td><i><weblab:getPropertyValues uri="${rdfProperties['abstract'] }" /></i></td>
</tr>
</c:if>
<c:if
test="${metaDisplay['isProducedFrom'] && weblab:hasValue(resource, rdfProperties['isProducedFrom'])}">
<c:if test="${metaDisplay['isProducedFrom'] && weblab:hasValue(resource, rdfProperties['isProducedFrom'])}">
<tr>
<th><fmt:message key="meta.isProducedFrom" /></th>
<td><i><weblab:getPropertyValues
uri="${rdfProperties['isProducedFrom'] }" /></i></td>
<td><i><weblab:getPropertyValues uri="${rdfProperties['isProducedFrom'] }" /></i></td>
</tr>
</c:if>
<c:if
test="${metaDisplay['description'] && weblab:hasValue(resource, rdfProperties['description'])}">
<c:if test="${metaDisplay['description'] && weblab:hasValue(resource, rdfProperties['description'])}">
<tr>
<th><fmt:message key="meta.description" /></th>
<td><i><weblab:getPropertyValues
uri="${rdfProperties['description'] }" /></i></td>
<td><i><weblab:getPropertyValues uri="${rdfProperties['description'] }" /></i></td>
</tr>
</c:if>
<c:if
test="${metaDisplay['subject'] && weblab:hasValue(resource, rdfProperties['subject'])}">
<c:if test="${metaDisplay['subject'] && weblab:hasValue(resource, rdfProperties['subject'])}">
<tr>
<th><fmt:message key="meta.subject" /></th>
<td><i> <weblab:getPropertyValues
uri="${rdfProperties['subject'] }" var="subjects" /> <c:forEach
var="subject" items="${subjects }" varStatus="status">