Tested and fixed new data loading logic. Fixed performance issue with Laminates.

This commit is contained in:
Alexander Nozik 2017-02-04 11:31:42 +03:00
parent 9904f9d9b2
commit 8861dff73d

View File

@ -35,18 +35,10 @@ public class NumassPrepareTask extends AbstractTask<Table> {
Context context = model.getContext(); Context context = model.getContext();
//acquiring initial data. Data node could not be empty //acquiring initial data. Data node could not be empty
DataNode<NumassData> data;
Meta dataMeta = config.getMeta("data"); DataFilter filter = new DataFilter().configure(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(dataMeta); DataNode<NumassData> data = filter.filter(input.checked(NumassData.class));
data = filter.filter(data);
// Meta dataMeta = config.getMeta("data"); // Meta dataMeta = config.getMeta("data");
// URI storageUri = input.getCheckedData("dataRoot", URI.class).get(); // URI storageUri = input.getCheckedData("dataRoot", URI.class).get();
@ -83,8 +75,11 @@ public class NumassPrepareTask extends AbstractTask<Table> {
@Override @Override
protected TaskModel transformModel(TaskModel model) { protected TaskModel transformModel(TaskModel model) {
String rootName = model.meta().getString("data.root", "dataRoot"); if (model.hasValue("data.from")) {
model.data(rootName, "dataRoot"); model.data(model.getString("data.from.*"));
} else {
model.data("*");
}
return model; return model;
} }