diff --git a/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/ClusterersFactory.java b/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/ClusterersFactory.java index e2f041e..f995203 100644 --- a/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/ClusterersFactory.java +++ b/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/ClusterersFactory.java @@ -24,6 +24,11 @@ public class ClusterersFactory { return inputs; } + public static String getDescription(String configPath, String algorithmName) throws Exception{ + String input = ProcessorsFactory.getDescription(configPath + AlgorithmConfiguration.clusterersFile, algorithmName); + return input; + } + public static List getClusterers(AlgorithmConfiguration config) throws Exception { List clusterers = new ArrayList(); clusterers.add(getClusterer(config)); diff --git a/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/EvaluatorsFactory.java b/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/EvaluatorsFactory.java index 5258f5e..8477e02 100644 --- a/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/EvaluatorsFactory.java +++ b/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/EvaluatorsFactory.java @@ -25,6 +25,11 @@ public class EvaluatorsFactory { return inputs; } + public static String getDescription(String configPath, String algorithmName) throws Exception{ + String input = ProcessorsFactory.getDescription(configPath + AlgorithmConfiguration.evaluatorsFile, algorithmName); + return input; + } + public static List getEvaluators(AlgorithmConfiguration config) throws Exception { List evaluators = new ArrayList(); evaluators.add(getEvaluator(config)); diff --git a/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/GeneratorsFactory.java b/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/GeneratorsFactory.java index e687cf0..9a3069c 100644 --- a/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/GeneratorsFactory.java +++ b/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/GeneratorsFactory.java @@ -66,7 +66,10 @@ public class GeneratorsFactory { return gens; } - + public static String getDescription(String configPath, String algorithmName) throws Exception{ + String input = ProcessorsFactory.getDescription(configPath + AlgorithmConfiguration.algorithmsFile, algorithmName); + return input; + } public static List getAlgorithmParameters(String configPath, String algorithmName) throws Exception{ List inputs = ProcessorsFactory.getParameters(configPath + AlgorithmConfiguration.algorithmsFile, algorithmName); diff --git a/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/ModelersFactory.java b/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/ModelersFactory.java index 9c0387b..907f272 100644 --- a/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/ModelersFactory.java +++ b/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/ModelersFactory.java @@ -35,6 +35,10 @@ public class ModelersFactory { return inputs; } + public static String getDescription(String configPath, String algorithmName) throws Exception{ + String input = ProcessorsFactory.getDescription(configPath + AlgorithmConfiguration.modelsFile, algorithmName); + return input; + } public static List getModelers(AlgorithmConfiguration config) throws Exception { diff --git a/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/TransducerersFactory.java b/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/TransducerersFactory.java index 28dc363..39b71e0 100644 --- a/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/TransducerersFactory.java +++ b/src/main/java/org/gcube/dataanalysis/ecoengine/processing/factories/TransducerersFactory.java @@ -25,6 +25,11 @@ public class TransducerersFactory { return inputs; } + public static String getDescription(String configPath, String algorithmName) throws Exception{ + String input = ProcessorsFactory.getDescription(configPath + AlgorithmConfiguration.transducererFile, algorithmName); + return input; + } + public static List getTransducerers(AlgorithmConfiguration config) throws Exception { List clusterers = new ArrayList(); clusterers.add(getTransducerer(config)); diff --git a/src/main/java/org/gcube/dataanalysis/ecoengine/test/TestsMetaInfo.java b/src/main/java/org/gcube/dataanalysis/ecoengine/test/TestsMetaInfo.java index d4a59e2..68ee99f 100644 --- a/src/main/java/org/gcube/dataanalysis/ecoengine/test/TestsMetaInfo.java +++ b/src/main/java/org/gcube/dataanalysis/ecoengine/test/TestsMetaInfo.java @@ -25,8 +25,9 @@ public class TestsMetaInfo { public static void main(String[] args) throws Exception { System.out.println("***TEST 1 - Get Generation Algorithm Parameters***"); - List map = GeneratorsFactory.getAlgorithmParameters("./cfg/","DUMMY"); - System.out.println("input for DUMMY algorithm: "+map); + List map; +// List map = GeneratorsFactory.getAlgorithmParameters("./cfg/","DUMMY"); +// System.out.println("input for DUMMY algorithm: "+map); map = GeneratorsFactory.getAlgorithmParameters("./cfg/","AQUAMAPS_SUITABLE"); System.out.println("input for AQUAMAPS_SUITABLE algorithm: "+map); @@ -78,19 +79,24 @@ public static void main(String[] args) throws Exception { System.out.println("Clusterers Params: "+map); System.out.println("\n***TEST 15- Get Clusterers with a config***"); - List clus = ClusterersFactory.getClusterers(testConfigClusterer()); - System.out.println("Clusterers list: "+clus); +// List clus = ClusterersFactory.getClusterers(testConfigClusterer()); +// System.out.println("Clusterers list: "+clus); System.out.println("\n***TEST 16- Get All Transducerers***"); System.out.println("All Transducers: "+TransducerersFactory.getAllTransducerers("./cfg/")); System.out.println("\n***TEST 17- Get Transducerers Parameters ***"); - map = TransducerersFactory.getTransducerParameters("./cfg/","TESTTRANS"); + map = TransducerersFactory.getTransducerParameters("./cfg/","BIOCLIMATE_HSPEC"); System.out.println("Transducerers Params: "+map); System.out.println("\n***TEST 18- Get Transducerers with a config***"); - List trans = TransducerersFactory.getTransducerers(testConfigTrans()); - System.out.println("Transducerers list: "+trans); +// List trans = TransducerersFactory.getTransducerers(testConfigTrans()); +// System.out.println("Transducerers list: "+trans); + + + System.out.println("\n***TEST 19- Get Agent Description***"); + String desc = ClusterersFactory.getDescription("./cfg/","DBSCAN"); + System.out.println("DESCRIPTION: "+desc); int cores = Runtime.getRuntime().availableProcessors(); System.out.println("Number of cores: "+cores);