git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngine@59113 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
6bf14fd823
commit
2166ea5b3c
|
@ -39,6 +39,34 @@ public class ProcessorsFactory {
|
|||
return algs;
|
||||
}
|
||||
|
||||
|
||||
public static String getDescription(String file, String algorithmName) throws Exception {
|
||||
|
||||
Properties p = AlgorithmConfiguration.getProperties(file);
|
||||
String algorithmclass = p.getProperty(algorithmName);
|
||||
Object algclass = Class.forName(algorithmclass).newInstance();
|
||||
// if the algorithm is a generator itself then take it
|
||||
if (algclass instanceof Generator) {
|
||||
return ((Generator) algclass).getDescription();
|
||||
} else if (algclass instanceof Modeler) {
|
||||
return ((Modeler) algclass).getDescription();
|
||||
} else if (algclass instanceof Model) {
|
||||
return ((Model) algclass).getDescription();
|
||||
}
|
||||
else if (algclass instanceof Evaluator) {
|
||||
return ((Evaluator) algclass).getDescription();
|
||||
}
|
||||
else if (algclass instanceof Clusterer) {
|
||||
return ((Clusterer) algclass).getDescription();
|
||||
}
|
||||
else if (algclass instanceof Transducerer) {
|
||||
return ((Transducerer) algclass).getDescription();
|
||||
}
|
||||
else
|
||||
return ((SpatialProbabilityDistribution) algclass).getDescription();
|
||||
|
||||
}
|
||||
|
||||
public static List<StatisticalType> getParameters(String file, String algorithmName) throws Exception {
|
||||
|
||||
Properties p = AlgorithmConfiguration.getProperties(file);
|
||||
|
|
Loading…
Reference in New Issue