This commit is contained in:
Lucio Lelii 2017-10-20 16:09:45 +00:00
parent 7f7e27316b
commit abdcc0d4cc
6 changed files with 20 additions and 34 deletions

View File

@ -119,7 +119,7 @@ public class FileTools {
out.close();
}
} catch (IOException e) {
throw new Exception("The system can not write in " + filename + " because:\n" + e.getMessage());
throw new Exception("The system can not write in " + filename,e);
}
}

View File

@ -0,0 +1,16 @@
package org.gcube.dataanalysis.ecoengine.interfaces;
import java.util.List;
import org.gcube.dataanalysis.ecoengine.datatypes.StatisticalType;
public interface AlgorithmDescriptor {
//gets the description of the algorithm
public String getDescription();
//set the input parameters for this generator
public List<StatisticalType> getInputParameters();
public StatisticalType getOutput();
}

View File

@ -6,10 +6,7 @@ import org.gcube.dataanalysis.ecoengine.configuration.AlgorithmConfiguration;
import org.gcube.dataanalysis.ecoengine.configuration.INFRASTRUCTURE;
import org.gcube.dataanalysis.ecoengine.datatypes.StatisticalType;
public interface ComputationalAgent {
//set the input parameters for this generator
public List<StatisticalType> getInputParameters();
public interface ComputationalAgent extends AlgorithmDescriptor {
public String getResourceLoad();
@ -20,16 +17,12 @@ public interface ComputationalAgent {
//gets the weight of the generator: according to this the generator will be placed in the execution order
public INFRASTRUCTURE getInfrastructure();
// gets the content of the model: e.g. Table indications etc.
public StatisticalType getOutput();
public void init() throws Exception;
public void setConfiguration(AlgorithmConfiguration config);
public void shutdown();
public String getDescription();
public void compute() throws Exception;

View File

@ -1,11 +1,8 @@
package org.gcube.dataanalysis.ecoengine.interfaces;
import java.util.List;
import org.gcube.dataanalysis.ecoengine.configuration.ALG_PROPS;
import org.gcube.dataanalysis.ecoengine.datatypes.StatisticalType;
public interface GenericAlgorithm {
public interface GenericAlgorithm extends AlgorithmDescriptor {
//defines the properties of this algorithm
public ALG_PROPS[] getProperties();
@ -13,12 +10,4 @@ public interface GenericAlgorithm {
//defines the name of this algorithm
public String getName();
//gets the description of the algorithm
public String getDescription();
//set the input parameters for this generator
public List<StatisticalType> getInputParameters();
public StatisticalType getOutput();
}

View File

@ -1,23 +1,14 @@
package org.gcube.dataanalysis.ecoengine.interfaces;
import java.util.List;
import org.gcube.dataanalysis.ecoengine.configuration.ALG_PROPS;
import org.gcube.dataanalysis.ecoengine.configuration.AlgorithmConfiguration;
import org.gcube.dataanalysis.ecoengine.datatypes.StatisticalType;
public interface Model {
public interface Model extends AlgorithmDescriptor{
public ALG_PROPS[] getProperties();
public String getName();
//gets the description of the model
public String getDescription();
//set the input parameters for this generator
public List<StatisticalType> getInputParameters();
public float getVersion();
public void setVersion(float version);
@ -36,5 +27,4 @@ public interface Model {
public void stop();
public StatisticalType getOutput();
}

View File

@ -1,8 +1,6 @@
package org.gcube.dataanalysis.ecoengine.interfaces;
import org.gcube.dataanalysis.ecoengine.configuration.ALG_PROPS;
import org.gcube.dataanalysis.ecoengine.configuration.AlgorithmConfiguration;
import org.gcube.dataanalysis.ecoengine.configuration.INFRASTRUCTURE;
public interface Modeler extends ComputationalAgent{