Mercurial > dive4elements > river
changeset 4736:b195fede1c3b
Remove trailing whitespace.
line wrap: on
line diff
--- a/flys-aft/src/main/java/de/intevation/aft/DIPSGauge.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-aft/src/main/java/de/intevation/aft/DIPSGauge.java Wed Jan 02 13:18:31 2013 +0100 @@ -40,7 +40,7 @@ value = Double.parseDouble(element.getAttribute("WERT")); String dateString = element.getAttribute("GUELTIGAB"); if (dateString.length() == 0) { - throw + throw new IllegalArgumentException("missing GUELTIGAB attribute"); } Matcher m = DATE_PATTERN.matcher(dateString);
--- a/flys-aft/src/main/java/de/intevation/aft/DischargeTable.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-aft/src/main/java/de/intevation/aft/DischargeTable.java Wed Jan 02 13:18:31 2013 +0100 @@ -29,8 +29,8 @@ } public DischargeTable( - int gaugeId, - TimeInterval timeInterval, + int gaugeId, + TimeInterval timeInterval, String description ) { this.gaugeId = gaugeId; @@ -40,9 +40,9 @@ } public DischargeTable( - int id, - int gaugeId, - TimeInterval timeInterval, + int id, + int gaugeId, + TimeInterval timeInterval, String description ) { this(gaugeId, timeInterval, description); @@ -94,7 +94,7 @@ } - protected void loadValues(SymbolicStatement.Instance query) + protected void loadValues(SymbolicStatement.Instance query) throws SQLException { ResultSet rs = query.executeQuery(); @@ -243,7 +243,7 @@ } if (from.compareTo(to) > 0) { - log.warn("AFT: ABFLUSSTAFEL_NR = " + log.warn("AFT: ABFLUSSTAFEL_NR = " + dtId + ": " + from + " > " + to + ". -> swap"); Date temp = from; from = to;
--- a/flys-aft/src/main/java/de/intevation/aft/River.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-aft/src/main/java/de/intevation/aft/River.java Wed Jan 02 13:18:31 2013 +0100 @@ -68,8 +68,8 @@ String gaugeRiver = dipsGauge.getRiverName(); if (!gaugeRiver.equalsIgnoreCase(riverName)) { log.warn( - "DIPS: MESSSTELLE '" + name + - "' is assigned to river '" + gaugeRiver + + "DIPS: MESSSTELLE '" + name + + "' is assigned to river '" + gaugeRiver + "'. Needs to be on '" + riverName + "'."); continue; } @@ -92,7 +92,7 @@ String name = gaugesRs.getString("name"); long number = gaugesRs.getLong("official_number"); if (gaugesRs.wasNull()) { - log.warn("FLYS: Gauge '" + name + + log.warn("FLYS: Gauge '" + name + "' has no official number. Ignored."); continue; } @@ -162,7 +162,7 @@ for (DischargeTable dt: flysDTs) { String description = dt.getDescription(); if (description == null) { - log.warn("FLYS: discharge table " + dt.getId() + log.warn("FLYS: discharge table " + dt.getId() + " has no description. Ignored."); continue; } @@ -254,7 +254,7 @@ "' not in FLYS but in AFT/DIPS. -> Create"); if (!gauge.hasDatums()) { - log.warn("DIPS: Gauge '" + + log.warn("DIPS: Gauge '" + gauge.getAftName() + "' has no datum. Ignored."); continue; } @@ -278,7 +278,7 @@ insertStmnt.execute(); - log.info("FLYS: Created gauge '" + gauge.getAftName() + + log.info("FLYS: Created gauge '" + gauge.getAftName() + "' with id " + gaugeId + "."); gauge.setFlysId(gaugeId);
--- a/flys-aft/src/main/java/de/intevation/aft/SyncContext.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-aft/src/main/java/de/intevation/aft/SyncContext.java Wed Jan 02 13:18:31 2013 +0100 @@ -100,7 +100,7 @@ DIPSGauge oldG = map.put(number, newG); if (oldG != null) { log.warn("DIPS: '" + newG.getName() + - "' collides with '" + oldG.getName() + + "' collides with '" + oldG.getName() + "' on gauge number " + number + "."); } } @@ -112,7 +112,7 @@ return map; } - protected Map<TimeInterval, TimeInterval> loadTimeIntervals() + protected Map<TimeInterval, TimeInterval> loadTimeIntervals() throws SQLException { boolean debug = log.isDebugEnabled(); @@ -121,7 +121,7 @@ new TreeMap<TimeInterval, TimeInterval>(); ResultSet rs = null; - + try { rs = flysStatements .getStatement("select.timeintervals")
--- a/flys-aft/src/main/java/de/intevation/aft/TimeInterval.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-aft/src/main/java/de/intevation/aft/TimeInterval.java Wed Jan 02 13:18:31 2013 +0100 @@ -26,7 +26,7 @@ long s1 = d1 != null ? d1.getTime()/1000L : 0L; long s2 = d2 != null ? d2.getTime()/1000L : 0L; long diff = s1 - s2; - return diff < 0L + return diff < 0L ? -1 : diff > 0L ? 1 : 0; } @@ -34,7 +34,7 @@ @Override public int compareTo(TimeInterval other) { int cmp = compare(start, other.start); - return cmp != 0 + return cmp != 0 ? cmp : compare(stop, other.stop); }
--- a/flys-aft/src/main/java/de/intevation/aft/WQDiff.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-aft/src/main/java/de/intevation/aft/WQDiff.java Wed Jan 02 13:18:31 2013 +0100 @@ -59,7 +59,7 @@ } public void writeChanges( - SyncContext context, + SyncContext context, int tableId ) throws SQLException
--- a/flys-aft/src/main/java/de/intevation/db/ConnectedStatements.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-aft/src/main/java/de/intevation/db/ConnectedStatements.java Wed Jan 02 13:18:31 2013 +0100 @@ -45,12 +45,12 @@ savepoints = new ArrayDeque<Savepoint>(); } else { - log.info("Driver '" + metaData.getDriverName() + + log.info("Driver '" + metaData.getDriverName() + "' does not support savepoints."); } } - public SymbolicStatement.Instance getStatement(String key) + public SymbolicStatement.Instance getStatement(String key) throws SQLException { SymbolicStatement.Instance stmnt = boundStatements.get(key);
--- a/flys-aft/src/main/java/de/intevation/db/Statements.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-aft/src/main/java/de/intevation/db/Statements.java Wed Jan 02 13:18:31 2013 +0100 @@ -57,7 +57,7 @@ protected String driverToProperties() { return - type + "-" + + type + "-" + driver.replace('.', '-').toLowerCase() + ".properties"; }
--- a/flys-aft/src/main/java/de/intevation/db/SymbolicStatement.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-aft/src/main/java/de/intevation/db/SymbolicStatement.java Wed Jan 02 13:18:31 2013 +0100 @@ -46,7 +46,7 @@ } public Instance setInt(String key, int value) - throws SQLException + throws SQLException { List<Integer> pos = positions.get(key.toLowerCase()); if (pos != null) { @@ -59,7 +59,7 @@ } public Instance setString(String key, String value) - throws SQLException + throws SQLException { List<Integer> pos = positions.get(key.toLowerCase()); if (pos != null) { @@ -71,7 +71,7 @@ } public Instance setObject(String key, Object value) - throws SQLException + throws SQLException { List<Integer> pos = positions.get(key.toLowerCase()); if (pos != null) { @@ -83,7 +83,7 @@ } public Instance setTimestamp(String key, Timestamp value) - throws SQLException + throws SQLException { List<Integer> pos = positions.get(key.toLowerCase()); if (pos != null) { @@ -95,7 +95,7 @@ } public Instance setDouble(String key, double value) - throws SQLException + throws SQLException { List<Integer> pos = positions.get(key.toLowerCase()); if (pos != null) { @@ -107,7 +107,7 @@ } public Instance setLong(String key, long value) - throws SQLException + throws SQLException { List<Integer> pos = positions.get(key.toLowerCase()); if (pos != null) { @@ -119,7 +119,7 @@ } public Instance setNull(String key, int sqlType) - throws SQLException + throws SQLException { List<Integer> pos = positions.get(key.toLowerCase()); if (pos != null) {
--- a/flys-aft/src/main/java/de/intevation/utils/XML.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-aft/src/main/java/de/intevation/utils/XML.java Wed Jan 02 13:18:31 2013 +0100 @@ -46,7 +46,7 @@ private static Logger log = Logger.getLogger(XML.class); public static class MapXPathVariableResolver - implements XPathVariableResolver + implements XPathVariableResolver { protected Map<String, String> variables;
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FixationArtifact.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FixationArtifact.java Wed Jan 02 13:18:31 2013 +0100 @@ -59,7 +59,7 @@ ) { FixRealizingResult result = (FixRealizingResult) ((CalculationResult)this.compute(context, ComputeType.ADVANCE, false)).getData(); - + WKms wkms = result.getWQKms()[facetIdx]; double km = csl.getKm();
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java Wed Jan 02 13:18:31 2013 +0100 @@ -125,7 +125,7 @@ "facet.discharge_curves.mainvalues.q", "facet.discharge_curves.mainvalues.q"), true); - + fs.add(qfacet0); fs.add(qfacet1); fs.add(qfacet2);
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/HistoricalDischargeAccess.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/HistoricalDischargeAccess.java Wed Jan 02 13:18:31 2013 +0100 @@ -30,7 +30,7 @@ * This method returns the evaluation mode. The evaluation mode W is set, if * the <b>DATA_EVALUATION_MODE</b> is 0. Otherwise, the evaluation mode Q is * set. - * + * * @return EvaluationMode.W if the parameter <i>historical_mode</i> is set * to 0, otherwise EvaluationMode.Q. */ @@ -47,7 +47,7 @@ * This method returns the time range specified by <i>year_range</i> * parameter. This parameter has to be a string that consists of two long * values (time millis since 1970) separated by a ';'. - * + * * @return the evaluation time range specified by <i>year_range</i>. */ public Timerange getEvaluationTimerange() { @@ -70,7 +70,7 @@ * Otherwise, this method will return a double array of length 0. The values * returned by this method are extracted from string parameter * <i>historical_values</i>. - * + * * @return the input Q values or a double array of length 0. */ public double[] getQs() { @@ -91,7 +91,7 @@ * Otherwise, this method will return a double array of length 0. The values * returned by this method are extracted from string parameter * <i>historical_values</i>. - * + * * @return the input W values or a double array of length 0. */ public double[] getWs() {
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/math/Utils.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/math/Utils.java Wed Jan 02 13:18:31 2013 +0100 @@ -32,7 +32,7 @@ py -= y1; double slope2 = y2 / x2; double slopep = py / px; - if (epsilonEquals(slope2, slopep) + if (epsilonEquals(slope2, slopep) || (epsilonEquals(x2, 0.0) && epsilonEquals(px, 0.0))) { return y2 > EPSILON // Colinear. ? (py < -EPSILON ? -1 : py > y2 ? 1 : 0)
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ManagedFacet.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ManagedFacet.java Wed Jan 02 13:18:31 2013 +0100 @@ -70,7 +70,7 @@ /** * Get uuid of related artifact. - * + * * @return uuid of related artifact. */ public String getArtifact() {
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixingsFacet.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixingsFacet.java Wed Jan 02 13:18:31 2013 +0100 @@ -6,7 +6,7 @@ /** * Facet to access the current Km from the context safely - * + * * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a> */ public class FixingsFacet extends DataFacet {
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/SedimentLoadFactory.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/SedimentLoadFactory.java Wed Jan 02 13:18:31 2013 +0100 @@ -287,7 +287,7 @@ getValues("suspended_sediment", sqlQuery, load); getValues("susp_sand_bed", sqlQuery, load); getValues("susp_sand", sqlQuery, load); - + return load; } else if (type.equals("off_epoch")) { @@ -338,7 +338,7 @@ } /** - * + * */ protected static void getValues ( String fraction,
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/SedimentLoadInfoService.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/SedimentLoadInfoService.java Wed Jan 02 13:18:31 2013 +0100 @@ -81,7 +81,7 @@ Calendar calendar = Calendar.getInstance(); calendar.setTime(sl.getStart()); load.setAttribute( - "date", + "date", String.valueOf(calendar.get(Calendar.YEAR))); } all.appendChild(load);
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FlowVelocityState.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FlowVelocityState.java Wed Jan 02 13:18:31 2013 +0100 @@ -132,7 +132,7 @@ id, hash )); - + } else if(d.getType().equals("main_total")) { newFacets.add(new FlowVelocityFacet(
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeComputeState.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeComputeState.java Wed Jan 02 13:18:31 2013 +0100 @@ -32,7 +32,7 @@ /** * State to calculate historical discharge curves. - * + * * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> */ public class HistoricalDischargeComputeState extends DefaultState implements
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/SedimentLoadCalculate.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/SedimentLoadCalculate.java Wed Jan 02 13:18:31 2013 +0100 @@ -23,7 +23,7 @@ public class SedimentLoadCalculate extends DefaultState -implements FacetTypes +implements FacetTypes { private static final long serialVersionUID = 1L;
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/SedimentLoadDistanceSelect.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/SedimentLoadDistanceSelect.java Wed Jan 02 13:18:31 2013 +0100 @@ -4,7 +4,7 @@ public class SedimentLoadDistanceSelect -extends DistanceOnlySelect +extends DistanceOnlySelect { @Override protected String getUIProvider() {
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/HistoricalDischargeCurveGenerator.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/HistoricalDischargeCurveGenerator.java Wed Jan 02 13:18:31 2013 +0100 @@ -242,10 +242,10 @@ /** * Creates an array that consists of two <i>Minute</i> periods [start, end]. - * + * * @param timerange * Supports start and end time. - * + * * @return an array with two <i>Minute</i> periods [start, end]. */ protected RegularTimePeriod[] newRegularTimePeriod(Timerange timerange) {
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Wed Jan 02 13:18:31 2013 +0100 @@ -798,7 +798,7 @@ * Calculates the start and end km for zoomed charts. * @param bounds The given total bounds (unzoomed). * @param range The range specifying the zoom. - * + * * @return The start and end km for the zoomed chart. */ protected Bounds calculateZoom(Bounds bounds, Range range) {
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/extreme/ExtremeWQCurveGenerator.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/extreme/ExtremeWQCurveGenerator.java Wed Jan 02 13:18:31 2013 +0100 @@ -92,7 +92,7 @@ XYSeries qwseries = new StyledXYSeries(aaf.getFacetDescription(), theme); StyledSeriesBuilder.addPointsQW(qwseries, curve.getQs(), curve.getWs()); - + addAxisSeries(qwseries, YAXIS.W.idx, visible); }
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/DeltaWtExporter.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/DeltaWtExporter.java Wed Jan 02 13:18:31 2013 +0100 @@ -165,7 +165,7 @@ for (KMIndex<AnalysisPeriod []> periods: analysisPeriods) { for (KMIndex.Entry<AnalysisPeriod []> kmEntry: periods) { - + String kmS = kmF.format(kmEntry.getKm()); int analysisCount = 1;
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedDifferenceYearGenerator.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedDifferenceYearGenerator.java Wed Jan 02 13:18:31 2013 +0100 @@ -144,7 +144,7 @@ doBedDifferenceHeightsOut( (BedDiffYearResult)bundle.getData(context), bundle, attr, visible, 1); - } + } else if (processor.canHandle(name)) { processor.doOut(this, bundle, attr, visible, YAXIS.dW.idx); }
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/process/KMIndexProcessor.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/process/KMIndexProcessor.java Wed Jan 02 13:18:31 2013 +0100 @@ -81,7 +81,7 @@ generator.addAxisSeries(series, idx, visible); } - private void doReferenceEventsOut(XYChartGenerator generator, + private void doReferenceEventsOut(XYChartGenerator generator, ArtifactAndFacet aaf, Document doc, boolean visible, int idx) { logger.debug("doReferenceEventOut"); @@ -111,7 +111,7 @@ generator.addAxisDataset(col, idx, visible); } - private void doAnalysisEventsOut(XYChartGenerator generator, + private void doAnalysisEventsOut(XYChartGenerator generator, ArtifactAndFacet aaf, Document doc, boolean visible, int idx) { logger.debug("doAnalysisEventsOut");
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/process/Processor.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/process/Processor.java Wed Jan 02 13:18:31 2013 +0100 @@ -16,7 +16,7 @@ /** * Processes data to generate e.g. a chart. * - * @param generator XYChartGenerator to add output on. + * @param generator XYChartGenerator to add output on. * @param aandf The artifact and facet * @param theme The theme that contains styling information. * @param visible The visibility of the curve. @@ -31,9 +31,9 @@ /** * Returns true if the Processor class is able to generate output for a facet type - * + * * @param facettype Name of the facet type * @return true if the facettype can be processed */ - public boolean canHandle(String facettype); + public boolean canHandle(String facettype); }
--- a/flys-backend/src/main/java/de/intevation/flys/model/RiverAxis.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-backend/src/main/java/de/intevation/flys/model/RiverAxis.java Wed Jan 02 13:18:31 2013 +0100 @@ -35,9 +35,9 @@ private Integer kind; private River river; private LineString geom; - + public static final int DEFAULT_KIND = 0; - + public static final int KIND_OFFICIAL = 1; public static final int KIND_OUTSOURCED = 2; @@ -95,7 +95,7 @@ public static List<RiverAxis> getRiverAxis(String river) { return getRiverAxis(river, DEFAULT_KIND); } - + public static List<RiverAxis> getRiverAxis(String river, int kind) { Session session = SessionHolder.HOLDER.get();
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleInputPanel.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleInputPanel.java Wed Jan 02 13:18:31 2013 +0100 @@ -144,7 +144,7 @@ String vs = Double.valueOf(this.value).toString(); DataItem item = new DefaultDataItem(dataName, dataName, vs); data.add(new DefaultData( - dataName, + dataName, null, null, new DataItem[] { item }));
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationPicker.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationPicker.java Wed Jan 02 13:18:31 2013 +0100 @@ -156,7 +156,7 @@ addTo.setType (ListGridFieldType.ICON); addTo.setWidth (20); addTo.setCellIcon (baseUrl + MSG.markerRed()); - + ListGridField ldescr = new ListGridField("description", MSG.description()); ldescr.setType(ListGridFieldType.TEXT);
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/minfo/SedLoadPeriodPanel.java Tue Jan 01 13:54:08 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/minfo/SedLoadPeriodPanel.java Wed Jan 02 13:18:31 2013 +0100 @@ -181,7 +181,7 @@ protected boolean validateRange(int v1, int v2) { // TODO: Set useful years for validation. Current range is between start // of gregorian calendar and a year in the future... - if ((v1 > 1582 && v1 < 2100) + if ((v1 > 1582 && v1 < 2100) && (v2 > 1582 && v2 < 2100)) { return true; }