# HG changeset patch # User Sascha L. Teichmann # Date 1341736993 0 # Node ID 3c006a53e551e8c6e3ae70f3b898e536463ba234 # Parent 2aca387333d6b3ff053e269420ff0913484c12b5 Replaced tabs with four spaces each. flys-artifacts/trunk@4895 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 2aca387333d6 -r 3c006a53e551 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Sun Jul 08 07:56:46 2012 +0000 +++ b/flys-artifacts/ChangeLog Sun Jul 08 08:43:13 2012 +0000 @@ -1,3 +1,13 @@ +2012-07-08 Sascha L. Teichmann + + * src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java, + src/main/java/de/intevation/flys/artifacts/geom/Polygon2D.java, + src/main/java/de/intevation/flys/artifacts/model/FlowVelocityCalculation.java, + src/main/java/de/intevation/flys/artifacts/model/MiddleBedHeightCalculation.java, + src/main/java/de/intevation/flys/artifacts/access/BedHeightAccess.java, + src/main/java/de/intevation/flys/artifacts/access/FlowVelocityAccess.java: + Replaced tabs with four spaces each. + 2012-07-07 Sascha L. Teichmann * src/main/java/de/intevation/flys/exports/XYChartGenerator.java, diff -r 2aca387333d6 -r 3c006a53e551 flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java Sun Jul 08 07:56:46 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java Sun Jul 08 08:43:13 2012 +0000 @@ -83,7 +83,7 @@ { WINFOArtifact winfo = (WINFOArtifact) artifact; this.data = winfo.cloneData(); - logger.debug("Cloned data of winfo artifact."); + logger.debug("Cloned data of winfo artifact."); // Statically add Facets. List fs = new ArrayList(); DefaultState state = (DefaultState) getCurrentState(context); diff -r 2aca387333d6 -r 3c006a53e551 flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/BedHeightAccess.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/BedHeightAccess.java Sun Jul 08 07:56:46 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/BedHeightAccess.java Sun Jul 08 08:43:13 2012 +0000 @@ -10,101 +10,100 @@ public class BedHeightAccess extends Access { - private static final Logger logger = Logger.getLogger(BedHeightAccess.class); - + private static final Logger logger = Logger.getLogger(BedHeightAccess.class); - private int[] singleIDs; - private int[] epochIDs; + private int[] singleIDs; + private int[] epochIDs; - private Double lowerKM; - private Double upperKM; + private Double lowerKM; + private Double upperKM; - public BedHeightAccess(FLYSArtifact artifact) { - super(artifact); - } + public BedHeightAccess(FLYSArtifact artifact) { + super(artifact); + } - public Double getLowerKM() { - if (lowerKM == null) { - lowerKM = getDouble("ld_from"); - } + public Double getLowerKM() { + if (lowerKM == null) { + lowerKM = getDouble("ld_from"); + } - return lowerKM; + return lowerKM; } public Double getUpperKM() { - if (upperKM == null) { - upperKM = getDouble("ld_to"); - } + if (upperKM == null) { + upperKM = getDouble("ld_to"); + } - return upperKM; + return upperKM; } public int[] getBedHeightSingleIDs() { - if (singleIDs == null) { - String data = getString("soundings"); - - if (data == null) { - logger.warn("No 'soundings' parameter specified!"); - return null; - } - - String[] parts = data.split(";"); - - TIntArrayList ids = new TIntArrayList(); + if (singleIDs == null) { + String data = getString("soundings"); - for (String part: parts) { - if (part.indexOf(SoundingsSelect.PREFIX_SINGLE) >= 0) { - String tmp = part.replace(SoundingsSelect.PREFIX_SINGLE, ""); + if (data == null) { + logger.warn("No 'soundings' parameter specified!"); + return null; + } - try { - ids.add(Integer.parseInt(tmp)); - } - catch (NumberFormatException nfe) { - logger.warn("Cannot parse int from string: '" + tmp + "'"); - } - } - } + String[] parts = data.split(";"); - singleIDs = ids.toNativeArray(); - } + TIntArrayList ids = new TIntArrayList(); - return singleIDs; + for (String part: parts) { + if (part.indexOf(SoundingsSelect.PREFIX_SINGLE) >= 0) { + String tmp = part.replace(SoundingsSelect.PREFIX_SINGLE, ""); + + try { + ids.add(Integer.parseInt(tmp)); + } + catch (NumberFormatException nfe) { + logger.warn("Cannot parse int from string: '" + tmp + "'"); + } + } + } + + singleIDs = ids.toNativeArray(); + } + + return singleIDs; } public int[] getBedHeightEpochIDs() { - if (epochIDs == null) { - String data = getString("soundings"); - - if (data == null) { - logger.warn("No 'soundings' parameter specified!"); - return null; - } - - String[] parts = data.split(";"); - - TIntArrayList ids = new TIntArrayList(); + if (epochIDs == null) { + String data = getString("soundings"); - for (String part: parts) { - if (part.indexOf(SoundingsSelect.PREFIX_EPOCH) >= 0) { - String tmp = part.replace(SoundingsSelect.PREFIX_EPOCH, ""); + if (data == null) { + logger.warn("No 'soundings' parameter specified!"); + return null; + } - try { - ids.add(Integer.parseInt(tmp)); - } - catch (NumberFormatException nfe) { - logger.warn("Cannot parse int from string: '" + tmp + "'"); - } - } - } + String[] parts = data.split(";"); - epochIDs = ids.toNativeArray(); - } + TIntArrayList ids = new TIntArrayList(); - return epochIDs; + for (String part: parts) { + if (part.indexOf(SoundingsSelect.PREFIX_EPOCH) >= 0) { + String tmp = part.replace(SoundingsSelect.PREFIX_EPOCH, ""); + + try { + ids.add(Integer.parseInt(tmp)); + } + catch (NumberFormatException nfe) { + logger.warn("Cannot parse int from string: '" + tmp + "'"); + } + } + } + + epochIDs = ids.toNativeArray(); + } + + return epochIDs; } } diff -r 2aca387333d6 -r 3c006a53e551 flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/FlowVelocityAccess.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/FlowVelocityAccess.java Sun Jul 08 07:56:46 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/FlowVelocityAccess.java Sun Jul 08 08:43:13 2012 +0000 @@ -5,50 +5,50 @@ public class FlowVelocityAccess extends Access { - private int[] mainChannels; - private int[] totalChannels; + private int[] mainChannels; + private int[] totalChannels; - private Double lowerKM; - private Double upperKM; + private Double lowerKM; + private Double upperKM; - public FlowVelocityAccess(FLYSArtifact artifact) { - super(artifact); - } + public FlowVelocityAccess(FLYSArtifact artifact) { + super(artifact); + } - public int[] getMainChannels() { - if (mainChannels == null) { - mainChannels = getIntArray("main.channel"); - } + public int[] getMainChannels() { + if (mainChannels == null) { + mainChannels = getIntArray("main.channel"); + } - return mainChannels; + return mainChannels; } public int[] getTotalChannels() { - if (totalChannels == null) { - totalChannels = getIntArray("total.channel"); - } + if (totalChannels == null) { + totalChannels = getIntArray("total.channel"); + } - return totalChannels; + return totalChannels; } public Double getLowerKM() { - if (lowerKM == null) { - lowerKM = getDouble("ld_from"); - } + if (lowerKM == null) { + lowerKM = getDouble("ld_from"); + } - return lowerKM; + return lowerKM; } public Double getUpperKM() { - if (upperKM == null) { - upperKM = getDouble("ld_to"); - } + if (upperKM == null) { + upperKM = getDouble("ld_to"); + } - return upperKM; + return upperKM; } } diff -r 2aca387333d6 -r 3c006a53e551 flys-artifacts/src/main/java/de/intevation/flys/artifacts/geom/Polygon2D.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/geom/Polygon2D.java Sun Jul 08 07:56:46 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/geom/Polygon2D.java Sun Jul 08 08:43:13 2012 +0000 @@ -93,13 +93,13 @@ public double area() { double area = 0d; - for (int i = 0, N = points.size(); i < N; ++i) { - int j = (i + 1) % N; + for (int i = 0, N = points.size(); i < N; ++i) { + int j = (i + 1) % N; Point2D pi = points.get(i); Point2D pj = points.get(j); - area += X(pi)*Y(pj); - area -= X(pj)*Y(pi); - } + area += X(pi)*Y(pj); + area -= X(pj)*Y(pi); + } return 0.5d*area; } diff -r 2aca387333d6 -r 3c006a53e551 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FlowVelocityCalculation.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FlowVelocityCalculation.java Sun Jul 08 07:56:46 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FlowVelocityCalculation.java Sun Jul 08 08:43:13 2012 +0000 @@ -22,7 +22,6 @@ Logger.getLogger(FlowVelocityCalculation.class); - public CalculationResult calculate(FlowVelocityAccess access) { logger.info("FlowVelocityCalculation.calculate"); @@ -30,7 +29,7 @@ int[] totalIds = access.getTotalChannels(); if (logger.isDebugEnabled()) { - Artifact a = access.getArtifact(); + Artifact a = access.getArtifact(); logger.debug("Artifact '" + a.identifier() + "' contains:"); if (mainIds != null) { logger.debug(" " + mainIds.length + " main channel ids"); @@ -79,7 +78,7 @@ protected List getFlowVelocityModels( - FlowVelocityAccess access, + FlowVelocityAccess access, List zones ) { River river = FLYSUtils.getRiver(access.getArtifact()); @@ -132,7 +131,7 @@ protected CalculationResult buildCalculationResult( - FlowVelocityAccess access, + FlowVelocityAccess access, List models ) { double kmLo = access.getLowerKM(); diff -r 2aca387333d6 -r 3c006a53e551 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/MiddleBedHeightCalculation.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/MiddleBedHeightCalculation.java Sun Jul 08 07:56:46 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/MiddleBedHeightCalculation.java Sun Jul 08 08:43:13 2012 +0000 @@ -32,7 +32,7 @@ if (logger.isDebugEnabled()) { - Artifact artifact = access.getArtifact(); + Artifact artifact = access.getArtifact(); logger.debug("Artifact '" + artifact.identifier() + "' contains:"); if (singleIds != null) { @@ -52,8 +52,8 @@ protected List getSingles( - BedHeightAccess access, - int[] ids + BedHeightAccess access, + int[] ids ) { List singles = new ArrayList(); @@ -74,8 +74,8 @@ protected List getEpochs( - BedHeightAccess access, - int[] ids + BedHeightAccess access, + int[] ids ) { List epochs = new ArrayList(); @@ -96,7 +96,7 @@ protected CalculationResult buildCalculationResult( - BedHeightAccess access, + BedHeightAccess access, List singles, List epochs ) {