Updated Boolean support
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/data-miner-manager-cl@134519 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
aa26b7fc9d
commit
7cda53e606
|
@ -70,7 +70,7 @@ public abstract class SClient implements Serializable{
|
|||
throws Exception;
|
||||
|
||||
/**
|
||||
* Cance a computation
|
||||
* Cancel a computation
|
||||
*
|
||||
* @param computationId computation Id
|
||||
* @return
|
||||
|
|
|
@ -190,9 +190,15 @@ public class WPS2DM {
|
|||
guessPrimitiveType(guessedType), defaultValue);
|
||||
}
|
||||
|
||||
} else
|
||||
converted = new ListParameter(id, title, String.class.getName(),
|
||||
} else {
|
||||
if(guessedType.compareTo(Boolean.class.getName())==0){
|
||||
converted = new ObjectParameter(id, title, guessedType, defaultValue);
|
||||
} else {
|
||||
converted = new ListParameter(id, title, String.class.getName(),
|
||||
SEPARATOR);
|
||||
}
|
||||
|
||||
}
|
||||
return converted;
|
||||
}
|
||||
|
||||
|
@ -401,9 +407,14 @@ public class WPS2DM {
|
|||
}
|
||||
if (values.length > 1) {
|
||||
ObjectParameter conv = (ObjectParameter) converted;
|
||||
converted = new EnumParameter(conv.getName(),
|
||||
conv.getDescription(), enumValues,
|
||||
conv.getDefaultValue());
|
||||
if (conv.getType() != null
|
||||
&& !conv.getType().isEmpty()
|
||||
&& conv.getType().compareToIgnoreCase(
|
||||
Boolean.class.getName()) != 0){
|
||||
converted = new EnumParameter(conv.getName(),
|
||||
conv.getDescription(), enumValues,
|
||||
conv.getDefaultValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (wpsType.isSetComplexData()) {
|
||||
|
@ -525,6 +536,9 @@ public class WPS2DM {
|
|||
return Long.class.getName();
|
||||
else if (typeS.contains("short"))
|
||||
return Short.class.getName();
|
||||
else if (typeS.contains("boolean"))
|
||||
return Boolean.class.getName();
|
||||
|
||||
}
|
||||
|
||||
return String.class.getName();
|
||||
|
@ -538,6 +552,7 @@ public class WPS2DM {
|
|||
}
|
||||
|
||||
public static String guessPrimitiveType(String type) {
|
||||
|
||||
if (type.equals(Integer.class.getName())) {
|
||||
return Integer.class.getName();
|
||||
} else if (type.equals(String.class.getName())) {
|
||||
|
|
|
@ -19,7 +19,7 @@ public class Resource implements Serializable {
|
|||
private static final long serialVersionUID = 1417885805472591661L;
|
||||
|
||||
public enum ResourceType {
|
||||
OBJECT, FILE, TABULAR, MAP, IMAGE, ERROR
|
||||
OBJECT, FILE, TABULAR, MAP, IMAGE
|
||||
};
|
||||
|
||||
private String resourceId, name, description;
|
||||
|
@ -128,9 +128,7 @@ public class Resource implements Serializable {
|
|||
return this.resourceType == ResourceType.IMAGE;
|
||||
}
|
||||
|
||||
public boolean isError() {
|
||||
return this.resourceType == ResourceType.ERROR;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
|
|
@ -160,11 +160,12 @@ public class BionymLocalTest extends TestCase {
|
|||
parserName.setName("Parser_Name");
|
||||
parserName.setValue("SIMPLE");
|
||||
|
||||
EnumParameter activatePreparsingProcessing=new EnumParameter();
|
||||
ObjectParameter activatePreparsingProcessing = new ObjectParameter();
|
||||
activatePreparsingProcessing.setName("Activate_Preparsing_Processing");
|
||||
activatePreparsingProcessing.setValue("true");
|
||||
|
||||
EnumParameter useStemmedGenusAndSpecies=new EnumParameter();
|
||||
|
||||
ObjectParameter useStemmedGenusAndSpecies=new ObjectParameter();
|
||||
useStemmedGenusAndSpecies.setName("Use_Stemmed_Genus_and_Species");
|
||||
useStemmedGenusAndSpecies.setValue("false");
|
||||
|
||||
|
|
Loading…
Reference in New Issue