Commit cb9b1545 authored by Yann Mombrun's avatar Yann Mombrun

WEBLAB-1372 - New version 2.2.0-SNAP relying on parent 1.2.8-SNAP.

Add a very simple test case.
Remove dependency to deprecated library rdf-helper-jena-selection.
Update headers and remove a lot of warnings.
Externalise (in the constructor defined in spring configuration) the various sparql requests in use inside the project.

git-svn-id: svn://svn.forge.objectweb.org/svnroot/weblab/trunk/WebLabServices/Portlets/metadata-portlet@4063 a803c184-d8de-4a0e-a52b-d3eef88212b6
parent 793dac74
......@@ -4,17 +4,29 @@
<parent>
<groupId>org.ow2.weblab.portlets</groupId>
<artifactId>parent</artifactId>
<version>1.2.6</version>
<version>1.2.8-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
<groupId>org.ow2.weblab.portlets</groupId>
<artifactId>weblab-metaview</artifactId>
<version>2.1.4</version>
<version>2.2.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>WebLab Metaview</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<weblab.snapshot.repositoryId>weblab.snapshot</weblab.snapshot.repositoryId>
<weblab.release.repositoryId>weblab.release</weblab.release.repositoryId>
<weblab.snapshot.url>scp://weblab-project.org/home/ipccproj/public_html/maven-snapshot</weblab.snapshot.url>
<weblab.release.url>scp://weblab-project.org/home/ipccproj/public_html/maven</weblab.release.url>
<weblab.repositoryId>${weblab.snapshot.repositoryId}</weblab.repositoryId>
<weblab.url>${weblab.snapshot.url}</weblab.url>
</properties>
<dependencies>
<dependency>
<groupId>org.ow2.weblab.core.helpers</groupId>
......@@ -22,44 +34,16 @@
</dependency>
<dependency>
<groupId>org.ow2.weblab.core.helpers</groupId>
<artifactId>rdf-helper-jena-selection</artifactId>
</dependency>
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc-portlet</artifactId>
</dependency>
<dependency>
<groupId>org.ow2.weblab.components</groupId>
<artifactId>weblab-client</artifactId>
</dependency>
<dependency>
<groupId>org.ow2.weblab.portlets</groupId>
<artifactId>weblab-portlet-filters</artifactId>
<artifactId>rdf-helper-jena-structure</artifactId>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId>
</dependency>
<dependency>
<groupId>org.ow2.weblab.components</groupId>
<artifactId>weblab-taglib</artifactId>
</dependency>
<dependency>
<groupId>org.ow2.weblab.core</groupId>
<artifactId>annotator</artifactId>
</dependency>
<dependency>
<groupId>org.ow2.weblab.core.helpers</groupId>
<artifactId>rdf-helper-jena-structure</artifactId>
</dependency>
</dependencies>
<description>This portlet displays WebLab resources metadata.</description>
......@@ -68,25 +52,4 @@
<finalName>${project.artifactId}</finalName>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.ow2.weblab.components</groupId>
<artifactId>weblab-taglib</artifactId>
<version>0.0.5</version>
</dependency>
<dependency>
<groupId>org.ow2.weblab.core</groupId>
<artifactId>annotator</artifactId>
<version>1.2.7</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc-portlet</artifactId>
<version>${spring.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2014 Airbus Defence and Space
* Copyright (C) 2004 - 2015 Airbus Defence and Space
*
* 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
......@@ -22,23 +22,23 @@ import java.util.TreeMap;
/**
* Class representing a result configuration for meta.
*
*
* @author emilien
*
*
*/
public class DisplayMetaConfBean {
private Map<String, Boolean> properties;
public DisplayMetaConfBean() {
properties = new TreeMap<String, Boolean>();
this.properties = new TreeMap<>();
}
public Map<String, Boolean> getProperties() {
return properties;
return this.properties;
}
......@@ -46,5 +46,5 @@ public class DisplayMetaConfBean {
public void setProperties(Map<String, Boolean> properties) {
this.properties = properties;
}
}
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2014 Airbus Defence and Space
* Copyright (C) 2004 - 2015 Airbus Defence and Space
*
* 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
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2014 Airbus Defence and Space
* Copyright (C) 2004 - 2015 Airbus Defence and Space
*
* 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
......@@ -20,7 +20,7 @@ package org.ow2.weblab.portlet.business.bean;
/**
* A service description bean.
*
*
* @author emilienbondu
*
*/
......@@ -29,7 +29,7 @@ public class ServiceDescription {
private String uri,label;
public String getUri() {
return uri;
return this.uri;
}
public void setUri(String uri) {
......@@ -37,7 +37,7 @@ public class ServiceDescription {
}
public String getLabel() {
return label;
return this.label;
}
public void setLabel(String label) {
......
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2014 Airbus Defence and Space
* Copyright (C) 2004 - 2015 Airbus Defence and Space
*
* 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
......@@ -18,21 +18,29 @@
package org.ow2.weblab.portlet.business.service;
import java.net.URI;
import java.util.Locale;
import java.util.Map;
import org.ow2.weblab.core.model.PieceOfKnowledge;
import org.ow2.weblab.core.model.Resource;
import org.ow2.weblab.core.services.ContentNotAvailableException;
import org.ow2.weblab.core.services.InvalidParameterException;
import org.ow2.weblab.core.services.UnexpectedException;
import org.ow2.weblab.portlet.business.bean.ServiceDescription;
public interface MetaViewBusinessServices {
public Resource getWLResource(String docURI, String remoteUser) throws ContentNotAvailableException;
public String getURIFromPoK(PieceOfKnowledge pok);
public Map<String, ServiceDescription> getTranslations(Resource res, Locale prefered);
public PieceOfKnowledge getPoKForSelectedTranslation(String uri, String serviceURI, String lang);
public Resource getWLResource(final String docURI) throws ContentNotAvailableException, InvalidParameterException, UnexpectedException;
public String getURIFromPoK(final PieceOfKnowledge pok);
public Map<String, ServiceDescription> getTranslations(final Resource res, final Locale prefered);
public PieceOfKnowledge getPoKForSelectedTranslation(final URI uri, final URI serviceURI, final String lang);
}
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2014 Airbus Defence and Space
* Copyright (C) 2004 - 2015 Airbus Defence and Space
*
* 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
......@@ -19,7 +19,7 @@
package org.ow2.weblab.portlet.mvc.spring.controller;
import java.net.URL;
import java.net.URI;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -34,10 +34,11 @@ import javax.xml.namespace.QName;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.ow2.weblab.core.model.Document;
import org.ow2.weblab.core.model.PieceOfKnowledge;
import org.ow2.weblab.core.model.Resource;
import org.ow2.weblab.core.services.ContentNotAvailableException;
import org.ow2.weblab.core.services.InvalidParameterException;
import org.ow2.weblab.core.services.UnexpectedException;
import org.ow2.weblab.portlet.business.bean.DisplayMetaConfBean;
import org.ow2.weblab.portlet.business.bean.RDFPropertiesConfBean;
import org.ow2.weblab.portlet.business.service.MetaViewBusinessServices;
......@@ -58,9 +59,9 @@ import org.springframework.web.portlet.bind.annotation.ResourceMapping;
/**
* Metaview portlet Spring MVC controller.
* Business layer is accessible by Spring business services
*
*
* Control actions, renders, resources and events requests.
*
*
* @author emilienbondu
*
*/
......@@ -69,131 +70,128 @@ import org.springframework.web.portlet.bind.annotation.ResourceMapping;
@RequestMapping(value="VIEW")
@SessionAttributes({"resource", "isEmptyModel", "isLoadedResource", "rdfProperties", "translations", "metaDisplay"})
public class MetaViewContoller {
// attributes
protected Log logger = LogFactory.getLog(this.getClass());
protected URL WSDL_REPO_URL;
@Autowired
@Qualifier("metaviewBusinessService")
protected MetaViewBusinessServices metaviewBusinessService;
@Autowired
@Qualifier("displayMeta")
protected DisplayMetaConfBean metaDisplayConf;
@ModelAttribute("metaDisplay")
public Map<String, Boolean> getDisplayMeta() {
return metaDisplayConf.getProperties();
return this.metaDisplayConf.getProperties();
}
@Autowired
@Qualifier("rdfProperties")
protected RDFPropertiesConfBean rdfProperties;
@ModelAttribute("rdfProperties")
public Map<String, String> getRDFProperties() {
return rdfProperties.getProperties();
return this.rdfProperties.getProperties();
}
//#############################################################################
// action mapping methods #
//#############################################################################
@ActionMapping(params="action=goToEntity")
public void goToEntity(ActionResponse response, ModelMap model) {
logger.debug("receiving action gotToEntity");
this.logger.debug("receiving action goToEntity");
response.setEvent(QName.valueOf("{http://weblab.ow2.org/portlet/metaview/action}sendUnloadedDocument"), (PieceOfKnowledge)model.get("resource"));
}
@ActionMapping(params="action=selectTranslation")
public void selectTranslation(ActionRequest request, ActionResponse response, ModelMap model) {
String lang = request.getParameter("language");
String service = request.getParameter("service");
logger.debug("select translation for language :"+lang+" and service"+ service);
URI service = URI.create(request.getParameter("service"));
this.logger.debug("select translation for language :"+lang+" and service"+ service);
response.setEvent(QName.valueOf("{http://weblab.ow2.org/portlet/metaview/action}selectTranslatedVersion"),
metaviewBusinessService.getPoKForSelectedTranslation(((Resource)model.get("resource")).getUri(), service, lang));
this.metaviewBusinessService.getPoKForSelectedTranslation(URI.create(((Resource)model.get("resource")).getUri()),service, lang));
}
@ActionMapping(params="action=selectOriginalVersion")
public void selectOriginal(ActionRequest request, ActionResponse response, ModelMap model) {
logger.debug("select original version");
this.logger.debug("select original version");
response.setEvent(QName.valueOf("{http://weblab.ow2.org/portlet/metaview/action}selectOriginalVersion"), ((Resource)model.get("resource")).getUri());
}
//#############################################################################
// event mapping methods #
//#############################################################################
@EventMapping(value="{http://weblab.ow2.org/portlet/metaview/reaction}displayMeta")
public void processLoadedDocumentEvent(EventRequest request, EventResponse response, ModelMap model) {
public void processLoadedDocumentEvent(EventRequest request, EventResponse response, ModelMap model) {
// receive a event containing a document
logger.debug("receiving the event : {http://weblab.ow2.org/portlet/metaview/reaction}displayMeta");
model.addAttribute("resource", (Document) request.getEvent().getValue());
this.logger.debug("receiving the event : {http://weblab.ow2.org/portlet/metaview/reaction}displayMeta");
model.addAttribute("resource", request.getEvent().getValue());
model.addAttribute("resourceDesc", new HashMap<String, List<String>>());
model.addAttribute("isLoadedResource", false);
model.addAttribute("isEmptyModel", false);
model.addAttribute("isLoadedResource", Boolean.FALSE);
model.addAttribute("isEmptyModel", Boolean.FALSE);
}
@EventMapping(value="{http://weblab.ow2.org/portlet/metaview/reaction}loadDocumentAndDisplayMeta")
public void processNotLoadedDocumentEvent(EventRequest request, EventResponse response, ModelMap model) {
// receive a event containing an unloaded document
logger.debug("receiving the event : {http://weblab.ow2.org/portlet/metaview/reaction}loadDocumentAndDisplayMeta");
model.addAttribute("resource", (PieceOfKnowledge) request.getEvent().getValue());
this.logger.debug("receiving the event : {http://weblab.ow2.org/portlet/metaview/reaction}loadDocumentAndDisplayMeta");
model.addAttribute("resource", request.getEvent().getValue());
model.addAttribute("resourceDesc", new HashMap<String, List<String>>());
model.addAttribute("isLoadedResource", false);
model.addAttribute("isEmptyModel", false);
model.addAttribute("isLoadedResource", Boolean.FALSE);
model.addAttribute("isEmptyModel", Boolean.FALSE);
//response.setEvent(QName.valueOf("{http://weblab.ow2.org/portlet/metaview/action}sendUnloadedDocument"), (PieceOfKnowledge)model.get("resource"));
}
//#############################################################################
// resource mapping methods #
//#############################################################################
@ResourceMapping("showMetadata")
public ModelAndView serveMetadata(ResourceRequest request, ResourceResponse response, ModelMap model) throws ContentNotAvailableException {
public ModelAndView serveMetadata(ResourceRequest request, ResourceResponse response, ModelMap model) throws ContentNotAvailableException, InvalidParameterException, UnexpectedException {
response.setContentType("text/html");
response.setCharacterEncoding("UTF-8");
ModelAndView mav = new ModelAndView();
mav.setView("view_meta_ajax");
mav.addAllObjects(model);
Resource resource= (Resource) model.get("resource");
logger.debug("serving the metadata content table from resource :"+resource.getUri());
this.logger.debug("serving the metadata content table from resource: "+resource.getUri());
// loading map if needed
boolean isLoadedDocument = false;
if (model != null && model.containsAttribute("isLoadedResource")) {
isLoadedDocument = (Boolean)model.get("isLoadedResource");
if (model.containsAttribute("isLoadedResource")) {
isLoadedDocument = ((Boolean)model.get("isLoadedResource")).booleanValue();
}
// adding map to model
if (!isLoadedDocument) {
// loading resource from pok by calling service
mav.getModelMap().addAttribute("resource",
metaviewBusinessService.getWLResource(
metaviewBusinessService.getURIFromPoK((PieceOfKnowledge) resource),
request.getRemoteUser()));
mav.getModelMap().addAttribute("isLoadedResource", true);
mav.getModelMap().addAttribute("translations", metaviewBusinessService.getTranslations(
this.metaviewBusinessService.getWLResource(this.metaviewBusinessService.getURIFromPoK((PieceOfKnowledge) resource)));
mav.getModelMap().addAttribute("isLoadedResource", Boolean.TRUE);
mav.getModelMap().addAttribute("translations", this.metaviewBusinessService.getTranslations(
(Resource) mav.getModelMap().get("resource"), request.getLocale()));
}
return mav;
}
//#############################################################################
// render mapping methods #
//#############################################################################
......@@ -202,16 +200,16 @@ public class MetaViewContoller {
ModelAndView mav = new ModelAndView("view");
mav.addAllObjects(model);
if (!model.containsAttribute("isEmptyModel")) {
mav.addObject("isEmptyModel", true);
mav.addObject("isEmptyModel", Boolean.TRUE);
}
return mav;
}
//#############################################################################
// exceptions handlers #
//#############################################################################
@ExceptionHandler(ContentNotAvailableException.class)
public ModelAndView getMetadataException(ContentNotAvailableException ex) {
@ExceptionHandler(Exception.class)
public ModelAndView getMetadataException(Exception ex) {
ModelAndView mav = new ModelAndView("error");
mav.addObject("message_error", ex.getMessage());
return mav;
......
......@@ -24,3 +24,4 @@ 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.com.hp.hpl.jena.sparql.engine.optimizer = INFO
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<!-- Spring xml for meta-data display in the result portlet. Here is
<!-- Spring xml for meta-data display in the result portlet. Here is
defined interesting RDF annotations namespace for the result portlet.
The portlet search in resources for this annotation and display them
when possible (as meta-data).
when possible (as meta-data).
-->
<beans>
<bean id="weblab-metaview" class="org.ow2.weblab.portlet.filter.config.PortletMappingBean">
<property name="reactions">
......@@ -14,16 +14,11 @@ when possible (as meta-data).
<entry key="{http://weblab.ow2.org/portlet/metaview/reaction}loadDocumentAndDisplayMeta">
<list>
<value>{http://weblab.ow2.org/events/result}selectNotLoadedDocument</value>
<value>{http://weblab.ow2.org/events/result}selectNotLoadedImage</value>
<value>{http://weblab.ow2.org/events/geo}selectNotLoadedDocument</value>
<value>{http://weblab.ow2.org/events/time}selectNotLoadedDocument</value>
<value>{http://weblab.ow2.org/events/basket}selectNotLoadedDocument</value>
<value>{http://weblab.ow2.org/events/basket}selectNotLoadedImage</value>
</list>
</entry>
</map>
</property>
<property name="actions">
<map>
<entry key="{http://weblab.ow2.org/portlet/metaview/action}sendUnloadedDocument" value="{http://weblab.ow2.org/events/meta}selectNotLoadedDocument" />
......@@ -31,7 +26,7 @@ when possible (as meta-data).
<entry key="{http://weblab.ow2.org/portlet/metaview/action}selectOriginalVersion" value="{http://weblab.ow2.org/events/meta}selectOriginal" />
</map>
</property>
<property name="redirections">
<map>
<entry key="{http://weblab.ow2.org/portlet/metaview/action}sendUnloadedDocument" value="/web/guest"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<!--
Spring xml for meta-data business service configuration.
-->
<beans>
<bean id="WSBusinessServiceConfig" class="org.ow2.weblab.portlet.business.bean.ServiceConfBean">
<!-- weblab client service URI -->
<property name="serviceURI" value="http://weblab.ow2.org/core/1.2/services/resourceContainer#Load_Resource"/>
<bean id="metaviewBusinessService" class="org.ow2.weblab.portlet.business.service.impl.WSBusinessServicesImpl">
<constructor-arg value="http://weblab.ow2.org/core/1.2/services/resourceContainer#Load_Resource" type="java.lang.String" name="resourceContainerUri" />
<constructor-arg value="SELECT DISTINCT ?resource WHERE { ?subject &lt;http://weblab.ow2.org/core/1.2/ontology/retrieval#isLinkedTo&gt; ?resource }" type="java.lang.String" name="linkedToQuery" />
<constructor-arg value="SELECT DISTINCT ?lang ?service ?label WHERE { ?resource &lt;http://weblab.ow2.org/core/1.2/ontology/model#isComposedByMediaUnit&gt; ?mu . ?mu &lt;http://weblab.ow2.org/core/1.2/ontology/processing#isProducedBy&gt; ?service . ?service &lt;http://www.w3.org/2000/01/rdf-schema#label&gt; ?label . ?mu &lt;http://weblab.ow2.org/core/1.2/ontology/processing#isTranslationOf&gt; ?translation . ?mu &lt;http://purl.org/dc/elements/1.1/language&gt; ?lang FILTER (langMatches(lang(?label), ?preferred) || langMatches(lang(?label), &quot;&quot;))}" type="java.lang.String" name="translationsQueryTemplate" />
</bean>
</beans>
\ No newline at end of file
......@@ -2,7 +2,8 @@
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 4.0.0//EN" "http://www.liferay.com/dtd/liferay-display_4_0_0.dtd">
<display>
<category name="WebLab">
<portlet id="weblab-metaview" />
</category>
<category name="WebLab">
<portlet id="weblab-metaview" />
</category>
</display>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<!-- Spring xml for meta-data display in the result portlet. Here is
defined interesting RDF annotations namespace for the result portlet.
The portlet search in resources for this annotation and display them
when possible (as meta-data).
-->
<beans>
<bean id="rdfProperties" class="org.ow2.weblab.portlet.business.bean.RDFPropertiesConfBean">
<property name="properties">
<map>
......@@ -23,7 +17,7 @@ when possible (as meta-data).
<entry key="refersTo" value="http://weblab.ow2.org/core/1.2/ontology/processing#refersTo" />
<entry key="hasScore" value="http://weblab.ow2.org/core/1.2/ontology/retrieval#hasScore" />
<entry key="translation" value="http://weblab.ow2.org/core/1.2/ontology/processing#availableTranslation" />
<!-- DublinCore properties-->
<entry key="title" value="http://purl.org/dc/elements/1.1/title" />
<entry key="abstract" value="http://purl.org/dc/terms/abstract" />
......@@ -43,12 +37,13 @@ when possible (as meta-data).
<entry key="created" value="http://purl.org/dc/terms/created" />
<entry key="extent" value="http://purl.org/dc/terms/extent" />
<entry key="mainsource" value="http://purl.org/dc/terms/source" />
<!-- RDF properties -->
<entry key="seeAlso" value="http://www.w3.org/2000/01/rdf-schema#seeAlso" />
</map>
</property>
</bean>
<bean id="displayMeta" class="org.ow2.weblab.portlet.business.bean.DisplayMetaConfBean">
<property name="properties">
<map>
......@@ -64,7 +59,7 @@ when possible (as meta-data).
<entry key="refersTo" value="false" />
<entry key="hasScore" value="false" />
<entry key="translation" value="true" />
<!-- DublinCore properties-->
<entry key="title" value="true" />
<entry key="abstract" value="true" />
......@@ -84,10 +79,11 @@ when possible (as meta-data).
<entry key="created" value="true" />
<entry key="extent" value="true" />
<entry key="mainsource" value="true" />
<!-- RDF properties -->
<entry key="seeAlso" value="false" />
</map>
</property>
</bean>
</bean>
</beans>
\ No newline at end of file
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="1.0">
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="1.0">
<portlet>
<description xml:lang="FR">Visualisation des méta données</description>
<portlet-name>weblab-metaview</portlet-name>
<display-name xml:lang="FR">Visualisation des méta données</display-name>
<!-- <portlet-class>org.ow2.weblab.portlet.MetaDataPortlet</portlet-class>-->
<portlet-class>org.springframework.web.portlet.DispatcherPortlet</portlet-class>
<portlet-class>org.springframework.web.portlet.DispatcherPortlet</portlet-class>
<expiration-cache>0</expiration-cache>
<!-- Supported only the view mode for this portlet -->
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
<supported-locale>fr</supported-locale>
<supported-locale>en</supported-locale>
<resource-bundle>meta_portlet</resource-bundle>
......@@ -23,10 +23,10 @@
<short-title>Metadata portlet</short-title>
<keywords>JSR286 Portlet meta</keywords>
</portlet-info>
<!-- Supported event for this portlet -->
<!-- processing -->
<supported-processing-event>
<qname xmlns:result="http://weblab.ow2.org/events/result">result:selectDocument</qname>
......@@ -43,12 +43,12 @@
<supported-processing-event>
<qname xmlns:basket="http://weblab.ow2.org/events/basket">basket:selectNotLoadedDocument</qname>
</supported-processing-event>
<!-- publishing -->
<supported-publishing-event>
<qname xmlns:meta="http://weblab.ow2.org/events/meta">meta:selectNotLoadedDocument</qname>
</supported-publishing-event>
<supported-publishing-event>
<qname xmlns:meta="http://weblab.ow2.org/events/meta">meta:selectTranslation</qname>
</supported-publishing-event>
......
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
<display-name>weblab-metaview</display-name>
<description>WebLab portlet web application to show metadata about weblab resource</description>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<servlet>