From 8861dff73de6edc408eb4a62366a5ddc199adc9f Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sat, 4 Feb 2017 11:31:42 +0300 Subject: [PATCH] Tested and fixed new data loading logic. Fixed performance issue with Laminates. --- .../inr/numass/tasks/NumassPrepareTask.java | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/numass-main/src/main/java/inr/numass/tasks/NumassPrepareTask.java b/numass-main/src/main/java/inr/numass/tasks/NumassPrepareTask.java index 3a99e843..b001206b 100644 --- a/numass-main/src/main/java/inr/numass/tasks/NumassPrepareTask.java +++ b/numass-main/src/main/java/inr/numass/tasks/NumassPrepareTask.java @@ -35,18 +35,10 @@ public class NumassPrepareTask extends AbstractTask { Context context = model.getContext(); //acquiring initial data. Data node could not be empty - DataNode data; - Meta dataMeta = config.getMeta("data"); - if (dataMeta.hasValue("from")) { - data = input.getCheckedNode(dataMeta.getString("from"), NumassData.class); - } else { - data = input.checked(NumassData.class); - } + DataFilter filter = new DataFilter().configure(config.getMeta("data")); - DataFilter filter = new DataFilter().configure(dataMeta); - - data = filter.filter(data); + DataNode data = filter.filter(input.checked(NumassData.class)); // Meta dataMeta = config.getMeta("data"); // URI storageUri = input.getCheckedData("dataRoot", URI.class).get(); @@ -83,8 +75,11 @@ public class NumassPrepareTask extends AbstractTask
{ @Override protected TaskModel transformModel(TaskModel model) { - String rootName = model.meta().getString("data.root", "dataRoot"); - model.data(rootName, "dataRoot"); + if (model.hasValue("data.from")) { + model.data(model.getString("data.from.*")); + } else { + model.data("*"); + } return model; }