Mercurial > dive4elements > river
changeset 6101:a0078e5e3b39
Removed unused context from RangeAccess and subclasses leading to some dead code removal.
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/CrossSectionArtifact.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/CrossSectionArtifact.java Sat May 25 19:32:58 2013 +0200 @@ -145,8 +145,6 @@ addStringData(DATA_IS_NEWEST, newString); addStringData(DATA_IS_MASTER, newString); - StaticState state = (StaticState) getCurrentState(context); - if (!fs.isEmpty()) { addFacets(getCurrentStateId(), fs); } @@ -162,7 +160,7 @@ { D4EArtifact flys = (D4EArtifact) artifact; - RangeAccess rangeAccess = new RangeAccess(flys, null); + RangeAccess rangeAccess = new RangeAccess(flys); double[] range = rangeAccess.getKmRange(); double min = 0.0f; if (range != null && range.length > 0) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java Sat May 25 19:32:58 2013 +0200 @@ -240,7 +240,7 @@ protected void initialize(Artifact artifact, Object context, CallMeta meta) { logger.debug("MainValuesArtifact.initialize"); D4EArtifact winfo = (D4EArtifact) artifact; - RangeAccess rangeAccess = new RangeAccess(winfo, null); + RangeAccess rangeAccess = new RangeAccess(winfo); double [] locations = rangeAccess.getKmRange(); if (locations != null) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java Sat May 25 19:32:58 2013 +0200 @@ -242,7 +242,7 @@ return error(new WQKms[0], "no.wst.for.selected.river"); } - RangeAccess rangeAccess = new RangeAccess(this, null); + RangeAccess rangeAccess = new RangeAccess(this); double [] range = rangeAccess.getKmRange(); if (range == null) { return error(new WQKms[0], "no.range.found"); @@ -321,7 +321,7 @@ return error(null, "no.gauge.selected"); } - RangeAccess rangeAccess = new RangeAccess(this, null); + RangeAccess rangeAccess = new RangeAccess(this); double[] locations = rangeAccess.getLocations(); if (locations == null) { @@ -379,7 +379,7 @@ return error(new WQKms[0], "no.river.selected"); } - RangeAccess rangeAccess = new RangeAccess(this, null); + RangeAccess rangeAccess = new RangeAccess(this); double[] locations = rangeAccess.getLocations(); if (locations == null) { @@ -677,7 +677,7 @@ return null; } - RangeAccess rangeAccess = new RangeAccess(this, null); + RangeAccess rangeAccess = new RangeAccess(this); double [] range = rangeAccess.getKmRange(); if (range == null) { logger.warn("no ranges found"); @@ -849,7 +849,7 @@ */ public double[] getKms() { if (isRange()) { - RangeAccess rangeAccess = new RangeAccess(this, null); + RangeAccess rangeAccess = new RangeAccess(this); double [] distance = rangeAccess.getKmRange(); return getKms(distance); @@ -864,7 +864,7 @@ if (!isRange()) { return null; } - RangeAccess rangeAccess = new RangeAccess(this, null); + RangeAccess rangeAccess = new RangeAccess(this); double [] fromTo = rangeAccess.getKmRange(); if (fromTo == null) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedHeightAccess.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedHeightAccess.java Sat May 25 19:32:58 2013 +0200 @@ -35,8 +35,8 @@ private String time; - public BedHeightAccess(D4EArtifact artifact, CallContext context) { - super(artifact, context); + public BedHeightAccess(D4EArtifact artifact) { + super(artifact); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedQualityAccess.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedQualityAccess.java Sat May 25 19:32:58 2013 +0200 @@ -33,7 +33,7 @@ public BedQualityAccess(D4EArtifact artifact, CallContext context) { - super(artifact, context); + super(artifact); } public List<DateRange> getDateRanges() {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/Calculation4Access.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/Calculation4Access.java Sat May 25 19:32:58 2013 +0200 @@ -34,7 +34,7 @@ public Calculation4Access(D4EArtifact artifact) { - super(artifact, null); + super(artifact); } public List<Segment> getSegments() {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/ExtremeAccess.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/ExtremeAccess.java Sat May 25 19:32:58 2013 +0200 @@ -38,8 +38,8 @@ protected List<RangeWithValues> ranges; - public ExtremeAccess(D4EArtifact artifact, CallContext context) { - super(artifact, context); + public ExtremeAccess(D4EArtifact artifact) { + super(artifact); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/FixAccess.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/FixAccess.java Sat May 25 19:32:58 2013 +0200 @@ -33,8 +33,8 @@ protected String function; - public FixAccess(D4EArtifact artifact, CallContext context) { - super(artifact, context); + public FixAccess(D4EArtifact artifact) { + super(artifact); } public Long getStart() {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/FixAnalysisAccess.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/FixAnalysisAccess.java Sat May 25 19:32:58 2013 +0200 @@ -30,8 +30,8 @@ protected double [] qs; - public FixAnalysisAccess(D4EArtifact artifact, CallContext context) { - super(artifact, context); + public FixAnalysisAccess(D4EArtifact artifact) { + super(artifact); } public DateRange getReferencePeriod() {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/FixRealizingAccess.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/FixRealizingAccess.java Sat May 25 19:32:58 2013 +0200 @@ -28,8 +28,8 @@ protected List<Segment> segments; - public FixRealizingAccess(D4EArtifact artifact, CallContext context) { - super(artifact, context); + public FixRealizingAccess(D4EArtifact artifact) { + super(artifact); } public Boolean isQ() {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/FlowVelocityAccess.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/FlowVelocityAccess.java Sat May 25 19:32:58 2013 +0200 @@ -21,8 +21,8 @@ private int[] mainChannels; private int[] totalChannels; - public FlowVelocityAccess(D4EArtifact artifact, CallContext context) { - super(artifact, context); + public FlowVelocityAccess(D4EArtifact artifact) { + super(artifact); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/GaugeAccess.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/GaugeAccess.java Sat May 25 19:32:58 2013 +0200 @@ -21,8 +21,8 @@ { private static Logger logger = Logger.getLogger(GaugeAccess.class); - public GaugeAccess(D4EArtifact artifact, CallContext context) { - super(artifact, context); + public GaugeAccess(D4EArtifact artifact) { + super(artifact); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/MapAccess.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/MapAccess.java Sat May 25 19:32:58 2013 +0200 @@ -20,8 +20,8 @@ extends RangeAccess { - public MapAccess(D4EArtifact artifact, CallContext context) { - super(artifact, context); + public MapAccess(D4EArtifact artifact) { + super(artifact); } public List<String> getHWS() {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/RangeAccess.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/RangeAccess.java Sat May 25 19:32:58 2013 +0200 @@ -25,8 +25,6 @@ { private static Logger logger = Logger.getLogger(RangeAccess.class); - private CallContext context; - public static enum KM_MODE { RANGE, LOCATIONS, NONE }; double[] kmRange; @@ -40,9 +38,8 @@ private KM_MODE mode; - public RangeAccess(D4EArtifact artifact, CallContext context) { + public RangeAccess(D4EArtifact artifact) { super(artifact); - this.context = context; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/SedimentLoadAccess.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/SedimentLoadAccess.java Sat May 25 19:32:58 2013 +0200 @@ -28,8 +28,8 @@ private String time; private String unit; - public SedimentLoadAccess(D4EArtifact artifact, CallContext context) { - super(artifact, context); + public SedimentLoadAccess(D4EArtifact artifact) { + super(artifact); } public Double getLowerKM() {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/extreme/ExtremeCurveFacet.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/extreme/ExtremeCurveFacet.java Sat May 25 19:32:58 2013 +0200 @@ -95,7 +95,7 @@ logger.debug("A curve at km = " + currentKm); Curve c = curveEntry.getValue(); // Find segment in which the curr. km is located. - ExtremeAccess access = new ExtremeAccess(flys, context); + ExtremeAccess access = new ExtremeAccess(flys); double[] ds = access.getValuesForRange(currentKm);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAnalysisPeriodsFacet.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAnalysisPeriodsFacet.java Sat May 25 19:32:58 2013 +0200 @@ -69,7 +69,6 @@ if (artifact instanceof D4EArtifact) { D4EArtifact flys = (D4EArtifact)artifact; - FixAnalysisAccess access = new FixAnalysisAccess(flys, context); CalculationResult res = (CalculationResult) flys.compute(context,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAvSectorFacet.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAvSectorFacet.java Sat May 25 19:32:58 2013 +0200 @@ -69,7 +69,6 @@ if (artifact instanceof D4EArtifact) { D4EArtifact flys = (D4EArtifact)artifact; - FixAnalysisAccess access = new FixAnalysisAccess(flys, context); CalculationResult res = (CalculationResult) flys.compute(context,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixDerivateFacet.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixDerivateFacet.java Sat May 25 19:32:58 2013 +0200 @@ -75,7 +75,7 @@ } D4EArtifact flys = (D4EArtifact)artifact; - FixAnalysisAccess access = new FixAnalysisAccess(flys, context); + FixAnalysisAccess access = new FixAnalysisAccess(flys); CalculationResult res = (CalculationResult) flys.compute(context,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixDeviationFacet.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixDeviationFacet.java Sat May 25 19:32:58 2013 +0200 @@ -67,7 +67,6 @@ logger.debug("FixDeviationFacet.getData"); if (artifact instanceof D4EArtifact) { D4EArtifact flys = (D4EArtifact)artifact; - FixAnalysisAccess access = new FixAnalysisAccess(flys, context); CalculationResult res = (CalculationResult) flys.compute(context,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixEventFacet.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixEventFacet.java Sat May 25 19:32:58 2013 +0200 @@ -50,7 +50,7 @@ public Object getData(Artifact artifact, CallContext context) { logger.debug("FixEventFacet.getData"); - FixRealizingAccess access = new FixRealizingAccess((D4EArtifact) artifact, context); + FixRealizingAccess access = new FixRealizingAccess((D4EArtifact) artifact); int wstColID = access.getEvents()[index]; return WQKmsFactory.getWQKmsCID(wstColID); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalDeviationFacet.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalDeviationFacet.java Sat May 25 19:32:58 2013 +0200 @@ -72,7 +72,6 @@ if (artifact instanceof D4EArtifact) { D4EArtifact flys = (D4EArtifact)artifact; - FixAnalysisAccess access = new FixAnalysisAccess(flys, context); CalculationResult res = (CalculationResult) flys.compute(context,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalReferenceFacet.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalReferenceFacet.java Sat May 25 19:32:58 2013 +0200 @@ -72,7 +72,6 @@ if (artifact instanceof D4EArtifact) { D4EArtifact flys = (D4EArtifact)artifact; - FixAnalysisAccess access = new FixAnalysisAccess(flys, context); CalculationResult res = (CalculationResult) flys.compute(context,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixWQCurveFacet.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixWQCurveFacet.java Sat May 25 19:32:58 2013 +0200 @@ -69,7 +69,7 @@ logger.debug("getData"); if (artifact instanceof D4EArtifact) { D4EArtifact flys = (D4EArtifact)artifact; - FixAnalysisAccess access = new FixAnalysisAccess(flys, context); + FixAnalysisAccess access = new FixAnalysisAccess(flys); CalculationResult res = (CalculationResult) flys.compute(context,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFacet.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFacet.java Sat May 25 19:32:58 2013 +0200 @@ -38,7 +38,7 @@ */ @Override public Object getData(Artifact artifact, CallContext context) { - BedHeightAccess access = new BedHeightAccess((D4EArtifact)artifact, context); + BedHeightAccess access = new BedHeightAccess((D4EArtifact)artifact); if (type.equals("singlevalues")) { return access.getSingleValues(); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DistanceOnlySelect.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DistanceOnlySelect.java Sat May 25 19:32:58 2013 +0200 @@ -34,7 +34,7 @@ D4EArtifact flys = (D4EArtifact) artifact; try { - RangeAccess rangeAccess = new RangeAccess(flys, null); + RangeAccess rangeAccess = new RangeAccess(flys); double from = rangeAccess.getFrom(); double to = rangeAccess.getTo();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DurationCurveState.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DurationCurveState.java Sat May 25 19:32:58 2013 +0200 @@ -75,7 +75,7 @@ WQDay wqday = (WQDay)res.getData(); if (wqday != null && facets != null) { - RangeAccess rangeAccess = new RangeAccess(winfo, context); + RangeAccess rangeAccess = new RangeAccess(winfo); // Create an i18ed name for a (w or q) duration curve facet. Object[] args = new Object[] { RiverUtils.getRiver(winfo).getName(),
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.java Sat May 25 19:32:58 2013 +0200 @@ -483,7 +483,7 @@ protected void setRange(D4EArtifact artifact, WSPLGENJob job) { - RangeAccess rangeAccess = new RangeAccess(artifact, null); + RangeAccess rangeAccess = new RangeAccess(artifact); double[] range = rangeAccess.getKmRange(); job.setStart(range[0]);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FlowVelocityState.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FlowVelocityState.java Sat May 25 19:32:58 2013 +0200 @@ -70,7 +70,7 @@ List<Facet> newFacets = new ArrayList<Facet>(); - FlowVelocityAccess access = new FlowVelocityAccess(artifact, context); + FlowVelocityAccess access = new FlowVelocityAccess(artifact); CalculationResult res = old instanceof CalculationResult ? (CalculationResult) old
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSBarriersState.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSBarriersState.java Sat May 25 19:32:58 2013 +0200 @@ -110,7 +110,7 @@ return null; } - MapAccess access = new MapAccess(artifact, context); + MapAccess access = new MapAccess(artifact); String river = access.getRiver(); HWSContainer hwsLines = HWSFactory.getHWSLines(river); HWSContainer hwsPoints = HWSFactory.getHWSPoints(river);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MiddleBedHeight.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MiddleBedHeight.java Sat May 25 19:32:58 2013 +0200 @@ -46,7 +46,7 @@ List<Facet> newFacets = new ArrayList<Facet>(); - BedHeightAccess access = new BedHeightAccess(artifact, context); + BedHeightAccess access = new BedHeightAccess(artifact); CalculationResult res = old instanceof CalculationResult ? (CalculationResult) old
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/RangeState.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/RangeState.java Sat May 25 19:32:58 2013 +0200 @@ -83,7 +83,7 @@ D4EArtifact flys = (D4EArtifact) artifact; try { - RangeAccess rangeAccess = new RangeAccess(flys, null); + RangeAccess rangeAccess = new RangeAccess(flys); double from = rangeAccess.getFrom(); double to = rangeAccess.getTo(); double step = rangeAccess.getStep();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQAdapted.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQAdapted.java Sat May 25 19:32:58 2013 +0200 @@ -137,7 +137,7 @@ D4EArtifact flysArtifact = (D4EArtifact) artifact; - RangeAccess rangeAccess = new RangeAccess(flysArtifact, context); + RangeAccess rangeAccess = new RangeAccess(flysArtifact); double[] dist = rangeAccess.getKmRange(); // TODO use Access to get River and gauges. River river = RiverUtils.getRiver(flysArtifact);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/ExtremeCompute.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/ExtremeCompute.java Sat May 25 19:32:58 2013 +0200 @@ -61,7 +61,7 @@ CalculationResult res; - ExtremeAccess access = new ExtremeAccess(artifact, context); + ExtremeAccess access = new ExtremeAccess(artifact); if (old instanceof CalculationResult) { res = (CalculationResult)old;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/ExtremeQInput.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/ExtremeQInput.java Sat May 25 19:32:58 2013 +0200 @@ -86,7 +86,7 @@ D4EArtifact flysArtifact = (D4EArtifact) artifact; - ExtremeAccess access = new ExtremeAccess(flysArtifact, context); + ExtremeAccess access = new ExtremeAccess(flysArtifact); River river = RiverFactory.getRiver(access.getRiver()); WstValueTable wstValueTable = WstValueTableFactory.getTable(river);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixAnalysisCompute.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixAnalysisCompute.java Sat May 25 19:32:58 2013 +0200 @@ -133,8 +133,7 @@ CalculationResult res; - FixAnalysisAccess access = - new FixAnalysisAccess(artifact, context); + FixAnalysisAccess access = new FixAnalysisAccess(artifact); if (old instanceof CalculationResult) { res = (CalculationResult)old;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixRealizingCompute.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixRealizingCompute.java Sat May 25 19:32:58 2013 +0200 @@ -71,8 +71,7 @@ CalculationResult res; - FixRealizingAccess access = - new FixRealizingAccess(artifact, context); + FixRealizingAccess access = new FixRealizingAccess(artifact); if (old instanceof CalculationResult) { res = (CalculationResult) old;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferenceSelect.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferenceSelect.java Sat May 25 19:32:58 2013 +0200 @@ -63,7 +63,7 @@ CallContext context) { Element[] elements = new Element[1]; - BedHeightAccess bha = new BedHeightAccess((D4EArtifact)artifact, context); + BedHeightAccess bha = new BedHeightAccess((D4EArtifact)artifact); String time = bha.getYearEpoch(); elements[0] = createItem( ec,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadCalculate.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadCalculate.java Sat May 25 19:32:58 2013 +0200 @@ -55,7 +55,7 @@ List<Facet> newFacets = new ArrayList<Facet>(); - SedimentLoadAccess access = new SedimentLoadAccess(artifact, context); + SedimentLoadAccess access = new SedimentLoadAccess(artifact); CalculationResult res = old instanceof CalculationResult ? (CalculationResult) old : new SedimentLoadCalculation().calculate(access);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadYearSelect.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadYearSelect.java Sat May 25 19:32:58 2013 +0200 @@ -44,7 +44,7 @@ public boolean validate(Artifact artifact) throws IllegalArgumentException { - SedimentLoadAccess access = new SedimentLoadAccess((D4EArtifact) artifact, null); + SedimentLoadAccess access = new SedimentLoadAccess((D4EArtifact) artifact); // Second year should be later than first. if (access.getPeriod() != null && access.getPeriod()[1] < access.getPeriod()[0])
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ATExporter.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ATExporter.java Sat May 25 19:32:58 2013 +0200 @@ -95,7 +95,7 @@ } River river = RiverUtils.getRiver(master); - RangeAccess rangeAccess = new RangeAccess(master, context); + RangeAccess rangeAccess = new RangeAccess(master); double[] kms = rangeAccess.getLocations(); Gauge gauge = river.determineGaugeByPosition(kms[0]);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator.java Sat May 25 19:32:58 2013 +0200 @@ -1432,7 +1432,7 @@ protected double[] getRange() { D4EArtifact flys = (D4EArtifact) master; - RangeAccess rangeAccess = new RangeAccess(flys, null); + RangeAccess rangeAccess = new RangeAccess(flys); return rangeAccess.getKmRange(); }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveExporter.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveExporter.java Sat May 25 19:32:58 2013 +0200 @@ -129,7 +129,7 @@ logger.debug("ComputedDischargeCurveExporter.writeCSVHeader"); String unit = RiverUtils.getRiver((D4EArtifact) master).getWstUnit().getName(); - RangeAccess access = new RangeAccess((D4EArtifact)master, context); + RangeAccess access = new RangeAccess((D4EArtifact)master); double[] km = access.getLocations(); String header = msg(CSV_W_HEADER, DEFAULT_CSV_W_HEADER, new Object[] { unit }); @@ -218,7 +218,7 @@ source.addMetaData("date", df.format(new Date())); - RangeAccess rangeAccess = new RangeAccess(flys, null); + RangeAccess rangeAccess = new RangeAccess(flys); double[] kms = rangeAccess.getKmRange(); source.addMetaData("range", String.valueOf(kms[0]));
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DurationCurveExporter.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/DurationCurveExporter.java Sat May 25 19:32:58 2013 +0200 @@ -227,7 +227,7 @@ source.addMetaData("date", df.format(new Date())); - RangeAccess rangeAccess = new RangeAccess(flys, null); + RangeAccess rangeAccess = new RangeAccess(flys); double[] kms = rangeAccess.getKmRange(); source.addMetaData("range", String.valueOf(kms[0]));
--- a/artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityGenerator.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityGenerator.java Sat May 25 19:32:58 2013 +0200 @@ -240,13 +240,13 @@ } else if (getXBounds(0) == null && getDomainAxisRange() == null) { D4EArtifact artifact = (D4EArtifact)artifactAndFacet.getArtifact(); - FlowVelocityAccess access = new FlowVelocityAccess(artifact, context); + FlowVelocityAccess access = new FlowVelocityAccess(artifact); context.putContextValue("startkm", access.getLowerKM()); context.putContextValue("endkm", access.getUpperKM()); } else if (getXBounds(0) == null && getDomainAxisRange() != null){ D4EArtifact artifact = (D4EArtifact)artifactAndFacet.getArtifact(); - FlowVelocityAccess access = new FlowVelocityAccess(artifact, context); + FlowVelocityAccess access = new FlowVelocityAccess(artifact); Bounds b = new DoubleBounds(access.getLowerKM(), access.getUpperKM()); Bounds bounds = calculateZoom(b, getDomainAxisRange());
--- a/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java Sat May 25 19:32:58 2013 +0200 @@ -346,7 +346,7 @@ new Object[] { RiverUtils.getRivername(flys) }) }); - RangeAccess rangeAccess = new RangeAccess(flys, null); + RangeAccess rangeAccess = new RangeAccess(flys); double[] kms = rangeAccess.getKmRange(); writer.writeNext(new String[] { Resources.getMsg( @@ -573,7 +573,7 @@ } else if (flys instanceof FixationArtifact) { // Get W/Q input per gauge for this case. - FixRealizingAccess fixAccess = new FixRealizingAccess(flys, getCallContext()); + FixRealizingAccess fixAccess = new FixRealizingAccess(flys); segments = fixAccess.getSegments(); if (segments != null && !segments.isEmpty()) { isFixRealize = true; @@ -772,7 +772,7 @@ source.addMetaData("date", df.format(new Date())); - RangeAccess rangeAccess = new RangeAccess(flys, null); + RangeAccess rangeAccess = new RangeAccess(flys); double[] kms = rangeAccess.getKmRange(); source.addMetaData("range", kms[0] + " - " + kms[kms.length-1]);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java Sat May 25 19:32:58 2013 +0200 @@ -159,7 +159,7 @@ @Override protected String getDefaultChartSubtitle() { - FixAnalysisAccess access = new FixAnalysisAccess(artifact, context); + FixAnalysisAccess access = new FixAnalysisAccess(artifact); DateRange dateRange = access.getDateRange(); DateRange refRange = access.getReferencePeriod();
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixATExport.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixATExport.java Sat May 25 19:32:58 2013 +0200 @@ -62,7 +62,7 @@ logger.debug("No CalculationResult found for AT export."); return; } - FixAccess access = new FixAccess((D4EArtifact)this.master, context); + FixAccess access = new FixAccess((D4EArtifact)this.master); String f = access.getFunction(); if (f == null || f.length() == 0) { logger.debug("No function found for AT export."); @@ -80,7 +80,7 @@ Writer writer = new OutputStreamWriter(out, DEFAULT_CSV_CHARSET); - FixAccess access = new FixAccess((D4EArtifact)this.master, context); + FixAccess access = new FixAccess((D4EArtifact)this.master); FixATWriter atWriter = new FixATWriter(this.function, this.parameters); NodeList nodes = request.getElementsByTagName("km"); String km = nodes.item(0).getTextContent();
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixDeltaWtGenerator.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixDeltaWtGenerator.java Sat May 25 19:32:58 2013 +0200 @@ -118,7 +118,7 @@ @Override protected String getDefaultChartSubtitle() { - FixAnalysisAccess access = new FixAnalysisAccess(artifact, context); + FixAnalysisAccess access = new FixAnalysisAccess(artifact); DateRange dateRange = access.getDateRange(); DateRange refRange = access.getReferencePeriod(); return Resources.format( @@ -234,7 +234,7 @@ logger.debug("doReferencePeriodsOut()"); if (visible) { - FixAnalysisAccess access = new FixAnalysisAccess(artifact, context); + FixAnalysisAccess access = new FixAnalysisAccess(artifact); DateRange refRange = access.getReferencePeriod(); RegularTimePeriod start = new Day(refRange.getFrom());
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java Sat May 25 19:32:58 2013 +0200 @@ -554,7 +554,7 @@ @Override protected String getDefaultChartSubtitle() { - FixAnalysisAccess access = new FixAnalysisAccess(artifact, context); + FixAnalysisAccess access = new FixAnalysisAccess(artifact); DateRange dateRange = access.getDateRange(); DateRange refRange = access.getReferencePeriod(); @@ -586,7 +586,7 @@ StringBuilder buf = new StringBuilder(); // Add analysis periods as additional subtitle - FixAnalysisAccess access = new FixAnalysisAccess(artifact, context); + FixAnalysisAccess access = new FixAnalysisAccess(artifact); DateRange[] aperiods = access.getAnalysisPeriods(); buf.append(msg("fix.analysis.periods")); buf.append(": ");
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceEpochGenerator.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceEpochGenerator.java Sat May 25 19:32:58 2013 +0200 @@ -113,13 +113,13 @@ } else if (getXBounds(0) == null && getDomainAxisRange() == null) { D4EArtifact artifact = (D4EArtifact)bundle.getArtifact(); - FlowVelocityAccess access = new FlowVelocityAccess(artifact, context); + FlowVelocityAccess access = new FlowVelocityAccess(artifact); context.putContextValue("startkm", access.getLowerKM()); context.putContextValue("endkm", access.getUpperKM()); } else if (getXBounds(0) == null && getDomainAxisRange() != null){ D4EArtifact artifact = (D4EArtifact)bundle.getArtifact(); - FlowVelocityAccess access = new FlowVelocityAccess(artifact, context); + FlowVelocityAccess access = new FlowVelocityAccess(artifact); Bounds b = new DoubleBounds(access.getLowerKM(), access.getUpperKM()); Bounds bounds = calculateZoom(b, getDomainAxisRange());
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/SedimentLoadLSGenerator.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/SedimentLoadLSGenerator.java Sat May 25 19:32:58 2013 +0200 @@ -119,13 +119,13 @@ } else if (getXBounds(0) == null && getDomainAxisRange() == null) { D4EArtifact artifact = (D4EArtifact)bundle.getArtifact(); - RangeAccess access = new RangeAccess(artifact, context); + RangeAccess access = new RangeAccess(artifact); context.putContextValue("startkm", access.getFrom()); context.putContextValue("endkm", access.getTo()); } else if (getXBounds(0) == null && getDomainAxisRange() != null){ D4EArtifact artifact = (D4EArtifact)bundle.getArtifact(); - RangeAccess access = new RangeAccess(artifact, context); + RangeAccess access = new RangeAccess(artifact); Bounds b = new DoubleBounds(access.getFrom(), access.getTo()); Bounds bounds = calculateZoom(b, getDomainAxisRange()); @@ -226,7 +226,7 @@ protected String getDefaultYAxisLabel(int pos) { String label = "default"; if (pos == YAXIS.L.idx) { - SedimentLoadAccess access = new SedimentLoadAccess(artifact, context); + SedimentLoadAccess access = new SedimentLoadAccess(artifact); if (access.getUnit().equals("m3_per_a")) { label = msg(I18N_YAXIS_LABEL_2, I18N_YAXIS_LABEL_DEFAULT_2); }
--- a/artifacts/src/main/java/org/dive4elements/river/utils/RiverUtils.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/utils/RiverUtils.java Sat May 25 19:32:58 2013 +0200 @@ -459,7 +459,7 @@ return null; } - RangeAccess rangeAccess = new RangeAccess(flys, null); + RangeAccess rangeAccess = new RangeAccess(flys); double[] dist = rangeAccess.getKmRange(); if (dist == null) { @@ -915,7 +915,7 @@ return null; } - RangeAccess rangeAccess = new RangeAccess(flys, null); + RangeAccess rangeAccess = new RangeAccess(flys); double[] dist = rangeAccess.getKmRange(); if (dist == null) { logger.debug("getGauges: no dist!");
--- a/artifacts/src/main/java/org/dive4elements/river/wsplgen/FacetCreator.java Sat May 25 16:58:27 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/wsplgen/FacetCreator.java Sat May 25 19:32:58 2013 +0200 @@ -85,7 +85,7 @@ protected Envelope getWSPLGENBounds() { String river = getRiver(); - RangeAccess rangeAccess = new RangeAccess(artifact, null); + RangeAccess rangeAccess = new RangeAccess(artifact); double kms[] = rangeAccess.getKmRange(); logger.debug("### getWSPLGENBounds"); @@ -123,7 +123,7 @@ public void createWSPLGENFacet() { String river = getRiver(); - RangeAccess rangeAccess = new RangeAccess(artifact, null); + RangeAccess rangeAccess = new RangeAccess(artifact); double kms[] = rangeAccess.getKmRange(); WSPLGENLayerFacet wsplgen = new WSPLGENLayerFacet(