2017-05-09 18:38:15 +02:00
|
|
|
package org.gcube.dataanalysis.dataminer.poolmanager.util;
|
|
|
|
|
|
|
|
***REMOVED***
|
|
|
|
import org.gcube.dataanalysis.dataminer.poolmanager.process.AlgorithmPackageParser;
|
|
|
|
|
|
|
|
***REMOVED***
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by ggiammat on 5/9/17.
|
|
|
|
*/
|
|
|
|
public class AlgorithmBuilder ***REMOVED***
|
|
|
|
|
|
|
|
|
2017-07-05 17:50:42 +02:00
|
|
|
public static Algorithm create(String algorithmPackageURL) throws IOException, InterruptedException ***REMOVED***
|
|
|
|
return create(algorithmPackageURL, null, null, null, null, null, null, null);
|
2017-05-09 18:38:15 +02:00
|
|
|
***REMOVED***
|
|
|
|
|
|
|
|
public static Algorithm create(String algorithmPackageURL, String vre, String hostname, String name, String description,
|
|
|
|
String category, String algorithmType, String skipJava) throws IOException, InterruptedException ***REMOVED***
|
2017-05-12 17:32:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
Algorithm algo = new AlgorithmPackageParser().parsePackage(algorithmPackageURL);
|
2017-05-09 18:38:15 +02:00
|
|
|
|
|
|
|
|
|
|
|
if(category != null)***REMOVED***
|
|
|
|
algo.setCategory(category);
|
|
|
|
***REMOVED***
|
2017-05-10 11:31:28 +02:00
|
|
|
if(algorithmType != null)***REMOVED***
|
|
|
|
algo.setAlgorithmType(algorithmType);
|
|
|
|
***REMOVED***
|
|
|
|
if(skipJava != null)***REMOVED***
|
|
|
|
algo.setSkipJava(skipJava);
|
|
|
|
***REMOVED***
|
|
|
|
if(skipJava != null)***REMOVED***
|
|
|
|
algo.setSkipJava(skipJava);
|
|
|
|
***REMOVED***
|
|
|
|
if(name != null)***REMOVED***
|
|
|
|
algo.setName(name);
|
|
|
|
***REMOVED***
|
|
|
|
if(description != null)***REMOVED***
|
|
|
|
algo.setDescription(description);
|
|
|
|
***REMOVED***
|
|
|
|
|
2017-05-09 18:38:15 +02:00
|
|
|
return algo;
|
|
|
|
***REMOVED***
|
|
|
|
|
|
|
|
***REMOVED***
|