diff --git a/README.md b/README.md index 40c2dc02..182b921c 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ### Docker -You must install [Docker](https://www.docker.com/) and [docker-compose](https://docs.docker.com/compose/install/). +You must install [Docker](https://www.docker.com/) and [docker-compose](https://docs.docker.com/compose/install/). Clone the repository diff --git a/docs/configuration.md b/docs/configuration.md index d48b2dbf..99010d6e 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -82,3 +82,46 @@ execution = } } ``` + +## Publisher + +The publisher section of the configuration file describes how the Wings system shares data, execution, and provenance. The following properties are available: + +``` + publisher = + { + file-store= + { + url = "https://publisher.mint.isi.edu"; + type = "FILE_SYSTEM"; + } + triple-store = { + export-name = "exportTest"; + export-url = "https://opmw.org/"; + publish = https://endpoint.mint.isi.edu/provenance/data; + query = https://endpoint.mint.isi.edu/provenance/query; + domains-directory = /opt/wings/storage/default; + } + } +``` + +### File store + +The file store section of the configuration file describes how the Wings system shares data. The following properties are available: + +| Name | Description | Default Value | +| ------------------------- | --------------------------------- | ------------- | +| publisher.file-store.url | URI where the files are published | | +| publisher.file-store.type | Type of file store (FILE_SYSTEM) | FILE_SYSTEM | + +### Triple store + +The triple store section of the configuration file describes how the Wings system shares execution and provenance. The following properties are available: + +| Name | Description | Default Value | +| ---------------------------------------- | -------------------------------------- | ---------------------------------------------- | +| publisher.triple-store.export-name | Name of the export (exportTest) | exportTest | +| publisher.triple-store.export-url | URI where the files are published | https://opmw.org/ | +| publisher.triple-store.publish | URI where the provenance is published | https://endpoint.mint.isi.edu/provenance/data | +| publisher.triple-store.query | URI where the provenance is queried | https://endpoint.mint.isi.edu/provenance/query | +| publisher.triple-store.domains-directory | Directory where the domains are stored | /opt/wings/storage/default | diff --git a/engines/oodt/adapter/src/main/java/edu/isi/wings/catalog/component/api/impl/oodt/ComponentCreationFM.java b/engines/oodt/adapter/src/main/java/edu/isi/wings/catalog/component/api/impl/oodt/ComponentCreationFM.java index bcaae829..e8bd7734 100644 --- a/engines/oodt/adapter/src/main/java/edu/isi/wings/catalog/component/api/impl/oodt/ComponentCreationFM.java +++ b/engines/oodt/adapter/src/main/java/edu/isi/wings/catalog/component/api/impl/oodt/ComponentCreationFM.java @@ -68,10 +68,14 @@ public class ComponentCreationFM implements ComponentCreationAPI { OntFactory ontologyFactory; - private static HashMap compHolders = - new HashMap(); - private static HashMap compMeta = - new HashMap(); + private static HashMap compHolders = new HashMap< + String, + String + >(); + private static HashMap compMeta = new HashMap< + String, + Metadata + >(); public ComponentCreationFM(Properties props) { this.fmurl = props.getProperty("oodt.fmurl"); @@ -102,8 +106,10 @@ public ComponentTree getComponentHierarchy(boolean details) { String rootid = this.absurl + "#Component"; ComponentHolder rootholder = new ComponentHolder(rootid); ComponentTreeNode rootnode = new ComponentTreeNode(rootholder); - HashMap tnmap = - new HashMap(); + HashMap tnmap = new HashMap< + String, + ComponentTreeNode + >(); HashMap pmap = this.curatorApi.getParentTypeMap(); try { for (ProductType ptype : this.fmclient.getProductTypes()) { diff --git a/engines/oodt/adapter/src/main/java/edu/isi/wings/catalog/data/api/impl/oodt/DataCreationFM.java b/engines/oodt/adapter/src/main/java/edu/isi/wings/catalog/data/api/impl/oodt/DataCreationFM.java index 712f3f65..30658317 100644 --- a/engines/oodt/adapter/src/main/java/edu/isi/wings/catalog/data/api/impl/oodt/DataCreationFM.java +++ b/engines/oodt/adapter/src/main/java/edu/isi/wings/catalog/data/api/impl/oodt/DataCreationFM.java @@ -59,8 +59,10 @@ public class DataCreationFM implements DataCreationAPI { String liburl; String onturl; - private static HashMap prodTypes = - new HashMap(); + private static HashMap prodTypes = new HashMap< + String, + String + >(); public DataCreationFM(Properties props) { this.fmurl = props.getProperty("oodt.fmurl"); diff --git a/engines/oodt/adapter/src/main/java/edu/isi/wings/execution/engine/api/impl/oodt/OODTExecutionEngine.java b/engines/oodt/adapter/src/main/java/edu/isi/wings/execution/engine/api/impl/oodt/OODTExecutionEngine.java index 5d558aee..e59427cf 100644 --- a/engines/oodt/adapter/src/main/java/edu/isi/wings/execution/engine/api/impl/oodt/OODTExecutionEngine.java +++ b/engines/oodt/adapter/src/main/java/edu/isi/wings/execution/engine/api/impl/oodt/OODTExecutionEngine.java @@ -242,8 +242,10 @@ public ExecutionMonitoringThread( public void run() { planexe.onStart(this.logger); try { - HashMap jobstatus = - new HashMap(); + HashMap jobstatus = new HashMap< + String, + RuntimeInfo.Status + >(); int osleeptime = 1000; int maxsleeptime = 4 * osleeptime; diff --git a/engines/oodt/adapter/src/main/java/edu/isi/wings/execution/engine/api/impl/oodt/OODTWorkflowAdapter.java b/engines/oodt/adapter/src/main/java/edu/isi/wings/execution/engine/api/impl/oodt/OODTWorkflowAdapter.java index 080b5236..9158270a 100644 --- a/engines/oodt/adapter/src/main/java/edu/isi/wings/execution/engine/api/impl/oodt/OODTWorkflowAdapter.java +++ b/engines/oodt/adapter/src/main/java/edu/isi/wings/execution/engine/api/impl/oodt/OODTWorkflowAdapter.java @@ -80,8 +80,10 @@ public OODTWorkflowAdapter( public Workflow runWorkflow(RuntimePlan planexe, Metadata meta) throws Exception { // Get List of all Jobs - HashMap tasksById = - new HashMap(); + HashMap tasksById = new HashMap< + String, + WorkflowTask + >(); HashMap opProducers = new HashMap(); HashMap taskJobs = new HashMap(); for (RuntimeStep stepexe : planexe.getQueue().getAllSteps()) { @@ -117,8 +119,10 @@ public Workflow runWorkflow(RuntimePlan planexe, Metadata meta) } // Get Parent Child Relationship between jobs - HashMap> parents = - new HashMap>(); + HashMap> parents = new HashMap< + String, + ArrayList + >(); for (RuntimeStep stepexe : planexe.getQueue().getAllSteps()) { ExecutionStep step = stepexe.getStep(); ArrayList chparents = parents.get(stepexe.getName()); @@ -132,8 +136,10 @@ public Workflow runWorkflow(RuntimePlan planexe, Metadata meta) } // Arrange Jobs into Job Levels - TreeMap> jobLevels = - new TreeMap>(); + TreeMap> jobLevels = new TreeMap< + Integer, + ArrayList + >(); for (String jobid : tasksById.keySet()) { Integer lvl = new Integer(getJobLevel(jobid, 0, parents)); ArrayList lvljobs; diff --git a/engines/oodt/adapter/src/main/java/edu/isi/wings/util/oodt/CurationServiceAPI.java b/engines/oodt/adapter/src/main/java/edu/isi/wings/util/oodt/CurationServiceAPI.java index b4e92b0a..8f37d09d 100644 --- a/engines/oodt/adapter/src/main/java/edu/isi/wings/util/oodt/CurationServiceAPI.java +++ b/engines/oodt/adapter/src/main/java/edu/isi/wings/util/oodt/CurationServiceAPI.java @@ -49,10 +49,10 @@ private String query(String method, String op, Object... args) { String params = "policy=" + URLEncoder.encode(this.policy, "UTF-8"); for (int i = 0; i < args.length; i += 2) { params += - "&" + - args[i] + - "=" + - URLEncoder.encode(args[i + 1].toString(), "UTF-8"); + "&" + + args[i] + + "=" + + URLEncoder.encode(args[i + 1].toString(), "UTF-8"); } URL urlobj = new URL(url); @@ -117,7 +117,7 @@ public boolean addElementsForProductType( ) { String elementIds = ""; for (Element element : elementList) elementIds += - (elementIds != "" ? "," : "") + element.getElementId(); + (elementIds != "" ? "," : "") + element.getElementId(); String result = this.query( "POST", @@ -169,7 +169,7 @@ public boolean removeElementsForProductType( ) { String elementIds = ""; for (Element element : elementList) elementIds += - (elementIds != "" ? "," : "") + element.getElementId(); + (elementIds != "" ? "," : "") + element.getElementId(); String result = this.query( "DELETE", diff --git a/engines/oodt/wmservices/src/main/java/org/apache/oodt/cas/wmservices/client/WmServicesClient.java b/engines/oodt/wmservices/src/main/java/org/apache/oodt/cas/wmservices/client/WmServicesClient.java index 4f46b3e2..5a44cfc8 100644 --- a/engines/oodt/wmservices/src/main/java/org/apache/oodt/cas/wmservices/client/WmServicesClient.java +++ b/engines/oodt/wmservices/src/main/java/org/apache/oodt/cas/wmservices/client/WmServicesClient.java @@ -116,7 +116,7 @@ private String query(String method, String op, Object... args) { for (int i = 0; i < args.length; i += 2) { if (i > 0) params += "&"; params += - args[i] + "=" + URLEncoder.encode(args[i + 1].toString(), "UTF-8"); + args[i] + "=" + URLEncoder.encode(args[i + 1].toString(), "UTF-8"); } if ("GET".equals(method)) { URL urlobj = new URL(url + "?" + params); diff --git a/planner/src/main/java/edu/isi/wings/catalog/component/api/impl/kb/ComponentCreationKB.java b/planner/src/main/java/edu/isi/wings/catalog/component/api/impl/kb/ComponentCreationKB.java index e0d75d34..c9355384 100644 --- a/planner/src/main/java/edu/isi/wings/catalog/component/api/impl/kb/ComponentCreationKB.java +++ b/planner/src/main/java/edu/isi/wings/catalog/component/api/impl/kb/ComponentCreationKB.java @@ -306,9 +306,9 @@ protected boolean incrementComponentVersion(String cid, KBAPI writerkb) { KBObject compobj = kb.getIndividual(cid); KBObject versionProp = kb.getProperty(this.pcns + "hasVersion"); KBObject versionVal = kb.getPropertyValue(compobj, versionProp); - int currentVersion = (Integer) ( - versionVal.getValue() != null ? versionVal.getValue() : 0 - ); + int currentVersion = (Integer) (versionVal.getValue() != null + ? versionVal.getValue() + : 0); int newVersion = currentVersion + 1; KBObject cobj = writerkb.getResource(cid); diff --git a/planner/src/main/java/edu/isi/wings/catalog/component/api/impl/kb/ComponentKB.java b/planner/src/main/java/edu/isi/wings/catalog/component/api/impl/kb/ComponentKB.java index b2dfd20b..ee2d9ade 100644 --- a/planner/src/main/java/edu/isi/wings/catalog/component/api/impl/kb/ComponentKB.java +++ b/planner/src/main/java/edu/isi/wings/catalog/component/api/impl/kb/ComponentKB.java @@ -820,11 +820,9 @@ public Component getComponent(String cid, boolean details) { protected int getComponentVersion(KBObject compobj) { KBObject versionProp = kb.getProperty(this.pcns + "hasVersion"); KBObject versionVal = kb.getPropertyValue(compobj, versionProp); - return (Integer) ( - (versionVal != null && versionVal.getValue() != null) + return (Integer) ((versionVal != null && versionVal.getValue() != null) ? versionVal.getValue() - : 0 - ); + : 0); } protected ArrayList getComponentInputs(KBObject compobj) { diff --git a/planner/src/main/java/edu/isi/wings/catalog/component/api/impl/kb/ComponentReasoningKB.java b/planner/src/main/java/edu/isi/wings/catalog/component/api/impl/kb/ComponentReasoningKB.java index 59b53864..1b1be789 100644 --- a/planner/src/main/java/edu/isi/wings/catalog/component/api/impl/kb/ComponentReasoningKB.java +++ b/planner/src/main/java/edu/isi/wings/catalog/component/api/impl/kb/ComponentReasoningKB.java @@ -53,14 +53,22 @@ public class ComponentReasoningKB private boolean useRules = true; private HashMap ccache = new HashMap(); - private HashMap rulescache = - new HashMap(); - private HashMap> abscache = - new HashMap>(); - private HashMap> classcache = - new HashMap>(); - private HashMap> kbcache = - new HashMap>(); + private HashMap rulescache = new HashMap< + String, + KBRuleList + >(); + private HashMap> abscache = new HashMap< + String, + ArrayList + >(); + private HashMap> classcache = new HashMap< + String, + ArrayList + >(); + private HashMap> kbcache = new HashMap< + String, + ArrayList + >(); private ArrayList metricTriples; private ArrayList metricProps; @@ -897,8 +905,10 @@ public ArrayList findOutputDataPredictedDescriptions( ); // Keep a map of variable object to variable name - HashMap variableNameMap = - new HashMap(); + HashMap variableNameMap = new HashMap< + Variable, + String + >(); for (String rolestr : sRoleMap.keySet()) { Variable var = sRoleMap.get(rolestr); @@ -926,8 +936,10 @@ public ArrayList findOutputDataPredictedDescriptions( // Get a mapping of ArgID's to arg for the Component // Also note which roles are inputs - HashMap argMaps = - new HashMap(); + HashMap argMaps = new HashMap< + String, + ComponentRole + >(); HashMap sInputRoles = new HashMap(); for (ComponentRole role : comp.getInputs()) { argMaps.put(role.getRoleName(), role); @@ -1199,8 +1211,9 @@ public ArrayList findOutputDataPredictedDescriptions( // Marking all compatible inputs to be passed through to the output. // Note: If not all outputs have a matching input, then component is still run and not skipped - ArrayList matchingInputs = - new ArrayList(); + ArrayList matchingInputs = new ArrayList< + ComponentRole + >(); for (ComponentRole inrole : comp.getInputs()) { if (!inrole.isParam()) { if (checkTypeCompatibility(varclasses, inrole.getID())) { @@ -1261,11 +1274,9 @@ public ArrayList findOutputDataPredictedDescriptions( for (Variable var : sRoleMap.values()) { if ( var.isParameterVariable() && - ( - noParamBindings.containsKey(var.getID()) || + (noParamBindings.containsKey(var.getID()) || var.getBinding() == null || - var.getBinding().getValue() == null - ) + var.getBinding().getValue() == null) ) { KBObject varobj = tkb.getResource(variableNameMap.get(var)); KBObject origvarobj = tkb.getResource(var.getID()); diff --git a/planner/src/main/java/edu/isi/wings/catalog/component/classes/requirements/Dependency.java b/planner/src/main/java/edu/isi/wings/catalog/component/classes/requirements/Dependency.java index 8be90be8..680e97d1 100644 --- a/planner/src/main/java/edu/isi/wings/catalog/component/classes/requirements/Dependency.java +++ b/planner/src/main/java/edu/isi/wings/catalog/component/classes/requirements/Dependency.java @@ -70,12 +70,12 @@ public boolean checkDependency(KBAPI api, KBObject obj) { if ( this.operator == Operator.GREATER_THAN && Double.parseDouble(obj.getValueAsString()) > - Double.parseDouble(this.desiredValue.toString()) + Double.parseDouble(this.desiredValue.toString()) ) return true; if ( this.operator == Operator.LESS_THAN && Double.parseDouble(obj.getValueAsString()) < - Double.parseDouble(this.desiredValue.toString()) + Double.parseDouble(this.desiredValue.toString()) ) return true; } return false; diff --git a/planner/src/main/java/edu/isi/wings/catalog/data/api/impl/kb/DataCreationKB.java b/planner/src/main/java/edu/isi/wings/catalog/data/api/impl/kb/DataCreationKB.java index c7665dce..f7722c56 100644 --- a/planner/src/main/java/edu/isi/wings/catalog/data/api/impl/kb/DataCreationKB.java +++ b/planner/src/main/java/edu/isi/wings/catalog/data/api/impl/kb/DataCreationKB.java @@ -137,8 +137,10 @@ public ArrayList getAllDatatypeIds() { @Override public HashMap> getAllDatatypeDatasets() { - HashMap> typedata = - new HashMap>(); + HashMap> typedata = new HashMap< + String, + ArrayList + >(); String query = "SELECT ?s ?type\n" + "WHERE {\n" + diff --git a/planner/src/main/java/edu/isi/wings/catalog/data/classes/MetadataProperty.java b/planner/src/main/java/edu/isi/wings/catalog/data/classes/MetadataProperty.java index 09d0f97e..0c7a216b 100644 --- a/planner/src/main/java/edu/isi/wings/catalog/data/classes/MetadataProperty.java +++ b/planner/src/main/java/edu/isi/wings/catalog/data/classes/MetadataProperty.java @@ -74,15 +74,15 @@ public void setRange(String id) { public String toString() { String str = ""; str += - "\n" + - getName() + - "(" + - type + - ")\nDomains:" + - domains + - "\nRange:" + - range + - "\n"; + "\n" + + getName() + + "(" + + type + + ")\nDomains:" + + domains + + "\nRange:" + + range + + "\n"; return str; } } diff --git a/planner/src/main/java/edu/isi/wings/catalog/resource/api/impl/kb/ResourceKB.java b/planner/src/main/java/edu/isi/wings/catalog/resource/api/impl/kb/ResourceKB.java index d1303902..b51802ea 100644 --- a/planner/src/main/java/edu/isi/wings/catalog/resource/api/impl/kb/ResourceKB.java +++ b/planner/src/main/java/edu/isi/wings/catalog/resource/api/impl/kb/ResourceKB.java @@ -45,8 +45,10 @@ public class ResourceKB extends TransactionsJena implements ResourceAPI { public String onturl, liburl; private String tdbRepository; - private static HashMap initializedLibrary = - new HashMap(); + private static HashMap initializedLibrary = new HashMap< + String, + Boolean + >(); private KBAPI ontkb, libkb; @@ -398,8 +400,9 @@ public ArrayList getAllSoftwareEnvironment() { this.start_read(); boolean batched = this.start_batch_operation(); - ArrayList environment = - new ArrayList(); + ArrayList environment = new ArrayList< + SoftwareEnvironment + >(); for (KBObject swobj : this.getInstancesOfClass( this.cmap.get("SoftwareGroup"), this.libkb @@ -703,8 +706,10 @@ public void setMachineWhitelist(ArrayList whitelist) { } public void copyFrom(ResourceAPI rc, ComponentCreationAPI cc) { - HashMap sws = - new HashMap(); + HashMap sws = new HashMap< + String, + SoftwareVersion + >(); this.start_write(); boolean batched = this.start_batch_operation(); diff --git a/planner/src/main/java/edu/isi/wings/catalog/resource/classes/Machine.java b/planner/src/main/java/edu/isi/wings/catalog/resource/classes/Machine.java index ca333f0e..d5b7f953 100644 --- a/planner/src/main/java/edu/isi/wings/catalog/resource/classes/Machine.java +++ b/planner/src/main/java/edu/isi/wings/catalog/resource/classes/Machine.java @@ -226,14 +226,10 @@ public MachineDetails call() { details.setNumCores(Runtime.getRuntime().availableProcessors()); details.setMaxMemory( - ( - (com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean() - ).getTotalPhysicalMemorySize() + ((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getTotalPhysicalMemorySize() ); details.setFreeMemory( - ( - (com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean() - ).getFreePhysicalMemorySize() + ((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getFreePhysicalMemorySize() ); File[] roots = File.listRoots(); for (File root : roots) { diff --git a/planner/src/main/java/edu/isi/wings/common/CollectionsHelper.java b/planner/src/main/java/edu/isi/wings/common/CollectionsHelper.java index 72f753c8..f8cff51f 100644 --- a/planner/src/main/java/edu/isi/wings/common/CollectionsHelper.java +++ b/planner/src/main/java/edu/isi/wings/common/CollectionsHelper.java @@ -12,16 +12,18 @@ public class CollectionsHelper { * * @return the combined list of variable object bindings */ - public static ArrayList combineVariableDataObjectMappings( - VariableBindingsListSet listset - ) { - ArrayList combinedList = - new ArrayList(); + public static ArrayList< + VariableBindingsList + > combineVariableDataObjectMappings(VariableBindingsListSet listset) { + ArrayList combinedList = new ArrayList< + VariableBindingsList + >(); for (ArrayList list : listset) { if (combinedList.isEmpty()) combinedList = list; else { - ArrayList templist = - new ArrayList(); + ArrayList templist = new ArrayList< + VariableBindingsList + >(); for (VariableBindingsList map1 : combinedList) { for (VariableBindingsList map2 : list) { VariableBindingsList cmap = new VariableBindingsList(); diff --git a/planner/src/main/java/edu/isi/wings/common/kb/PropertiesHelper.java b/planner/src/main/java/edu/isi/wings/common/kb/PropertiesHelper.java index e017e7db..334ed6ea 100644 --- a/planner/src/main/java/edu/isi/wings/common/kb/PropertiesHelper.java +++ b/planner/src/main/java/edu/isi/wings/common/kb/PropertiesHelper.java @@ -39,8 +39,10 @@ public class PropertiesHelper { private static HashMap pcnsmap = null; private static HashMap dcnsmap = null; - private static HashMap classLoggers = - new HashMap(); + private static HashMap classLoggers = new HashMap< + String, + Logger + >(); private static String ontdir, logdir, resdir, opdir; diff --git a/planner/src/main/java/edu/isi/wings/execution/engine/classes/ExecutionQueue.java b/planner/src/main/java/edu/isi/wings/execution/engine/classes/ExecutionQueue.java index cbef7c6d..ce0b1e0e 100644 --- a/planner/src/main/java/edu/isi/wings/execution/engine/classes/ExecutionQueue.java +++ b/planner/src/main/java/edu/isi/wings/execution/engine/classes/ExecutionQueue.java @@ -66,7 +66,7 @@ public ArrayList getNextStepsToExecute() { if ( parentStep != null && parentStep.getRuntimeInfo().getStatus() != - RuntimeInfo.Status.SUCCESS + RuntimeInfo.Status.SUCCESS ) ok = false; } if (ok) steps.add(step); diff --git a/planner/src/main/java/edu/isi/wings/execution/tools/api/impl/kb/RunKB.java b/planner/src/main/java/edu/isi/wings/execution/tools/api/impl/kb/RunKB.java index 4a5ad612..7ab26270 100644 --- a/planner/src/main/java/edu/isi/wings/execution/tools/api/impl/kb/RunKB.java +++ b/planner/src/main/java/edu/isi/wings/execution/tools/api/impl/kb/RunKB.java @@ -228,25 +228,19 @@ public int getNumberOfRuns( "?run exec:hasExecutionStatus ?status .\n" + "?run exec:hasTemplate ?template .\n" + "?run exec:hasStartTime ?start .\n" + - ( - status != null + (status != null ? "?run exec:hasExecutionStatus '" + status + "') .\n" - : "" - ) + - ( - starttime != null + : "") + + (starttime != null ? "FILTER(?start > '" + starttime + "'^^xsd:dateTime) .\n" - : "" - ) + - ( - pattern != null + : "") + + (pattern != null ? "FILTER REGEX(str(?template), '" + newtplurl + ".*" + pattern + ".*') .\n" - : "" - ) + + : "") + "FILTER REGEX(str(?run), '" + newrunurl + "') .\n" + @@ -289,25 +283,19 @@ public ArrayList getRunListSimple( "?run exec:hasExecutionStatus ?status .\n" + "?run exec:hasTemplate ?template .\n" + "?run exec:hasStartTime ?start .\n" + - ( - status != null + (status != null ? "?run exec:hasExecutionStatus '" + status + "') .\n" - : "" - ) + - ( - starttime != null + : "") + + (starttime != null ? "FILTER(?start > '" + starttime + "'^^xsd:dateTime) .\n" - : "" - ) + - ( - pattern != null + : "") + + (pattern != null ? "FILTER REGEX(str(?template), '" + newtplurl + ".*" + pattern + ".*') .\n" - : "" - ) + + : "") + "FILTER REGEX(str(?run), '" + newrunurl + "') .\n"; @@ -385,41 +373,40 @@ public ArrayList getRunList( if (status == null || status.equals("SUCCESS")) { query += - // Query for Successful runs - "{\n" + - " ?run exec:hasExecutionStatus 'SUCCESS' .\n" + - " ?run exec:hasEndTime ?end .\n" + - "}\n"; + // Query for Successful runs + "{\n" + + " ?run exec:hasExecutionStatus 'SUCCESS' .\n" + + " ?run exec:hasEndTime ?end .\n" + + "}\n"; } if (status == null || status.equals("FAILURE")) { if (status == null) query += "UNION\n"; query += - // Query for Failures - "{\n" + - " ?run exec:hasExecutionStatus 'FAILURE' .\n" + - " ?run exec:hasEndTime ?end .\n" + - // FIXME: Removing this as we could have failures without any steps - /*" ?run exec:hasStep ?step .\n" + + // Query for Failures + "{\n" + + " ?run exec:hasExecutionStatus 'FAILURE' .\n" + + " ?run exec:hasEndTime ?end .\n" + + // FIXME: Removing this as we could have failures without any steps + /*" ?run exec:hasStep ?step .\n" + (fasterQuery ? " ?step exec:hasExecutionStatus 'FAILURE' .\n": "") + " ?step exec:hasExecutionStatus ?stepstatus .\n" +*/ - "}\n"; + "}\n"; } if (status == null || status.equals("RUNNING")) { if (status == null) query += "UNION\n"; query += - // Query for Failures - "{\n" + - " ?run exec:hasExecutionStatus 'RUNNING' .\n" + - " ?run exec:hasStep ?step .\n" + - (fasterQuery ? " ?step exec:hasExecutionStatus 'RUNNING' .\n" : "") + - " ?step exec:hasExecutionStatus ?stepstatus .\n" + - "}\n"; + // Query for Failures + "{\n" + + " ?run exec:hasExecutionStatus 'RUNNING' .\n" + + " ?run exec:hasStep ?step .\n" + + (fasterQuery ? " ?step exec:hasExecutionStatus 'RUNNING' .\n" : "") + + " ?step exec:hasExecutionStatus ?stepstatus .\n" + + "}\n"; } query += "}\n"; query += - "GROUP BY ?run ?status ?template ?start ?end \n" + - "ORDER BY DESC(?start)"; + "GROUP BY ?run ?status ?template ?start ?end \n" + "ORDER BY DESC(?start)"; if (limit >= 0 && start >= 0) { query += " LIMIT " + limit + " OFFSET " + start; @@ -582,10 +569,8 @@ private RuntimePlan getExecutionRun(String runid, boolean details) { RuntimeInfo.Status status = rplan.getRuntimeInfo().getStatus(); if ( details || - ( - status == RuntimeInfo.Status.FAILURE || - status == RuntimeInfo.Status.RUNNING - ) + (status == RuntimeInfo.Status.FAILURE || + status == RuntimeInfo.Status.RUNNING) ) { try { KBAPI tkb = this.ontologyFactory.getKB(rplan.getURL(), OntSpec.PLAIN); @@ -1042,8 +1027,10 @@ public RuntimePlan rePlan(RuntimePlan oldplanexe) { planexe.setPlan(newplan); // Hash steps from current queue - HashMap stepMap = - new HashMap(); + HashMap stepMap = new HashMap< + String, + RuntimeStep + >(); for (RuntimeStep step : planexe.getQueue().getAllSteps()) stepMap.put( step.getID(), step diff --git a/planner/src/main/java/edu/isi/wings/planner/api/impl/kb/WorkflowGenerationKB.java b/planner/src/main/java/edu/isi/wings/planner/api/impl/kb/WorkflowGenerationKB.java index 840b85e7..2415e29e 100644 --- a/planner/src/main/java/edu/isi/wings/planner/api/impl/kb/WorkflowGenerationKB.java +++ b/planner/src/main/java/edu/isi/wings/planner/api/impl/kb/WorkflowGenerationKB.java @@ -208,8 +208,10 @@ public ArrayList