@@ -14,7 +14,7 @@ |
import javax.xml.soap.SOAPPart; |
|
/** |
- * Last Updated: 16-December-2014 |
+ * Last Updated: 28-April-2016 |
* @author Tyler Wible |
* @since 7-July-2014 |
* For more information on all of CDWR's water services, go to: |
@@ -29,7 +29,11 @@ |
* @param beginDate the user specified begin date for the station (yyyy-MM-dd format) |
* @param endDate the user specified end date for the station (yyyy-MM-dd format) |
* @param dataType a flag for extraction of either "hourly" or "daily" flow data from CDWR |
- * @return a String[][] containing column1 = date(if dataType = "daily": yyyy-MM-dd format, if dataType = "hourly": yyyy-MM-dd HH:mm format), column2 = flowValue |
+ * @return a Object[][] containing: |
+ * [0] = an ArrayList<String> containing the data query from the web service |
+ * [1] = a String[][] containing column1 = date(if dataType = "daily": yyyy-MM-dd format, if dataType = "hourly": yyyy-MM-dd HH:mm format), column2 = flowValue |
+ * [2] = start data of the data (if dataType = "daily": yyyy-MM-dd format, if dataType = "hourly": yyyy-MM-dd HH:mm format) |
+ * [3] = end data of the data (if dataType = "daily": yyyy-MM-dd format, if dataType = "hourly": yyyy-MM-dd HH:mm format) |
* @throws Exception |
*/ |
public Object[] getCDWRflowData(String stationID, String beginDate, String endDate, String dataType) throws Exception { |
@@ -253,7 +257,9 @@ |
/** |
* Finds rating curve data for the specified station from the Colorado Division of Water Resource Database |
* @param stationID the abbreviation of the name for the CDWR station |
- * @return a double[][] containing column1 = discharge(ft3/s), column2 = depth(ft) |
+ * @return a Object[][] containing: |
+ * [0] = an ArrayList<String> containing the data query from the web service |
+ * [1] = a double[][] containing rating curve data: column1 = discharge, column2 = depth |
* @throws Exception |
*/ |
public Object[] getCDWRratingCurve(String stationID) throws Exception { |
@@ -30,7 +30,7 @@ |
import org.jfree.ui.TextAnchor; |
|
/** |
-* Last Updated: 16-March-2016 |
+* Last Updated: 28-April-2016 |
* @author Tyler Wible |
* @since 3-February-2014 |
*/ |
@@ -52,7 +52,7 @@ |
* @param Label_title the desired label title. |
* @param lowerlimit the lower limit of the x-interval marker. |
* @param upperlimit the upper limit of the x-interval marker. |
- * @return An Interval Marker. |
+ * @return XYPlot with the interval label added |
*/ |
public XYPlot addIntervalLabel (XYPlot plot, String Label_title, double lowerlimit, double upperlimit){ |
//Create a new interval marker and set its properties |
@@ -81,7 +81,7 @@ |
* @param existingExtremeOutliers a variable indicating if there are already |
* existing extreme outliers (true) which are already labeled in the legend, |
* therefore don't label these outliers in the legend |
- * @return the original plot with new object in it. |
+ * @return the original plot with new boxplot in it. |
*/ |
public Object[] boxplot_shapes(XYPlot plot, |
double x_coord, |
@@ -223,7 +223,7 @@ |
* @param series a double[][] array with series[all][0] = x-values, series[all][1] = y-values |
* @param lineColor the color of the line to be graphed |
* @param seriesIndex the graph index of the series to be plotted |
- * @return the provided XYPlot with the series added to it with the above properties |
+ * @return the XYPlot with the series added to it with the above properties |
*/ |
public XYPlot addXYSeries(XYPlot plot, double[][] series, Color lineColor, int seriesIndex){ |
XYSeries xySeries = new XYSeries(""); |
@@ -1,6 +1,5 @@ |
package m.cfa; |
|
-import m.cfa.User_Data; |
import java.io.BufferedReader; |
import java.io.File; |
import java.io.FileReader; |
@@ -10,7 +9,7 @@ |
import java.util.List; |
|
/** |
-* Last Updated: 12-February-2016 |
+* Last Updated: 28-April-2016 |
* @author Tyler Wible |
* @since 22-June-2012 |
*/ |
@@ -26,6 +25,8 @@ |
* @param wq_test The word 'flow' or the formatted name for the water quality test being used, Format is: '00600 Total nitrogen, water, unfiltered, milligrams per liter -- mg/L' = '5-digit-USGS-water-quality-test-code test-name -- units' |
* @param beginDate the used defined begin date of search (yyyy-mm-dd) |
* @param endDate the user defined end date of search (yyyy-mm-dd) |
+ * @return if cfaFormat_TF is True, it returns a tab delimited result file containing flow or water quality data: column1 = date(yyyy-mm-dd), column2 = flowValue |
+ * if cfaFormat_TF is False, it returns a tab-delimited result file containing the formated result file of STORET data from the web service query |
* @throws IOException |
* @throws InterruptedException |
*/ |
@@ -104,6 +105,7 @@ |
* @param wq_test The word 'flow' or the formatted name for the water quality test being used, Format is: '00600 Total nitrogen, water, unfiltered, milligrams per liter -- mg/L' = '5-digit-USGS-water-quality-test-code test-name -- units' |
* @param beginDate the used defined begin date of search (yyyy-mm-dd) |
* @param endDate the user defined end date of search (yyyy-mm-dd) |
+ * @return a String[][] containing the flow or water quality data: column1 = date(yyyy-mm-dd), column2 = flowValue |
* @throws IOException |
*/ |
public String[][] getSTORETdata(String mainFolder, |
@@ -11,7 +11,7 @@ |
import java.util.Iterator; |
|
/** |
-* Last Updated: 17-March-2016 |
+* Last Updated: 28-April-2016 |
* @author Tyler Wible |
* @since 21-June-2012 |
*/ |
@@ -21,7 +21,11 @@ |
* @param stationID the USGS station ID for the current station |
* @param beginDate the user specified begin date for the station (yyyy-mm-dd format) |
* @param endDate the user specified end date for the station (yyyy-mm-dd format) |
- * @return a String[][] containing column1 = date(yyyy-mm-dd), column2 = flowValue |
+ * @return a Object[][] containing: |
+ * [0] = an ArrayList<String> containing the data query from the web service |
+ * [1] = a String[][] containing column1 = date(yyyy-mm-dd), column2 = flowValue |
+ * [2] = start data of the data (yyyy-mm-dd) |
+ * [3] = end data of the data (yyyy-mm-dd) |
* @throws IOException |
*/ |
public Object[] getUSGSflowData(String stationID, String beginDate, String endDate) throws IOException{ |
@@ -83,7 +87,7 @@ |
* @param stationID the USGS station ID for the current station |
* @param beginDate the user specified begin date for the station (yyyy-mm-dd format) |
* @param endDate the user specified end date for the station (yyyy-mm-dd format) |
- * @return an ArrayList<String> containing the results of the search for flow data using the above inputs |
+ * @return an ArrayList<String> containing the results of the web service search for flow data using the above inputs |
* @throws IOException |
*/ |
public ArrayList<String> DownloadFlowWebpage(String stationID, String beginDate, String endDate) throws IOException { |
@@ -112,7 +116,11 @@ |
* @param stationID the USGS station ID for the current station |
* @param beginDate the user specified begin date for the station (yyyy-mm-dd format) |
* @param endDate the user specified end date for the station (yyyy-mm-dd format) |
- * @return an ArrayList<String> containing the flow results tab deliminated (stationID \t date \t flowValue) |
+ * @return a Object[][] containing: |
+ * [0] = an ArrayList<String> containing the data query from the web service |
+ * [1] = a double[][] containing column1 = year, column2 = floodValue |
+ * [2] = start data of the data (yyyy-mm-dd) |
+ * [3] = end data of the data (yyyy-mm-dd) |
* @throws IOException |
*/ |
public Object[] getUSGSPeakData(String stationID, String beginDate, String endDate) throws IOException{ |
@@ -163,7 +171,7 @@ |
/** |
* Opens a web connection to USGS and returns the contents of a search for all peak flow data for the specific station |
* @param stationID the USGS station ID for the current station |
- * @return an ArrayList<String> containing the results of the search for flow data using the above inputs |
+ * @return an ArrayList<String> containing the results of the web service search for peak flow data using the above inputs |
* @throws IOException |
*/ |
public ArrayList<String> DownloadPeakFlowWebpage(String stationID) throws IOException { |
@@ -240,7 +248,11 @@ |
* @param stationID the USGS station ID for the current station |
* @param beginDate the user specified begin date for the station (yyyy-mm-dd format) |
* @param endDate the user specified end date for the station (yyyy-mm-dd format) |
- * @return a String[][] containing column1 = date(yyyy-mm-dd), column2 = flowValue |
+ * @return a Object[][] containing: |
+ * [0] = an ArrayList<String> containing the data query from the web service |
+ * [1] = a String[][] containing column1 = date(yyyy-MM-dd hh:mm), column2 = flowValue |
+ * [2] = start data of the data (yyyy-MM-dd hh:mm) |
+ * [3] = end data of the data (yyyy-MM-dd hh:mm) |
* @throws IOException |
*/ |
public Object[] getUSGS15minFlowData(String stationID, String beginDate, String endDate) throws IOException{ |
@@ -312,7 +324,7 @@ |
* @param stationID the USGS station ID for the current station |
* @param beginDate the user specified begin date for the station (yyyy-mm-dd format) |
* @param endDate the user specified end date for the station (yyyy-mm-dd format) |
- * @return an ArrayList<String> containing the results of the search for 15 minute flow data using the above inputs |
+ * @return an ArrayList<String> containing the results of the web service search for 15 minute flow data using the above inputs |
* @throws IOException |
*/ |
public ArrayList<String> Download15minFlowWebpage(String stationID, String beginDate, String endDate) throws IOException { |
@@ -348,7 +360,11 @@ |
/** |
* Get the water quality webpage and loop through and pull out the water quality data for the current station |
* @param stationID the USGS station ID for the current station |
- * @return a String[][] containing column1 = date(yyyy-mm-dd), column2 = flowValue |
+ * @return a Object[][] containing: |
+ * [0] = an ArrayList<String> containing the data query from the web service |
+ * [1] = a String[][] containing column1 = year, column2 = waterQualityValue |
+ * [2] = start data of the data (yyyy-mm-dd) |
+ * [3] = end data of the data (yyyy-mm-dd) |
* @throws IOException |
* @throws InterruptedException |
*/ |
@@ -413,7 +429,7 @@ |
/** |
* Opens a web connection to USGS and returns the contents of a search for all water quality data for the specific station |
* @param stationID the USGS station ID for the current station |
- * @return an ArrayList<String> containing the results of the search for water quality data using the above input |
+ * @return an ArrayList<String> containing the results of the web service search for water quality data using the above input |
* @throws IOException |
* @throws InterruptedException |
*/ |
@@ -478,7 +494,7 @@ |
* Opens a web connection to USGS and returns the contents of a search for all water quality data for the specific station |
* @param stationID the USGS station ID for the current station |
* @param wqTest the 5 digit USGS water qualiyt (WQ) test code that the user has requested for download |
- * @return an ArrayList containing the USGS provided header for the text as well as all the WQ data for the provided wqTest code |
+ * @return an ArrayList containing the USGS provided header for the text as well as water quality data for the provided wqTest code |
* @throws IOException |
* @throws InterruptedException |
*/ |
@@ -600,7 +616,7 @@ |
* @param allWQdata all existing stream water quality data (column 1 = dates, column 2 = flow values) |
* @param beginDate the start of the desired data date range |
* @param endDate the end of the desired data date range |
- * @return |
+ * @return a String[][] containing column1 = date (yyyy-mm-dd), column2 = flowValue based on USGS water quality observations for discharge (codes 00061 and 30209) |
* @throws IOException |
*/ |
public String[][] getUSGSwqFlowData(String[][] flowData, String[][] allWQdata, String beginDate, String endDate) throws IOException{ |
@@ -627,7 +643,9 @@ |
/** |
* Get the rating curve (stage-discharge relationship) data for use by the user |
* @param stationID the USGS station ID for the current station |
- * @return a double[][] containing column1 = discharge(ft3/s), column2 = depth(ft) |
+ * @return a Object[][] containing: |
+ * [0] = an ArrayList<String> containing the data query from the web service |
+ * [1] = a double[][] containing column1 = discharge, column2 = depth |
* @throws IOException |
*/ |
public Object[] getUSGSratingCurve(String stationID) throws IOException{ |
@@ -677,7 +695,7 @@ |
/** |
* Opens a web connection to USGS and returns the contents of a search for 15 minute flow data for the specific station and date range |
* @param stationID the USGS station ID for the current station |
- * @return an ArrayList<String> containing the results of the search for 15 minute flow data using the above inputs |
+ * @return an ArrayList<String> containing the results of the search for rating curve data using the above inputs |
* @throws IOException |
*/ |
public ArrayList<String> DownloadRatingCurveWebpage(String stationID) throws IOException { |
@@ -6,7 +6,7 @@ |
import java.util.Date; |
|
/** |
-* Last Updated: 26-January-2015 |
+* Last Updated: 28-April-2016 |
* @author Tyler Wible |
* @since 12-July-2012 |
*/ |
@@ -60,7 +60,7 @@ |
* yyyy/m/dd, |
* yyyy/m/d) |
* (ex. "Date\tFlow\n1999-04-29\t8.3\n1999-05-09\t60.2\n1999-05-29\t20.1") |
- * @return a string[] containing the header |
+ * @return a string[] containing the header of the first and second datasets (used by loadest and durationcurve-ldc) |
* @throws IOException |
*/ |
private String[] getHeaders(String userData_string) throws IOException{ |
@@ -91,11 +91,9 @@ |
* @param wqTest the water quality test desired "00600 Total nitrogen, water, unfiltered, milligrams per liter -- mg/L" (format: "5-digit test-name -- units") or "flow" |
* @param beginDate the user specified begin date, used to minimize the data returned |
* @param endDate the user specified end date, used to minimize the data returned |
- * @return and object containing two of the following in returnArray[0] and |
- * returnArray[1]: a string[][] with the contents of the user uploaded file |
- * formatted as: column1 = dates (yyyy-mm-dd), column2 = values (expected to |
- * be daily average flow values in cfs or water quality concentrations in |
- * mg/L) |
+ * * @return a Object[][] containing: |
+ * [0] = a String[][] containing flow data: column1 = year, column2 = flowValue |
+ * [1] = a String[][] containing water quality data: column1 = year, column2 = floodValue |
* @throws IOException |
*/ |
public Object[] readUserFileLDC(String database, String stationID, String userData_string, String wqTest, String beginDate, String endDate) throws IOException{ |