git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngineExternalAlgorithms@71700 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
6f335c73e3
commit
27ab27035b
|
@ -8,8 +8,10 @@ import java.util.Map;
|
|||
import org.gcube.contentmanagement.lexicalmatcher.utils.AnalysisLogger;
|
||||
import org.gcube.dataanalysis.ecoengine.configuration.AlgorithmConfiguration;
|
||||
import org.gcube.dataanalysis.ecoengine.configuration.INFRASTRUCTURE;
|
||||
import org.gcube.dataanalysis.ecoengine.datatypes.DatabaseType;
|
||||
import org.gcube.dataanalysis.ecoengine.datatypes.PrimitiveType;
|
||||
import org.gcube.dataanalysis.ecoengine.datatypes.StatisticalType;
|
||||
import org.gcube.dataanalysis.ecoengine.datatypes.enumtypes.DatabaseParameters;
|
||||
import org.gcube.dataanalysis.ecoengine.datatypes.enumtypes.PrimitiveTypes;
|
||||
import org.gcube.dataanalysis.ecoengine.interfaces.Transducerer;
|
||||
import org.gcube.dataanalysis.ecoengine.utils.ResourceFactory;
|
||||
|
@ -26,6 +28,15 @@ public abstract class StandardLocalExternalAlgorithm implements Transducerer {
|
|||
inputs.add(new PrimitiveType(Enum.class.getName(), itemsList, PrimitiveTypes.ENUMERATED, name, description, defaultvalue));
|
||||
}
|
||||
|
||||
protected void addRemoteDatabaseInput(String name, String urlParameterName, String userParameterName, String passwordParameterName) {
|
||||
inputs.add(new DatabaseType(DatabaseParameters.REMOTEDATABASERRNAME,name,"RR name"));
|
||||
inputs.add(new DatabaseType(DatabaseParameters.REMOTEDATABASEURL,urlParameterName,"RR name"));
|
||||
inputs.add(new DatabaseType(DatabaseParameters.REMOTEDATABASEUSERNAME,name,"RR name"));
|
||||
inputs.add(new DatabaseType(DatabaseParameters.REMOTEDATABASEPASSWORD,name,"RR name"));
|
||||
inputs.add(new DatabaseType(DatabaseParameters.REMOTEDATABASEDRIVER,name,"RR name"));
|
||||
inputs.add(new DatabaseType(DatabaseParameters.REMOTEDATABASEDIALECT,name,"RR name"));
|
||||
}
|
||||
|
||||
protected void addStringInput(String name, String description, String defaultvalue) {
|
||||
inputs.add(new PrimitiveType(String.class.getName(), null, PrimitiveTypes.STRING, name, description, defaultvalue));
|
||||
}
|
||||
|
|
|
@ -32,7 +32,12 @@ public class TaxaMatchTransducer extends StandardLocalExternalAlgorithm {
|
|||
String species = getInputParameter(Species);
|
||||
String genusOperator = getInputParameter(GenusOperator);
|
||||
String speciesOperator = getInputParameter(SpeciesOperator);
|
||||
|
||||
/*
|
||||
String databaseIP = "biodiversity.db.i-marine.research-infrastructures.eu";
|
||||
String databaseUser = "postgres";
|
||||
String databasePwd = "0b1s@d4sc13nc3";
|
||||
String databaseName = "fishbase";
|
||||
*/
|
||||
String databaseIP = "biodiversity.db.i-marine.research-infrastructures.eu";
|
||||
String databaseUser = "postgres";
|
||||
String databasePwd = "0b1s@d4sc13nc3";
|
||||
|
@ -76,6 +81,7 @@ public class TaxaMatchTransducer extends StandardLocalExternalAlgorithm {
|
|||
addStringInput(Species, "Species", "morhua");
|
||||
addEnumerateInput(operators.values(), GenusOperator, "Comparison Operator for Genus", "" + operators.EQUAL);
|
||||
addEnumerateInput(operators.values(), SpeciesOperator, "Comparison Operator for Species", "" + operators.EQUAL);
|
||||
// addRemoteDatabaseInput("FishBase");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue