Commit da469d44 authored by Yann Mombrun's avatar Yann Mombrun

Few updates of the code style.

Remove _en file to ensure english is the default.

git-svn-id: svn://svn.forge.objectweb.org/svnroot/weblab/trunk/WebLabServices/Portlets/metadata-portlet@4613 a803c184-d8de-4a0e-a52b-d3eef88212b6
parent b79be200
/** /**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications * WEBLAB: Service oriented integration platform for media mining and intelligence applications
* *
* Copyright (C) 2004 - 2016 Airbus Defence and Space * Copyright (C) 2004 - 2017 Airbus Defence and Space
* *
* This library is free software; you can redistribute it and/or modify it under the terms of * 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 * the GNU Lesser General Public License as published by the Free Software Foundation; either
...@@ -47,11 +47,11 @@ public class TimeConfig { ...@@ -47,11 +47,11 @@ public class TimeConfig {
public String getFormatDateTimeForJSTL() { public String getFormatDateTimeForJSTL() {
return formatDateTimeForJSTL; return this.formatDateTimeForJSTL;
} }
public void setFormatDateTimeForJSTL(String formatDateTimeForJSTL) { public void setFormatDateTimeForJSTL(final String formatDateTimeForJSTL) {
this.formatDateTimeForJSTL = formatDateTimeForJSTL; this.formatDateTimeForJSTL = formatDateTimeForJSTL;
} }
......
/** /**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications * WEBLAB: Service oriented integration platform for media mining and intelligence applications
* *
* Copyright (C) 2004 - 2016 Airbus Defence and Space * Copyright (C) 2004 - 2017 Airbus Defence and Space
* *
* This library is free software; you can redistribute it and/or modify it under the terms of * 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 * the GNU Lesser General Public License as published by the Free Software Foundation; either
...@@ -42,8 +42,8 @@ public interface MetaViewBusinessServices { ...@@ -42,8 +42,8 @@ public interface MetaViewBusinessServices {
public PieceOfKnowledge getPoKForSelectedTranslation(final URI uri, final URI serviceURI, final String lang); public PieceOfKnowledge getPoKForSelectedTranslation(final URI uri, final URI serviceURI, final String lang);
public PieceOfKnowledge getPoKToUseAsSource(Document doc, String sourceTab); public PieceOfKnowledge getPoKToUseAsSource(final Document doc, final String sourceTab);
} }
/** /**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications * WEBLAB: Service oriented integration platform for media mining and intelligence applications
* *
* Copyright (C) 2004 - 2016 Airbus Defence and Space * Copyright (C) 2004 - 2016 Airbus Defence and Space
* *
* This library is free software; you can redistribute it and/or modify it under the terms of * 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 * the GNU Lesser General Public License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version. * version 2.1 of the License, or (at your option) any later version.
* *
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details. * See the GNU Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public License along with this * You should have received a copy of the GNU Lesser General Public License along with this
* library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA * Floor, Boston, MA 02110-1301 USA
...@@ -23,11 +23,12 @@ import com.liferay.portal.kernel.exception.SystemException; ...@@ -23,11 +23,12 @@ import com.liferay.portal.kernel.exception.SystemException;
/** /**
* Interface defining the service is charge of permission control * Interface defining the service is charge of permission control
* *
* @author rgauthier * @author rgauthier
*/ */
public interface PermissionService { public interface PermissionService {
public boolean hasAdminRole(PortletRequest request) throws SystemException;
public boolean hasAdminRole(final PortletRequest request) throws SystemException;
} }
/** /**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications * WEBLAB: Service oriented integration platform for media mining and intelligence applications
* *
* Copyright (C) 2004 - 2016 Airbus Defence and Space * Copyright (C) 2004 - 2017 Airbus Defence and Space
* *
* This library is free software; you can redistribute it and/or modify it under the terms of * 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 * the GNU Lesser General Public License as published by the Free Software Foundation; either
...@@ -119,7 +119,7 @@ public class EditMetaServices { ...@@ -119,7 +119,7 @@ public class EditMetaServices {
} else if (valueType.equals("double")) { } else if (valueType.equals("double")) {
this.write(resource, xlmns, URI.create(entireNameSpace), keyParam, Double.class, Double.valueOf(value)); this.write(resource, xlmns, URI.create(entireNameSpace), keyParam, Double.class, Double.valueOf(value));
} else if (valueType.equals("date")) { } else if (valueType.equals("date")) {
final SimpleDateFormat dateFormat = new SimpleDateFormat(timeConfig.getFormatDateTimeForJSTL()); final SimpleDateFormat dateFormat = new SimpleDateFormat(this.timeConfig.getFormatDateTimeForJSTL());
this.write(resource, xlmns, URI.create(entireNameSpace), keyParam, Date.class, dateFormat.parse(value.toString())); this.write(resource, xlmns, URI.create(entireNameSpace), keyParam, Date.class, dateFormat.parse(value.toString()));
} else if (valueType.equals("integer")) { } else if (valueType.equals("integer")) {
this.write(resource, xlmns, URI.create(entireNameSpace), keyParam, Integer.class, Integer.valueOf(value)); this.write(resource, xlmns, URI.create(entireNameSpace), keyParam, Integer.class, Integer.valueOf(value));
......
...@@ -50,19 +50,20 @@ public class LiferayPermissionServiceImpl implements PermissionService { ...@@ -50,19 +50,20 @@ public class LiferayPermissionServiceImpl implements PermissionService {
/* /*
* (non-Javadoc) * (non-Javadoc)
* *
* @see org.ow2.weblab.portlet.business.service.PermissionService#hasAdminRole(javax.portlet.ResourceRequest) * @see org.ow2.weblab.portlet.business.service.PermissionService#hasAdminRole(javax.portlet.ResourceRequest)
*/ */
@Override @Override
public boolean hasAdminRole(PortletRequest request) throws SystemException { public boolean hasAdminRole(final PortletRequest request) throws SystemException {
ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY); final ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
User user = themeDisplay.getUser(); final User user = themeDisplay.getUser();
for (String role : adminRoles) { for (final String role : this.adminRoles) {
for (Role userRole : user.getRoles()) { for (final Role userRole : user.getRoles()) {
if (userRole.getName().equals(role)) if (userRole.getName().equals(role)) {
return true; return true;
}
} }
} }
return false; return false;
......
/** /**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications * WEBLAB: Service oriented integration platform for media mining and intelligence applications
* *
* Copyright (C) 2004 - 2016 Airbus Defence and Space * Copyright (C) 2004 - 2017 Airbus Defence and Space
* *
* This library is free software; you can redistribute it and/or modify it under the terms of * 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 * the GNU Lesser General Public License as published by the Free Software Foundation; either
...@@ -72,7 +72,7 @@ public class RestResourceSaverService implements ResourceSaverService { ...@@ -72,7 +72,7 @@ public class RestResourceSaverService implements ResourceSaverService {
* The URL of the rest service to be called in order to save the edition * The URL of the rest service to be called in order to save the edition
* @throws MalformedURLException * @throws MalformedURLException
* If the URL is not valid * If the URL is not valid
* @throws URISyntaxException * @throws URISyntaxException
*/ */
public RestResourceSaverService(final String url) throws MalformedURLException, URISyntaxException { public RestResourceSaverService(final String url) throws MalformedURLException, URISyntaxException {
super(); super();
...@@ -104,7 +104,7 @@ public class RestResourceSaverService implements ResourceSaverService { ...@@ -104,7 +104,7 @@ public class RestResourceSaverService implements ResourceSaverService {
} }
final HttpPost httpPost = new HttpPost(this.url); final HttpPost httpPost = new HttpPost(this.url);
final StringEntity xmlEntity = new StringEntity(ResourceUtil.saveToXMLString(resource), APPLICATION_XML); final StringEntity xmlEntity = new StringEntity(ResourceUtil.saveToXMLString(resource), RestResourceSaverService.APPLICATION_XML);
httpPost.setEntity(xmlEntity); httpPost.setEntity(xmlEntity);
final HttpResponse response = httpClient.execute(httpPost); final HttpResponse response = httpClient.execute(httpPost);
......
/** /**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications * WEBLAB: Service oriented integration platform for media mining and intelligence applications
* *
* Copyright (C) 2004 - 2016 Airbus Defence and Space * Copyright (C) 2004 - 2017 Airbus Defence and Space
* *
* This library is free software; you can redistribute it and/or modify it under the terms of * 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 * the GNU Lesser General Public License as published by the Free Software Foundation; either
...@@ -121,7 +121,7 @@ public class WSBusinessServicesImpl implements MetaViewBusinessServices { ...@@ -121,7 +121,7 @@ public class WSBusinessServicesImpl implements MetaViewBusinessServices {
final ResultSetMem rsm = semRes.selectAsJenaResultSet(this.linkedToQuery); final ResultSetMem rsm = semRes.selectAsJenaResultSet(this.linkedToQuery);
if (rsm.hasNext()) { if (rsm.hasNext()) {
final com.hp.hpl.jena.rdf.model.Resource resource = rsm.next().getResource("resource"); final com.hp.hpl.jena.rdf.model.Resource resource = rsm.next().getResource("resource");
if (resource != null && resource.isURIResource()) { if ((resource != null) && resource.isURIResource()) {
return resource.getURI(); return resource.getURI();
} }
} }
...@@ -149,20 +149,20 @@ public class WSBusinessServicesImpl implements MetaViewBusinessServices { ...@@ -149,20 +149,20 @@ public class WSBusinessServicesImpl implements MetaViewBusinessServices {
while (rs.hasNext()) { while (rs.hasNext()) {
final QuerySolution qs = rs.next(); final QuerySolution qs = rs.next();
if (!translations.containsKey(qs.getLiteral(LANG).toString())) { if (!translations.containsKey(qs.getLiteral(WSBusinessServicesImpl.LANG).toString())) {
final ServiceDescription serviceDesc = new ServiceDescription(); final ServiceDescription serviceDesc = new ServiceDescription();
serviceDesc.setUri(qs.getResource(SERVICE).getURI().toString()); serviceDesc.setUri(qs.getResource(WSBusinessServicesImpl.SERVICE).getURI().toString());
serviceDesc.setLabel(qs.getLiteral(LABEL).getLexicalForm()); serviceDesc.setLabel(qs.getLiteral(WSBusinessServicesImpl.LABEL).getLexicalForm());
translations.put(qs.getLiteral(LANG).toString(), serviceDesc); translations.put(qs.getLiteral(WSBusinessServicesImpl.LANG).toString(), serviceDesc);
this.logger.debug("Translation found: " + qs.getLiteral(LANG).toString() + " - " + qs.getLiteral(LABEL).getLexicalForm()); this.logger.debug("Translation found: " + qs.getLiteral(WSBusinessServicesImpl.LANG).toString() + " - " + qs.getLiteral(WSBusinessServicesImpl.LABEL).getLexicalForm());
} }
if (translations.containsKey(qs.get(LANG)) && !qs.getLiteral(LABEL).getLanguage().isEmpty()) { if (translations.containsKey(qs.get(WSBusinessServicesImpl.LANG)) && !qs.getLiteral(WSBusinessServicesImpl.LABEL).getLanguage().isEmpty()) {
final ServiceDescription serviceDesc = new ServiceDescription(); final ServiceDescription serviceDesc = new ServiceDescription();
serviceDesc.setUri(qs.getResource(SERVICE).getURI().toString()); serviceDesc.setUri(qs.getResource(WSBusinessServicesImpl.SERVICE).getURI().toString());
serviceDesc.setLabel(qs.getLiteral(LABEL).getLexicalForm()); serviceDesc.setLabel(qs.getLiteral(WSBusinessServicesImpl.LABEL).getLexicalForm());
translations.put(qs.getLiteral(LANG).toString(), serviceDesc); translations.put(qs.getLiteral(WSBusinessServicesImpl.LANG).toString(), serviceDesc);
this.logger.debug("Translation found: " + qs.getLiteral(LANG).toString() + " - " + qs.getLiteral(LABEL).getLexicalForm()); this.logger.debug("Translation found: " + qs.getLiteral(WSBusinessServicesImpl.LANG).toString() + " - " + qs.getLiteral(WSBusinessServicesImpl.LABEL).getLexicalForm());
} }
} }
...@@ -182,15 +182,14 @@ public class WSBusinessServicesImpl implements MetaViewBusinessServices { ...@@ -182,15 +182,14 @@ public class WSBusinessServicesImpl implements MetaViewBusinessServices {
return pok; return pok;
} }
@Override
public PieceOfKnowledge getPoKToUseAsSource(Document doc, String sourceTab) {
@Override
public PieceOfKnowledge getPoKToUseAsSource(final Document doc, final String sourceTab) {
final PieceOfKnowledge pok = new PieceOfKnowledge(); final PieceOfKnowledge pok = new PieceOfKnowledge();
pok.setUri("weblab://" + UUID.randomUUID()); pok.setUri("weblab://" + UUID.randomUUID());
URI uri = URI.create(pok.getUri()); final URI uri = URI.create(pok.getUri());
final DublinCoreAnnotator dcaDoc = new DublinCoreAnnotator(doc); final DublinCoreAnnotator dcaDoc = new DublinCoreAnnotator(doc);
......
/** /**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications * WEBLAB: Service oriented integration platform for media mining and intelligence applications
* *
* Copyright (C) 2004 - 2016 Airbus Defence and Space * Copyright (C) 2004 - 2017 Airbus Defence and Space
* *
* This library is free software; you can redistribute it and/or modify it under the terms of * 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 * the GNU Lesser General Public License as published by the Free Software Foundation; either
...@@ -47,7 +47,6 @@ import org.springframework.web.portlet.ModelAndView; ...@@ -47,7 +47,6 @@ import org.springframework.web.portlet.ModelAndView;
import org.springframework.web.portlet.bind.annotation.ActionMapping; import org.springframework.web.portlet.bind.annotation.ActionMapping;
import org.springframework.web.portlet.bind.annotation.ResourceMapping; import org.springframework.web.portlet.bind.annotation.ResourceMapping;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.WebKeys; import com.liferay.portal.kernel.util.WebKeys;
import com.liferay.portal.theme.ThemeDisplay; import com.liferay.portal.theme.ThemeDisplay;
...@@ -130,7 +129,7 @@ public class EditMetaController { ...@@ -130,7 +129,7 @@ public class EditMetaController {
final ModelAndView mav = new ModelAndView(); final ModelAndView mav = new ModelAndView();
final ModelMap model = (ModelMap) request.getPortletSession().getAttribute("model"); final ModelMap model = (ModelMap) request.getPortletSession().getAttribute("model");
if (!model.containsAttribute(EditMetaController.TIME_CONFIG)) { if (!model.containsAttribute(EditMetaController.TIME_CONFIG)) {
model.addAttribute(EditMetaController.TIME_CONFIG, timeConfig); model.addAttribute(EditMetaController.TIME_CONFIG, this.timeConfig);
} }
if (!model.containsAttribute(EditMetaController.DATA_TAGLIB) || !model.containsAttribute(EditMetaController.DATA_LANGUAGE)) { if (!model.containsAttribute(EditMetaController.DATA_TAGLIB) || !model.containsAttribute(EditMetaController.DATA_LANGUAGE)) {
model.addAttribute(EditMetaController.DATA_TAGLIB, this.dataTaglib.getFormats()); model.addAttribute(EditMetaController.DATA_TAGLIB, this.dataTaglib.getFormats());
...@@ -146,7 +145,7 @@ public class EditMetaController { ...@@ -146,7 +145,7 @@ public class EditMetaController {
} }
if (!model.containsAttribute(EditMetaController.EDIT_ERROR)) { if (!model.containsAttribute(EditMetaController.EDIT_ERROR)) {
model.addAttribute(EditMetaController.EDIT_ERROR, false); model.addAttribute(EditMetaController.EDIT_ERROR, Boolean.FALSE);
} }
mav.setView("editview"); mav.setView("editview");
mav.addAllObjects(model); mav.addAllObjects(model);
...@@ -156,29 +155,29 @@ public class EditMetaController { ...@@ -156,29 +155,29 @@ public class EditMetaController {
@ResourceMapping("clearErrorAttribute") @ResourceMapping("clearErrorAttribute")
public void clearModelAttribute(final ModelMap model) { public void clearModelAttribute(final ModelMap model) {
model.addAttribute(EditMetaController.EDIT_ERROR, false); model.addAttribute(EditMetaController.EDIT_ERROR, Boolean.FALSE);
} }
@ActionMapping(params = "action=cancel") @ActionMapping(params = "action=cancel")
public void cancelEdit(final ActionRequest actionRequest, final ActionResponse response, final ModelMap model) throws SystemException, PortalException, IOException { public void cancelEdit(final ActionRequest actionRequest, final ActionResponse response, final ModelMap model) throws IOException {
this.logger.debug("view redirect after cancel method called"); this.logger.debug("view redirect after cancel method called");
// build link to default portlet jsp // build link to default portlet jsp
String portletName = (String) actionRequest.getAttribute(WebKeys.PORTLET_ID); final String portletName = (String) actionRequest.getAttribute(WebKeys.PORTLET_ID);
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY); final ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
PortletURL portletURL = PortletURLFactoryUtil.create(PortalUtil.getHttpServletRequest(actionRequest), portletName, themeDisplay.getLayout().getPlid(), PortletRequest.RENDER_PHASE); final PortletURL portletURL = PortletURLFactoryUtil.create(PortalUtil.getHttpServletRequest(actionRequest), portletName, themeDisplay.getLayout().getPlid(), PortletRequest.RENDER_PHASE);
response.sendRedirect(portletURL.toString()); response.sendRedirect(portletURL.toString());
} }
@ActionMapping(params = "action=save") @ActionMapping(params = "action=save")
public void saveEdit(final ActionRequest request, final ActionResponse response, final ModelMap model) throws SystemException, PortalException, IOException { public void saveEdit(final ActionRequest request, final ActionResponse response, final ModelMap model) throws SystemException {
this.logger.debug("saveEdit method called"); this.logger.debug("saveEdit method called");
if (!permissionService.hasAdminRole(request)) { if (!this.permissionService.hasAdminRole(request)) {
logger.error("The current user does not have the role to be authorized to edit the metadata of any document!"); this.logger.error("The current user does not have the role to be authorized to edit the metadata of any document!");
return; return;
} }
...@@ -190,7 +189,7 @@ public class EditMetaController { ...@@ -190,7 +189,7 @@ public class EditMetaController {
final Resource resource = (Resource) model.get(EditMetaController.RESOURCE); final Resource resource = (Resource) model.get(EditMetaController.RESOURCE);
final Map<String, List<String>> editMeta = (LinkedHashMap<String, List<String>>) model.get(EditMetaController.EDIT_META_DATA); final Map<String, List<String>> editMeta = (LinkedHashMap<String, List<String>>) model.get(EditMetaController.EDIT_META_DATA);
final Map<String, String[]> parameterMap = request.getParameterMap(); final Map<String, String[]> parameterMap = request.getParameterMap();
final EditMetaServices editMetaServices = new EditMetaServices(editMeta, timeConfig); final EditMetaServices editMetaServices = new EditMetaServices(editMeta, this.timeConfig);
editMetaServices.writeContent(resource, parameterMap); editMetaServices.writeContent(resource, parameterMap);
boolean worked = false; boolean worked = false;
try { try {
...@@ -198,9 +197,9 @@ public class EditMetaController { ...@@ -198,9 +197,9 @@ public class EditMetaController {
if (!worked) { if (!worked) {
this.logger.warn("The resource " + resource.getUri() + " may not be saved."); this.logger.warn("The resource " + resource.getUri() + " may not be saved.");
} }
model.addAttribute(EditMetaController.EDIT_ERROR, !worked); model.addAttribute(EditMetaController.EDIT_ERROR, Boolean.valueOf(!worked));
} catch (final IOException | WebLabCheckedException e) { } catch (final IOException | WebLabCheckedException e) {
model.addAttribute(EditMetaController.EDIT_ERROR, !worked); model.addAttribute(EditMetaController.EDIT_ERROR, Boolean.valueOf(!worked));
this.logger.error("An error occured saving the resource " + resource.getUri() + ".", e); this.logger.error("An error occured saving the resource " + resource.getUri() + ".", e);
} }
model.addAttribute(EditMetaController.RESOURCE, resource); model.addAttribute(EditMetaController.RESOURCE, resource);
......
/** /**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications * WEBLAB: Service oriented integration platform for media mining and intelligence applications
* *
* Copyright (C) 2004 - 2016 Airbus Defence and Space * Copyright (C) 2004 - 2017 Airbus Defence and Space
* *
* This library is free software; you can redistribute it and/or modify it under the terms of * 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 * the GNU Lesser General Public License as published by the Free Software Foundation; either
...@@ -169,21 +169,21 @@ public class MetaViewController { ...@@ -169,21 +169,21 @@ public class MetaViewController {
public void useAsSource(final ActionRequest request, final ActionResponse response, final ModelMap model) throws SystemException { public void useAsSource(final ActionRequest request, final ActionResponse response, final ModelMap model) throws SystemException {
this.logger.info("send event useAsSource"); this.logger.info("send event useAsSource");
if (!permissionService.hasAdminRole(request)) { if (!this.permissionService.hasAdminRole(request)) {
logger.warn("The current user does not have the role to be authorized to use this as a source!"); this.logger.warn("The current user does not have the role to be authorized to use this as a source!");
return; return;
} }
if (this.allowSourceEventing == null || !this.allowSourceEventing) { if ((this.allowSourceEventing == null) || !this.allowSourceEventing) {
logger.warn("The user does not have the authorisation to send an event to the source!"); this.logger.warn("The user does not have the authorisation to send an event to the source!");
return; return;
} }
Document doc = (Document) model.get(MetaViewController.RESOURCE); final Document doc = (Document) model.get(MetaViewController.RESOURCE);
PieceOfKnowledge pok = metaviewBusinessService.getPoKToUseAsSource(doc, sourceTypeTab); final PieceOfKnowledge pok = this.metaviewBusinessService.getPoKToUseAsSource(doc, this.sourceTypeTab);
response.setEvent(QName.valueOf("{http://weblab.ow2.org/portlet/action}useAsSource"), pok); response.setEvent(QName.valueOf("{http://weblab.ow2.org/portlet/action}useAsSource"), pok);
} }
// ############################################################################# // #############################################################################
// event mapping methods # // event mapping methods #
...@@ -239,7 +239,7 @@ public class MetaViewController { ...@@ -239,7 +239,7 @@ public class MetaViewController {
mav.getModelMap().addAttribute(MetaViewController.ALLOW_SOURCE_EVENTING, this.allowSourceEventing); mav.getModelMap().addAttribute(MetaViewController.ALLOW_SOURCE_EVENTING, this.allowSourceEventing);
// check admin permissions for user // check admin permissions for user
mav.getModelMap().addAttribute(MetaViewController.HAS_ADMIN_ROLE, permissionService.hasAdminRole(request)); mav.getModelMap().addAttribute(MetaViewController.HAS_ADMIN_ROLE, this.permissionService.hasAdminRole(request));
// adding map to model // adding map to model
if (!isLoadedDocument) { if (!isLoadedDocument) {
......
...@@ -18,7 +18,7 @@ meta.catego = Category: ...@@ -18,7 +18,7 @@ meta.catego = Category:
meta.subject = Subject: meta.subject = Subject:
meta.description = Description: meta.description = Description:
meta.publisher = Publisher: meta.publisher = Publisher:
meta.contibutor = Contributor: meta.contributor = Contributor:
meta.date = Date: meta.date = Date:
meta.type = Type: meta.type = Type:
meta.format = Format: meta.format = Format:
...@@ -48,6 +48,8 @@ meta.commented = Comment: ...@@ -48,6 +48,8 @@ meta.commented = Comment:
meta.reliability = Reliability: meta.reliability = Reliability:
meta.credibility = Credibility: meta.credibility = Credibility:
meta.toKeep = Protected: meta.toKeep = Protected:
meta.lat=Lat:
meta.lon=Lon:
meta.location = Document Location: meta.location = Document Location:
meta.label.location = Document Location meta.label.location = Document Location
meta.speaker = Speakers: meta.speaker = Speakers:
...@@ -69,7 +71,7 @@ meta.cancelButton=Cancel ...@@ -69,7 +71,7 @@ meta.cancelButton=Cancel
meta.saveButton=Save meta.saveButton=Save
meta.editButton=Edit meta.editButton=Edit
portlet.meta.configuration = Displayed meta-data portlet.meta.configuration = Displayed metadata
meta.save_config = Save meta.save_config = Save
portlet.no_meta = No meta-data to display portlet.no_meta = No meta-data to display
portlet.leave = You are going to leave the WebLab Platform, are you sure you want to access external networks ? portlet.leave = You are going to leave the WebLab Platform, are you sure you want to access external networks ?
\ No newline at end of file
javax.portlet.title= Metadata view Portlet
portlet.title = Metadata view
portlet.warning.session_expired = Session expired
meta.useAsSource = Use as new source
meta.defaultTitle = Title unavailable
meta.metadata = meta-data
meta.hasNativeContent = Native Content:
meta.hasNormalisedContent = Normalised Content:
meta.isGeneratedFrom = Generated from:
meta.isProducedFrom = Produced from:
meta.isResultOf = Result of:
meta.hasNumberOfResults = Number of results:
meta.isExposedAs = Exposed as:
meta.title = Title:
meta.creator = Creator:
meta.abstract = Summary:
meta.catego = Category:
meta.subject = Subject:
meta.description = Description:
meta.publisher = Publisher:
meta.contributor = Contributor:
meta.date = Date:
meta.type = Type:
meta.format = Format:
meta.identifier = Identifier:
meta.source = Source:
meta.mainsource = Gathering seed:
meta.language = Language:
meta.relation = Relation:
meta.coverage = Coverage:
meta.right = Right:
meta.modified = Modification date:
meta.created = Creation date:
meta.hasRank = Rank:
meta.hasDescription = Description:
meta.hasScore = Score:
meta.gatheringDate = Gathering date:
meta.extent = Media extension:
meta.projectName = Crawling project name:
meta.hasOriginalFileSize = Original file size:
meta.refersTo = Refers to:
meta.seeAlso = See also:
meta.availableTranslations = Translations&nbsp;:
meta.originalLanguageVersion = Original version
meta.rate = Rating:
meta.commented = Comment:
meta.reliability = Reliability:
meta.credibility = Credibility:
meta.toKeep = Protected:
meta.lat= Lat:
meta.lon= Lon:
meta.location = Document Location:
meta.label.location = Document Location
meta.speaker = Speakers:
meta.edit.rate = Rate
meta.edit.commented = Comment
meta.edit.reliability = Reliability
meta.edit.credibility = Credibility
meta.edit.subject = Subject
meta.edit.toKeep = ToKeep
meta.label.toKeep = To Keep
meta.edit.lat = lat
meta.edit.lon = long
meta.edit.error.credibreliable=This field cannot be empty.
meta.errorSave= An error occured, new metadatas will not be saved.
meta.addMetaButton=Add Metadata
meta.cancelButton=Cancel
meta.saveButton=Save
meta.editButton=Edit
portlet.meta.configuration = Displayed meta-data
meta.save_config = Save
portlet.no_meta = No meta-data to display
portlet.leave = You are going to leave the WebLab Platform, are you sure you want to access external networks ?
\ No newline at end of file
javax.portlet.title= Portlet visor de metadatos javax.portlet.title= Portlet visor de metadatos
portlet.title = Visor de metadatos portlet.title = Visor de metadatos
portlet.warning.session_expired = Sesin caducada portlet.warning.session_expired = Sesin caducada
meta.useAsSource = Use como una nueva fuente meta.useAsSource = Use como una nueva fuente
meta.defaultTitle = Ttulo no disponible meta.defaultTitle = Ttulo no disponible
meta.metadata = meta-datos&nbsp;: meta.metadata = meta-datos&nbsp;:
meta.hasNativeContent = Contenido Nativo&nbsp;: meta.hasNativeContent = Contenido Nativo&nbsp;:
meta.hasNormalisedContent = Contenido Normalizado&nbsp;: meta.hasNormalisedContent = Contenido Normalizado&nbsp;:
meta.isGeneratedFrom = Generado a partir de&nbsp;: meta.isGeneratedFrom = Generado a partir de&nbsp;:
meta.isProducedFrom = Producido a partir de&nbsp;: meta.isProducedFrom = Producido a partir de&nbsp;:
meta.isResultOf = Resultado de&nbsp;: meta.isResultOf = Resultado de&nbsp;:
meta.hasNumberOfResults = Nmero de resultados&nbsp;: meta.hasNumberOfResults = Nmero de resultados&nbsp;:
meta.isExposedAs = Expuesto como&nbsp;: meta.isExposedAs = Expuesto como&nbsp;:
meta.title = Ttulo&nbsp;: meta.title = Ttulo&nbsp;:
meta.creator = Creador&nbsp;: meta.creator = Creador&nbsp;:
meta.abstract = Resumen&nbsp;: meta.abstract = Resumen&nbsp;:
meta.catego = Categora&nbsp;: meta.catego = Categora&nbsp;:
meta.subject = Tema&nbsp;: meta.subject = Tema&nbsp;:
meta.description = Descripcin&nbsp;: meta.description = Descripcin&nbsp;:
meta.publisher = Editor&nbsp;: meta.publisher = Editor&nbsp;:
meta.contributor = Colaborador&nbsp;: meta.contributor = Colaborador&nbsp;:
meta.date = Fecha&nbsp;: