53 lines
1.6 KiB
Java
53 lines
1.6 KiB
Java
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***
|
|
|
|
***REMOVED***FIXME: do the same done for category
|
|
if (algo.getAlgorithmType() == null) ***REMOVED***
|
|
algo.setAlgorithmType(algorithmType);
|
|
***REMOVED*** else
|
|
algo.setAlgorithmType(algo.getCategory());
|
|
|
|
if (algo.getSkipJava() == null) ***REMOVED***
|
|
algo.setSkipJava(skipJava);
|
|
***REMOVED*** else
|
|
algo.setSkipJava(algo.getSkipJava());
|
|
|
|
if (algo.getName() == null) ***REMOVED***
|
|
algo.setName(name);
|
|
***REMOVED*** else
|
|
algo.setName(algo.getName());
|
|
|
|
if (algo.getDescription() == null) ***REMOVED***
|
|
algo.setDescription(description);
|
|
;
|
|
***REMOVED*** else
|
|
algo.setDescription(algo.getDescription());
|
|
|
|
return algo;
|
|
***REMOVED***
|
|
|
|
***REMOVED***
|