dataminer-pool-manager/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/AlgorithmBuilder.java

48 lines
1.4 KiB
Java
Executable File

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***
public static Algorithm create(String algorithmPackageURL) throws IOException, InterruptedException ***REMOVED***
return create(algorithmPackageURL, null, null, null, null, null, null, null);
***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***
Algorithm algo = new AlgorithmPackageParser().parsePackage(algorithmPackageURL);
if(category != null)***REMOVED***
algo.setCategory(category);
***REMOVED***
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***
return algo;
***REMOVED***
***REMOVED***