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
......@@ -20,177 +20,174 @@
package org.ow2.weblab.portlet.business.service.impl;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.UUID;
import javax.portlet.PortletContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.ow2.weblab.components.client.WebLabClient;
import org.ow2.weblab.core.extended.exception.WebLabCheckedException;
import org.ow2.weblab.core.extended.ontologies.DublinCore;
import org.ow2.weblab.core.extended.ontologies.RDFS;
import org.ow2.weblab.core.extended.ontologies.WebLabModel;
import org.ow2.weblab.core.extended.ontologies.WebLabProcessing;
import org.ow2.weblab.core.extended.ontologies.WebLabRetrieval;
import org.ow2.weblab.core.helper.impl.AdvancedSelector;
import org.ow2.weblab.core.helper.impl.RDFSelectorFactory;
import org.ow2.weblab.core.extended.factory.ExceptionFactory;
import org.ow2.weblab.core.helper.impl.SemanticResource;
import org.ow2.weblab.core.helper.impl.Statements;
import org.ow2.weblab.core.model.PieceOfKnowledge;
import org.ow2.weblab.core.model.Resource;
import org.ow2.weblab.core.model.processing.WProcessingAnnotator;
import org.ow2.weblab.core.services.ContentNotAvailableException;
import org.ow2.weblab.core.services.InvalidParameterException;
import org.ow2.weblab.core.services.ResourceContainer;
import org.ow2.weblab.core.services.UnexpectedException;
import org.ow2.weblab.core.services.resourcecontainer.LoadResourceArgs;
import org.ow2.weblab.core.services.resourcecontainer.LoadResourceReturn;
import org.ow2.weblab.portlet.business.bean.ServiceConfBean;
import org.ow2.weblab.portlet.business.bean.ServiceDescription;
import org.ow2.weblab.portlet.business.service.MetaViewBusinessServices;
import org.purl.dc.elements.DublinCoreAnnotator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import com.hp.hpl.jena.query.ParameterizedSparqlString;
import com.hp.hpl.jena.query.QuerySolution;
import com.hp.hpl.jena.query.QuerySolutionMap;
import com.hp.hpl.jena.rdf.model.ResourceFactory;
import com.hp.hpl.jena.sparql.resultset.ResultSetMem;
@Service(value="metaviewBusinessService")
public class WSBusinessServicesImpl implements MetaViewBusinessServices {
// attributes
private static final String DEFAULT_USER_URI = "http://weblab.ow2.org/user#Weblab";
private static final String DEFAULT_USER_NAMESPACE = "http://weblab.ow2.org/user#";
private static final String DEFAULT_USAGE_CONTEXT = "http://defaultContext.org";
protected Log logger = LogFactory.getLog(this.getClass());
@Autowired()
@Qualifier("WSBusinessServiceConfig")
protected ServiceConfBean configuration;
@Autowired
private PortletContext context;
public Resource getWLResource(String docURI, String remoteUser) throws ContentNotAvailableException {
// getting resource from repository
LoadResourceArgs args = new LoadResourceArgs();
args.setResourceId(docURI);
@Service(value = "metaviewBusinessService")
public class WSBusinessServicesImpl implements MetaViewBusinessServices {
//setting user repo url
ResourceContainer service = null;
if (remoteUser != null) {
try {
service = WebLabClient.getResourceContainer(DEFAULT_USER_NAMESPACE+remoteUser, DEFAULT_USAGE_CONTEXT, configuration.getServiceURI());
} catch (WebLabCheckedException e) {
throw new ContentNotAvailableException("Unable to handle a valid service to get the content");
}
logger.info("Using WL service "+service+ "to get resource:"+docURI+" for user:"+remoteUser);
} else {
try {
service = WebLabClient.getResourceContainer(DEFAULT_USER_URI, DEFAULT_USAGE_CONTEXT, configuration.getServiceURI());
} catch (WebLabCheckedException e) {
throw new ContentNotAvailableException("Unable to handle a valid service to get the content");
}
logger.info("Using WL service "+service+ "to get resource:"+docURI);
}
if (service == null) {
throw new ContentNotAvailableException("Unable to handle a valid service to get the content");
private static final String SERVICE = "service";
private static final String LABEL = "label";
private static final String LANG = "lang";
protected final Log logger = LogFactory.getLog(this.getClass());
protected final ResourceContainer service;
private final String linkedToQuery;
private final String translationsQueryTemplate;
/**
* Standard constructor of the class, setting the resource container URI to find it in the weblab-client.
*
* @param resourceContainerUri
* The identifier of the resource container
* @param linkedToQuery
* The query that search the linked resource URI inside the received pok
* @param translationsQueryTemplate
* The query template to be used to search for available translations inside the loaded document
* @throws WebLabCheckedException
* If the resource container cannot be loaded
*/
public WSBusinessServicesImpl(final String resourceContainerUri, final String linkedToQuery, final String translationsQueryTemplate) throws WebLabCheckedException {
this.service = WebLabClient.getResourceContainer("Not used", "Not used", resourceContainerUri);
if (this.service == null) {
final String message = "Unable to initialise the resource container needed for metadata.";
this.logger.fatal(message);
throw new WebLabCheckedException(message);
}
LoadResourceReturn res;
this.linkedToQuery = linkedToQuery;
this.translationsQueryTemplate = translationsQueryTemplate;
}
@Override
public Resource getWLResource(final String docURI) throws ContentNotAvailableException, InvalidParameterException, UnexpectedException {
final LoadResourceArgs args = new LoadResourceArgs();
args.setResourceId(docURI);
try {
res = service.loadResource(args);
return res.getResource();
} catch (Exception e) {
throw new ContentNotAvailableException("Unable to get the content ("+e.getMessage()+")");
return this.service.loadResource(args).getResource();
} catch (final Exception e) {
final String message = "Caught an error when calling Resource container service to retrieve document " + docURI + ".";
this.logger.error(message, e);
throw ExceptionFactory.createUnexpectedException(message, e);
}
}
/**
* Method to get URI from a receive PieceOfKnowledge using
* POK_PROPERTY_DOC_URI
*
*
* @param pok
* @return URI if exist null otherwise
*/
public String getURIFromPoK(PieceOfKnowledge pok) {
@Override
public String getURIFromPoK(final PieceOfKnowledge pok) {
if (pok != null) {
AdvancedSelector rdfSelector = RDFSelectorFactory.getSelector(true);
Statements map = rdfSelector.searchFor(pok, WebLabRetrieval.IS_LINKED_TO);
if (map != null && !map.entrySet().isEmpty()) {
return (String) map.entrySet().iterator().next().getValue().getValue(WebLabRetrieval.IS_LINKED_TO);
final SemanticResource semRes = new SemanticResource(pok);
final ResultSetMem rsm = semRes.selectAsJenaResultSet(this.linkedToQuery);
if (rsm.hasNext()) {
final com.hp.hpl.jena.rdf.model.Resource resource = rsm.next().getResource("resource");
if (resource != null && resource.isURIResource()) {
return resource.getURI();
}
}
this.logger.error("Received pok (" + pok.getUri() + ") is not linked to a document URI.");
} else {
this.logger.error("Received pok was null.");
}
return null;
}
@Override
public Map<String, ServiceDescription> getTranslations(Resource res, Locale prefered) {
HashMap<String, ServiceDescription> translations= new HashMap<String, ServiceDescription>();
SemanticResource sem = new SemanticResource(res);
String query =
"SELECT DISTINCT ?lang ?service ?label WHERE {"
+ "<"+res.getUri()+"> <"+WebLabModel.IS_COMPOSED_BY_MEDIA_UNIT+"> ?mu."
+ "?mu <"+WebLabProcessing.IS_PRODUCED_BY+"> ?service."
+ "?service <"+RDFS.LABEL+"> ?label."
+ "?mu <"+WebLabProcessing.IS_TRANSLATION_OF+"> ?translation."
+ "?mu <"+DublinCore.LANGUAGE_PROPERTY_NAME+"> ?lang "
+ "FILTER (langMatches(lang(?label), \""+prefered.getLanguage()+"\") || langMatches(lang(?label), \"\"))"
+ "}";
logger.info("Query :"+query );
ResultSetMem rs = sem.selectAsJenaResultSet(query);
public Map<String, ServiceDescription> getTranslations(final Resource resource, final Locale preferred) {
final HashMap<String, ServiceDescription> translations = new HashMap<>();
final QuerySolutionMap qsm = new QuerySolutionMap();
qsm.add("preferred", ResourceFactory.createPlainLiteral(preferred.getLanguage()));
qsm.add("resource", ResourceFactory.createResource(resource.getUri()));
final ParameterizedSparqlString query = new ParameterizedSparqlString(this.translationsQueryTemplate, qsm);
final SemanticResource sem = new SemanticResource(resource);
final ResultSetMem rs = sem.selectAsJenaResultSet(query.toString());
while (rs.hasNext()) {
QuerySolution qs = rs.next();
if (!translations.containsKey(qs.getLiteral("lang").toString())) {
ServiceDescription service = new ServiceDescription();
service.setUri(qs.getResource("service").getURI().toString());
service.setLabel(qs.getLiteral("label").getLexicalForm());
translations.put(qs.getLiteral("lang").toString(), service);
logger.debug("Translation founded :"+qs.getLiteral("lang").toString()+" : "+qs.getLiteral("label").getLexicalForm());
final QuerySolution qs = rs.next();
if (!translations.containsKey(qs.getLiteral(LANG).toString())) {
final ServiceDescription serviceDesc = new ServiceDescription();
serviceDesc.setUri(qs.getResource(SERVICE).getURI().toString());
serviceDesc.setLabel(qs.getLiteral(LABEL).getLexicalForm());
translations.put(qs.getLiteral(LANG).toString(), serviceDesc);
this.logger.debug("Translation found: " + qs.getLiteral(LANG).toString() + " - " + qs.getLiteral(LABEL).getLexicalForm());
}
if (translations.containsKey(qs.get("lang")) && !qs.getLiteral("label").getLanguage().equalsIgnoreCase("")) {
ServiceDescription service = new ServiceDescription();
service.setUri(qs.getResource("service").getURI().toString());
service.setLabel(qs.getLiteral("label").getLexicalForm());
translations.put(qs.getLiteral("lang").toString(), service);
logger.debug("Translation founded :"+qs.getLiteral("lang").toString()+" : "+qs.getLiteral("label").getLexicalForm());
if (translations.containsKey(qs.get(LANG)) && !qs.getLiteral(LABEL).getLanguage().isEmpty()) {
final ServiceDescription serviceDesc = new ServiceDescription();
serviceDesc.setUri(qs.getResource(SERVICE).getURI().toString());
serviceDesc.setLabel(qs.getLiteral(LABEL).getLexicalForm());
translations.put(qs.getLiteral(LANG).toString(), serviceDesc);
this.logger.debug("Translation found: " + qs.getLiteral(LANG).toString() + " - " + qs.getLiteral(LABEL).getLexicalForm());
}
}
return translations;
}
@Override
public PieceOfKnowledge getPoKForSelectedTranslation(String uri, String serviceURI, String lang) {
PieceOfKnowledge pok = new PieceOfKnowledge();
pok.setUri("weblab://"+UUID.randomUUID());
try {
WProcessingAnnotator wpa = new WProcessingAnnotator(new URI(uri), pok);
DublinCoreAnnotator dca = new DublinCoreAnnotator(new URI(uri), pok);
wpa.writeProducedBy(new URI(serviceURI));
dca.writeLanguage(lang);
} catch (URISyntaxException e) {
logger.error("Unable to create event POK, returning an empty one :"+e.getLocalizedMessage());
}
public PieceOfKnowledge getPoKForSelectedTranslation(final URI uri, final URI serviceURI, final String lang) {
final PieceOfKnowledge pok = new PieceOfKnowledge();
pok.setUri("weblab://" + UUID.randomUUID());
final WProcessingAnnotator wpa = new WProcessingAnnotator(uri, pok);
final DublinCoreAnnotator dca = new DublinCoreAnnotator(uri, pok);
wpa.writeProducedBy(serviceURI);
dca.writeLanguage(lang);
return pok;
}
}
/**
* 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());