diff --git a/Source/Core/src/ca/uqac/lif/labpal/Experiment.java b/Source/Core/src/ca/uqac/lif/labpal/Experiment.java index ffe3d367..f23e1624 100755 --- a/Source/Core/src/ca/uqac/lif/labpal/Experiment.java +++ b/Source/Core/src/ca/uqac/lif/labpal/Experiment.java @@ -152,7 +152,7 @@ public Experiment setId(int id) * fulfilled. Override this method if your experiment must do some form of * setup before starting (e.g. generating files, etc.). Do not * satisfy the prerequisites here: rather use - * {@link #fulfillPrerequisites(JsonMap)}. + * {@link #fulfillPrerequisites()}. * * @return true if the prerequisites are fulfilled, false otherwise */ @@ -166,7 +166,7 @@ public boolean prerequisitesFulfilled() * Override this method if your experiment must do some form of * setup before starting (e.g. generating files, etc.). Obviously, there * should be some form of coherence between this method and - * {@link #prerequisitesFulfilled(JsonMap)}. + * {@link #prerequisitesFulfilled()}. * * @return true if the prerequisites have been successfully generated, * false otherwise @@ -179,7 +179,6 @@ public boolean fulfillPrerequisites() /** * Cleans any prerequisites this experiment may have generated. * For example: deleting files that were generated, etc. - * @see {@link #fulfillPrerequisites(JsonMap)} */ public void cleanPrerequisites() { diff --git a/Source/Core/src/ca/uqac/lif/labpal/Laboratory.java b/Source/Core/src/ca/uqac/lif/labpal/Laboratory.java index 299c05b6..fd9a8e04 100755 --- a/Source/Core/src/ca/uqac/lif/labpal/Laboratory.java +++ b/Source/Core/src/ca/uqac/lif/labpal/Laboratory.java @@ -122,8 +122,7 @@ public abstract class Laboratory private transient Thread m_thread; /** - * The number of parkmips - * @see {@link #countParkMips()} + * The number of parkmips (see {@link #countParkMips()}) */ public transient static float s_parkMips = countParkMips(); @@ -207,7 +206,7 @@ public final String getAuthorName() * Adds an experiment to the lab * @param e The experiment * @param group The group to add this experiment to - * @param plots Optional: a number of plots this experiment should be + * @param tables Optional: a number of tables this experiment should be * associated with * @return This lab */ @@ -231,7 +230,7 @@ public Laboratory add(Experiment e, Group group, ExperimentTable ... tables) /** * Adds an experiment to the lab * @param e The experiment - * @param plots Optional: a number of tables this experiment should be + * @param tables Optional: a number of tables this experiment should be * associated with * @return This lab */ @@ -255,7 +254,7 @@ public Laboratory addAndQueue(Experiment e) /** * Assigns plots to this lab - * @param p The plots + * @param plots The plots * @return This lab */ public Laboratory add(Plot ... plots) diff --git a/Source/Core/src/ca/uqac/lif/labpal/plot/Plot.java b/Source/Core/src/ca/uqac/lif/labpal/plot/Plot.java index 6e9b349a..83b3ebdb 100755 --- a/Source/Core/src/ca/uqac/lif/labpal/plot/Plot.java +++ b/Source/Core/src/ca/uqac/lif/labpal/plot/Plot.java @@ -203,7 +203,7 @@ public final int getId() /** * Gets the plot's title - * @return + * @return The title */ public final String getTitle() { diff --git a/Source/Core/src/ca/uqac/lif/labpal/plot/gnuplot/ClusteredHistogram.java b/Source/Core/src/ca/uqac/lif/labpal/plot/gnuplot/ClusteredHistogram.java index 2ad815e9..e71898c8 100755 --- a/Source/Core/src/ca/uqac/lif/labpal/plot/gnuplot/ClusteredHistogram.java +++ b/Source/Core/src/ca/uqac/lif/labpal/plot/gnuplot/ClusteredHistogram.java @@ -72,7 +72,7 @@ public class ClusteredHistogram extends GnuPlot implements TwoDimensionalPlot /** * Whether the histogram is of type "row stacked". - * @see {@link #rowStacked()} + * (see {@link #rowStacked()}) */ protected boolean m_rowStacked = false; diff --git a/Source/Core/src/ca/uqac/lif/labpal/plot/gral/GralPlot.java b/Source/Core/src/ca/uqac/lif/labpal/plot/gral/GralPlot.java index 78eb1d22..e11f0593 100755 --- a/Source/Core/src/ca/uqac/lif/labpal/plot/gral/GralPlot.java +++ b/Source/Core/src/ca/uqac/lif/labpal/plot/gral/GralPlot.java @@ -34,8 +34,8 @@ public class GralPlot extends Plot { /** - * Creates a new wrapped plot from a plot - * @param p The plot + * Creates a new plot from a table + * @param t The table */ public GralPlot(Table t) { @@ -43,9 +43,11 @@ public GralPlot(Table t) } /** - * Creates a new wrapped plot from a plot - * @param p The plot - * @param transformation A table transformation + * Creates a new plot from a table, applying a transformation + * to this table + * @param t The table + * @param transformation A table transformation. This transformation + * will be applied to the table before plotting. */ public GralPlot(Table t, TableTransformation transformation) { diff --git a/Source/Core/src/ca/uqac/lif/labpal/server/ExperimentsPageCallback.java b/Source/Core/src/ca/uqac/lif/labpal/server/ExperimentsPageCallback.java index 415cb4bf..bcc2d46c 100755 --- a/Source/Core/src/ca/uqac/lif/labpal/server/ExperimentsPageCallback.java +++ b/Source/Core/src/ca/uqac/lif/labpal/server/ExperimentsPageCallback.java @@ -283,8 +283,8 @@ public static String getStatusLabel(Experiment e, LabAssistant assistant) /** * Performs the "queue" action on every experiment selected in the - * input form - * @see {@link LabAssistant#queue(Experiment)} + * input form + * @see LabAssistant#queue(Experiment) * @param params The input parameters of the HTML form * @return A message indicating the success of the operation */ @@ -311,7 +311,7 @@ protected String queue(Map params) /** * Performs the "reset" action on every experiment selected in the * input form - * @see {@link Experiment#reset()} + * @see Experiment#reset() * @param params The input parameters of the HTML form * @return A message indicating the success of the operation */ @@ -338,7 +338,7 @@ protected String reset(Map params) /** * Performs the "unqueue" action on every experiment selected in the * input form - * @see {@link LabAssistant#unqueue(Experiment)} + * @see LabAssistant#unqueue(Experiment) * @param params The input parameters of the HTML form * @return A message indicating the success of the operation */ @@ -365,7 +365,7 @@ protected String unqueue(Map params) /** * Performs the "clean" action on every experiment selected in the * input form - * @see {@link Experiment#clean()} + * @see Experiment#clean() * @param params The input parameters of the HTML form * @return A message indicating the success of the operation */ diff --git a/Source/Core/src/ca/uqac/lif/labpal/table/DataTable.java b/Source/Core/src/ca/uqac/lif/labpal/table/DataTable.java index 75814ce5..c026ef51 100644 --- a/Source/Core/src/ca/uqac/lif/labpal/table/DataTable.java +++ b/Source/Core/src/ca/uqac/lif/labpal/table/DataTable.java @@ -32,6 +32,7 @@ import ca.uqac.lif.json.JsonNull; import ca.uqac.lif.json.JsonNumber; import ca.uqac.lif.json.JsonString; +import ca.uqac.lif.labpal.FileHelper; /** * A table made of concrete values @@ -61,16 +62,11 @@ public class DataTable extends Table * The symbol used to represent missing values in a CSV rendition */ public static final transient String s_datafileMissing = "?"; - - /** - * The OS-dependent line separator - */ - protected static final String CRLF = System.getProperty("line.separator"); /** * Creates a new data table - * @param ordering - * @param types + * @param ordering The ordering of the columns in this table. This array + * should contain column names */ public DataTable(String ... ordering) { @@ -237,20 +233,19 @@ protected String toHtml(String[] sort_order) { TableNode node = getTree(sort_order); StringBuilder out = new StringBuilder(); - out.append("").append(CRLF).append("").append(CRLF); + out.append("
").append(FileHelper.CRLF).append("").append(FileHelper.CRLF); for (String key : sort_order) { out.append(""); } - out.append("").append(CRLF).append("").append(CRLF).append("").append(CRLF); + out.append("").append(FileHelper.CRLF).append("").append(FileHelper.CRLF).append("").append(FileHelper.CRLF); toHtml(node, out, 0, sort_order.length); - out.append("").append(CRLF).append("").append(CRLF).append("
").append(key).append("
"); + out.append("").append(FileHelper.CRLF).append("").append(FileHelper.CRLF).append(""); return out.toString(); } /** * Produces a flat HTML rendition of the table - * @return */ protected void toHtml(TableNode cur_node, StringBuilder out, int depth, int total_depth) { @@ -280,7 +275,7 @@ else if (cur_node.m_value instanceof JsonNull) } else { - out.append("").append(CRLF).append(""); + out.append("").append(FileHelper.CRLF).append(""); for (int i = 0; i < depth; i++) { out.append("-"); @@ -477,7 +472,7 @@ public String toCsv(String[] ordering, String separator, String missing) out.append(missing); } } - out.append(CRLF); + out.append(FileHelper.CRLF); } return out.toString(); } @@ -500,7 +495,7 @@ public String toString() } out.append(m_preferredOrdering[i]); } - out.append(CRLF); + out.append(FileHelper.CRLF); out.append(toCsv()); return out.toString(); } diff --git a/Source/Core/src/ca/uqac/lif/labpal/table/Table.java b/Source/Core/src/ca/uqac/lif/labpal/table/Table.java index fa657a86..4187f9f3 100755 --- a/Source/Core/src/ca/uqac/lif/labpal/table/Table.java +++ b/Source/Core/src/ca/uqac/lif/labpal/table/Table.java @@ -34,7 +34,7 @@ /** * A multi-dimensional array of values. Tables can be passed to - * {@link Plot} objects to generate graphics. + * {@link ca.uqac.lif.labpal.plot.Plot Plot} objects to generate graphics. */ public abstract class Table implements DataSource { @@ -157,7 +157,8 @@ public final boolean isColumnNumeric(int columnIndex) /** * Gets the type of the column of given name - * @param col_name The name of the column + * @param position The position of the column, starting at 0 for the + * first column * @return The type, or {@code null} if the column does not exist */ public final Class> getColumnTypeFor(int position) @@ -203,7 +204,7 @@ public final Column getColumn(int col) /** * Gets the position of the column of a given name in the table - * @param col The name + * @param name The name * @return The column's position, or -1 if the name was not found */ public abstract int getColumnPosition(String name); diff --git a/Source/Core/src/ca/uqac/lif/labpal/table/TableEntry.java b/Source/Core/src/ca/uqac/lif/labpal/table/TableEntry.java index 68ee6f7f..ff43942f 100755 --- a/Source/Core/src/ca/uqac/lif/labpal/table/TableEntry.java +++ b/Source/Core/src/ca/uqac/lif/labpal/table/TableEntry.java @@ -18,6 +18,7 @@ package ca.uqac.lif.labpal.table; import java.util.HashMap; +import java.util.Map; /** * An entry in a data table @@ -70,7 +71,7 @@ public boolean equals(Object o) { return false; } - for (Entry entry : entrySet()) + for (Map.Entry entry : entrySet()) { if (!te.get(entry.getKey()).equals(entry.getValue())) {