How-to Implement Algorithms for the Statistical Manager

From Gcube Wiki
Revision as of 11:15, 21 June 2013 by Angela.italiano (Talk | contribs)

Jump to: navigation, search

Prerequisites

IDE: Eclipse Java EE IDE for Web Developers. Version: 3.7+

Step by Step

Let's start creating a project using the eclipse IDE that is mavenized. After having mavenized the project in eclipse you have to put dependencies.

Step by Step

The maven artifact coordinates are:

<dependency>
	<groupId>org.gcube.dataanalysis</groupId>
	<artifactId>ecological-engine</artifactId>
	<version>1.6.1-SNAPSHOT</version>
</dependency>

Let's start creating a new call which implements basic algorithm; it will be executed by Statistical Manager. Next step is to extend basic interface StandardLocalExternalAlgorithm. The following snippet shows unimplemented interface methods that we are going to fulfill.

public class SimpleAlgorithm extends StandardLocalExternalAlgorithm{
 
	@Override
	public void init() throws Exception {
		// TODO Auto-generated method stub		
	}
	@Override
	public String getDescription() {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	protected void process() throws Exception {
		// TODO Auto-generated method stub
 
	}
	@Override
	protected void setInputParameters() {
		// TODO Auto-generated method stub
 
	}
	@Override
	public void shutdown() {
		// TODO Auto-generated method stub		
	}
	@Override
	public StatisticalType getOutput() {
		return null;
	}
}