Lucio Lelii 7 years ago
commit f1edca1e19

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>worms-plugin</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

@ -0,0 +1,7 @@
#Wed Mar 07 12:54:27 CET 2012
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8

@ -0,0 +1,5 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7

@ -0,0 +1,5 @@
#Wed Mar 07 12:49:34 CET 2012
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

@ -0,0 +1 @@
Used as a Plugin in the gCube Framework

@ -0,0 +1,6 @@
gCube System - License
------------------------------------------------------------
The gCube/gCore software is licensed as Free Open Source software conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
The software and documentation is provided by its authors/distributors "as is" and no expressed or
implied warranty is given for its use, quality or fitness for a particular case.

@ -0,0 +1,2 @@
* Valentina Marioli (valentina.marioli@isti.cnr.it), CNR Pisa,
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo".

@ -0,0 +1,62 @@
The gCube System - ${name}
--------------------------------------------------
${description}
${gcube.description}
${gcube.funding}
Version
--------------------------------------------------
${version} (${buildDate})
Please see the file named "changelog.xml" in this directory for the release notes.
Authors
--------------------------------------------------
* Valentina Marioli (valentina.marioli@isti.cnr.it), Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" - CNR, Pisa (Italy).
Maintainers
-----------
* Valentina Marioli (valentina.marioli@isti.cnr.it), Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" - CNR, Pisa (Italy).
Download information
--------------------------------------------------
Source code is available from SVN:
${scm.url}
Binaries can be downloaded from the gCube website:
${gcube.website}
Installation
--------------------------------------------------
Installation documentation is available on-line in the gCube Wiki:
${gcube.wikiRoot}/Biodiversity_Access
Documentation
--------------------------------------------------
Documentation is available on-line in the gCube Wiki:
${gcube.wikiRoot}/Biodiversity_Access
Support
--------------------------------------------------
Bugs and support requests can be reported in the gCube issue tracking tool:
${gcube.issueTracking}
Licensing
--------------------------------------------------
This software is licensed under the terms you may find in the file named "LICENSE" in this directory.

@ -0,0 +1,42 @@
<ReleaseNotes>
<Changeset component="org.gcube.data-access.worms-spd-plugin.1-0-0"
date="2012-05-04">
<Change>worms plugin for species product discovery release</Change>
</Changeset>
<Changeset component="org.gcube.data-access.worms-spd-plugin.1-1-0"
date="2012-09-14">
<Change>bugs fixed</Change>
</Changeset>
<Changeset component="org.gcube.data-access.worms-spd-plugin.1-2-0"
date="2012-10-18">
<Change>Added plugin info</Change>
</Changeset>
<Changeset component="org.gcube.data-access.worms-spd-plugin.1-3-0"
date="2012-11-30">
<Change>Added unacceptreason to the AphiaRecord object</Change>
</Changeset>
<Changeset component="org.gcube.data-access.worms-spd-plugin.1-4-0"
date="2013-01-17">
<Change>updated to spd-plugin-framework 2.0</Change>
</Changeset>
<Changeset component="org.gcube.data-access.worms-spd-plugin.1-5-0"
date="2013-04-30">
<Change>updated to spd service</Change>
</Changeset>
<Changeset component="org.gcube.data-access.worms-spd-plugin.1-6-0"
date="2013-07-19">
<Change>
The Worms/Wordss webservice has been changed extending the AphiaRecord
object with properties: isMarine, isFreshwater, isBrackish,
isTerrestrial, isExtinct, match_type, modified.
</Change>
</Changeset>
<Changeset component="org.gcube.data-access.worms-spd-plugin.1-7-0"
date="2014-04-28">
<Change>Added citation</Change>
</Changeset>
<Changeset component="org.gcube.data-access.worms-spd-plugin.1-8-0"
date="2017-02-01">
<Change>bug fixing</Change>
</Changeset>
</ReleaseNotes>

@ -0,0 +1,42 @@
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>servicearchive</id>
<formats>
<format>tar.gz</format>
</formats>
<baseDirectory>/</baseDirectory>
<fileSets>
<fileSet>
<directory>${distroDirectory}</directory>
<outputDirectory>/</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
<includes>
<include>README</include>
<include>LICENSE</include>
<include>INSTALL</include>
<include>MAINTAINERS</include>
<include>changelog.xml</include>
</includes>
<fileMode>755</fileMode>
<filtered>true</filtered>
</fileSet>
</fileSets>
<files>
<file>
<source>${distroDirectory}/profile.xml</source>
<outputDirectory>/</outputDirectory>
<filtered>true</filtered>
</file>
<file>
<source>target/${build.finalName}.jar</source>
<outputDirectory>/${artifactId}</outputDirectory>
</file>
<file>
<source>${distroDirectory}/svnpath.txt</source>
<outputDirectory>/${artifactId}</outputDirectory>
<filtered>true</filtered>
</file>
</files>
</assembly>

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<Resource>
<ID></ID>
<Type>Service</Type>
<Profile>
<Description>${description}</Description>
<Class>DataAccess</Class>
<Name>${artifactId}</Name>
<Version>1.0.0</Version>
<Packages>
<Software>
<Description>${description}</Description>
<Name>${artifactId}</Name>
<Version>${version}</Version>
<MavenCoordinates>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
</MavenCoordinates>
<Type>library</Type>
<Files>
<File>${build.finalName}.jar</File>
</Files>
</Software>
</Packages>
</Profile>
</Resource>

@ -0,0 +1 @@
http://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/worms-spd-plugin

