From 0a8ec5a7f9fef988d2abe86b071003279a7429b9 Mon Sep 17 00:00:00 2001 From: Varun Ratnakar Date: Fri, 24 Aug 2018 14:44:09 +0530 Subject: [PATCH] Bug fixes --- .../isi/wings/catalog/data/api/impl/kb/DataKB.java | 11 +++++------ .../isi/wings/workflow/plan/api/impl/pplan/PPlan.java | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/planner/src/main/java/edu/isi/wings/catalog/data/api/impl/kb/DataKB.java b/planner/src/main/java/edu/isi/wings/catalog/data/api/impl/kb/DataKB.java index b426e868..a00b38f7 100644 --- a/planner/src/main/java/edu/isi/wings/catalog/data/api/impl/kb/DataKB.java +++ b/planner/src/main/java/edu/isi/wings/catalog/data/api/impl/kb/DataKB.java @@ -126,12 +126,11 @@ public String getDataLocation(String dataid) { this.start_read(); KBObject locprop = this.kb.getProperty(this.dcns + "hasLocation"); KBObject dobj = this.kb.getIndividual(dataid); - if(dobj == null) - return null; - - KBObject locobj = this.kb.getPropertyValue(dobj, locprop); - if (locobj != null && locobj.getValue() != null) - return locobj.getValueAsString(); + if(dobj != null) { + KBObject locobj = this.kb.getPropertyValue(dobj, locprop); + if (locobj != null && locobj.getValue() != null) + return locobj.getValueAsString(); + } else { String location = this.getDefaultDataLocation(dataid); File f = new File(location); diff --git a/planner/src/main/java/edu/isi/wings/workflow/plan/api/impl/pplan/PPlan.java b/planner/src/main/java/edu/isi/wings/workflow/plan/api/impl/pplan/PPlan.java index cdc07c43..e32101c7 100644 --- a/planner/src/main/java/edu/isi/wings/workflow/plan/api/impl/pplan/PPlan.java +++ b/planner/src/main/java/edu/isi/wings/workflow/plan/api/impl/pplan/PPlan.java @@ -39,10 +39,10 @@ public class PPlan extends URIEntity private static final long serialVersionUID = 1L; transient Properties props; - OntFactory ontologyFactory; + transient OntFactory ontologyFactory; boolean incomplete; - TransactionsJena transaction; + transient TransactionsJena transaction; ArrayList steps;