diff --git a/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/IPlotDataAccess.java b/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/IPlotDataAccess.java index 85d732f8dfe74504bc409a6141f81363530d2fec..a4e6ea748dab3bea954f1cc4aa34c8ea3f119588 100644 --- a/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/IPlotDataAccess.java +++ b/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/IPlotDataAccess.java @@ -39,14 +39,14 @@ import nl.astron.lofar.java.gui.plotter.exceptions.PlotterDataAccessException; public interface IPlotDataAccess{ /** - * This method will retrieve data from the data access layer using an array - * of strings and it must return a HashMap dataset understandable by the plotter. - * @param constraints An array of String constraints to be passed to the implementing class + * This method will retrieve data from the data access layer using an object with any + * possible information and it must return a HashMap dataset understandable by the plotter. + * @param constraints An object with constraints to be passed to the implementing class * @return The dataset that has been generated * @throws PlotterDataAccessException will be thrown if the dataset could not * be generated for any reason, like database exceptions, file errors, etc. */ - public HashMap retrieveData(String[] constraints) throws PlotterDataAccessException; + public HashMap retrieveData(Object constraints) throws PlotterDataAccessException; } diff --git a/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/IPlotDataExport.java b/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/IPlotDataExport.java index 7bbad18f6745af0d220e4cfa102540b68e6ff51d..a840d5bee09add90a8ab898f7c82fb6ab4ea0482 100644 --- a/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/IPlotDataExport.java +++ b/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/IPlotDataExport.java @@ -39,13 +39,13 @@ public interface IPlotDataExport{ /** * Exports a dataset using a set of String parameters - * @param params String array containing zero or more arguments for the export class + * @param params Object containing zero or more arguments for the export class * @param data the dataset to be exported * @throws PlotterException will be thrown if the dataset could not * be exported for any reason, like database exceptions, file errors, etc. * (This exception will be migrated to a more specific PlotterDataExportException) */ - public void exportData(String[] params, HashMap data) throws PlotterException; + public void exportData(Object params, HashMap data) throws PlotterException; } diff --git a/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/PlotController.java b/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/PlotController.java index f6558fe259b43e5f2dc8f11ae5abf89a0667e319..78152030ef7721873d4b6ad71aed64050344be38 100644 --- a/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/PlotController.java +++ b/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/PlotController.java @@ -84,7 +84,7 @@ public class PlotController{ * layer or the Plotter Framework have run into an exception that the * user needs to be aware of. */ - public JComponent createPlot(int type, boolean separateLegend, String[] constraints) throws PlotterException{ + public JComponent createPlot(int type, boolean separateLegend, Object constraints) throws PlotterException{ String plotFrameworkClass = ""; Object aPlotter = null; IPlot aNewPlot = null; @@ -137,7 +137,7 @@ public class PlotController{ HashMap retrieveableData = m_PlotDataManager.retrieveData(constraints); m_IPlot = aNewPlot; - return m_IPlot.createPlot(type,constraints[0],retrieveableData,separateLegend); + return m_IPlot.createPlot(type,constraints.toString(),retrieveableData,separateLegend); }else{ throw new NotSupportedException("The requested plot type ("+type+") is not supported by the plotter at this time."); @@ -169,18 +169,18 @@ public class PlotController{ * layer or the Plotter Framework have run into an exception that the * user needs to be aware of. */ - public Image createPlotImage(String[] constraints) throws PlotterException{ + public Image createPlotImage(Object constraints) throws PlotterException{ throw new NotImplementedException("Image exportation is not yet implemented in this release."); } /** * This method will attempt to export a plot using the * Data Export layer specified in the plotter_config.properties file. - * @param arguments The array of string arguments to be passed to the data export layer + * @param arguments The object containing arguments to be passed to the data export layer * @throws PlotterException will be thrown when the Data Export * layer has run into an exception that the user needs to be aware of. */ - public void exportData(String[] arguments) throws PlotterException{ + public void exportData(Object arguments) throws PlotterException{ throw new NotImplementedException("Export of data is not yet implemented in this release."); } diff --git a/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/PlotDataManager.java b/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/PlotDataManager.java index 3bdc74f39bfd98cd71c84073d72fe6ce86a498fa..561a5abdb0e6fc48dd5ba5d50b4eaec19eae8f0c 100644 --- a/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/PlotDataManager.java +++ b/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/PlotDataManager.java @@ -91,7 +91,7 @@ public class PlotDataManager{ * inside the Data Access class, or when the Data Access class itself could not * be properly accessed due to errors in the plotter_config.properties file. */ - public HashMap retrieveData(String[] constraints) throws PlotterException{ + public HashMap retrieveData(Object constraints) throws PlotterException{ if(aDataAccessor == null){ initializeDataAccessLayer(); } @@ -110,14 +110,14 @@ public class PlotDataManager{ * the parameters provided. It will call the Data Export * class provided in the plotter_config.properties file. * - * @param exportParams The String array containing parameters for the data - * export class + * @param exportParams An object containing parameters for the data + * export class. * @param data the data set to be exported * @throws PlotterException will be thrown when an Exception occurs * inside the Data Export class, or when the Data Export class itself could not * be properly accessed due to errors in the plotter_config.properties file. */ - public void exportData(String[] exportParams, HashMap data) throws PlotterException{ + public void exportData(Object exportParams, HashMap data) throws PlotterException{ throw new NotImplementedException("Export of data is not yet implemented in this release."); } /** diff --git a/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/PlotPanel.java b/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/PlotPanel.java index 3a92353bff120dc1432ff3084ede948cfd1019d3..85ce85f031296312cc57571b5afd2a0952db99b5 100644 --- a/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/PlotPanel.java +++ b/JAVA/GUI/Plotter/src/nl/astron/lofar/java/gui/plotter/PlotPanel.java @@ -47,7 +47,7 @@ public class PlotPanel extends JPanel{ private PlotController m_PlotController; private JComponent plot; private JComponent legend; - private String[] currentDataConstraint; + private Object currentDataConstraint; /** * - Constructs a new PlotPanel @@ -72,7 +72,7 @@ public class PlotPanel extends JPanel{ * -int type (this is defined by PlotConstants.PLOT_*) * -boolean separateLegend (this will tell the plotter that you would like a separate JComponent legend, * otherwise you will see a legend where the plotter puts it by default. - * -String[] constraints (These are the arguments you need for the data access layer to get the data + * -Object constraints (These are the arguments you need for the data access layer to get the data * you want, which can be anything, as long as your configured data access layer * supports it!) * The plot will be added to this class' ContentPane so you can view it directly. It can also be retrieved separately @@ -85,7 +85,7 @@ public class PlotPanel extends JPanel{ * Please handle this exception in a way that your application does not suffer from it, and make sure the user will be shown a message * that something has gone wrong. */ - public void createPlot(int type, boolean separateLegend, String[] constraints) throws PlotterException{ + public void createPlot(int type, boolean separateLegend, Object constraints) throws PlotterException{ this.removeAll(); plot = null; legend = null; @@ -96,7 +96,7 @@ public class PlotPanel extends JPanel{ /** * This method will attempt to generate a plot image using several key arguments: * -int type (this is defined by PlotConstants.PLOT_*) - * -String[] constraints (These are the arguments you need for the data access layer to get the data + * -Object constraints (These are the arguments you need for the data access layer to get the data * you want, which can be anything, as long as your configured data access layer * supports it!) * @@ -107,20 +107,20 @@ public class PlotPanel extends JPanel{ * Please handle this exception in a way that your application does not suffer from it, and make sure the user will be shown a message * that something has gone wrong. */ - public Image exportImage(int type, String[] constraints) throws PlotterException{ + public Image exportImage(int type, Object constraints) throws PlotterException{ return m_PlotController.createPlotImage(constraints); } /** * This method will attempt to export the data currently in the plot to your configured data export layer using a single argument: - * -String[] arguments (These are the arguments you need for the data export layer to export the data - * you currently have in the plot, and these strings can mean anything, as long as your configured data export layer + * -Object arguments (These are the arguments you need for the data export layer to export the data + * you currently have in the plot, and this can be anything, as long as your configured data export layer * supports them!) * @param arguments The arguments to be passed to the configured data export layer * @throws PlotterException will be thrown if an Exception is detected in the plotter that the user needs to be aware of. * Please handle this exception in a way that your application does not suffer from it, and make sure the user will be shown a message * that something has gone wrong. */ - public void exportData(String[] arguments) throws PlotterException{ + public void exportData(Object arguments) throws PlotterException{ m_PlotController.exportData(arguments); } /**