@ -0,0 +1,143 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>maven-parent</artifactId>
<groupId>org.gcube.tools</groupId>
<version>1.0.0</version>
<relativePath />
</parent>
<groupId>org.gcube.data.spd</groupId>
<artifactId>worms-spd-plugin</artifactId>
<version>1.7.1-SNAPSHOT</version>
<name>worms-plugin</name>
<description>worms plugin for species manager service</description>
<properties>
<distroDirectory>${project.basedir}/distro</distroDirectory>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>gcube-bom</artifactId>
<version>LATEST</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.gcube.resources</groupId>
<artifactId>common-gcore-resources</artifactId>
</dependency>
<dependency>
<groupId>org.gcube.resources.discovery</groupId>
<artifactId>ic-client</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.axis/axis -->
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.xml/jaxrpc-api -->
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxrpc-api</artifactId>
<version>1.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-discovery/commons-discovery -->
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/wsdl4j/wsdl4j -->
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.gcube.data.spd</groupId>
<artifactId>spd-model</artifactId>
<version>[3.0.0-SNAPSHOT, 4.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.data.spd</groupId>
<artifactId>spd-plugin-framework</artifactId>
<version>[3.0.0-SNAPSHOT, 4.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>copy-profile</id>
<phase>install</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>target</outputDirectory>
<resources>
<resource>
<directory>${distroDirectory}</directory>
<filtering>true</filtering>
<includes>
<include>profile.xml</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2</version>
<configuration>
<descriptors>
<descriptor>${distroDirectory}/descriptor.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>servicearchive</id>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

@ -0,0 +1,16 @@
/**
* AphiaNameService.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
*/
package aphia.v1_0.worms;
public interface AphiaNameService extends javax.xml.rpc.Service {
public java.lang.String getAphiaNameServicePortAddress();
public aphia.v1_0.worms.AphiaNameServicePortType getAphiaNameServicePort() throws javax.xml.rpc.ServiceException;
public aphia.v1_0.worms.AphiaNameServicePortType getAphiaNameServicePort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;
}

@ -0,0 +1,647 @@
/**
* AphiaNameServiceBindingStub.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
*/
package aphia.v1_0.worms;
public class AphiaNameServiceBindingStub extends org.apache.axis.client.Stub implements aphia.v1_0.worms.AphiaNameServicePortType {
private java.util.Vector cachedSerClasses = new java.util.Vector();
private java.util.Vector cachedSerQNames = new java.util.Vector();
private java.util.Vector cachedSerFactories = new java.util.Vector();
private java.util.Vector cachedDeserFactories = new java.util.Vector();
static org.apache.axis.description.OperationDesc [] _operations;
static {
_operations = new org.apache.axis.description.OperationDesc[12];
_initOperationDesc1();
_initOperationDesc2();
}
private static void _initOperationDesc1(){
org.apache.axis.description.OperationDesc oper;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("getAphiaID");
oper.addParameter(new javax.xml.namespace.QName("", "scientificname"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.addParameter(new javax.xml.namespace.QName("", "marine_only"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"), boolean.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
oper.setReturnClass(int.class);
oper.setReturnQName(new javax.xml.namespace.QName("", "return"));
oper.setStyle(org.apache.axis.constants.Style.RPC);
oper.setUse(org.apache.axis.constants.Use.ENCODED);
_operations[0] = oper;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("getAphiaRecords");
oper.addParameter(new javax.xml.namespace.QName("", "scientificname"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.addParameter(new javax.xml.namespace.QName("", "like"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"), boolean.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.addParameter(new javax.xml.namespace.QName("", "fuzzy"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"), boolean.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.addParameter(new javax.xml.namespace.QName("", "marine_only"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"), boolean.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.addParameter(new javax.xml.namespace.QName("", "offset"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.setReturnType(new javax.xml.namespace.QName("http://aphia/v1.0", "AphiaRecords"));
oper.setReturnClass(aphia.v1_0.worms.AphiaRecord[].class);
oper.setReturnQName(new javax.xml.namespace.QName("", "return"));
oper.setStyle(org.apache.axis.constants.Style.RPC);
oper.setUse(org.apache.axis.constants.Use.ENCODED);
_operations[1] = oper;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("getAphiaNameByID");
oper.addParameter(new javax.xml.namespace.QName("", "AphiaID"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
oper.setReturnClass(java.lang.String.class);
oper.setReturnQName(new javax.xml.namespace.QName("", "return"));
oper.setStyle(org.apache.axis.constants.Style.RPC);
oper.setUse(org.apache.axis.constants.Use.ENCODED);
_operations[2] = oper;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("getAphiaRecordByID");
oper.addParameter(new javax.xml.namespace.QName("", "AphiaID"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.setReturnType(new javax.xml.namespace.QName("http://aphia/v1.0", "AphiaRecord"));
oper.setReturnClass(aphia.v1_0.worms.AphiaRecord.class);
oper.setReturnQName(new javax.xml.namespace.QName("", "return"));
oper.setStyle(org.apache.axis.constants.Style.RPC);
oper.setUse(org.apache.axis.constants.Use.ENCODED);
_operations[3] = oper;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("getAphiaRecordByTSN");
oper.addParameter(new javax.xml.namespace.QName("", "TSN"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.setReturnType(new javax.xml.namespace.QName("http://aphia/v1.0", "AphiaRecord"));
oper.setReturnClass(aphia.v1_0.worms.AphiaRecord.class);
oper.setReturnQName(new javax.xml.namespace.QName("", "return"));
oper.setStyle(org.apache.axis.constants.Style.RPC);
oper.setUse(org.apache.axis.constants.Use.ENCODED);
_operations[4] = oper;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("getAphiaRecordsByNames");
oper.addParameter(new javax.xml.namespace.QName("", "scientificnames"), new javax.xml.namespace.QName("http://aphia/v1.0", "scientificnames"), java.lang.String[].class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.addParameter(new javax.xml.namespace.QName("", "like"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"), boolean.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.addParameter(new javax.xml.namespace.QName("", "fuzzy"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"), boolean.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.addParameter(new javax.xml.namespace.QName("", "marine_only"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"), boolean.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.setReturnType(new javax.xml.namespace.QName("http://aphia/v1.0", "AphiaMatches"));
oper.setReturnClass(aphia.v1_0.worms.AphiaRecord[][].class);
oper.setReturnQName(new javax.xml.namespace.QName("", "return"));
oper.setStyle(org.apache.axis.constants.Style.RPC);
oper.setUse(org.apache.axis.constants.Use.ENCODED);
_operations[5] = oper;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("getAphiaRecordsByVernacular");
oper.addParameter(new javax.xml.namespace.QName("", "vernacular"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.addParameter(new javax.xml.namespace.QName("", "like"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"), boolean.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.addParameter(new javax.xml.namespace.QName("", "offset"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.setReturnType(new javax.xml.namespace.QName("http://aphia/v1.0", "AphiaRecords"));
oper.setReturnClass(aphia.v1_0.worms.AphiaRecord[].class);
oper.setReturnQName(new javax.xml.namespace.QName("", "return"));
oper.setStyle(org.apache.axis.constants.Style.RPC);
oper.setUse(org.apache.axis.constants.Use.ENCODED);
_operations[6] = oper;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("getAphiaClassificationByID");
oper.addParameter(new javax.xml.namespace.QName("", "AphiaID"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.setReturnType(new javax.xml.namespace.QName("http://aphia/v1.0", "Classification"));
oper.setReturnClass(aphia.v1_0.worms.Classification.class);
oper.setReturnQName(new javax.xml.namespace.QName("", "return"));
oper.setStyle(org.apache.axis.constants.Style.RPC);
oper.setUse(org.apache.axis.constants.Use.ENCODED);
_operations[7] = oper;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("getSourcesByAphiaID");
oper.addParameter(new javax.xml.namespace.QName("", "AphiaID"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.setReturnType(new javax.xml.namespace.QName("http://aphia/v1.0", "Sources"));
oper.setReturnClass(aphia.v1_0.worms.Source[].class);
oper.setReturnQName(new javax.xml.namespace.QName("", "return"));
oper.setStyle(org.apache.axis.constants.Style.RPC);
oper.setUse(org.apache.axis.constants.Use.ENCODED);
_operations[8] = oper;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("getAphiaSynonymsByID");
oper.addParameter(new javax.xml.namespace.QName("", "AphiaID"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.setReturnType(new javax.xml.namespace.QName("http://aphia/v1.0", "AphiaRecords"));
oper.setReturnClass(aphia.v1_0.worms.AphiaRecord[].class);
oper.setReturnQName(new javax.xml.namespace.QName("", "return"));
oper.setStyle(org.apache.axis.constants.Style.RPC);
oper.setUse(org.apache.axis.constants.Use.ENCODED);
_operations[9] = oper;
}
private static void _initOperationDesc2(){
org.apache.axis.description.OperationDesc oper;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("getAphiaVernacularsByID");
oper.addParameter(new javax.xml.namespace.QName("", "AphiaID"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.setReturnType(new javax.xml.namespace.QName("http://aphia/v1.0", "Vernaculars"));
oper.setReturnClass(aphia.v1_0.worms.Vernacular[].class);
oper.setReturnQName(new javax.xml.namespace.QName("", "return"));
oper.setStyle(org.apache.axis.constants.Style.RPC);
oper.setUse(org.apache.axis.constants.Use.ENCODED);
_operations[10] = oper;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("getAphiaChildrenByID");
oper.addParameter(new javax.xml.namespace.QName("", "AphiaID"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.addParameter(new javax.xml.namespace.QName("", "offset"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, org.apache.axis.description.ParameterDesc.IN, false, false);
oper.setReturnType(new javax.xml.namespace.QName("http://aphia/v1.0", "AphiaRecords"));
oper.setReturnClass(aphia.v1_0.worms.AphiaRecord[].class);
oper.setReturnQName(new javax.xml.namespace.QName("", "return"));
oper.setStyle(org.apache.axis.constants.Style.RPC);
oper.setUse(org.apache.axis.constants.Use.ENCODED);
_operations[11] = oper;
}
public AphiaNameServiceBindingStub() throws org.apache.axis.AxisFault {
this(null);
}
public AphiaNameServiceBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
this(service);
super.cachedEndpoint = endpointURL;
}
public AphiaNameServiceBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
if (service == null) {
super.service = new org.apache.axis.client.Service();
} else {
super.service = service;
}
java.lang.Class cls;
javax.xml.namespace.QName qName;
java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
qName = new javax.xml.namespace.QName("http://aphia/v1.0", "Sources");
cachedSerQNames.add(qName);
cls = aphia.v1_0.worms.Source[].class;
cachedSerClasses.add(cls);
cachedSerFactories.add(arraysf);
cachedDeserFactories.add(arraydf);
qName = new javax.xml.namespace.QName("http://aphia/v1.0", "AphiaRecords");
cachedSerQNames.add(qName);
cls = aphia.v1_0.worms.AphiaRecord[].class;
cachedSerClasses.add(cls);
cachedSerFactories.add(arraysf);
cachedDeserFactories.add(arraydf);
qName = new javax.xml.namespace.QName("http://aphia/v1.0", "Source");
cachedSerQNames.add(qName);
cls = aphia.v1_0.worms.Source.class;
cachedSerClasses.add(cls);
cachedSerFactories.add(beansf);
cachedDeserFactories.add(beandf);
qName = new javax.xml.namespace.QName("http://aphia/v1.0", "Vernacular");
cachedSerQNames.add(qName);
cls = aphia.v1_0.worms.Vernacular.class;
cachedSerClasses.add(cls);
cachedSerFactories.add(beansf);
cachedDeserFactories.add(beandf);
qName = new javax.xml.namespace.QName("http://aphia/v1.0", "Vernaculars");
cachedSerQNames.add(qName);
cls = aphia.v1_0.worms.Vernacular[].class;
cachedSerClasses.add(cls);
cachedSerFactories.add(arraysf);
cachedDeserFactories.add(arraydf);
qName = new javax.xml.namespace.QName("http://aphia/v1.0", "AphiaRecord");
cachedSerQNames.add(qName);
cls = aphia.v1_0.worms.AphiaRecord.class;
cachedSerClasses.add(cls);
cachedSerFactories.add(beansf);
cachedDeserFactories.add(beandf);
qName = new javax.xml.namespace.QName("http://aphia/v1.0", "Classification");
cachedSerQNames.add(qName);
cls = aphia.v1_0.worms.Classification.class;
cachedSerClasses.add(cls);
cachedSerFactories.add(beansf);
cachedDeserFactories.add(beandf);
qName = new javax.xml.namespace.QName("http://aphia/v1.0", "scientificnames");
cachedSerQNames.add(qName);
cls = java.lang.String[].class;
cachedSerClasses.add(cls);
cachedSerFactories.add(arraysf);
cachedDeserFactories.add(arraydf);
qName = new javax.xml.namespace.QName("http://aphia/v1.0", "AphiaMatches");
cachedSerQNames.add(qName);
cls = aphia.v1_0.worms.AphiaRecord[][].class;
cachedSerClasses.add(cls);
cachedSerFactories.add(arraysf);
cachedDeserFactories.add(arraydf);
}
protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
try {
org.apache.axis.client.Call _call =
(org.apache.axis.client.Call) super.service.createCall();
if (super.maintainSessionSet) {
_call.setMaintainSession(super.maintainSession);
}
if (super.cachedUsername != null) {
_call.setUsername(super.cachedUsername);
}
if (super.cachedPassword != null) {
_call.setPassword(super.cachedPassword);
}
if (super.cachedEndpoint != null) {
_call.setTargetEndpointAddress(super.cachedEndpoint);
}
if (super.cachedTimeout != null) {
_call.setTimeout(super.cachedTimeout);
}
if (super.cachedPortName != null) {
_call.setPortName(super.cachedPortName);
}
java.util.Enumeration keys = super.cachedProperties.keys();
while (keys.hasMoreElements()) {
java.lang.String key = (java.lang.String) keys.nextElement();
_call.setProperty(key, super.cachedProperties.get(key));
}
// All the type mapping information is registered
// when the first call is made.
// The type mapping information is actually registered in
// the TypeMappingRegistry of the service, which
// is the reason why registration is only needed for the first call.
synchronized (this) {
if (firstCall()) {
// must set encoding style before registering serializers
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
for (int i = 0; i < cachedSerFactories.size(); ++i) {
java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
javax.xml.namespace.QName qName =
(javax.xml.namespace.QName) cachedSerQNames.get(i);
java.lang.Class sf = (java.lang.Class)
cachedSerFactories.get(i);
java.lang.Class df = (java.lang.Class)
cachedDeserFactories.get(i);
_call.registerTypeMapping(cls, qName, sf, df, false);
}
}
}
return _call;
}
catch (java.lang.Throwable _t) {
throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t);
}
}
public int getAphiaID(java.lang.String scientificname, boolean marine_only) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[0]);
_call.setUseSOAPAction(true);
//_call.setSOAPActionURI("getAphiaID");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://aphia/v1.0/AphiaID", "getAphiaID"));
setRequestHeaders(_call);
setAttachments(_call);
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {scientificname, new java.lang.Boolean(marine_only)});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try {
return ((java.lang.Integer) _resp).intValue();
} catch (java.lang.Exception _exception) {
return ((java.lang.Integer) org.apache.axis.utils.JavaUtils.convert(_resp, int.class)).intValue();
}
}
}
public aphia.v1_0.worms.AphiaRecord[] getAphiaRecords(java.lang.String scientificname, boolean like, boolean fuzzy, boolean marine_only, int offset) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[1]);
_call.setUseSOAPAction(true);
//_call.setSOAPActionURI("getAphiaRecords");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://aphia/v1.0/AphiaRecords", "getAphiaRecords"));
setRequestHeaders(_call);
setAttachments(_call);
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {scientificname, new java.lang.Boolean(like), new java.lang.Boolean(fuzzy), new java.lang.Boolean(marine_only), new java.lang.Integer(offset)});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try {
return (aphia.v1_0.worms.AphiaRecord[]) _resp;
} catch (java.lang.Exception _exception) {
return (aphia.v1_0.worms.AphiaRecord[]) org.apache.axis.utils.JavaUtils.convert(_resp, aphia.v1_0.worms.AphiaRecord[].class);
}
}
}
public java.lang.String getAphiaNameByID(int aphiaID) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[2]);
_call.setUseSOAPAction(true);
//_call.setSOAPActionURI("getAphiaNameByID");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://aphia/v1.0/AphiaName", "getAphiaNameByID"));
setRequestHeaders(_call);
setAttachments(_call);
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Integer(aphiaID)});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try {
return (java.lang.String) _resp;
} catch (java.lang.Exception _exception) {
return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.String.class);
}
}
}
public aphia.v1_0.worms.AphiaRecord getAphiaRecordByID(int aphiaID) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[3]);
_call.setUseSOAPAction(true);
//_call.setSOAPActionURI("getAphiaRecordByID");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://aphia/v1.0/AphiaRecord", "getAphiaRecordByID"));
setRequestHeaders(_call);
setAttachments(_call);
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Integer(aphiaID)});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try {
return (aphia.v1_0.worms.AphiaRecord) _resp;
} catch (java.lang.Exception _exception) {
return (aphia.v1_0.worms.AphiaRecord) org.apache.axis.utils.JavaUtils.convert(_resp, aphia.v1_0.worms.AphiaRecord.class);
}
}
}
public aphia.v1_0.worms.AphiaRecord getAphiaRecordByTSN(int TSN) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[4]);
_call.setUseSOAPAction(true);
//_call.setSOAPActionURI("getAphiaRecordByTSN");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://aphia/v1.0/AphiaRecord", "getAphiaRecordByTSN"));
setRequestHeaders(_call);
setAttachments(_call);
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Integer(TSN)});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try {
return (aphia.v1_0.worms.AphiaRecord) _resp;
} catch (java.lang.Exception _exception) {
return (aphia.v1_0.worms.AphiaRecord) org.apache.axis.utils.JavaUtils.convert(_resp, aphia.v1_0.worms.AphiaRecord.class);
}
}
}
public aphia.v1_0.worms.AphiaRecord[][] getAphiaRecordsByNames(java.lang.String[] scientificnames, boolean like, boolean fuzzy, boolean marine_only) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[5]);
_call.setUseSOAPAction(true);
//_call.setSOAPActionURI("getAphiaRecordsByNames");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://aphia/v1.0/AphiaMatches", "getAphiaRecordsByNames"));
setRequestHeaders(_call);
setAttachments(_call);
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {scientificnames, new java.lang.Boolean(like), new java.lang.Boolean(fuzzy), new java.lang.Boolean(marine_only)});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try {
return (aphia.v1_0.worms.AphiaRecord[][]) _resp;
} catch (java.lang.Exception _exception) {
return (aphia.v1_0.worms.AphiaRecord[][]) org.apache.axis.utils.JavaUtils.convert(_resp, aphia.v1_0.worms.AphiaRecord[][].class);
}
}
}
public aphia.v1_0.worms.AphiaRecord[] getAphiaRecordsByVernacular(java.lang.String vernacular, boolean like, int offset) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[6]);
_call.setUseSOAPAction(true);
//_call.setSOAPActionURI("getAphiaRecordsByVernacular");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://aphia/v1.0/AphiaRecords", "getAphiaRecordsByVernacular"));
setRequestHeaders(_call);
setAttachments(_call);
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {vernacular, new java.lang.Boolean(like), new java.lang.Integer(offset)});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try {
return (aphia.v1_0.worms.AphiaRecord[]) _resp;
} catch (java.lang.Exception _exception) {
return (aphia.v1_0.worms.AphiaRecord[]) org.apache.axis.utils.JavaUtils.convert(_resp, aphia.v1_0.worms.AphiaRecord[].class);
}
}
}
public aphia.v1_0.worms.Classification getAphiaClassificationByID(int aphiaID) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[7]);
_call.setUseSOAPAction(true);
//_call.setSOAPActionURI("getAphiaClassificationByID");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://aphia/v1.0/Classification", "getAphiaClassificationByID"));
setRequestHeaders(_call);
setAttachments(_call);
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Integer(aphiaID)});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try {
return (aphia.v1_0.worms.Classification) _resp;
} catch (java.lang.Exception _exception) {
return (aphia.v1_0.worms.Classification) org.apache.axis.utils.JavaUtils.convert(_resp, aphia.v1_0.worms.Classification.class);
}
}
}
public aphia.v1_0.worms.Source[] getSourcesByAphiaID(int aphiaID) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[8]);
_call.setUseSOAPAction(true);
//_call.setSOAPActionURI("getSourcesByAphiaID");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://aphia/v1.0/Sources", "getSourcesByAphiaID"));
setRequestHeaders(_call);
setAttachments(_call);
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Integer(aphiaID)});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try {
return (aphia.v1_0.worms.Source[]) _resp;
} catch (java.lang.Exception _exception) {
return (aphia.v1_0.worms.Source[]) org.apache.axis.utils.JavaUtils.convert(_resp, aphia.v1_0.worms.Source[].class);
}
}
}
public aphia.v1_0.worms.AphiaRecord[] getAphiaSynonymsByID(int aphiaID) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[9]);
_call.setUseSOAPAction(true);
//_call.setSOAPActionURI("getAphiaSynonymsByID");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://aphia/v1.0/AphiaRecords", "getAphiaSynonymsByID"));
setRequestHeaders(_call);
setAttachments(_call);
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Integer(aphiaID)});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try {
return (aphia.v1_0.worms.AphiaRecord[]) _resp;
} catch (java.lang.Exception _exception) {
return (aphia.v1_0.worms.AphiaRecord[]) org.apache.axis.utils.JavaUtils.convert(_resp, aphia.v1_0.worms.AphiaRecord[].class);
}
}
}
public aphia.v1_0.worms.Vernacular[] getAphiaVernacularsByID(int aphiaID) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[10]);
_call.setUseSOAPAction(true);
//_call.setSOAPActionURI("getAphiaVernacularsByID");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://aphia/v1.0/AphiaVernaculars", "getAphiaVernacularsByID"));
setRequestHeaders(_call);
setAttachments(_call);
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Integer(aphiaID)});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try {
return (aphia.v1_0.worms.Vernacular[]) _resp;
} catch (java.lang.Exception _exception) {
return (aphia.v1_0.worms.Vernacular[]) org.apache.axis.utils.JavaUtils.convert(_resp, aphia.v1_0.worms.Vernacular[].class);
}
}
}
public aphia.v1_0.worms.AphiaRecord[] getAphiaChildrenByID(int aphiaID, int offset) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[11]);
_call.setUseSOAPAction(true);
//_call.setSOAPActionURI("getAphiaChildrenByID");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://aphia/v1.0/AphiaRecords", "getAphiaChildrenByID"));
setRequestHeaders(_call);
setAttachments(_call);
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Integer(aphiaID), new java.lang.Integer(offset)});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try {
return (aphia.v1_0.worms.AphiaRecord[]) _resp;
} catch (java.lang.Exception _exception) {
return (aphia.v1_0.worms.AphiaRecord[]) org.apache.axis.utils.JavaUtils.convert(_resp, aphia.v1_0.worms.AphiaRecord[].class);
}
}
}
}

