git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@154606 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
40668380a8
commit
c68ba87d7c
|
@ -11,15 +11,18 @@ import org.apache.commons.httpclient.HttpClient;
|
||||||
import org.apache.commons.httpclient.methods.GetMethod;
|
import org.apache.commons.httpclient.methods.GetMethod;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
|
||||||
public class AlgorithmTest {
|
public class AlgorithmTest {
|
||||||
|
|
||||||
|
String protocol=null;
|
||||||
|
String hostname = null;
|
||||||
|
String token= null;
|
||||||
|
String layerID = null;
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void executeAlgorithmsFromFile() throws Exception{
|
public void executeAlgorithmsFromFile() throws Exception{
|
||||||
String protocol = "http";
|
|
||||||
String hostname = "dataminer1-pre.d4science.org";
|
|
||||||
String token = "a5b623b6-6577-4271-aba6-7ada687d29cf-98187548";
|
|
||||||
|
|
||||||
Iterator<String> uris = getUrisIterator();
|
Iterator<String> uris = getUrisIterator();
|
||||||
|
|
||||||
|
@ -31,14 +34,16 @@ public class AlgorithmTest {
|
||||||
if (nextLine.startsWith("#"))
|
if (nextLine.startsWith("#"))
|
||||||
algorithmName = nextLine;
|
algorithmName = nextLine;
|
||||||
else{
|
else{
|
||||||
String callUrl = nextLine.replace("{PROTOCOL}", protocol).replace("{HOST}", hostname).replace("{TOKEN}", token);
|
String callUrl = nextLine.replace("{PROTOCOL}", protocol).replace("{HOST}", hostname).replace("{TOKEN}", token).replace("{LAYERID}", layerID);
|
||||||
try{
|
try{
|
||||||
|
long start = System.currentTimeMillis();
|
||||||
URL url = new URL(callUrl);
|
URL url = new URL(callUrl);
|
||||||
URI uri = new URI(url.getProtocol(), url.getUserInfo(), url.getHost(), url.getPort(), url.getPath(), url.getQuery(), url.getRef());
|
URI uri = new URI(url.getProtocol(), url.getUserInfo(), url.getHost(), url.getPort(), url.getPath(), url.getQuery(), url.getRef());
|
||||||
GetMethod get = new GetMethod(uri.toString());
|
GetMethod get = new GetMethod(uri.toString());
|
||||||
client.executeMethod(get);
|
client.executeMethod(get);
|
||||||
if(get.getStatusCode()!=200)
|
if(get.getStatusCode()!=200)
|
||||||
System.out.println("algorithm "+algorithmName+" returned status "+get.getStatusCode()+" with url "+uri);
|
System.out.println("algorithm "+algorithmName+" returned status "+get.getStatusCode()+" with url "+uri);
|
||||||
|
else System.out.println("algorithm "+algorithmName+" worked in "+(System.currentTimeMillis()-start)+" millis");
|
||||||
} catch(Exception e){
|
} catch(Exception e){
|
||||||
System.out.println("invalid url");
|
System.out.println("invalid url");
|
||||||
}
|
}
|
||||||
|
@ -46,6 +51,8 @@ public class AlgorithmTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private Iterator<String> getUrisIterator() throws Exception{
|
private Iterator<String> getUrisIterator() throws Exception{
|
||||||
|
|
||||||
return new Iterator<String>(){
|
return new Iterator<String>(){
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=GetCapabilities&Service=WPS&gcube-token={TOKEN}
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=GetCapabilities&Service=WPS&gcube-token={TOKEN}
|
||||||
#ESRI_GRID_EXTRACTION
|
#ESRI_GRID_EXTRACTION
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&Version=1.0.0&gcube-token={TOKEN}&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.ESRI_GRID_EXTRACTION
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&Version=1.0.0&gcube-token={TOKEN}&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.ESRI_GRID_EXTRACTION
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.ESRI_GRID_EXTRACTION&DataInputs=Layer=fc9ac2f4-a2bd-43d1-a361-ac67c5ceac31;YResolution=0.5;XResolution=0.5;BBox_LowerLeftLong=-50;BBox_UpperRightLat=60;BBox_LowerLeftLat=-60;BBox_UpperRightLong=50;Z=0;TimeIndex=0;
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.ESRI_GRID_EXTRACTION&DataInputs=Layer={LAYERID};YResolution=0.5;XResolution=0.5;BBox_LowerLeftLong=-50;BBox_UpperRightLat=60;BBox_LowerLeftLat=-60;BBox_UpperRightLong=50;Z=0;TimeIndex=0;
|
||||||
#DBSCAN
|
#DBSCAN
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&Version=1.0.0&gcube-token={TOKEN}&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.clusterers.DBSCAN
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&Version=1.0.0&gcube-token={TOKEN}&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.clusterers.DBSCAN
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.clusterers.DBSCAN&DataInputs=OccurrencePointsClusterLabel=OccClustersTest;epsilon=10;min_points=1;OccurrencePointsTable={PROTOCOL}://goo.gl/VDzpch;FeaturesColumnNames=depthmean|sstmnmax|salinitymean;
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.clusterers.DBSCAN&DataInputs=OccurrencePointsClusterLabel=OccClustersTest;epsilon=10;min_points=1;OccurrencePointsTable={PROTOCOL}://goo.gl/VDzpch;FeaturesColumnNames=depthmean|sstmnmax|salinitymean;
|
||||||
|
@ -29,10 +29,10 @@
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.HCAF_FILTER&DataInputs=B_Box_Left_Lower_Lat=-17;B_Box_Right_Upper_Long=147;B_Box_Right_Upper_Lat=25;B_Box_Left_Lower_Long=89;Table_Label=wps_hcaf_filter;
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.HCAF_FILTER&DataInputs=B_Box_Left_Lower_Lat=-17;B_Box_Right_Upper_Long=147;B_Box_Right_Upper_Lat=25;B_Box_Left_Lower_Long=89;Table_Label=wps_hcaf_filter;
|
||||||
#MAX_ENT_NICHE_MODELLING
|
#MAX_ENT_NICHE_MODELLING
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&Version=1.0.0&gcube-token={TOKEN}&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.MAX_ENT_NICHE_MODELLING
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&Version=1.0.0&gcube-token={TOKEN}&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.MAX_ENT_NICHE_MODELLING
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.MAX_ENT_NICHE_MODELLING&DataInputs=LongitudeColumn=decimallongitude;LatitudeColumn=decimallatitude;Z=0;Layers=fc9ac2f4-a2bd-43d1-a361-ac67c5ceac31;TimeIndex=0;MaxIterations=100;SpeciesName=Latimeria%20chalumnae;DefaultPrevalence=0.5;YResolution=0.5;OccurrencesTable=http://goo.gl/5cnKKp;XResolution=0.5;OutputTableLabel=wps_maxent;
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.MAX_ENT_NICHE_MODELLING&DataInputs=LongitudeColumn=decimallongitude;LatitudeColumn=decimallatitude;Z=0;Layers={LAYERID};TimeIndex=0;MaxIterations=100;SpeciesName=Latimeria%20chalumnae;DefaultPrevalence=0.5;YResolution=0.5;OccurrencesTable=http://goo.gl/5cnKKp;XResolution=0.5;OutputTableLabel=wps_maxent;
|
||||||
#OCCURRENCE_ENRICHMENT
|
#OCCURRENCE_ENRICHMENT
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&Version=1.0.0&gcube-token={TOKEN}&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.OCCURRENCE_ENRICHMENT
|
#{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&Version=1.0.0&gcube-token={TOKEN}&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.OCCURRENCE_ENRICHMENT
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.OCCURRENCE_ENRICHMENT&DataInputs=OptionalFilter=%20;OutputTableName=wps_enriched;FeaturesNames=temp;OccurrenceTable=http://goo.gl/ZfFcfE;LongitudeColumn=decimallongitude;LatitudeColumn=decimallatitude;ScientificNameColumn=scientificname;Layers=fc9ac2f4-a2bd-43d1-a361-ac67c5ceac31;TimeColumn=eventdate;Resolution=0.5;
|
#{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.OCCURRENCE_ENRICHMENT&DataInputs=OptionalFilter=%20;OutputTableName=wps_enriched;FeaturesNames=temp;OccurrenceTable=http://goo.gl/ZfFcfE;LongitudeColumn=decimallongitude;LatitudeColumn=decimallatitude;ScientificNameColumn=scientificname;Layers={LAYERID};TimeColumn=eventdate;Resolution=0.5;
|
||||||
#PRESENCE_CELLS_GENERATION
|
#PRESENCE_CELLS_GENERATION
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&Version=1.0.0&gcube-token={TOKEN}&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.PRESENCE_CELLS_GENERATION
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&Version=1.0.0&gcube-token={TOKEN}&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.PRESENCE_CELLS_GENERATION
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.PRESENCE_CELLS_GENERATION&DataInputs=Number_of_Points=20;Table_Label=hcaf_filtered_wps;Species_Code=Fis-30189;
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.PRESENCE_CELLS_GENERATION&DataInputs=Number_of_Points=20;Table_Label=hcaf_filtered_wps;Species_Code=Fis-30189;
|
||||||
|
@ -92,13 +92,13 @@
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.evaluators.DISCREPANCY_ANALYSIS&DataInputs=ComparisonThreshold=0.1;SecondTable={PROTOCOL}://goo.gl/cXbg2n;FirstTable={PROTOCOL}://goo.gl/BBk8iB;KThreshold=0.5;MaxSamples=10000;FirstTableProbabilityColumn=probability;SecondTableProbabilityColumn=probability;FirstTableCsquareColumn=csquarecode;SecondTableCsquareColumn=csquarecode
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.evaluators.DISCREPANCY_ANALYSIS&DataInputs=ComparisonThreshold=0.1;SecondTable={PROTOCOL}://goo.gl/cXbg2n;FirstTable={PROTOCOL}://goo.gl/BBk8iB;KThreshold=0.5;MaxSamples=10000;FirstTableProbabilityColumn=probability;SecondTableProbabilityColumn=probability;FirstTableCsquareColumn=csquarecode;SecondTableCsquareColumn=csquarecode
|
||||||
#XYEXTRACTOR
|
#XYEXTRACTOR
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&Version=1.0.0&gcube-token={TOKEN}&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.XYEXTRACTOR
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&Version=1.0.0&gcube-token={TOKEN}&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.XYEXTRACTOR
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.XYEXTRACTOR&DataInputs=OutputTableLabel=wps_xy_extractor;Layer=fc9ac2f4-a2bd-43d1-a361-ac67c5ceac31;YResolution=0.5;XResolution=0.5;BBox_LowerLeftLong=-50;BBox_UpperRightLat=60;BBox_LowerLeftLat=-60;BBox_UpperRightLong=50;Z=0;TimeIndex=0;
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.XYEXTRACTOR&DataInputs=OutputTableLabel=wps_xy_extractor;Layer={LAYERID};YResolution=0.5;XResolution=0.5;BBox_LowerLeftLong=-50;BBox_UpperRightLat=60;BBox_LowerLeftLat=-60;BBox_UpperRightLong=50;Z=0;TimeIndex=0;
|
||||||
#TIMEEXTRACTION
|
#TIMEEXTRACTION
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&Version=1.0.0&gcube-token={TOKEN}&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.TIMEEXTRACTION
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&Version=1.0.0&gcube-token={TOKEN}&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.TIMEEXTRACTION
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.TIMEEXTRACTION&DataInputs=SamplingFreq=-1;X=28;Y=38;Z=0;Resolution=0.5;Layer=fc9ac2f4-a2bd-43d1-a361-ac67c5ceac31;OutputTableLabel=wps_time_extr
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.TIMEEXTRACTION&DataInputs=SamplingFreq=-1;X=28;Y=38;Z=0;Resolution=0.5;Layer={LAYERID};OutputTableLabel=wps_time_extr
|
||||||
#ZEXTRACTION
|
#ZEXTRACTION
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&Version=1.0.0&gcube-token={TOKEN}&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.ZEXTRACTION
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&Version=1.0.0&gcube-token={TOKEN}&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.ZEXTRACTION
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.ZEXTRACTION&DataInputs=OutputTableLabel=wps_z_extractor;Layer=fc9ac2f4-a2bd-43d1-a361-ac67c5ceac31;Resolution=100;Y=38;TimeIndex=0;X=28
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.ZEXTRACTION&DataInputs=OutputTableLabel=wps_z_extractor;Layer={LAYERID};Resolution=100;Y=38;TimeIndex=0;X=28
|
||||||
#XYEXTRACTOR_TABLE
|
#XYEXTRACTOR_TABLE
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&Version=1.0.0&gcube-token={TOKEN}&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.XYEXTRACTOR_TABLE
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&Version=1.0.0&gcube-token={TOKEN}&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.XYEXTRACTOR_TABLE
|
||||||
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.XYEXTRACTOR_TABLE&DataInputs=TimeIndex=0;Z=0;filter= ;zColumn=lme;timeColumn=lme;xColumn=centerlong;yColumn=centerlat;geoReferencedTableName={PROTOCOL}://goo.gl/KjWYQG;valueColumn=oceanarea;XResolution=0.5;YResolution=0.5;BBox_UpperRightLong=50;BBox_LowerLeftLat=-60;BBox_LowerLeftLong=-50;BBox_UpperRightLat=60;OutputTableLabel=wps_xy_extr_table;
|
{PROTOCOL}://{HOST}/wps/WebProcessingService?request=Execute&service=WPS&Version=1.0.0&gcube-token={TOKEN}&lang=en-US&Identifier=org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.XYEXTRACTOR_TABLE&DataInputs=TimeIndex=0;Z=0;filter= ;zColumn=lme;timeColumn=lme;xColumn=centerlong;yColumn=centerlat;geoReferencedTableName={PROTOCOL}://goo.gl/KjWYQG;valueColumn=oceanarea;XResolution=0.5;YResolution=0.5;BBox_UpperRightLong=50;BBox_LowerLeftLat=-60;BBox_LowerLeftLong=-50;BBox_UpperRightLat=60;OutputTableLabel=wps_xy_extr_table;
|
||||||
|
|
Loading…
Reference in New Issue