diff --git a/numass-main/src/main/java/inr/numass/actions/PrepareDataAction.java b/numass-main/src/main/java/inr/numass/actions/PrepareDataAction.java index f6079bd4..15e494bc 100644 --- a/numass-main/src/main/java/inr/numass/actions/PrepareDataAction.java +++ b/numass-main/src/main/java/inr/numass/actions/PrepareDataAction.java @@ -77,7 +77,7 @@ public class PrepareDataAction extends OneToOneAction { } if (meta.hasNode("correction")) { - corrections.addAll(meta.getNodes("correction").stream() + corrections.addAll(meta.getMetaList("correction").stream() .map((Function) this::makeCorrection) .collect(Collectors.toList())); } @@ -140,7 +140,7 @@ public class PrepareDataAction extends OneToOneAction { //Генерируем автоматический формат по первой строчке format = TableFormat.forPoint(dataList.get(0)); } else { - format = TableFormat.fixedWidth(8, parnames); + format = TableFormat.forNames(parnames); } String head; diff --git a/numass-main/src/main/java/inr/numass/actions/SlicedData.java b/numass-main/src/main/java/inr/numass/actions/SlicedData.java index 9a2fcb1a..ca23d05b 100644 --- a/numass-main/src/main/java/inr/numass/actions/SlicedData.java +++ b/numass-main/src/main/java/inr/numass/actions/SlicedData.java @@ -21,10 +21,11 @@ import hep.dataforge.tables.TableFormat; import hep.dataforge.values.Value; import inr.numass.storage.NMFile; import inr.numass.storage.NMPoint; +import org.apache.commons.math3.util.Pair; + import java.util.ArrayList; import java.util.HashMap; import java.util.Map; -import org.apache.commons.math3.util.Pair; /** * @@ -40,7 +41,7 @@ public class SlicedData extends SimplePointSource { ArrayList names = new ArrayList<>(intervals.keySet()); names.add(0, TNAME); names.add(0, UNAME); - return TableFormat.fixedWidth(8, names); + return TableFormat.forNames(names); } diff --git a/numass-main/src/main/java/inr/numass/actions/SummaryAction.java b/numass-main/src/main/java/inr/numass/actions/SummaryAction.java index 1c2c9693..154d4dd2 100644 --- a/numass-main/src/main/java/inr/numass/actions/SummaryAction.java +++ b/numass-main/src/main/java/inr/numass/actions/SummaryAction.java @@ -70,7 +70,7 @@ public class SummaryAction extends ManyToOneAction { } names[names.length - 1] = "chi2"; - ListTable.Builder res = new ListTable.Builder(TableFormat.fixedWidth(8, names)); + ListTable.Builder res = new ListTable.Builder(TableFormat.forNames(names)); double[] weights = new double[parNames.length]; Arrays.fill(weights, 0); diff --git a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassRootHandler.java b/numass-storage/numass-server/src/main/java/inr/numass/server/NumassRootHandler.java index 53c01057..59d1b315 100644 --- a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassRootHandler.java +++ b/numass-storage/numass-server/src/main/java/inr/numass/server/NumassRootHandler.java @@ -10,7 +10,7 @@ import hep.dataforge.storage.api.Loader; import hep.dataforge.storage.api.StateLoader; import hep.dataforge.storage.api.Storage; import hep.dataforge.storage.commons.JSONMetaWriter; -import hep.dataforge.storage.servlet.Utils; +import hep.dataforge.storage.servlet.ServletUtils; import org.slf4j.LoggerFactory; import ratpack.handling.Context; import ratpack.handling.Handler; @@ -40,7 +40,7 @@ public class NumassRootHandler implements Handler { public void handle(Context ctx) throws Exception { try { ctx.getResponse().contentType("text/html"); - Template template = Utils.freemarkerConfig().getTemplate("NumassRoot.ftl"); + Template template = ServletUtils.freemarkerConfig().getTemplate("NumassRoot.ftl"); Map data = new HashMap(6); if (!server.meta().isEmpty()) { diff --git a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassStorageHandler.java b/numass-storage/numass-server/src/main/java/inr/numass/server/NumassStorageHandler.java index 569d301b..7e5ce2d8 100644 --- a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassStorageHandler.java +++ b/numass-storage/numass-server/src/main/java/inr/numass/server/NumassStorageHandler.java @@ -10,8 +10,8 @@ import hep.dataforge.meta.MetaBuilder; import hep.dataforge.storage.api.ObjectLoader; import hep.dataforge.storage.api.PointLoader; import hep.dataforge.storage.api.Storage; +import hep.dataforge.storage.servlet.ServletUtils; import hep.dataforge.storage.servlet.StorageRatpackHandler; -import hep.dataforge.storage.servlet.Utils; import org.slf4j.LoggerFactory; import ratpack.handling.Context; @@ -47,7 +47,7 @@ public class NumassStorageHandler extends StorageRatpackHandler { try { ObjectLoader noteLoader = (ObjectLoader) loader; ctx.getResponse().contentType("text/html"); - Template template = Utils.freemarkerConfig().getTemplate("NoteLoader.ftl"); + Template template = ServletUtils.freemarkerConfig().getTemplate("NoteLoader.ftl"); List notes = getNotes(noteLoader).limit(100).map(note -> render(note)).collect(Collectors.toList());