@ -0,0 +1,137 @@
/**
* AphiaNameServiceLocator.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
*/
package aphia.v1_0.worms;
import org.gcube.data.spd.wormsplugin.*;
public class AphiaNameServiceLocator extends org.apache.axis.client.Service implements aphia.v1_0.worms.AphiaNameService {
public AphiaNameServiceLocator() {
}
public AphiaNameServiceLocator(org.apache.axis.EngineConfiguration config) {
super(config);
}
// Use to get a proxy class for AphiaNameServicePort
private java.lang.String AphiaNameServicePort_address = WormsPlugin.baseurl;
public java.lang.String getAphiaNameServicePortAddress() {
return AphiaNameServicePort_address;
}
// The WSDD service name defaults to the port name.
private java.lang.String AphiaNameServicePortWSDDServiceName = "AphiaNameServicePort";
public java.lang.String getAphiaNameServicePortWSDDServiceName() {
return AphiaNameServicePortWSDDServiceName;
}
public void setAphiaNameServicePortWSDDServiceName(java.lang.String name) {
AphiaNameServicePortWSDDServiceName = name;
}
public aphia.v1_0.worms.AphiaNameServicePortType getAphiaNameServicePort() throws javax.xml.rpc.ServiceException {
java.net.URL endpoint;
try {
endpoint = new java.net.URL(AphiaNameServicePort_address);
}
catch (java.net.MalformedURLException e) {
throw new javax.xml.rpc.ServiceException(e);
}
return getAphiaNameServicePort(endpoint);
}
public aphia.v1_0.worms.AphiaNameServicePortType getAphiaNameServicePort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
try {
aphia.v1_0.worms.AphiaNameServiceBindingStub _stub = new aphia.v1_0.worms.AphiaNameServiceBindingStub(portAddress, this);
_stub.setPortName(getAphiaNameServicePortWSDDServiceName());
return _stub;
}
catch (org.apache.axis.AxisFault e) {
return null;
}
}
public void setAphiaNameServicePortEndpointAddress(java.lang.String address) {
AphiaNameServicePort_address = address;
}
/**
* For the given interface, get the stub implementation.
* If this service has no port for the given interface,
* then ServiceException is thrown.
*/
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
try {
if (aphia.v1_0.worms.AphiaNameServicePortType.class.isAssignableFrom(serviceEndpointInterface)) {
aphia.v1_0.worms.AphiaNameServiceBindingStub _stub = new aphia.v1_0.worms.AphiaNameServiceBindingStub(new java.net.URL(AphiaNameServicePort_address), this);
_stub.setPortName(getAphiaNameServicePortWSDDServiceName());
return _stub;
}
}
catch (java.lang.Throwable t) {
throw new javax.xml.rpc.ServiceException(t);
}
throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
}
/**
* For the given interface, get the stub implementation.
* If this service has no port for the given interface,
* then ServiceException is thrown.
*/
public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
if (portName == null) {
return getPort(serviceEndpointInterface);
}
java.lang.String inputPortName = portName.getLocalPart();
if ("AphiaNameServicePort".equals(inputPortName)) {
return getAphiaNameServicePort();
}
else {
java.rmi.Remote _stub = getPort(serviceEndpointInterface);
((org.apache.axis.client.Stub) _stub).setPortName(portName);
return _stub;
}
}
public javax.xml.namespace.QName getServiceName() {
return new javax.xml.namespace.QName("http://aphia/v1.0", "AphiaNameService");
}
private java.util.HashSet ports = null;
public java.util.Iterator getPorts() {
if (ports == null) {
ports = new java.util.HashSet();
ports.add(new javax.xml.namespace.QName("http://aphia/v1.0", "AphiaNameServicePort"));
}
return ports.iterator();
}
/**
* Set the endpoint address for the specified port name.
*/
public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("AphiaNameServicePort".equals(portName)) {
setAphiaNameServicePortEndpointAddress(address);
}
else { // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
/**
* Set the endpoint address for the specified port name.
*/
public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
setEndpointAddress(portName.getLocalPart(), address);
}
}

@ -0,0 +1,112 @@
/**
* AphiaNameServicePortType.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
*/
package aphia.v1_0.worms;
public interface AphiaNameServicePortType extends java.rmi.Remote {
/**
* <strong>Get the (first) exact matching AphiaID for a given
* name.<br/>Parameters:
* <ul>
* <li><u>marine_only</u>: limit to marine taxa. Default=true.</li>
* </ul>
* </strong>
*/
public int getAphiaID(java.lang.String scientificname, boolean marine_only) throws java.rmi.RemoteException;
/**
* <strong>Get one or more matching (max. 50) AphiaRecords for
* a given name.<br/>Parameters:
* <ul>
* <li><u>like</u>: add a '%'-sign added after the ScientificName
* (SQL LIKE function). Default=true.</li>
* <li><u>fuzzy</u>: fuzzy matching. Default=true.</li>
* <li><u>marine_only</u>: limit to marine taxa. Default=true.</li>
* <li><u>offset</u>: starting recordnumber, when retrieving next chunck
* of (50) records. Default=1.</li>
* </ul>
* </strong>
*/
public aphia.v1_0.worms.AphiaRecord[] getAphiaRecords(java.lang.String scientificname, boolean like, boolean fuzzy, boolean marine_only, int offset) throws java.rmi.RemoteException;
/**
* <strong>Get the correct name for a given AphiaID</strong>.
*/
public java.lang.String getAphiaNameByID(int aphiaID) throws java.rmi.RemoteException;
/**
* <strong>Get the complete Aphia Record for a given AphiaID.</strong>
*/
public aphia.v1_0.worms.AphiaRecord getAphiaRecordByID(int aphiaID) throws java.rmi.RemoteException;
/**
* <strong>Get the Aphia Record for a given TSN (ITIS Taxonomic
* Serial Number).</strong>
*/
public aphia.v1_0.worms.AphiaRecord getAphiaRecordByTSN(int TSN) throws java.rmi.RemoteException;
/**
* <strong>For each given scientific name, try to find one or
* more AphiaRecords.<br/>
* This allows you to match multiple names in one call. Limited to
* 500 names at once for performance reasons.
* <br/>Parameters:
* <ul>
* <li><u>like</u>: add a '%'-sign after the ScientificName (SQL
* LIKE function). Default=false.</li>
* <li><u>fuzzy</u>: fuzzy matching. Default=true.</li>
* <li><u>marine_only</u>: limit to marine taxa. Default=true.</li>
* </ul></strong>
*/
public aphia.v1_0.worms.AphiaRecord[][] getAphiaRecordsByNames(java.lang.String[] scientificnames, boolean like, boolean fuzzy, boolean marine_only) throws java.rmi.RemoteException;
/**
* <strong>Get one or more Aphia Records (max. 50) for a given
* vernacular.</strong><br/>Parameters:
* <ul>
* <li><u>like</u>: add a '%'-sign before and after the input (SQL
* LIKE '%vernacular%' function). Default=false.</li>
* <li><u>offset</u>: starting record number, when retrieving next chunck
* of (50) records. Default=1.</li>
* </ul>
* </strong>
*/
public aphia.v1_0.worms.AphiaRecord[] getAphiaRecordsByVernacular(java.lang.String vernacular, boolean like, int offset) throws java.rmi.RemoteException;
/**
* <strong>Get the complete classification for one taxon. This
* also includes any sub or super ranks.</strong>
*/
public aphia.v1_0.worms.Classification getAphiaClassificationByID(int aphiaID) throws java.rmi.RemoteException;
/**
* <strong>Get one or more sources/references including links,
* for one AphiaID</strong>
*/
public aphia.v1_0.worms.Source[] getSourcesByAphiaID(int aphiaID) throws java.rmi.RemoteException;
/**
* <strong>Get all synonyms for a given AphiaID.</strong>
*/
public aphia.v1_0.worms.AphiaRecord[] getAphiaSynonymsByID(int aphiaID) throws java.rmi.RemoteException;
/**
* <strong>Get all vernaculars for a given AphiaID.</strong>
*/
public aphia.v1_0.worms.Vernacular[] getAphiaVernacularsByID(int aphiaID) throws java.rmi.RemoteException;
/**
* <strong>Get the direct children (max. 50) for a given AphiaID.</strong><br
* />Parameters:
* <ul>
* <li><u>offset</u>: starting record number, when retrieving next chunck
* of (50) records. Default=1.</li>
* </ul>
*/
public aphia.v1_0.worms.AphiaRecord[] getAphiaChildrenByID(int aphiaID, int offset) throws java.rmi.RemoteException;
}

