Commit 12acd7db authored by Yann Mombrun's avatar Yann Mombrun

New version 2.1.2-SNAPSHOT with update to taglib 0.0.4-SNAPSHOT.

WEBLAB-1203 - Contributor is now part of the default properties.
WEBLAB-1195 - Update the presentation of dc:extent to be like the one of dc:creator for instance.
WEBLAB-1200 - Fix by updating the taglib version.
Cleanup the code for date rendering in order to prevent from adding a line with empty value when it cannot be parsed. As a drawback nothing will tell the user something was wrong.

git-svn-id: svn://svn.forge.objectweb.org/svnroot/weblab/trunk/WebLabServices/Portlets/metadata-portlet@3814 a803c184-d8de-4a0e-a52b-d3eef88212b6
parent 739820a2
......@@ -9,7 +9,7 @@
<groupId>org.ow2.weblab.portlets</groupId>
<artifactId>weblab-metaview</artifactId>
<version>2.1.1</version>
<version>2.1.2-SNAPSHOT</version>
<packaging>war</packaging>
<name>WebLab Metaview</name>
......@@ -30,7 +30,6 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>3.0.7.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
......@@ -40,12 +39,10 @@
<dependency>
<groupId>org.ow2.weblab.components</groupId>
<artifactId>weblab-client</artifactId>
<version>0.2.1</version>
</dependency>
<dependency>
<groupId>org.ow2.weblab.portlets</groupId>
<artifactId>weblab-portlet-filters</artifactId>
<version>0.2.1</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
......@@ -54,7 +51,7 @@
<dependency>
<groupId>org.ow2.weblab.components</groupId>
<artifactId>weblab-taglib</artifactId>
<version>0.0.2</version>
<version>0.0.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.ow2.weblab.core</groupId>
......
......@@ -21,48 +21,50 @@ package org.ow2.weblab.portlet.business.bean;
import java.util.Map;
/**
* Bean to store annotations description and it value.
* @author emilien
* Bean to store annotations description and it value.
*
* @author emilien
*/
public class RDFPropertiesConfBean {
/*
* attributes
*/
private Map<String, String> properties;
/**
* @return the properties
*/
public Map<String, String> getProperties() {
return properties;
return this.properties;
}
/**
* @param properties the properties to set
* @param properties
* the properties to set
*/
public void setProperties(Map<String, String> properties) {
public void setProperties(final Map<String, String> properties) {
this.properties = properties;
}
/*
* getters and setter
/**
* @return An array of the property values.
*/
public String[] getDisctinctAnnotationsNS() {
return this.properties.values().toArray(new String[this.properties.values().size()]);
public String[] getDistinctAnnotationsNS() {
return this.properties.values().toArray(new String[this.properties.values().size()]);
}
/*
* getters and setter
*/
/**
* get the value for the annotation name-space.
* @param namespace of annotation
*
* @param namespace
* of annotation
* @return value for this annotation
*/
public String getAnnotationValue(String namespace) {
public String getAnnotationValue(final String namespace) {
return this.properties.get(namespace).toString();
}
}
......@@ -20,7 +20,7 @@ log4j.appender.rollingfile.datePattern = '.'yyyy-MM-dd
# Configuration of the Loggers
log4j.rootLogger = INFO, console, rollingfile
log4j.rootLogger = DEBUG, console, rollingfile
# You can decrease the level of a specific package by adding it here
#log4j.logger.org.springframework = INFO
log4j.logger.org.springframework = INFO
......@@ -17,7 +17,7 @@ meta.catego = Kategorie&nbsp;:
meta.subject = Thema&nbsp;:
meta.description = Beschreibung&nbsp;:
meta.publisher = Verffentlicht bei&nbsp;:
meta.contibutor = Beitrag&nbsp;:
meta.contributor = Beitrag&nbsp;:
meta.date = Datum&nbsp;:
meta.type = Art&nbsp;:
meta.format = Format&nbsp;:
......
......@@ -18,7 +18,7 @@ meta.catego = Category:
meta.subject = Subject:
meta.description = Description:
meta.publisher = Publisher:
meta.contibutor = Contributor:
meta.contributor = Contributor:
meta.date = Date:
meta.type = Type:
meta.format = Format:
......
......@@ -18,7 +18,7 @@ meta.catego = Categor
meta.subject = Tema&nbsp;:
meta.description = Descripcin&nbsp;:
meta.publisher = Editor&nbsp;:
meta.contibutor = Colaborador&nbsp;:
meta.contributor = Colaborador&nbsp;:
meta.date = Fecha&nbsp;:
meta.type = Tipo&nbsp;:
meta.format = Formato&nbsp;:
......
......@@ -17,7 +17,7 @@ meta.catego = Cat
meta.subject = Sujet et mots-clefs&nbsp;:
meta.description = Commentaires crateur&nbsp;:
meta.publisher = Editeur&nbsp;:
meta.contibutor = Contributeur&nbsp;:
meta.contributor = Contributeur&nbsp;:
meta.date = Date&nbsp;:
meta.type = Type de document&nbsp;:
meta.format = Format&nbsp;:
......@@ -34,7 +34,7 @@ meta.meta_value = Valeur&nbsp;:
meta.hasRank = Rang&nbsp;:
meta.hasDescription = Description&nbsp;:
meta.hasScore = Pertinence&nbsp;:
meta.gatheringDate = Date de capture&nbsp;:
meta.gatheringDate = Date de collecte&nbsp;:
meta.catego = Classification&nbsp;:
meta.extent = Statistiques sur le document&nbsp;:
meta.projectName = Nom du projet li la collecte&nbsp;:
......
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
<!-- <bean id="metaviewBusinessServices"-->
<!-- class="org.ow2.weblab.portlet.buisness.service.impl.WSBusinessServicesImpl">-->
<!-- <constructor-arg ref="configuration" />-->
<!-- </bean>-->
<!-- <bean id="configuration">-->
<!-- </bean>-->
<!-- <import resource="mapping.xml"/>-->
</beans>
\ No newline at end of file
......@@ -27,6 +27,7 @@ when possible (as meta-data).
<entry key="title" value="http://purl.org/dc/elements/1.1/title" />
<entry key="abstract" value="http://purl.org/dc/terms/abstract" />
<entry key="creator" value="http://purl.org/dc/elements/1.1/creator" />
<entry key="contributor" value="http://purl.org/dc/elements/1.1/contributor" />
<entry key="catego" value="http://purl.org/dc/terms/subject" />
<entry key="subject" value="http://purl.org/dc/elements/1.1/subject" />
<entry key="description" value="http://purl.org/dc/elements/1.1/description" />
......@@ -65,6 +66,7 @@ when possible (as meta-data).
<entry key="title" value="true" />
<entry key="abstract" value="true" />
<entry key="creator" value="true" />
<entry key="contributor" value="true" />
<entry key="subject" value="true" />
<entry key="catego" value="true" />
<entry key="description" value="true" />
......
......@@ -19,7 +19,6 @@ jQuery('.warnUserOnClick').live("click", function() {
var answer = window.confirm('<fmt:message key="portlet.leave" />');
if (answer){
window.open($(this).prop('href'));
}
return false;
});
......@@ -28,12 +27,8 @@ jQuery('.warnUserOnClick').live("click", function() {
<!-- meta-data -->
<div>
<!-- <a href="<portlet:actionURL><portlet:param name="action" value="goToEntity" /></portlet:actionURL>" >goToEntity</a>-->
<table class="meta_data_table">
<tbody>
<!--<tr><th class="titre_ligne premier_titre"><fmt:message key="meta.meta_name" /></th><th class="titre_ligne premier_titre"><fmt:message key="meta.meta_value" /></th></tr>-->
<c:if test="${metaDisplay['title'] && weblab:hasValue(resource, rdfProperties['title'])}">
<tr>
<th>
......@@ -126,15 +121,46 @@ jQuery('.warnUserOnClick').live("click", function() {
</td>
</tr>
</c:if>
<c:if test="${metaDisplay['date'] && weblab:hasValue(resource, rdfProperties['date'])}">
<c:if test="${metaDisplay['contributor'] && weblab:hasValue(resource, rdfProperties['contributor'])}">
<tr>
<th>
<fmt:message key="meta.date" />
<fmt:message key="meta.contributor" />
</th>
<td>
<i><weblab:getPropertyValues uri="${rdfProperties['date'] }"/></i>
<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>
</tr>
</tr>
</c:if>
<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" />
<c:set var="datesStr" value="${datesStr}${dateStr}" />
</c:catch>
</c:forEach>
<c:if test="${datesError == null}">
<tr>
<th>
<fmt:message key="meta.date" />
</th>
<td>
<i>
<c:out value="${datesStr}" />
</i>
</td>
</tr>
</c:if>
</c:if>
<c:if test="${metaDisplay['description'] && weblab:hasValue(resource, rdfProperties['description'])}">
<tr>
......@@ -217,13 +243,13 @@ jQuery('.warnUserOnClick').live("click", function() {
</th>
<td>
<i>
<weblab:getPropertyValues uri="${rdfProperties['catego'] }" var="categories"/>
<c:forEach var="catego" items="${categories}" varStatus="status">
<c:if test="${status.count != 1}">
,
</c:if>
${catego }
</c:forEach>
<weblab:getPropertyValues uri="${rdfProperties['catego'] }" var="categories"/>
<c:forEach var="catego" items="${categories}" varStatus="status">
<c:if test="${status.count != 1}">
,
</c:if>
${catego }
</c:forEach>
</i>
</td>
</tr>
......@@ -254,78 +280,90 @@ jQuery('.warnUserOnClick').live("click", function() {
<fmt:message key="meta.extent" />
</th>
<td>
<i><weblab:getPropertyValues uri="${rdfProperties['extent'] }"/></i>
<i><weblab:getPropertyValues uri="${rdfProperties['extent'] }" var="extents"/>
<c:forEach var="extent" items="${extents}" varStatus="status">
<c:if test="${status.count != 1}">
,
</c:if>
${extent}
</c:forEach></i>
</td>
</tr>
</c:if>
<c:if test="${metaDisplay['created'] && weblab:hasValue(resource, rdfProperties['created'])}">
<tr>
<th>
<fmt:message key="meta.created" />
</th>
<td>
<i>
<weblab:getPropertyValues uri="${rdfProperties['created'] }" var="createdDates"/>
<c:forEach items="${createdDates }" var="date" varStatus="status">
<c:if test="${status.count != 1}">
<br>
</c:if>
<c:catch var="error">
<fmt:formatDate value="${date }" type="BOTH" dateStyle="FULL"/>
</c:catch>
<c:if test="${error != null}">
<span style="color:transparent">${error }</span>
</c:if>
</c:forEach>
</i>
</td>
</tr>
<weblab:getPropertyValues uri="${rdfProperties['created'] }" var="createdDates"/>
<c:set var="createdDatesStr" value="" />
<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}" />
</c:catch>
</c:forEach>
<c:if test="${createdDatesError == null}">
<tr>
<th>
<fmt:message key="meta.created" />
</th>
<td>
<i>
<c:out value="${createdDatesStr}" />
</i>
</td>
</tr>
</c:if>
</c:if>
<c:if test="${metaDisplay['modified'] && weblab:hasValue(resource, rdfProperties['modified'])}">
<tr>
<th>
<fmt:message key="meta.modified" />
</th>
<td>
<i>
<weblab:getPropertyValues uri="${rdfProperties['modified'] }" var="modifiedDates"/>
<c:forEach items="${modifiedDates }" var="date" varStatus="status">
<c:if test="${status.count != 1}">
<br>
</c:if>
<c:catch var="error">
<fmt:formatDate value="${date }" type="BOTH" dateStyle="FULL"/>
</c:catch>
<c:if test="${error != null}">
<span style="color:transparent">${error }</span>
</c:if>
</c:forEach>
</i>
</td>
</tr>
<weblab:getPropertyValues uri="${rdfProperties['modified'] }" var="modifiedDates"/>
<c:set var="modifiedDatesStr" value="" />
<c:forEach items="${modifiedDates}" var="modifiedDate" varStatus="modifiedDateStatus">
<c:if test="${modifiedDateStatus.count != 1}">
<c:set var="modifiedDatesStr" value="${modifiedDatesStr}<br />" />
</c:if>
<c:catch var="modifiedDatesError">
<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}">
<tr>
<th>
<fmt:message key="meta.modified" />
</th>
<td>
<i>
<c:out value="${modifiedDatesStr}" />
</i>
</td>
</tr>
</c:if>
</c:if>
<c:if test="${metaDisplay['gatheringDate'] && weblab:hasValue(resource, rdfProperties['gatheringDate'])}">
<tr>
<th>
<fmt:message key="meta.gatheringDate" />
</th>
<td>
<i>
<weblab:getPropertyValues uri="${rdfProperties['gatheringDate'] }" var="gatheringDates"/>
<c:forEach items="${gatheringDates }" var="date" varStatus="status">
<c:if test="${status.count != 1}">
<br>
</c:if>
<c:catch var="error">
<fmt:formatDate value="${date }" type="BOTH" dateStyle="FULL"/>
</c:catch>
<c:if test="${error != null}">
<span style="color:transparent">${error }</span>
</c:if>
</c:forEach>
</i>
</td>
</tr>
<weblab:getPropertyValues uri="${rdfProperties['gatheringDate'] }" var="gatheringDates"/>
<c:set var="gatheringDatesStr" value="" />
<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}" />
</c:catch>
</c:forEach>
<c:if test="${gatheringDatesError == null}">
<tr>
<th>
<fmt:message key="meta.gatheringDate" />
</th>
<td>
<i>
<c:out value="${gatheringDatesStr}" />
</i>
</td>
</tr>
</c:if>
</c:if>
<c:if test="${metaDisplay['projectName'] && weblab:hasValue(resource, rdfProperties['projectName'])}">
<tr>
......@@ -344,8 +382,7 @@ jQuery('.warnUserOnClick').live("click", function() {
</th>
<td>
<weblab:getPropertyValues uri="${rdfProperties['hasOriginalFileSize'] }" var="fileSizes"/>
<weblab:renderValues style="fileSize" value="${fileSizes }"/>
<weblab:renderValues style="fileSize" value="${fileSizes}"/>
</td>
</tr>
</c:if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment