Commit 39f8427f authored by Leila Khelif's avatar Leila Khelif

First commit

git-svn-id: svn://svn.forge.objectweb.org/svnroot/weblab/trunk/WebLabServices/Portlets/metadata-portlet@1667 a803c184-d8de-4a0e-a52b-d3eef88212b6
parent 3ddc28ad
This diff is collapsed.
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<properties>
<service.name>weblab-metaview</service.name>
<eclipse.useProjectReferences>false</eclipse.useProjectReferences>
</properties>
<parent>
<groupId>org.ow2.weblab.portlets</groupId>
<artifactId>parent</artifactId>
<version>1.2.1</version>
</parent>
<groupId>org.ow2.weblab.portlets</groupId>
<artifactId>${service.name}</artifactId>
<packaging>war</packaging>
<version>2.0-SNAPSHOT</version>
<name>${service.name}</name>
<dependencies>
<!-- HERISSON -->
<!--<dependency>
<groupId>org.weblab-project.portlets</groupId>
<artifactId>weblab-portlet</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.1.7</version>
</dependency>-->
<!-- HERISSON fin -->
<dependency>
<groupId>org.ow2.weblab.core.helpers</groupId>
<artifactId>rdf-helper-jena</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.ow2.weblab.core.helpers</groupId>
<artifactId>rdf-helper-jena-selection</artifactId>
<version>1.5.1</version>
</dependency>
<dependency>
<!-- needed because rdf-helper-jena use xerces... so xalan lib -->
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.1</version>
<!-- <scope>runtime</scope>-->
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.4</version>
<!-- Any implementation should be added (scope provided or test)-->
</dependency>
<dependency>
<groupId>org.ow2.weblab.core.helpers</groupId>
<artifactId>bean-helper-spring</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<configuration>
<sourceDestDir>src/main/java</sourceDestDir>
<verbose>true</verbose>
<wsdlDirectory>src/main/resources/services</wsdlDirectory>
</configuration>
</plugin>
</plugins>
<finalName>weblab-metaview</finalName>
</build>
</project>
This diff is collapsed.
package org.ow2.weblab.portlet.bean;
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2009 EADS DEFENCE AND SECURITY SYSTEMS
*
* 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 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;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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
* library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
/**
* Bean representing the configuration of the annotation filter service.
*
* @author emilien
*
*/
public class AnnotationServiceConfigBean {
private String serviceURL;
public AnnotationServiceConfigBean() {
}
public String getServiceURL() {
return this.serviceURL;
}
public void setServiceURL(String serviceURL) {
this.serviceURL = serviceURL;
}
}
package org.ow2.weblab.portlet.bean;
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2009 EADS DEFENCE AND SECURITY SYSTEMS
*
* 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 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;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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
* library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
import java.util.Map;
/**
* Bean to store annotations description and it value.
* @author emilien
*
*/
public class AnnotationsDescBean {
/*
* attributes
*/
private Map<String, String> properties;
/**
* @return the properties
*/
public Map<String, String> getProperties() {
return properties;
}
/**
* @param properties the properties to set
*/
public void setProperties(Map<String, String> properties) {
this.properties = properties;
}
/*
* getters and setter
*/
public String[] getDisctinctAnnotationsNS() {
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
* @return value for this annotation
*/
public String getAnnotationValue(String namespace) {
return this.properties.get(namespace).toString();
}
}
package org.ow2.weblab.portlet.bean;
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2009 EADS DEFENCE AND SECURITY SYSTEMS
*
* 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 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;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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
* library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
import java.util.Map;
import java.util.TreeMap;
/**
* Class representing a result configuration for result portlet.
*
* @author emilien
*
*/
public class MetaConfBean {
private Map<String, Boolean> properties;
public MetaConfBean() {
properties = new TreeMap<String, Boolean>();
}
public Map<String, Boolean> getProperties() {
return properties;
}
public void setProperties(Map<String, Boolean> properties) {
this.properties = properties;
}
}
package org.ow2.weblab.portlet.bean;
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2009 EADS DEFENCE AND SECURITY SYSTEMS
*
* 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 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;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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
* library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
/**
* Bean representing the configuration of the search service.
*
* @author emilien
*
*/
public class RepoServiceConfigBean {
private String serviceURL;
public RepoServiceConfigBean() {
}
public String getServiceURL() {
return this.serviceURL;
}
public void setServiceURL(String serviceURL) {
this.serviceURL = serviceURL;
}
}
/**
* WEBLAB: Service oriented integration platform for media mining and intelligence applications
*
* Copyright (C) 2004 - 2009 EADS DEFENCE AND SECURITY SYSTEMS
*
* 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 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;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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
* library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
package org.ow2.weblab.portlet.tool;
import java.net.URL;
import javax.xml.namespace.QName;
import org.apache.commons.logging.LogFactory;
import org.ow2.weblab.core.extended.util.ServiceUtil;
import org.ow2.weblab.core.services.ResourceContainer;
import org.ow2.weblab.core.services.ResourceContainer_Service;
public class ResourceContainerUtil {
/**
* Build a Searcher service from WSDL and web Service URL.
* @param WSDLLocation
* @param searcher_url
* @return Searcher web service corresponding urls.
*/
public static ResourceContainer getResourceContainerService(URL WSDLLocation, URL resource_container_url) {
ResourceContainer container;
LogFactory.getLog(ResourceContainerUtil.class).info("Resource Container URL : " + WSDLLocation);
ResourceContainer_Service container_service = new ResourceContainer_Service(
WSDLLocation,
new QName(
"http://weblab.ow2.org/core/1.2/services",
"ResourceContainer"));
container = container_service.getResourceContainerPort();
ServiceUtil.setEndpointAddress(container, resource_container_url.toString(),"getResource");
return container;
}
}
\ 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
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="metaConf" class="org.ow2.weblab.portlet.bean.AnnotationsDescBean">
<property name="properties">
<map>
<!-- Documents properties -->
<entry key="hasNativeContent" value="http://weblab.ow2.org/core/1.2/ontology/processing#hasNativeContent" />
<entry key="hasNormalisedContent" value="http://weblab.ow2.org/core/1.2/ontology/processing#hasNormalisedContent" />
<entry key="isGeneratedFrom" value="http://weblab.ow2.org/core/1.2/ontology/processing#isGeneratedFrom" />
<entry key="isProducedFrom" value="http://weblab.ow2.org/core/1.2/ontology/processing#isProducedFrom" />
<entry key="isExposedAs" value="http://weblab.ow2.org/core/1.2/ontology/processing#isExposedAs" />
<entry key="gatheringDate" value="http://weblab.ow2.org/core/1.2/ontology/processing#hasGatheringDate" />
<entry key="projectName" value="http://weblab-project.org/core/model/property/crawler/projectName" />
<entry key="hasOriginalFileSize" value="http://weblab.ow2.org/core/1.2/ontology/processing#hasOriginalFileSize" />
<entry key="hasOriginalFileName" value="http://weblab.ow2.org/core/1.2/ontology/processing#hasOriginalFileName" />
<entry key="refersTo" value="http://weblab.ow2.org/core/1.2/ontology/processing#refersTo" />
<!-- DublinCore properties-->
<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="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" />
<entry key="publisher" value="http://purl.org/dc/elements/1.1/publisher" />
<entry key="contibutor" value="http://purl.org/dc/elements/1.1/contibutor" />
<entry key="date" value="http://purl.org/dc/elements/1.1/date" />
<entry key="type" value="http://purl.org/dc/elements/1.1/type" />
<entry key="format" value="http://purl.org/dc/elements/1.1/format" />
<entry key="identifier" value="http://purl.org/dc/elements/1.1/identifier" />
<entry key="source" value="http://purl.org/dc/elements/1.1/source" />
<entry key="language" value="http://purl.org/dc/elements/1.1/language" />
<entry key="relation" value="http://purl.org/dc/elements/1.1/relation" />
<entry key="coverage" value="http://purl.org/dc/elements/1.1/coverage" />
<entry key="right" value="http://purl.org/dc/elements/1.1/right" />
<entry key="modified" value="http://purl.org/dc/terms/modified" />
<entry key="created" value="http://purl.org/dc/terms/created" />
<entry key="extent" value="http://purl.org/dc/terms/extent" />
<!-- FOAF properties -->
<entry key="thumbnail" value="http://xmlns.com/foaf/0.1/thumbnail"></entry>
<entry key="firstName" value="http://xmlns.com/foaf/0.1/firstName"></entry>
<entry key="lastName" value="http://xmlns.com/foaf/0.1/lastName"></entry>
<!-- RDF properties -->
<entry key="seeAlso" value="http://www.w3.org/2000/01/rdf-schema#seeAlso" />
<!-- Search properties -->
<entry key="hasRank" value="http://weblab.ow2.org/core/1.2/ontology/retrieval#hasRank" />
<entry key="hasDescription" value="http://weblab.ow2.org/core/1.2/ontology/retrieval#hasDescription" />
<entry key="hasScore" value="http://weblab.ow2.org/core/1.2/ontology/retrieval#hasScore" />
<entry key="isLinkedTo" value="http://weblab.ow2.org/core/1.2/ontology/retrieval#isLinkedTo" />
<entry key="inResultSet" value="http://weblab.ow2.org/core/1.2/ontology/retrieval#inResultSet" />
</map>
</property>
</bean>
<bean id="meta_conf_bean" class="org.ow2.weblab.portlet.bean.MetaConfBean">
<property name="properties">
<map>
<!-- Documents properties -->
<entry key="hasNativeContent" value="false" />
<entry key="hasNormalisedContent" value="false" />
<entry key="isGeneratedFrom" value="false" />
<entry key="isProducedFrom" value="true" />
<entry key="isExposedAs" value="true" />
<entry key="gatheringDate" value="false" />
<entry key="projectName" value="false" />
<entry key="hasOriginalFileSize" value="false" />
<entry key="hasOriginalFileName" value="false" />
<entry key="refersTo" value="false" />
<!-- DublinCore properties-->
<entry key="title" value="true" />
<entry key="abstract" value="true" />
<entry key="creator" value="false" />
<entry key="subject" value="true" />
<entry key="catego" value="true" />
<entry key="description" value="false" />
<entry key="publisher" value="false" />
<entry key="contibutor" value="false" />
<entry key="date" value="false" />
<entry key="type" value="true" />
<entry key="format" value="true" />
<entry key="identifier" value="false" />
<entry key="source" value="true" />
<entry key="language" value="true" />
<entry key="relation" value="false" />
<entry key="coverage" value="false" />
<entry key="right" value="false" />
<entry key="modified" value="false" />
<entry key="created" value="false" />
<entry key="extent" value="false" />
<!-- FOAF properties -->
<entry key="thumbnail" value="false"></entry>
<entry key="name" value="false"></entry>
<!-- RDF properties -->
<entry key="seeAlso" value="false" />
<!-- Search properties -->
<entry key="hasRank" value="false" />
<entry key="hasDescription" value="false" />
<entry key="hasScore" value="false" />
</map>
</property>
</bean>
</beans>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
WEBLAB: Service oriented integration platform for media mining and intelligence applications
Copyright (C) 2004 - 2010 CASSIDIAN
-->
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://weblab.ow2.org/core/1.2/services/analyser"
xmlns:types="http://weblab.ow2.org/core/1.2/services/analyser" xmlns:ex="http://weblab.ow2.org/core/1.2/services/exception"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:services="http://weblab.ow2.org/core/1.2/services/" targetNamespace="http://weblab.ow2.org/core/1.2/services/analyser" name="Analyser">
<documentation>
WEBLAB: Service oriented integration platform for media mining and intelligence applications
Copyright (C) 2004 - 2010 CASSIDIAN
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 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; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 library; if not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
</documentation>
<types>
<xsd:schema>
<xsd:import namespace="http://weblab.ow2.org/core/1.2/services/analyser" schemaLocation="AnalyserTypes.xsd" />
<xsd:import namespace="http://weblab.ow2.org/core/1.2/services/exception" schemaLocation="exception.xsd" />
</xsd:schema>
</types>
<import namespace="http://weblab.ow2.org/core/1.2/services/" location="ExceptionMessages.wsdl" />
<!-- Process method messages -->
<message name="processRequest">
<part name="args" element="types:processArgs" />
</message>
<message name="processResponse">
<part name="return" element="types:processReturn" />
</message>
<portType name="Analyser">
<documentation>Interface of a analyser. It only contains a method to enable business analyser to process resources, given a usage context. Most of the time this analysis turn out to be the addition
of annotations to the Resource.</documentation>
<operation name="process">
<documentation>Ask to the service to process with its business method.</documentation>
<input name="processInput" message="tns:processRequest" />
<output name="processOutput" message="tns:processResponse" />
<fault name="invalidParameterException" message="services:invalidParameterException">
<documentation>To be thrown when the parameter are not valid.</documentation>
</fault>
<fault name="insufficientResourcesException" message="services:insufficientResourcesException">
<documentation>To be thrown when an error occurs due to the lack of resources.</documentation>
</fault>
<fault name="contentNotAvailableException" message="services:contentNotAvailableException">
<documentation>To be thrown when the content of a resource is needed and not available.</documentation>
</fault>
<fault name="accessDeniedException" message="services:accessDeniedException">
<documentation>To be thrown when an error due to some security restriction.</documentation>
</fault>
<fault name="unsupportedRequestException" message="services:unsupportedRequestException">
<documentation>To be thrown when the parameter are good but some specific process are not supported (for instance, due to a language not handled or a given video format...).</documentation>
</fault>
<fault name="serviceNotConfiguredException" message="services:serviceNotConfiguredException">
<documentation>To be thrown when the service needs to be configured and either your usageContext is null or has not been configured.</documentation>
</fault>
<fault name="unexpectedException" message="services:unexpectedException">
<documentation>To be thrown when an error occurs in the method.</documentation>
</fault>
</operation>
</portType>
<binding name="AnalyserSOAPBinding" type="tns:Analyser">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="process">
<soap:operation soapAction="process" />
<input name="processInput">
<soap:body use="literal" />
</input>
<output name="processOutput">
<soap:body use="literal" />
</output>
<fault name="invalidParameterException">
<soap:fault name="invalidParameterException" use="literal" />
</fault>
<fault name="insufficientResourcesException">
<soap:fault name="insufficientResourcesException" use="literal" />
</fault>
<fault name="contentNotAvailableException">
<soap:fault name="contentNotAvailableException" use="literal" />
</fault>
<fault name="accessDeniedException">
<soap:fault name="accessDeniedException" use="literal" />
</fault>
<fault name="unsupportedRequestException">
<soap:fault name="unsupportedRequestException" use="literal" />
</fault>
<fault name="serviceNotConfiguredException">
<soap:fault name="serviceNotConfiguredException" use="literal" />
</fault>
<fault name="unexpectedException">
<soap:fault name="unexpectedException" use="literal" />
</fault>
</operation>
</binding>
</definitions>
<?xml version="1.0" encoding="UTF-8"?>
<!--
WEBLAB: Service oriented integration platform for media mining and intelligence applications
Copyright (C) 2004 - 2010 CASSIDIAN
-->
<xs:schema xmlns:tns="http://weblab.ow2.org/core/1.2/services/analyser" xmlns:model="http://weblab.ow2.org/core/1.2/model#"
xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://weblab.ow2.org/core/1.2/services/analyser"
attributeFormDefault="unqualified" elementFormDefault="qualified">
<xs:import namespace="http://weblab.ow2.org/core/1.2/model#" schemaLocation="../model/model.xsd" />
<xs:annotation>
<xs:documentation>
WEBLAB: Service oriented integration platform for media mining and intelligence applications Copyright (C) 2004 - 2010 CASSIDIAN
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
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; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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 library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
</xs:documentation>
<xs:documentation>Data Exchange Model for WebLab platform provided by CASSIDIAN Version 1.2 - 2010/08</xs:documentation>
</xs:annotation>
<xs:element name="processArgs" type="tns:processArgs" />
<xs:element name="processReturn" type="tns:processReturn" />
<xs:complexType name="processArgs">
<xs:annotation>
<xs:documentation>Wrapper containing the resource to process and the usage context to be used.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="usageContext" type="xs:string" minOccurs="0" maxOccurs="1" />
<xs:element name="resource" type="model:Resource" minOccurs="1" maxOccurs="1" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="processReturn">
<xs:annotation>
<xs:documentation>Wrapper containing the processed resource</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="resource" type="model:Resource" minOccurs="1" maxOccurs="1" />
</xs:sequence>
</xs:complexType>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<!--
WEBLAB: Service oriented integration platform for media mining and intelligence applications
Copyright (C) 2004 - 2010 CASSIDIAN
-->
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://weblab.ow2.org/core/1.2/services/configurable" xmlns:types="http://weblab.ow2.org/core/1.2/services/configurable"
xmlns:ex="http://weblab.ow2.org/core/1.2/services/exception" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://weblab.ow2.org/core/1.2/services/configurable" xmlns:services="http://weblab.ow2.org/core/1