@ -0,0 +1,830 @@
/**
* AphiaRecord.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
*/
package aphia.v1_0.worms;
public class AphiaRecord implements java.io.Serializable {
private int aphiaID;
private java.lang.String url;
private java.lang.String scientificname;
private java.lang.String authority;
private java.lang.String rank;
private java.lang.String status;
private int valid_AphiaID;
private java.lang.String valid_name;
private java.lang.String valid_authority;
private java.lang.String unacceptreason;
private java.lang.String kingdom;
private java.lang.String phylum;
private java.lang.String _class;
private java.lang.String order;
private java.lang.String family;
private java.lang.String genus;
private java.lang.String citation;
private java.lang.String lsid;
private int isMarine;
private int isFreshwater;
private int isBrackish;
private int isTerrestrial;
private int isExtinct;
private java.lang.String match_type;
private java.lang.String modified;
public AphiaRecord() {
}
public AphiaRecord(
int aphiaID,
java.lang.String url,
java.lang.String scientificname,
java.lang.String authority,
java.lang.String rank,
java.lang.String status,
java.lang.String unacceptreason,
int valid_AphiaID,
java.lang.String valid_name,
java.lang.String valid_authority,
java.lang.String kingdom,
java.lang.String phylum,
java.lang.String _class,
java.lang.String order,
java.lang.String family,
java.lang.String genus,
java.lang.String citation,
java.lang.String lsid,
int isMarine,
int isBrackish,
int isFreshwater,
int isTerrestrial,
int isExtinct,
java.lang.String match_type,
java.lang.String modified) {
this.aphiaID = aphiaID;
this.url = url;
this.scientificname = scientificname;
this.authority = authority;
this.rank = rank;
this.status = status;
this.unacceptreason = unacceptreason;
this.valid_AphiaID = valid_AphiaID;
this.valid_name = valid_name;
this.valid_authority = valid_authority;
this.kingdom = kingdom;
this.phylum = phylum;
this._class = _class;
this.order = order;
this.family = family;
this.genus = genus;
this.citation = citation;
this.lsid = lsid;
this.isMarine = isMarine;
this.isBrackish = isBrackish;
this.isFreshwater = isFreshwater;
this.isTerrestrial = isTerrestrial;
this.isExtinct = isExtinct;
this.match_type = match_type;
this.modified = modified;
}
/**
* @return the isMarine
*/
public int getIsMarine() {
return isMarine;
}
/**
* @param isMarine the isMarine to set
*/
public void setIsMarine(int isMarine) {
this.isMarine = isMarine;
}
/**
* Gets the aphiaID value for this AphiaRecord.
*
* @return aphiaID
*/
public int getAphiaID() {
return aphiaID;
}
/**
* Sets the aphiaID value for this AphiaRecord.
*
* @param aphiaID
*/
public void setAphiaID(int aphiaID) {
this.aphiaID = aphiaID;
}
/**
* Gets the url value for this AphiaRecord.
*
* @return url
*/
public java.lang.String getUrl() {
return url;
}
/**
* Sets the url value for this AphiaRecord.
*
* @param url
*/
public void setUrl(java.lang.String url) {
this.url = url;
}
/**
* Gets the scientificname value for this AphiaRecord.
*
* @return scientificname
*/
public java.lang.String getScientificname() {
return scientificname;
}
/**
* Sets the scientificname value for this AphiaRecord.
*
* @param scientificname
*/
public void setScientificname(java.lang.String scientificname) {
this.scientificname = scientificname;
}
/**
* Gets the authority value for this AphiaRecord.
*
* @return authority
*/
public java.lang.String getAuthority() {
return authority;
}
/**
* Sets the authority value for this AphiaRecord.
*
* @param authority
*/
public void setAuthority(java.lang.String authority) {
this.authority = authority;
}
/**
* Gets the rank value for this AphiaRecord.
*
* @return rank
*/
public java.lang.String getRank() {
return rank;
}
/**
* Sets the rank value for this AphiaRecord.
*
* @param rank
*/
public void setRank(java.lang.String rank) {
this.rank = rank;
}
/**
* Gets the status value for this AphiaRecord.
*
* @return status
*/
public java.lang.String getStatus() {
return status;
}
/**
* Sets the status value for this AphiaRecord.
*
* @param status
*/
public void setStatus(java.lang.String status) {
this.status = status;
}
/**
* Gets the valid_AphiaID value for this AphiaRecord.
*
* @return valid_AphiaID
*/
public int getValid_AphiaID() {
return valid_AphiaID;
}
/**
* Sets the valid_AphiaID value for this AphiaRecord.
*
* @param valid_AphiaID
*/
public void setValid_AphiaID(int valid_AphiaID) {
this.valid_AphiaID = valid_AphiaID;
}
/**
* Gets the valid_name value for this AphiaRecord.
*
* @return valid_name
*/
public java.lang.String getValid_name() {
return valid_name;
}
/**
* Sets the valid_name value for this AphiaRecord.
*
* @param valid_name
*/
public void setValid_name(java.lang.String valid_name) {
this.valid_name = valid_name;
}
public void setUnacceptreason(java.lang.String unacceptreason) {
this.unacceptreason = unacceptreason;
}
/**
* Gets the valid_authority value for this AphiaRecord.
*
* @return valid_authority
*/
public java.lang.String getValid_authority() {
return valid_authority;
}
/**
* Sets the valid_authority value for this AphiaRecord.
*
* @param valid_authority
*/
public void setValid_authority(java.lang.String valid_authority) {
this.valid_authority = valid_authority;
}
/**
* Gets the kingdom value for this AphiaRecord.
*
* @return kingdom
*/
public java.lang.String getKingdom() {
return kingdom;
}
/**
* Sets the kingdom value for this AphiaRecord.
*
* @param kingdom
*/
public void setKingdom(java.lang.String kingdom) {
this.kingdom = kingdom;
}
/**
* Gets the phylum value for this AphiaRecord.
*
* @return phylum
*/
public java.lang.String getPhylum() {
return phylum;
}
/**
* Sets the phylum value for this AphiaRecord.
*
* @param phylum
*/
public void setPhylum(java.lang.String phylum) {
this.phylum = phylum;
}
/**
* Gets the _class value for this AphiaRecord.
*
* @return _class
*/
public java.lang.String get_class() {
return _class;
}
/**
* Sets the _class value for this AphiaRecord.
*
* @param _class
*/
public void set_class(java.lang.String _class) {
this._class = _class;
}
/**
* Gets the order value for this AphiaRecord.
*
* @return order
*/
public java.lang.String getOrder() {
return order;
}
/**
* Sets the order value for this AphiaRecord.
*
* @param order
*/
public void setOrder(java.lang.String order) {
this.order = order;
}
/**
* Gets the family value for this AphiaRecord.
*
* @return family
*/
public java.lang.String getFamily() {
return family;
}
/**
* Sets the family value for this AphiaRecord.
*
* @param family
*/
public void setFamily(java.lang.String family) {
this.family = family;
}
/**
* Gets the genus value for this AphiaRecord.
*
* @return genus
*/
public java.lang.String getGenus() {
return genus;
}
/**
* Sets the genus value for this AphiaRecord.
*
* @param genus
*/
public void setGenus(java.lang.String genus) {
this.genus = genus;
}
/**
* Gets the citation value for this AphiaRecord.
*
* @return citation
*/
public java.lang.String getCitation() {
return citation;
}
/**
* Sets the citation value for this AphiaRecord.
*
* @param citation
*/
public void setCitation(java.lang.String citation) {
this.citation = citation;
}
/**
* Gets the lsid value for this AphiaRecord.
*
* @return lsid
*/
public java.lang.String getLsid() {
return lsid;
}
public java.lang.String getUnacceptreason() {
return unacceptreason;
}
/**
* Sets the lsid value for this AphiaRecord.
*
* @param lsid
*/
public void setLsid(java.lang.String lsid) {
this.lsid = lsid;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof AphiaRecord)) return false;
AphiaRecord other = (AphiaRecord) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
this.aphiaID == other.getAphiaID() &&
((this.url==null && other.getUrl()==null) ||
(this.url!=null &&
this.url.equals(other.getUrl()))) &&
((this.scientificname==null && other.getScientificname()==null) ||
(this.scientificname!=null &&
this.scientificname.equals(other.getScientificname()))) &&
((this.authority==null && other.getAuthority()==null) ||
(this.authority!=null &&
this.authority.equals(other.getAuthority()))) &&
((this.rank==null && other.getRank()==null) ||
(this.rank!=null &&
this.rank.equals(other.getRank()))) &&
((this.status==null && other.getStatus()==null) ||
(this.status!=null &&
this.status.equals(other.getStatus()))) &&
this.valid_AphiaID == other.getValid_AphiaID() &&
((this.valid_name==null && other.getValid_name()==null) ||
(this.valid_name!=null &&
this.valid_name.equals(other.getValid_name()))) &&
((this.valid_authority==null && other.getValid_authority()==null) ||
(this.valid_authority!=null &&
this.valid_authority.equals(other.getValid_authority()))) &&
((this.kingdom==null && other.getKingdom()==null) ||
(this.kingdom!=null &&
this.kingdom.equals(other.getKingdom()))) &&
((this.phylum==null && other.getPhylum()==null) ||
(this.phylum!=null &&
this.phylum.equals(other.getPhylum()))) &&
((this._class==null && other.get_class()==null) ||
(this._class!=null &&
this._class.equals(other.get_class()))) &&
((this.order==null && other.getOrder()==null) ||
(this.order!=null &&
this.order.equals(other.getOrder()))) &&
((this.family==null && other.getFamily()==null) ||
(this.family!=null &&
this.family.equals(other.getFamily()))) &&
((this.genus==null && other.getGenus()==null) ||
(this.genus!=null &&
this.genus.equals(other.getGenus()))) &&
((this.citation==null && other.getCitation()==null) ||
(this.citation!=null &&
this.citation.equals(other.getCitation()))) &&
((this.unacceptreason==null && other.getUnacceptreason()==null) ||
(this.unacceptreason!=null &&
this.unacceptreason.equals(other.getUnacceptreason()))) &&
this.isMarine == other.getIsMarine() &&
this.isFreshwater == other.getIsFreshwater() &&
this.isBrackish == other.getIsBrackish() &&
this.isTerrestrial == other.getIsTerrestrial() &&
this.isExtinct == other.getIsExtinct() &&
((this.match_type==null && other.getMatch_type()==null) ||
(this.match_type!=null &&
this.match_type.equals(other.getMatch_type()))) &&
((this.modified==null && other.getModified()==null) ||
(this.modified!=null &&
this.modified.equals(other.getModified()))) &&
((this.lsid==null && other.getLsid()==null) ||
(this.lsid!=null &&
this.lsid.equals(other.getLsid())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
_hashCode += getAphiaID();
if (getUrl() != null) {
_hashCode += getUrl().hashCode();
}
if (getScientificname() != null) {
_hashCode += getScientificname().hashCode();
}
if (getAuthority() != null) {
_hashCode += getAuthority().hashCode();
}
if (getRank() != null) {
_hashCode += getRank().hashCode();
}
if (getStatus() != null) {
_hashCode += getStatus().hashCode();
}
_hashCode += getValid_AphiaID();
if (getValid_name() != null) {
_hashCode += getValid_name().hashCode();
}
if (getValid_authority() != null) {
_hashCode += getValid_authority().hashCode();
}
if (getKingdom() != null) {
_hashCode += getKingdom().hashCode();
}
if (getPhylum() != null) {
_hashCode += getPhylum().hashCode();
}
if (get_class() != null) {
_hashCode += get_class().hashCode();
}
if (getOrder() != null) {
_hashCode += getOrder().hashCode();
}
if (getFamily() != null) {
_hashCode += getFamily().hashCode();
}
if (getGenus() != null) {
_hashCode += getGenus().hashCode();
}
if (getCitation() != null) {
_hashCode += getCitation().hashCode();
}
if (getLsid() != null) {
_hashCode += getLsid().hashCode();
}
if (getUnacceptreason() != null) {
_hashCode += getUnacceptreason().hashCode();
}
_hashCode += getIsMarine();
_hashCode += getIsFreshwater();
_hashCode += getIsBrackish();
_hashCode += getIsTerrestrial();
_hashCode += getIsExtinct();
if (getMatch_type() != null) {
_hashCode += getMatch_type().hashCode();
}
if (getModified() != null) {
_hashCode += getModified().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(AphiaRecord.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("http://aphia/v1.0", "AphiaRecord"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("aphiaID");
elemField.setXmlName(new javax.xml.namespace.QName("", "AphiaID"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("url");
elemField.setXmlName(new javax.xml.namespace.QName("", "url"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("scientificname");
elemField.setXmlName(new javax.xml.namespace.QName("", "scientificname"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("authority");
elemField.setXmlName(new javax.xml.namespace.QName("", "authority"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("rank");
elemField.setXmlName(new javax.xml.namespace.QName("", "rank"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("status");
elemField.setXmlName(new javax.xml.namespace.QName("", "status"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("valid_AphiaID");
elemField.setXmlName(new javax.xml.namespace.QName("", "valid_AphiaID"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("valid_name");
elemField.setXmlName(new javax.xml.namespace.QName("", "valid_name"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("valid_authority");
elemField.setXmlName(new javax.xml.namespace.QName("", "valid_authority"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("kingdom");
elemField.setXmlName(new javax.xml.namespace.QName("", "kingdom"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("phylum");
elemField.setXmlName(new javax.xml.namespace.QName("", "phylum"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("_class");
elemField.setXmlName(new javax.xml.namespace.QName("", "class"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("order");
elemField.setXmlName(new javax.xml.namespace.QName("", "order"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("family");
elemField.setXmlName(new javax.xml.namespace.QName("", "family"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("genus");
elemField.setXmlName(new javax.xml.namespace.QName("", "genus"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("citation");
elemField.setXmlName(new javax.xml.namespace.QName("", "citation"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("lsid");
elemField.setXmlName(new javax.xml.namespace.QName("", "lsid"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("unacceptreason");
elemField.setXmlName(new javax.xml.namespace.QName("", "unacceptreason"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("isMarine");
elemField.setXmlName(new javax.xml.namespace.QName("", "isMarine"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("isFreshwater");
elemField.setXmlName(new javax.xml.namespace.QName("", "isFreshwater"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("isBrackish");
elemField.setXmlName(new javax.xml.namespace.QName("", "isBrackish"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("isTerrestrial");
elemField.setXmlName(new javax.xml.namespace.QName("", "isTerrestrial"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("isExtinct");
elemField.setXmlName(new javax.xml.namespace.QName("", "isExtinct"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("match_type");
elemField.setXmlName(new javax.xml.namespace.QName("", "match_type"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("modified");
elemField.setXmlName(new javax.xml.namespace.QName("", "modified"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
public java.lang.String getModified() {
return modified;
}
public void setModified(java.lang.String modified) {
this.modified = modified;
}
public java.lang.String getMatch_type() {
return match_type;
}
public void setMatch_type(java.lang.String match_type) {
this.match_type = match_type;
}
public int getIsExtinct() {
return isExtinct;
}
public void setIsExtinct(int isExtinct) {
this.isExtinct = isExtinct;
}
public int getIsTerrestrial() {
return isTerrestrial;
}
public void setIsTerrestrial(int isTerrestrial) {
this.isTerrestrial = isTerrestrial;
}
public int getIsBrackish() {
return isBrackish;
}
public void setIsBrackish(int isBrackish) {
this.isBrackish = isBrackish;
}
public int getIsFreshwater() {
return isFreshwater;
}
public void setIsFreshwater(int isFreshwater) {
this.isFreshwater = isFreshwater;
}
}

@ -0,0 +1,216 @@
/**
* Classification.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
*/
package aphia.v1_0.worms;
public class Classification implements java.io.Serializable {
private int aphiaID;
private java.lang.String rank;
private java.lang.String scientificname;
private aphia.v1_0.worms.Classification child;
public Classification() {
}
public Classification(
int aphiaID,
java.lang.String rank,
java.lang.String scientificname,
aphia.v1_0.worms.Classification child) {
this.aphiaID = aphiaID;
this.rank = rank;
this.scientificname = scientificname;
this.child = child;
}
/**
* Gets the aphiaID value for this Classification.
*
* @return aphiaID
*/
public int getAphiaID() {
return aphiaID;
}
/**
* Sets the aphiaID value for this Classification.
*
* @param aphiaID
*/
public void setAphiaID(int aphiaID) {
this.aphiaID = aphiaID;
}
/**
* Gets the rank value for this Classification.
*
* @return rank
*/
public java.lang.String getRank() {
return rank;
}
/**
* Sets the rank value for this Classification.
*
* @param rank
*/
public void setRank(java.lang.String rank) {
this.rank = rank;
}
/**
* Gets the scientificname value for this Classification.
*
* @return scientificname
*/
public java.lang.String getScientificname() {
return scientificname;
}
/**
* Sets the scientificname value for this Classification.
*
* @param scientificname
*/
public void setScientificname(java.lang.String scientificname) {
this.scientificname = scientificname;
}
/**
* Gets the child value for this Classification.
*
* @return child
*/
public aphia.v1_0.worms.Classification getChild() {
return child;
}
/**
* Sets the child value for this Classification.
*
* @param child
*/
public void setChild(aphia.v1_0.worms.Classification child) {
this.child = child;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof Classification)) return false;
Classification other = (Classification) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
this.aphiaID == other.getAphiaID() &&
((this.rank==null && other.getRank()==null) ||
(this.rank!=null &&
this.rank.equals(other.getRank()))) &&
((this.scientificname==null && other.getScientificname()==null) ||
(this.scientificname!=null &&
this.scientificname.equals(other.getScientificname()))) &&
((this.child==null && other.getChild()==null) ||
(this.child!=null &&
this.child.equals(other.getChild())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
_hashCode += getAphiaID();
if (getRank() != null) {
_hashCode += getRank().hashCode();
}
if (getScientificname() != null) {
_hashCode += getScientificname().hashCode();
}
if (getChild() != null) {
_hashCode += getChild().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(Classification.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("http://aphia/v1.0", "Classification"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("aphiaID");
elemField.setXmlName(new javax.xml.namespace.QName("", "AphiaID"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("rank");
elemField.setXmlName(new javax.xml.namespace.QName("", "rank"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("scientificname");
elemField.setXmlName(new javax.xml.namespace.QName("", "scientificname"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("child");
elemField.setXmlName(new javax.xml.namespace.QName("", "child"));
elemField.setXmlType(new javax.xml.namespace.QName("http://aphia/v1.0", "Classification"));
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}

@ -0,0 +1,329 @@
/**
* Source.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
*/
package aphia.v1_0.worms;
public class Source implements java.io.Serializable {
private int source_id;
private java.lang.String use;
private java.lang.String reference;
private java.lang.String page;
private java.lang.String url;
private java.lang.String link;
private java.lang.String fulltext;
private java.lang.String doi;
public Source() {
}
public Source(
int source_id,
java.lang.String use,
java.lang.String reference,
java.lang.String page,
java.lang.String url,
java.lang.String link,
java.lang.String fulltext,
java.lang.String doi) {
this.source_id = source_id;
this.use = use;
this.reference = reference;
this.page = page;
this.url = url;
this.link = link;
this.fulltext = fulltext;
this.doi = doi;
}
/**
* Gets the source_id value for this Source.
*
* @return source_id
*/
public int getSource_id() {
return source_id;
}
/**
* Sets the source_id value for this Source.
*
* @param source_id
*/
public void setSource_id(int source_id) {
this.source_id = source_id;
}
/**
* Gets the use value for this Source.
*
* @return use
*/
public java.lang.String getUse() {
return use;
}
/**
* Sets the use value for this Source.
*
* @param use
*/
public void setUse(java.lang.String use) {
this.use = use;
}
/**
* Gets the reference value for this Source.
*
* @return reference
*/
public java.lang.String getReference() {
return reference;
}
/**
* Sets the reference value for this Source.
*
* @param reference
*/
public void setReference(java.lang.String reference) {
this.reference = reference;
}
/**
* Gets the page value for this Source.
*
* @return page
*/
public java.lang.String getPage() {
return page;
}
/**
* Sets the page value for this Source.
*
* @param page
*/
public void setPage(java.lang.String page) {
this.page = page;
}
/**
* Gets the url value for this Source.
*
* @return url
*/
public java.lang.String getUrl() {
return url;
}
/**
* Sets the url value for this Source.
*
* @param url
*/
public void setUrl(java.lang.String url) {
this.url = url;
}
/**
* Gets the link value for this Source.
*
* @return link
*/
public java.lang.String getLink() {
return link;
}
/**
* Sets the link value for this Source.
*
* @param link
*/
public void setLink(java.lang.String link) {
this.link = link;
}
/**
* Gets the fulltext value for this Source.
*
* @return fulltext
*/
public java.lang.String getFulltext() {
return fulltext;
}
public java.lang.String getDoi() {
return doi;
}
public void setDoi(java.lang.String doi) {
this.doi = doi;
}
/**
* Sets the fulltext value for this Source.
*
* @param fulltext
*/
public void setFulltext(java.lang.String fulltext) {
this.fulltext = fulltext;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof Source)) return false;
Source other = (Source) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
this.source_id == other.getSource_id() &&
((this.use==null && other.getUse()==null) ||
(this.use!=null &&
this.use.equals(other.getUse()))) &&
((this.reference==null && other.getReference()==null) ||
(this.reference!=null &&
this.reference.equals(other.getReference()))) &&
((this.page==null && other.getPage()==null) ||
(this.page!=null &&
this.page.equals(other.getPage()))) &&
((this.url==null && other.getUrl()==null) ||
(this.url!=null &&
this.url.equals(other.getUrl()))) &&
((this.link==null && other.getLink()==null) ||
(this.link!=null &&
this.link.equals(other.getLink()))) &&
((this.fulltext==null && other.getFulltext()==null) ||
(this.fulltext!=null &&
this.fulltext.equals(other.getFulltext())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
_hashCode += getSource_id();
if (getUse() != null) {
_hashCode += getUse().hashCode();
}
if (getReference() != null) {
_hashCode += getReference().hashCode();
}
if (getPage() != null) {
_hashCode += getPage().hashCode();
}
if (getUrl() != null) {
_hashCode += getUrl().hashCode();
}
if (getLink() != null) {
_hashCode += getLink().hashCode();
}
if (getFulltext() != null) {
_hashCode += getFulltext().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(Source.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("http://aphia/v1.0", "Source"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("source_id");
elemField.setXmlName(new javax.xml.namespace.QName("", "source_id"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("use");
elemField.setXmlName(new javax.xml.namespace.QName("", "use"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("reference");
elemField.setXmlName(new javax.xml.namespace.QName("", "reference"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("page");
elemField.setXmlName(new javax.xml.namespace.QName("", "page"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("url");
elemField.setXmlName(new javax.xml.namespace.QName("", "url"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("link");
elemField.setXmlName(new javax.xml.namespace.QName("", "link"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("fulltext");
elemField.setXmlName(new javax.xml.namespace.QName("", "fulltext"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}

@ -0,0 +1,186 @@
/**
* Vernacular.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
*/
package aphia.v1_0.worms;
public class Vernacular implements java.io.Serializable {
private java.lang.String vernacular;
private java.lang.String language_code;
private java.lang.String language;
public Vernacular() {
}
public Vernacular(
java.lang.String vernacular,
java.lang.String language_code,
java.lang.String language) {
this.vernacular = vernacular;
this.language_code = language_code;
this.language = language;
}
/**
* Gets the vernacular value for this Vernacular.
*
* @return vernacular
*/
public java.lang.String getVernacular() {
return vernacular;
}
/**
* Sets the vernacular value for this Vernacular.
*
* @param vernacular
*/
public void setVernacular(java.lang.String vernacular) {
this.vernacular = vernacular;
}
/**
* Gets the language_code value for this Vernacular.
*
* @return language_code
*/
public java.lang.String getLanguage_code() {
return language_code;
}
/**
* Sets the language_code value for this Vernacular.
*
* @param language_code
*/
public void setLanguage_code(java.lang.String language_code) {
this.language_code = language_code;
}
/**
* Gets the language value for this Vernacular.
*
* @return language
*/
public java.lang.String getLanguage() {
return language;
}
/**
* Sets the language value for this Vernacular.
*
* @param language
*/
public void setLanguage(java.lang.String language) {
this.language = language;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof Vernacular)) return false;
Vernacular other = (Vernacular) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
((this.vernacular==null && other.getVernacular()==null) ||
(this.vernacular!=null &&
this.vernacular.equals(other.getVernacular()))) &&
((this.language_code==null && other.getLanguage_code()==null) ||
(this.language_code!=null &&
this.language_code.equals(other.getLanguage_code()))) &&
((this.language==null && other.getLanguage()==null) ||
(this.language!=null &&
this.language.equals(other.getLanguage())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
if (getVernacular() != null) {
_hashCode += getVernacular().hashCode();
}
if (getLanguage_code() != null) {
_hashCode += getLanguage_code().hashCode();
}
if (getLanguage() != null) {
_hashCode += getLanguage().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(Vernacular.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("http://aphia/v1.0", "Vernacular"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("vernacular");
elemField.setXmlName(new javax.xml.namespace.QName("", "vernacular"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("language_code");
elemField.setXmlName(new javax.xml.namespace.QName("", "language_code"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("language");
elemField.setXmlName(new javax.xml.namespace.QName("", "language"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}

@ -0,0 +1,107 @@
package org.gcube.data.spd.wormsplugin;
import java.rmi.RemoteException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import org.gcube.data.spd.model.CommonName;
import org.gcube.data.spd.model.products.Taxon;
import org.gcube.data.spd.model.products.TaxonomyItem;
import org.gcube.data.spd.model.products.TaxonomyStatus;
import org.gcube.data.spd.model.products.TaxonomyStatus.Status;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import aphia.v1_0.worms.AphiaRecord;
import aphia.v1_0.worms.Classification;
import aphia.v1_0.worms.Vernacular;
public class Utils {
static Logger logger = LoggerFactory.getLogger(Utils.class);
public static Taxon retrieveTaxon(Classification classification, int aphiaID){
Taxon taxon = null;
while (classification.getAphiaID()!=aphiaID){
Taxon newTaxon = new Taxon(classification.getAphiaID()+"");
if (taxon!=null)
newTaxon.setParent(taxon);
newTaxon.setRank(classification.getRank());
// logger.trace(classification.getRank());
// logger.trace(classification.getScientificname());
newTaxon.setScientificName(classification.getScientificname());
classification = classification.getChild();
taxon = newTaxon;
}
// logger.trace(taxon);
return taxon;
}
public static TaxonomyItem retrieveTaxonomy(Classification classification, int aphiaID){
List<CommonName> listCommNames = new ArrayList<CommonName> ();
TaxonomyItem taxon = null;
while (classification.getAphiaID()!=aphiaID){
int id = classification.getAphiaID();
TaxonomyItem newTaxon = new TaxonomyItem(id+"");
if (taxon!=null)
newTaxon.setParent(taxon);
newTaxon.setRank(classification.getRank());
newTaxon.setScientificName(classification.getScientificname());
newTaxon.setCredits(Utils.createCredits());
AphiaRecord record = null;
try {
record = WormsPlugin.binding.getAphiaRecordByID(id);
}catch (Exception e) {
logger.error("Error getAphiaRecordByID ", e);
}
if (record != null){
newTaxon.setCitation(record.getCitation());
newTaxon.setLsid(record.getLsid());
newTaxon.setScientificNameAuthorship(record.getAuthority());
}
Vernacular[] vernaculars;
try {
vernaculars = WormsPlugin.binding.getAphiaVernacularsByID(classification.getAphiaID());
if (vernaculars!=null){
// logger.debug("found vernacular name");
for (Vernacular vernacular : vernaculars) {
if (vernacular.getLanguage_code()!=null){
CommonName a = new CommonName(vernacular.getLanguage(),vernacular.getVernacular());
listCommNames.add(a);
}
}
}
} catch (RemoteException e) {
logger.error("RemoteException", e);
}
newTaxon.setCommonNames(listCommNames);
newTaxon.setStatus(new TaxonomyStatus("accepted", Status.ACCEPTED));
classification = classification.getChild();
taxon = newTaxon;
}
return taxon;
}
//format date
public static String createDate() {
Calendar now = Calendar.getInstance();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
String date = format.format(now.getTime());
return date;
}
public static String createCredits() {
String cred = WormsPlugin.credits;
cred = cred.replace("XDATEX",createDate());
return cred;
}
}

@ -0,0 +1,215 @@
package org.gcube.data.spd.wormsplugin;
import java.net.URL;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.gcube.common.resources.gcore.ServiceEndpoint;
import org.gcube.common.resources.gcore.ServiceEndpoint.AccessPoint;
import org.gcube.data.spd.model.CommonName;
import org.gcube.data.spd.model.Condition;
import org.gcube.data.spd.model.RepositoryInfo;
import org.gcube.data.spd.model.exceptions.ExternalRepositoryException;
import org.gcube.data.spd.model.products.DataProvider;
import org.gcube.data.spd.model.products.DataSet;
import org.gcube.data.spd.model.products.Product;
import org.gcube.data.spd.model.products.Product.ProductType;
import org.gcube.data.spd.model.products.ResultItem;
import org.gcube.data.spd.model.util.Capabilities;
import org.gcube.data.spd.plugin.fwk.AbstractPlugin;
import org.gcube.data.spd.plugin.fwk.capabilities.ClassificationCapability;
import org.gcube.data.spd.plugin.fwk.capabilities.ExpansionCapability;
import org.gcube.data.spd.plugin.fwk.capabilities.MappingCapability;
import org.gcube.data.spd.plugin.fwk.writers.ObjectWriter;
import org.gcube.data.spd.wormsplugin.capabilities.ClassificationCapabilityImpl;
import org.gcube.data.spd.wormsplugin.capabilities.ExpansionCapabilityImpl;
import org.gcube.data.spd.wormsplugin.capabilities.NamesMappingImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import aphia.v1_0.worms.AphiaRecord;
import aphia.v1_0.worms.Source;
import aphia.v1_0.worms.Vernacular;
public class WormsPlugin extends AbstractPlugin {
private Logger logger = LoggerFactory.getLogger(WormsPlugin.class);
public static String credits = "This information object has been generated via the Species Product Discovery service on XDATEX by interfacing with World Register of Marine Species (http://www.marinespecies.org/)";
public static aphia.v1_0.worms.AphiaNameServiceBindingStub binding;
public static String baseurl;
@Override
public void initialize(ServiceEndpoint res) throws Exception {
setUseCache(true);
try {
for (AccessPoint ap:res.profile().accessPoints()) {
if (ap.name().equals("portType")){
baseurl = ap.address();
}
}
binding = (aphia.v1_0.worms.AphiaNameServiceBindingStub)
new aphia.v1_0.worms.AphiaNameServiceLocator().getAphiaNameServicePort(new URL(baseurl));
}
catch (javax.xml.rpc.ServiceException jre) {
logger.error("error contacting worms service", jre);
throw jre;
}
super.initialize(res);
}
@SuppressWarnings("serial")
@Override
public Set<Capabilities> getSupportedCapabilities() {
return new HashSet<Capabilities>(){{add(Capabilities.Classification);add(Capabilities.NamesMapping);add(Capabilities.Expansion);}};
}
@Override
public ClassificationCapability getClassificationInterface() {
return new ClassificationCapabilityImpl();
}
@Override
public MappingCapability getMappingInterface() {
return new NamesMappingImpl();
}
@Override
public ExpansionCapability getExpansionInterface() {
return new ExpansionCapabilityImpl();
}
@Override
public String getRepositoryName() {
return "WoRMS";
}
@Override
public String getDescription() {
return "Plugin for WoRMS";
}
public void search(String word, ObjectWriter<ResultItem> writer, String type) throws ExternalRepositoryException {
try {
DataProvider dp = new DataProvider("worms");
dp.setName("Worms");
AphiaRecord[] records = null;
List<CommonName> listCommNames = new ArrayList<CommonName> ();
final int offsetlimit=50;
int offset =1;
do{
if (type.equals("vernacular"))
records = binding.getAphiaRecordsByVernacular(word, true, offset);
else if (type.equals("scientific"))
records = binding.getAphiaRecords(word, true, false, false, offset);
if (records!=null){
for (AphiaRecord record : records){
//logger.debug("found record in worms");
Source[] sources = null;
if (record==null || (sources= binding.getSourcesByAphiaID(record.getAphiaID()))==null || record.getScientificname()==null)
continue;
for (Source source : sources){
//logger.debug("found source in worms");
if (source==null)
continue;
if (source.getReference()!=null){
// logger.debug("source has fulltext not null");
DataSet ds = new DataSet(record.getAphiaID()+"||"+source.getReference().hashCode());
ds.setName(source.getReference());
if (source.getUrl()!=null) ds.setCitation(source.getUrl());
ds.setDataProvider(dp);
ResultItem item = new ResultItem(record.getAphiaID()+"", record.getScientificname());
// Calendar now = Calendar.getInstance();
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
// String credits ="Biodiversity data published by: "+ds.getName()+" (Accessed through WoRMS web service, "+format.format(now.getTime())+")";
AphiaRecord[] synonyms = binding.getAphiaSynonymsByID(record.getAphiaID());
if (synonyms!=null && synonyms.length>0){
Product product = new Product(ProductType.Synonym, item.getId());
product.setCount(synonyms.length);
item.setProducts(Collections.singletonList(product));
}
Vernacular[] vernaculars = binding.getAphiaVernacularsByID(record.getAphiaID());
if (vernaculars!=null){
// logger.debug("found vernacular name");
for (Vernacular vernacular : vernaculars) {
if (vernacular.getLanguage_code()!=null){
CommonName a = new CommonName(vernacular.getLanguage(),vernacular.getVernacular());
listCommNames.add(a);
}
}
}
item.setScientificNameAuthorship(record.getAuthority());
item.setLsid(record.getLsid());
item.setCitation(record.getCitation());
item.setCredits(Utils.createCredits());
item.setCommonNames(listCommNames);
item.setDataSet(ds);
if (record.getRank()!=null)
item.setRank(record.getRank());
else if (record.getScientificname().equals("Biota"))
item.setRank("Superdomain");
item.setParent(Utils.retrieveTaxon(binding.getAphiaClassificationByID(record.getAphiaID()), record.getAphiaID()));
if (writer.isAlive())
writer.write(item);
else
break;
}
}
}
}
offset+=offsetlimit;
} while (records!=null && records.length==offsetlimit);
} catch (RemoteException e) {
logger.error("error contacting WoRMS service", e);
throw new ExternalRepositoryException(e);
} catch (Throwable e) {
logger.error("error searching in WoRMS service", e);
}
}
@Override
public RepositoryInfo getRepositoryInfo() {
RepositoryInfo info = new RepositoryInfo("" +
"http://www.marinespecies.org/images/banner1.jpg",
"http://www.marinespecies.org/",
"The World Register of Marine Species (WoRMS) is a database that hopes to provide an authoritative and comprehensive list of names of marine organisms. The content of the registry is edited and maintained by scientific specialists on each group of organism. These taxonomists control the quality of the information, which is gathered from several regional and taxon-specific databases. WoRMS maintains valid names of all marine organisms, but also provides information on synonyms and invalid names. WoRMS is continuously updated since new species are constantly being discovered and described by scientists. In addition, the nomenclature and taxonomy of existing species is often corrected or changed as new research is constantly being published. WoRMS maintenance and development relies on financial contributions, the time contributed by its editorial board, and support of its host institution VLIZ.");
return info;
}
@Override
public void searchByScientificName(String word,
ObjectWriter<ResultItem> writer, Condition... properties) throws ExternalRepositoryException{ {
search(word, writer, "scientific");
}
}
}

@ -0,0 +1,299 @@
package org.gcube.data.spd.wormsplugin.capabilities;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.gcube.data.spd.model.CommonName;
import org.gcube.data.spd.model.Condition;
import org.gcube.data.spd.model.Conditions;
import org.gcube.data.spd.model.exceptions.ExternalRepositoryException;
import org.gcube.data.spd.model.exceptions.IdNotValidException;
import org.gcube.data.spd.model.exceptions.MethodNotSupportedException;
import org.gcube.data.spd.model.products.TaxonomyItem;
import org.gcube.data.spd.model.products.TaxonomyStatus;
import org.gcube.data.spd.model.products.TaxonomyStatus.Status;
import org.gcube.data.spd.model.util.ElementProperty;
import org.gcube.data.spd.plugin.fwk.capabilities.ClassificationCapability;
import org.gcube.data.spd.plugin.fwk.writers.ClosableWriter;
import org.gcube.data.spd.plugin.fwk.writers.ObjectWriter;
import org.gcube.data.spd.wormsplugin.Utils;
import org.gcube.data.spd.wormsplugin.WormsPlugin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import aphia.v1_0.worms.AphiaRecord;
import aphia.v1_0.worms.Source;
import aphia.v1_0.worms.Vernacular;
public class ClassificationCapabilityImpl extends ClassificationCapability {
public enum RecordType {
SCIENTIFIC,
VERNACULAR
}
private static Logger logger = LoggerFactory.getLogger(ClassificationCapabilityImpl.class);
@Override
public Set<Conditions> getSupportedProperties() {
return Collections.emptySet();
}
@Override
public List<TaxonomyItem> retrieveTaxonChildrenByTaxonId(String id) throws IdNotValidException, ExternalRepositoryException {
// logger.trace(id);
List<TaxonomyItem> list = new ArrayList<TaxonomyItem>();
try {
AphiaRecord[] records;
final int offsetlimit=50;
int offset =1;
do{
records = WormsPlugin.binding.getAphiaChildrenByID(Integer.parseInt(id), offset);
if (records!=null){
// logger.debug(records.length);
for (AphiaRecord record : records){
TaxonomyItem item = createItem(record, false);
if (item!=null)
list.add(item);
}
}
offset+=offsetlimit;
} while (records!=null && records.length==offsetlimit);
}catch (NumberFormatException e) {
logger.error("id not valid",e);
throw new IdNotValidException(e);
} catch (Throwable e) {
logger.error("error contacting worms service", e);
throw new ExternalRepositoryException(e);
}
return list;
}
public void retrieveTaxa(ObjectWriter<TaxonomyItem> writer, String word, RecordType type) throws ExternalRepositoryException{
Set<Integer> hash = new HashSet<Integer>();
try {
AphiaRecord[] records = null;
final int offsetlimit=50;
int offset =1;
do{
switch (type) {
case SCIENTIFIC:
records = WormsPlugin.binding.getAphiaRecords(word, true, false, false, offset);
break;
case VERNACULAR:
records = WormsPlugin.binding.getAphiaRecordsByVernacular(word, true, offset);
break;
default:
logger.warn("invalid record type");
break;
}
if (records!=null){
for (AphiaRecord record : records){
if (hash.contains(record.getAphiaID())){
continue;
}
hash.add(record.getAphiaID());
TaxonomyItem item = createItem(record, true);
if ((item != null) && (writer.isAlive()))
writer.write(item);
}
}
offset+=offsetlimit;
} while (records!=null && records.length==offsetlimit);
} catch (Throwable e) {
logger.error("error contacting worms service", e);
throw new ExternalRepositoryException(e);
}
}
//create TaxonomyItem
private TaxonomyItem createItem(AphiaRecord record, Boolean flag) throws RemoteException {
TaxonomyItem item = null;
String scientificname = record.getScientificname();
// logger.trace("scientificname " + scientificname);
if (scientificname != null ){
item = new TaxonomyItem(record.getAphiaID()+"");
item.setScientificName(record.getScientificname());
item.setScientificNameAuthorship(record.getAuthority());
item.setLsid(record.getLsid());
item.setCredits(Utils.createCredits());
item.setCitation(record.getCitation());
if (record.getRank()!=null)
item.setRank(record.getRank());
else if (record.getScientificname().equals("Biota"))
item.setRank("Superdomain");
List<CommonName> listCommNames = new ArrayList<CommonName> ();
Vernacular[] vernaculars = WormsPlugin.binding.getAphiaVernacularsByID(record.getAphiaID());
if (vernaculars!=null){
for (Vernacular vernacular : vernaculars) {
if (vernacular.getLanguage_code()!=null){
CommonName a = new CommonName(vernacular.getLanguage(),vernacular.getVernacular());
listCommNames.add(a);
}
}
}
item.setCommonNames(listCommNames);
try{
if (record.getStatus().equals("accepted"))
item.setStatus(new TaxonomyStatus("accepted", Status.ACCEPTED));
else if (record.getStatus().equals("unaccepted") && WormsPlugin.binding.getAphiaRecordByID(record.getValid_AphiaID()).getStatus().equals("accepted")){
// logger.trace(WormsPlugin.binding.getAphiaSynonymsByID(record.getValid_AphiaID()));
item.setStatus(new TaxonomyStatus(Status.SYNONYM, record.getValid_AphiaID()+"", "synonym"));}
else
item.setStatus(new TaxonomyStatus(record.getStatus(), Status.UNKNOWN));
}catch (Exception e) {
item.setStatus(new TaxonomyStatus(record.getStatus(), Status.UNKNOWN));
}
if (flag){
try{
item.setParent(Utils.retrieveTaxonomy( WormsPlugin.binding.getAphiaClassificationByID(record.getAphiaID()), record.getAphiaID()));
}catch (Exception e) {
item.setParent(null);
}
}
else
item.setParent(null);
Source[] sources = null;
if ((sources= WormsPlugin.binding.getSourcesByAphiaID(record.getAphiaID()))!=null){
for (Source source : sources){
// logger.trace(source.getReference());
if (source==null)
continue;
if (source.getReference()!=null){
StringBuilder p = new StringBuilder();
p.append(source.getReference());
if (source.getLink()!=null){
p.append(", available online at ");
p.append(source.getLink());
}
if (source.getUrl()!=null){
p.append(", details: ");
p.append(source.getUrl());
}
ElementProperty property = new ElementProperty(source.getUse(), p.toString());
item.addProperty(property);
}
}
}
}
return item;
}
@Override
public void retrieveTaxonByIds(Iterator<String> ids, ClosableWriter<TaxonomyItem> writer) throws ExternalRepositoryException {
try{
while(ids.hasNext()) {
String id = ids.next();
// logger.trace("Retrive taxon by id " + id);
TaxonomyItem tax = retrieveTaxonById(id);
if ((tax != null) && (writer.isAlive()))
writer.write(tax);
else
break;
}
} catch (IdNotValidException e) {
logger.error("IdNotValidn", e);
} catch (ExternalRepositoryException e) {
logger.error("ExternalRepositoryException", e);
throw e;
}finally{
writer.close();
}
}
@Override
public TaxonomyItem retrieveTaxonById(String id)
throws IdNotValidException, ExternalRepositoryException {
TaxonomyItem tax = null;
// logger.trace("Retrive taxon by id " + id);
AphiaRecord record = null;
try {
record = WormsPlugin.binding.getAphiaRecordByID(Integer.parseInt(id));
if (record!=null){
tax = createItem(record, true);
}
} catch (NumberFormatException e) {
logger.error("NumberFormatException", e);
throw new IdNotValidException(e);
} catch (RemoteException e) {
logger.error("Remote Error", e);
throw new ExternalRepositoryException(e);
}
return tax;
}
@Override
public void getSynonymnsById(ObjectWriter<TaxonomyItem> writer, String id)
throws IdNotValidException, MethodNotSupportedException, ExternalRepositoryException {
try{
AphiaRecord[] records = null;
if ((records = WormsPlugin.binding.getAphiaSynonymsByID(Integer.parseInt(id)))!=null){
for (AphiaRecord record : records){
TaxonomyItem tax = createItem(record, true);
if ((tax != null) && (writer.isAlive()))
writer.write(tax);
else
break;
}
}
}catch (Exception e) {
logger.error("General Error", e);
throw new ExternalRepositoryException(e);
}
}
@Override
public void searchByScientificName(String word,
ObjectWriter<TaxonomyItem> writer, Condition... properties) throws ExternalRepositoryException{
retrieveTaxa(writer, word, RecordType.SCIENTIFIC);
}
}

@ -0,0 +1,53 @@
package org.gcube.data.spd.wormsplugin.capabilities;
import java.rmi.RemoteException;
import org.gcube.data.spd.model.exceptions.ExternalRepositoryException;
import org.gcube.data.spd.model.exceptions.StreamNonBlockingException;
import org.gcube.data.spd.plugin.fwk.capabilities.ExpansionCapability;
import org.gcube.data.spd.plugin.fwk.writers.ObjectWriter;
import org.gcube.data.spd.wormsplugin.WormsPlugin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import aphia.v1_0.worms.AphiaRecord;
public class ExpansionCapabilityImpl implements ExpansionCapability {
Logger logger = LoggerFactory.getLogger(ExpansionCapabilityImpl.class);
@Override
public void getSynonyms(ObjectWriter<String> writer, String scientifcName) throws ExternalRepositoryException {
logger.debug("searching synonyms for "+scientifcName);
int offset =1;
int elements =20;
AphiaRecord[] records = null;
do{
try{
records = WormsPlugin.binding.getAphiaRecords(scientifcName, true, false, false, offset);
if (records!=null){
for (AphiaRecord record : records){
try{
AphiaRecord[] synonyms = WormsPlugin.binding.getAphiaSynonymsByID(record.getAphiaID());
if (synonyms!=null){
for (AphiaRecord synonym: synonyms){
if (!writer.isAlive()) return;
writer.write(synonym.getScientificname());
logger.debug("found synonym "+synonym.getScientificname());
}
}
}catch (Exception e) {
writer.write(new StreamNonBlockingException("WoRMS",scientifcName));
logger.error("error retrieving synonyms for aphia id "+record.getAphiaID(), e);
}
}
}
} catch (RemoteException e) {
throw new ExternalRepositoryException(e);
}
offset = elements+offset;
}while(records!=null && records.length == offset );
}
}

@ -0,0 +1,52 @@
package org.gcube.data.spd.wormsplugin.capabilities;
import java.rmi.RemoteException;
import java.util.HashSet;
import java.util.Set;
import org.gcube.data.spd.model.exceptions.ExternalRepositoryException;
import org.gcube.data.spd.plugin.fwk.capabilities.MappingCapability;
import org.gcube.data.spd.plugin.fwk.writers.ObjectWriter;
import org.gcube.data.spd.wormsplugin.WormsPlugin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import aphia.v1_0.worms.AphiaRecord;
public class NamesMappingImpl implements MappingCapability{
private static Logger logger = LoggerFactory.getLogger(NamesMappingImpl.class);
@Override
public void getRelatedScientificNames(ObjectWriter<String> writer,
String commonName) throws ExternalRepositoryException{
try {
logger.debug("retrieving mapping for "+commonName);
AphiaRecord[] records;
final int offsetlimit=50;
int offset =1;
Set<String> snSet = new HashSet<String>();
do{
records = WormsPlugin.binding.getAphiaRecordsByVernacular(commonName, true, offset);
if (records!=null){
for (AphiaRecord record : records){
if (!writer.isAlive()) return;
if (!snSet.contains(record.getScientificname())){
logger.trace("writing (COMMONNAMESMAPPING) "+record.getScientificname() );
writer.write(record.getScientificname());
snSet.add(record.getScientificname());
}
}
}
offset+=offsetlimit;
} while (records!=null && records.length==offsetlimit);
} catch (RemoteException e) {
throw new ExternalRepositoryException(e);
}
}
}

@ -0,0 +1,324 @@
/**
* AphiaNameServiceTestCase.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
*/
package org.gcube.data.spd.wormsplugin;
import static org.gcube.resources.discovery.icclient.ICFactory.clientFor;
import static org.gcube.resources.discovery.icclient.ICFactory.queryFor;
import java.util.List;
import javax.xml.rpc.ServiceException;
import org.gcube.common.resources.gcore.ServiceEndpoint;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.resources.discovery.client.api.DiscoveryClient;
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
import static org.junit.Assert.*;
public class AphiaNameServiceTestCase {
public AphiaNameServiceTestCase(java.lang.String name) throws ServiceException {
SimpleQuery query = queryFor(ServiceEndpoint.class);
query.addCondition("$resource/Profile/Category/text() eq 'BiodiversityRepository' and $resource/Profile/Name eq 'WoRMS' ");
ScopeProvider.instance.set("/gcube/devsec");
DiscoveryClient<ServiceEndpoint> client = clientFor(ServiceEndpoint.class);
List<ServiceEndpoint> resources = client.submit(query);
// System.out.println(resources.size());
WormsPlugin a = new WormsPlugin();
if(resources.size() != 0) {
try {
a.initialize(resources.get(0));
} catch (Exception e) {
e.printStackTrace();
}
}
WormsPlugin.binding = (aphia.v1_0.worms.AphiaNameServiceBindingStub)
new aphia.v1_0.worms.AphiaNameServiceLocator().getAphiaNameServicePort();
}
public void testAphiaNameServicePortWSDL() throws Exception {
javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
java.net.URL url = new java.net.URL(new aphia.v1_0.worms.AphiaNameServiceLocator().getAphiaNameServicePortAddress() + "&wsdl=1");
javax.xml.rpc.Service service = serviceFactory.createService(url, new aphia.v1_0.worms.AphiaNameServiceLocator().getServiceName());
assertTrue(service != null);
}
public void test1AphiaNameServicePortGetAphiaID() throws Exception {
aphia.v1_0.worms.AphiaNameServiceBindingStub binding;
try {
binding = (aphia.v1_0.worms.AphiaNameServiceBindingStub)
new aphia.v1_0.worms.AphiaNameServiceLocator().getAphiaNameServicePort();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
int value = -3;
value = binding.getAphiaID("solea solea", true);
// TBD - validate results
}
public void test2AphiaNameServicePortGetAphiaRecords() throws Exception {
aphia.v1_0.worms.AphiaNameServiceBindingStub binding;
try {
binding = (aphia.v1_0.worms.AphiaNameServiceBindingStub)
new aphia.v1_0.worms.AphiaNameServiceLocator().getAphiaNameServicePort();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
aphia.v1_0.worms.AphiaRecord[] value = null;
value = binding.getAphiaRecords(new java.lang.String(), true, true, true, 0);
// TBD - validate results
}
public void test3AphiaNameServicePortGetAphiaNameByID() throws Exception {
aphia.v1_0.worms.AphiaNameServiceBindingStub binding;
try {
binding = (aphia.v1_0.worms.AphiaNameServiceBindingStub)
new aphia.v1_0.worms.AphiaNameServiceLocator().getAphiaNameServicePort();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
java.lang.String value = null;
value = binding.getAphiaNameByID(0);
// TBD - validate results
}
public void test4AphiaNameServicePortGetAphiaRecordByID() throws Exception {
aphia.v1_0.worms.AphiaNameServiceBindingStub binding;
try {
binding = (aphia.v1_0.worms.AphiaNameServiceBindingStub)
new aphia.v1_0.worms.AphiaNameServiceLocator().getAphiaNameServicePort();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
aphia.v1_0.worms.AphiaRecord value = null;
value = binding.getAphiaRecordByID(0);
// TBD - validate results
}
public void test5AphiaNameServicePortGetAphiaRecordByTSN() throws Exception {
aphia.v1_0.worms.AphiaNameServiceBindingStub binding;
try {
binding = (aphia.v1_0.worms.AphiaNameServiceBindingStub)
new aphia.v1_0.worms.AphiaNameServiceLocator().getAphiaNameServicePort();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
aphia.v1_0.worms.AphiaRecord value = null;
value = binding.getAphiaRecordByTSN(0);
// TBD - validate results
}
public void test6AphiaNameServicePortGetAphiaRecordsByNames() throws Exception {
aphia.v1_0.worms.AphiaNameServiceBindingStub binding;
try {
binding = (aphia.v1_0.worms.AphiaNameServiceBindingStub)
new aphia.v1_0.worms.AphiaNameServiceLocator().getAphiaNameServicePort();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
aphia.v1_0.worms.AphiaRecord[][] value = null;
value = binding.getAphiaRecordsByNames(new java.lang.String[0], true, true, true);
// TBD - validate results
}
public void test7AphiaNameServicePortGetAphiaRecordsByVernacular() throws Exception {
aphia.v1_0.worms.AphiaNameServiceBindingStub binding;
try {
binding = (aphia.v1_0.worms.AphiaNameServiceBindingStub)
new aphia.v1_0.worms.AphiaNameServiceLocator().getAphiaNameServicePort();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
aphia.v1_0.worms.AphiaRecord[] value = null;
value = binding.getAphiaRecordsByVernacular(new java.lang.String(), true, 0);
// TBD - validate results
}
public void test8AphiaNameServicePortGetAphiaClassificationByID() throws Exception {
aphia.v1_0.worms.AphiaNameServiceBindingStub binding;
try {
binding = (aphia.v1_0.worms.AphiaNameServiceBindingStub)
new aphia.v1_0.worms.AphiaNameServiceLocator().getAphiaNameServicePort();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
aphia.v1_0.worms.Classification value = null;
value = binding.getAphiaClassificationByID(0);
// TBD - validate results
}
public void test9AphiaNameServicePortGetSourcesByAphiaID() throws Exception {
aphia.v1_0.worms.AphiaNameServiceBindingStub binding;
try {
binding = (aphia.v1_0.worms.AphiaNameServiceBindingStub)
new aphia.v1_0.worms.AphiaNameServiceLocator().getAphiaNameServicePort();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
aphia.v1_0.worms.Source[] value = null;
value = binding.getSourcesByAphiaID(0);
// TBD - validate results
}
public void test10AphiaNameServicePortGetAphiaSynonymsByID() throws Exception {
aphia.v1_0.worms.AphiaNameServiceBindingStub binding;
try {
binding = (aphia.v1_0.worms.AphiaNameServiceBindingStub)
new aphia.v1_0.worms.AphiaNameServiceLocator().getAphiaNameServicePort();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
aphia.v1_0.worms.AphiaRecord[] value = null;
value = binding.getAphiaSynonymsByID(0);
// TBD - validate results
}
public void test11AphiaNameServicePortGetAphiaVernacularsByID() throws Exception {
aphia.v1_0.worms.AphiaNameServiceBindingStub binding;
try {
binding = (aphia.v1_0.worms.AphiaNameServiceBindingStub)
new aphia.v1_0.worms.AphiaNameServiceLocator().getAphiaNameServicePort();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
aphia.v1_0.worms.Vernacular[] value = null;
value = binding.getAphiaVernacularsByID(0);
// TBD - validate results
}
public void test12AphiaNameServicePortGetAphiaChildrenByID() throws Exception {
aphia.v1_0.worms.AphiaNameServiceBindingStub binding;
try {
binding = (aphia.v1_0.worms.AphiaNameServiceBindingStub)
new aphia.v1_0.worms.AphiaNameServiceLocator().getAphiaNameServicePort();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
aphia.v1_0.worms.AphiaRecord[] value = null;
value = binding.getAphiaChildrenByID(0, 0);
// TBD - validate results
}
}

@ -0,0 +1,94 @@
package org.gcube.data.spd.wormsplugin;
import static org.gcube.resources.discovery.icclient.ICFactory.clientFor;
import static org.gcube.resources.discovery.icclient.ICFactory.queryFor;
import java.util.List;
import javax.xml.rpc.ServiceException;
import org.gcube.common.resources.gcore.ServiceEndpoint;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.data.spd.model.exceptions.ExternalRepositoryException;
import org.gcube.data.spd.model.exceptions.StreamException;
import org.gcube.data.spd.model.products.ResultItem;
import org.gcube.data.spd.plugin.fwk.writers.ObjectWriter;
import org.gcube.resources.discovery.client.api.DiscoveryClient;
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
public class Test {
/**
* @param args
* @throws ServiceException
* @throws ExternalRepositoryException
*/
public static void main(String[] args) throws ServiceException, ExternalRepositoryException {
SimpleQuery query = queryFor(ServiceEndpoint.class);
query.addCondition("$resource/Profile/Category/text() eq 'BiodiversityRepository' and $resource/Profile/Name eq 'WoRMS' ");
ScopeProvider.instance.set("/gcube/devsec");
DiscoveryClient<ServiceEndpoint> client = clientFor(ServiceEndpoint.class);
List<ServiceEndpoint> resources = client.submit(query);
System.out.println(resources.size());
WormsPlugin a = new WormsPlugin();
if(resources.size() != 0) {
try {
a.initialize(resources.get(0));
} catch (Exception e) {
e.printStackTrace();
}
}
// WormsPlugin.binding = (aphia.v1_0.AphiaNameServiceBindingStub)
// new aphia.v1_0.AphiaNameServiceLocator().getAphiaNameServicePort();
// a.searchByCommonName("Galapagos", new ObjectWriter<ResultItem>() {
//
// @Override
// public boolean put(ResultItem t) {
// System.out.println(t);
// return false;
// }
//
// @Override
// public void close() {
// //
//
// }
// });
a.searchByScientificName("biota", new ObjectWriter<ResultItem>() {
@Override
public boolean isAlive() {
// TODO Auto-generated method stub
return true;
}
@Override
public boolean write(ResultItem t) {
// System.out.println(t.toString());
System.out.println(t.getId() + " " + t.getScientificName() + " " + t.getDataSet());
System.out.println(t.getRank());
// if (t.getParent() != null){
// System.out.println(t.getParent().getId() + " " + t.getParent().getScientificName() + " " + t.getParent().getCitation());
// }
return true;
}
@Override
public boolean write(StreamException arg0) {
// TODO Auto-generated method stub
return false;
}
});
}
}

@ -0,0 +1,145 @@
package org.gcube.data.spd.wormsplugin;
import static org.gcube.resources.discovery.icclient.ICFactory.clientFor;
import static org.gcube.resources.discovery.icclient.ICFactory.queryFor;
import java.util.List;
import javax.xml.bind.JAXBException;
import org.gcube.common.resources.gcore.ServiceEndpoint;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.data.spd.model.binding.Bindings;
import org.gcube.data.spd.model.exceptions.StreamException;
import org.gcube.data.spd.model.products.TaxonomyItem;
import org.gcube.data.spd.plugin.fwk.writers.ObjectWriter;
import org.gcube.data.spd.wormsplugin.capabilities.ClassificationCapabilityImpl;
import org.gcube.resources.discovery.client.api.DiscoveryClient;
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
public class TestClassification {
public static void main(String[] args) throws Exception {
SimpleQuery query = queryFor(ServiceEndpoint.class);
query.addCondition("$resource/Profile/Category/text() eq 'BiodiversityRepository' and $resource/Profile/Name eq 'WoRMS' ");
ScopeProvider.instance.set("/gcube/devsec");
DiscoveryClient<ServiceEndpoint> client = clientFor(ServiceEndpoint.class);
List<ServiceEndpoint> resources = client.submit(query);
System.out.println(resources.size());
WormsPlugin a = new WormsPlugin();
if(resources.size() != 0) {
try {
a.initialize(resources.get(0));
} catch (Exception e) {
e.printStackTrace();
}
}
/*WormsPlugin.binding = (aphia.v1_0.AphiaNameServiceBindingStub)
new aphia.v1_0.AphiaNameServiceLocator().getAphiaNameServicePort();
*/
TaxonomyItem item = a.getClassificationInterface().retrieveTaxonById("1");
System.out.println("id: "+ item.getId() + " : " + item.getScientificName() + " - rank: " + item.getRank());
// // Test retrieveTaxaByScientificName
a.getClassificationInterface().searchByScientificName("biota", new ObjectWriter<TaxonomyItem>() {
@Override
public boolean isAlive() {
// TODO Auto-generated method stub
return true;
}
@Override
public boolean write(TaxonomyItem t) {
// System.out.println(t.getId() + " " + t.getScientificName() );
// System.out.println("SIZE " + t.getProperties().size());
// for ( ElementProperty ele : t.getProperties()) {
// System.out.println( ele.getName() + " - " + ele.getValue());
// }
while (t != null){
System.out.println(t.getId() + " " + t.getScientificName()+ " - rank: " + t.getRank());
System.out.println(t.getCitation());
System.out.println("**** " + t.getCredits());
t = t.getParent();
}
return false;
}
@Override
public boolean write(StreamException arg0) {
// TODO Auto-generated method stub
return false;
}
} );
//System.out.println(b.retrieveTaxonChildrenByTaxonId("274299"));
//
// LocalWrapper<String> wrap = new LocalWrapper<String>();
// wrap.add("273810");
// wrap.add("163034");
// wrap.add("305833");
// wrap.add("154712");
// wrap.add("323133");
// LocalReader<String> list = new LocalReader<String>(wrap);
// b.retrieveTaxonByIds(list, new Writer<TaxonomyItem>(null) {
//
// public boolean put(TaxonomyItem t) {
// System.out.println(t.getId());
// System.out.println(t);
// return false;
// }
//
// public void close() {
// //
//
// }
// } );
//
//
//
//
////
// b.getSynonymnsById(new ObjectWriter<TaxonomyItem>() {
//
// public boolean put(TaxonomyItem ri) {
//// System.out.println(ri.toString());
// System.out.println(ri.getScientificName());
// return true;
// }
//
// public void close() {
// System.out.println("************************");
// }
//
// @Override
// public boolean put(StreamException arg0) {
// // TODO Auto-generated method stub
// return false;
// }
// }, "319969"
// );
// }
// Test retrieveTaxonChildsByTaxonId
// System.out.println(b.retrieveTaxonChildsByTaxonId(126062+""));
}
}

@ -0,0 +1,75 @@
package org.gcube.data.spd.wormsplugin;
import static org.gcube.resources.discovery.icclient.ICFactory.clientFor;
import static org.gcube.resources.discovery.icclient.ICFactory.queryFor;
import java.util.List;
import javax.xml.rpc.ServiceException;
import org.gcube.common.resources.gcore.ServiceEndpoint;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.data.spd.model.exceptions.ExternalRepositoryException;
import org.gcube.data.spd.model.exceptions.StreamException;
import org.gcube.data.spd.plugin.fwk.writers.ObjectWriter;
import org.gcube.data.spd.wormsplugin.capabilities.ExpansionCapabilityImpl;
import org.gcube.resources.discovery.client.api.DiscoveryClient;
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
public class TestExpansionCapability {
/**
* @param args
* @throws ServiceException
* @throws ExternalRepositoryException
*/
public static void main(String[] args) throws ServiceException, ExternalRepositoryException {
SimpleQuery query = queryFor(ServiceEndpoint.class);
query.addCondition("$resource/Profile/Category/text() eq 'BiodiversityRepository' and $resource/Profile/Name eq 'WoRMS' ");
ScopeProvider.instance.set("/gcube/devsec");
DiscoveryClient<ServiceEndpoint> client = clientFor(ServiceEndpoint.class);
List<ServiceEndpoint> resources = client.submit(query);
System.out.println(resources.size());
WormsPlugin a = new WormsPlugin();
if(resources.size() != 0) {
try {
a.initialize(resources.get(0));
} catch (Exception e) {
e.printStackTrace();
}
}
WormsPlugin.binding = (aphia.v1_0.worms.AphiaNameServiceBindingStub)
new aphia.v1_0.worms.AphiaNameServiceLocator().getAphiaNameServicePort();
ExpansionCapabilityImpl b = new ExpansionCapabilityImpl();
b.getSynonyms(new ObjectWriter<String>() {
@Override
public boolean write(StreamException error) {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean write(String t) {
System.out.println(t);
return false;
}
@Override
public boolean isAlive() {
// TODO Auto-generated method stub
return true;
}
}, "sarda sarda");
}
}

@ -0,0 +1,52 @@
package org.gcube.data.spd.wormsplugin;
import static org.gcube.resources.discovery.icclient.ICFactory.clientFor;
import static org.gcube.resources.discovery.icclient.ICFactory.queryFor;
import java.util.List;
import java.util.Set;
import org.gcube.common.resources.gcore.ServiceEndpoint;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.data.spd.wormsplugin.capabilities.NamesMappingImpl;
import org.gcube.resources.discovery.client.api.DiscoveryClient;
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
public class TestMapping {
public static void main(String[] args) throws Exception {
SimpleQuery query = queryFor(ServiceEndpoint.class);
query.addCondition("$resource/Profile/Category/text() eq 'BiodiversityRepository' and $resource/Profile/Name eq 'WoRMS' ");
ScopeProvider.instance.set("/gcube/devsec");
DiscoveryClient<ServiceEndpoint> client = clientFor(ServiceEndpoint.class);
List<ServiceEndpoint> resources = client.submit(query);
System.out.println(resources.size());
WormsPlugin a = new WormsPlugin();
if(resources.size() != 0) {
try {
a.initialize(resources.get(0));
} catch (Exception e) {
e.printStackTrace();
}
}
WormsPlugin.binding = (aphia.v1_0.worms.AphiaNameServiceBindingStub)
new aphia.v1_0.worms.AphiaNameServiceLocator().getAphiaNameServicePort();
NamesMappingImpl b = new NamesMappingImpl();
// try {
// Set<String> c = b.scientificNameToCommonNamesMapping("Sarda");
// System.out.println("CommonName " + c.toString());
// } catch (Exception e) {
// e.printStackTrace();
// }
}
}
Loading…
Cancel
Save