Mercurial > dive4elements > river
changeset 8202:e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/AbstractStaticStateArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/AbstractStaticStateArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -41,7 +41,7 @@ private transient StaticState staticstate; - private static final Logger logger = + private static final Logger log = Logger.getLogger(AbstractStaticStateArtifact.class); /** @@ -96,7 +96,7 @@ @Override public Document describe(Document data, CallContext cc) { - logger.debug("Describe artifact: " + identifier()); + log.debug("Describe artifact: " + identifier()); Document desc = XMLUtils.newDocument();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/AnnotationArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/AnnotationArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -45,8 +45,8 @@ extends StaticD4EArtifact implements FacetTypes { - /** The logger for this class. */ - private static Logger logger = Logger.getLogger(AnnotationArtifact.class); + /** The log for this class. */ + private static Logger log = Logger.getLogger(AnnotationArtifact.class); /** The name of the artifact. */ public static final String ARTIFACT_NAME = "annotation"; @@ -86,7 +86,7 @@ Document data, List<Class> loadFacets) { - logger.debug("AnnotationArtifact.setup"); + log.debug("AnnotationArtifact.setup"); String filter = StaticD4EArtifact.getDatacageIDValue(data); String[] splits = filter.split(":"); if (splits.length > 1) { @@ -100,7 +100,7 @@ @Override protected void initialize(Artifact artifact, Object context, CallMeta meta) { - logger.debug("AnnotationArtifact.initialize, id: " + log.debug("AnnotationArtifact.initialize, id: " + artifact.identifier()); D4EArtifact flys = (D4EArtifact) artifact; @@ -114,11 +114,11 @@ state.computeInit(this, hash(), context, meta, fs); if (!fs.isEmpty()) { - logger.debug("Facets to add in AnnotationsArtifact.initialize ."); + log.debug("Facets to add in AnnotationsArtifact.initialize ."); addFacets(getCurrentStateId(), fs); } else { - logger.debug("No facets to add in AnnotationsArtifact.initialize ."); + log.debug("No facets to add in AnnotationsArtifact.initialize ."); } } @@ -147,9 +147,9 @@ */ @Override public Document describe(Document data, CallContext context) { - logger.debug("Describe: the current state is: " + getCurrentStateId()); + log.debug("Describe: the current state is: " + getCurrentStateId()); - if (logger.isDebugEnabled()) { + if (log.isDebugEnabled()) { dumpArtifact(); } @@ -213,22 +213,22 @@ RiverContext.STATE_ENGINE_KEY); for (String stateId: stateIds) { - logger.debug("Append output modes for state: " + stateId); + log.debug("Append output modes for state: " + stateId); DefaultState state = (DefaultState) engine.getState(stateId); List<Output> list = state.getOutputs(); if (list == null || list.isEmpty()) { - logger.debug("-> No output modes for this state."); + log.debug("-> No output modes for this state."); continue; } List<Facet> fs = getFacets(stateId); if (fs == null || fs.isEmpty()) { - logger.debug("No facets found."); + log.debug("No facets found."); continue; } - logger.debug("Found " + fs.size() + " facets in previous states."); + log.debug("Found " + fs.size() + " facets in previous states."); List<Output> generated = generateOutputs(list, fs); @@ -240,24 +240,24 @@ if (cur.validate(this)) { List<Output> list = cur.getOutputs(); if (list != null && list.size() > 0) { - logger.debug( + log.debug( "Append output modes for state: " + cur.getID()); List<Facet> fs = getFacets(cur.getID()); if (fs != null && fs.size() > 0) { List<Output> generated = generateOutputs(list, fs); - logger.debug("Found " + fs.size() + " current facets."); + log.debug("Found " + fs.size() + " current facets."); if (!generated.isEmpty()) { ProtocolUtils.appendOutputModes( doc, outs, generated); } else{ - logger.debug("Cannot append output to generated document."); + log.debug("Cannot append output to generated document."); } } else { - logger.debug("No facets found for the current state."); + log.debug("No facets found for the current state."); } } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/AreaArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/AreaArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -57,8 +57,8 @@ /** Name of state. */ protected static final String AREA_NAME = "area.name"; - /** Own logger. */ - private static final Logger logger = + /** Own log. */ + private static final Logger log = Logger.getLogger(AreaArtifact.class); @@ -79,7 +79,7 @@ Document data, List<Class> loadFacets) { - logger.info("AreaArtifact.setup"); + log.info("AreaArtifact.setup"); super.setup(identifier, factory, context, callMeta, data, loadFacets);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/BedHeightsArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/BedHeightsArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -33,8 +33,8 @@ extends AbstractStaticStateArtifact implements FacetTypes { - /** The logger for this class. */ - private static Logger logger = + /** The log for this class. */ + private static Logger log = Logger.getLogger(BedHeightsArtifact.class); /** Artifact name. */ @@ -58,7 +58,7 @@ * Trivial Constructor. */ public BedHeightsArtifact() { - logger.debug("BedHeightsArtifact.BedHeightsArtifact"); + log.debug("BedHeightsArtifact.BedHeightsArtifact"); } @Override @@ -78,10 +78,10 @@ Document data, List<Class> loadFacets) { - logger.debug("BedHeightsArtifact.setup"); + log.debug("BedHeightsArtifact.setup"); - if (logger.isDebugEnabled()) { - logger.debug(XMLUtils.toString(data)); + if (log.isDebugEnabled()) { + log.debug(XMLUtils.toString(data)); } String code = getDatacageIDValue(data); @@ -134,7 +134,7 @@ addFacets(STATIC_STATE_NAME, facets); } else { - logger.error("Invalid datacage ID '" + code + "'"); + log.error("Invalid datacage ID '" + code + "'"); } } super.setup(identifier, factory, context, callMeta, data, loadFacets); @@ -143,7 +143,7 @@ @Override protected void initStaticState() { - logger.debug("initStaticState " + getName() + " " + identifier()); + log.debug("initStaticState " + getName() + " " + identifier()); StaticState state = new StaticState(STATIC_STATE_NAME); DefaultOutput output = new DefaultOutput( @@ -163,13 +163,13 @@ protected void initialize(Artifact artifact, Object context, CallMeta meta) { // do not clone facets, etc. from master artifact - logger.debug("initialize"); + log.debug("initialize"); importData((D4EArtifact)artifact, "river"); importData((D4EArtifact)artifact, "ld_from"); importData((D4EArtifact)artifact, "ld_to"); - logger.debug("ld_from " + getDataAsString("ld_from")); - logger.debug("ld_to " + getDataAsString("ld_to")); + log.debug("ld_from " + getDataAsString("ld_from")); + log.debug("ld_to " + getDataAsString("ld_to")); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/ChartArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/ChartArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -40,7 +40,7 @@ /** Artifact, open to generate any (?) out. */ public class ChartArtifact extends D4EArtifact { - private static final Logger logger = + private static final Logger log = Logger.getLogger(ChartArtifact.class); @Override @@ -52,7 +52,7 @@ Document data, List<Class> loadFacets) { - logger.debug("ChartArtifact.setup"); + log.debug("ChartArtifact.setup"); this.identifier = identifier; name = "new_chart"; @@ -95,23 +95,23 @@ RiverContext.STATE_ENGINE_KEY); for (String stateId: stateIds) { - logger.debug("Append output modes for state: " + stateId); + log.debug("Append output modes for state: " + stateId); DefaultState state = (DefaultState) engine.getState(stateId); List<Output> list = state.getOutputs(); if (list == null || list.isEmpty()) { - logger.debug("-> No output modes for this state."); + log.debug("-> No output modes for this state."); continue; } List<Facet> fs = getFacets(stateId); if (fs == null || fs.isEmpty()) { - logger.debug("No facets for previous state found."); + log.debug("No facets for previous state found."); continue; } - logger.debug("Found " + fs.size() + " facets in previous states."); + log.debug("Found " + fs.size() + " facets in previous states."); List<Output> generated = generateOutputs(list, fs); @@ -122,7 +122,7 @@ DefaultState cur = (DefaultState) getCurrentState(context); List<Output> list = cur.getOutputs(); if (list != null && list.size() > 0) { - logger.debug( + log.debug( "Append output modes for current state: " + cur.getID()); List<Facet> fs = getFacets(cur.getID()); @@ -130,14 +130,14 @@ if (fs != null && fs.size() > 0) { List<Output> generated = generateOutputs(list, fs); - logger.debug("Found " + fs.size() + " current facets."); + log.debug("Found " + fs.size() + " current facets."); if (!generated.isEmpty()) { ProtocolUtils.appendOutputModes( doc, outs, generated); } } else { - logger.debug("No facets found for the current state."); + log.debug("No facets found for the current state."); } } } @@ -182,7 +182,7 @@ List<Facet> facets, Object old) { - logger.debug("ChartState.computeAdvance"); + log.debug("ChartState.computeAdvance"); return null;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/CrossSectionArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/CrossSectionArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -71,8 +71,8 @@ /** Name of data item storing the next possible km. */ public static final String DATA_NEXT_KM = "cross_section.km.next"; - /** Own logger. */ - private static final Logger logger = + /** Own log. */ + private static final Logger log = Logger.getLogger(CrossSectionArtifact.class); static { @@ -113,7 +113,7 @@ Document data, List<Class> loadFacets) { - logger.info("CrossSectionArtifact.setup"); + log.info("CrossSectionArtifact.setup"); super.setup(identifier, factory, context, callMeta, data, loadFacets); @@ -121,7 +121,7 @@ if (ids != null && ids.length() > 0) { addStringData(DATA_DBID, ids); - logger.debug("CrossSectionArtifacts db-id: " + ids); + log.debug("CrossSectionArtifacts db-id: " + ids); } else { throw new IllegalArgumentException("No attribute 'ids' found!"); @@ -233,7 +233,7 @@ return Integer.parseInt(val); } catch (NumberFormatException e) { - logger.warn("Could not get data " + dataName + " as int", e); + log.warn("Could not get data " + dataName + " as int", e); return 0; } } @@ -251,14 +251,14 @@ private double getParentKm() { String val = getDataAsString(PARENT_KM); if (val == null) { - logger.warn("Empty data: " + PARENT_KM); + log.warn("Empty data: " + PARENT_KM); return 0; } try { return Double.valueOf(val); } catch (NumberFormatException e) { - logger.warn("Could not get data " + PARENT_KM + " as double", e); + log.warn("Could not get data " + PARENT_KM + " as double", e); return 0; } } @@ -272,7 +272,7 @@ return Double.valueOf(val); } catch (NumberFormatException e) { - logger.warn("Could not get data " + DATA_KM + " as double", e); + log.warn("Could not get data " + DATA_KM + " as double", e); return 0; } } @@ -292,7 +292,7 @@ * in the form {{x1, x2} {y1, y2}} ). */ public double [][] getCrossSectionData() { - logger.info("getCrossSectionData() for cross_section.km " + log.info("getCrossSectionData() for cross_section.km " + getDataAsString(DATA_KM)); FastCrossSectionLine line = searchCrossSectionLine(); @@ -317,8 +317,8 @@ CrossSection crossSection = CrossSectionFactory .getCrossSection(getDBID()); - if (logger.isDebugEnabled()) { - logger.debug("dbid " + getDBID() + " : " + crossSection); + if (log.isDebugEnabled()) { + log.debug("dbid " + getDBID() + " : " + crossSection); } NavigableMap<Double, Integer> kms = CrossSectionKMService
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -67,7 +67,7 @@ */ public class D4EArtifact extends DefaultArtifact { - /** The logger that is used in this artifact. */ + /** The log that is used in this artifact. */ private static Logger log = Logger.getLogger(D4EArtifact.class); public static final String COMPUTING_CACHE = "computed.values";
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/ExternalWMSArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/ExternalWMSArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -30,7 +30,7 @@ public static final String NAME = "external_wms"; - private static final Logger logger = + private static final Logger log = Logger.getLogger(ExternalWMSArtifact.class); @@ -49,7 +49,7 @@ Document data, List<Class> loadFacets) { - logger.info("ExternalWMSArtifact.setup"); + log.info("ExternalWMSArtifact.setup"); super.setup(identifier, factory, context, callMeta, data, loadFacets);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/FixationArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/FixationArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,8 +31,8 @@ extends D4EArtifact implements WaterLineArtifact { - /** The logger for this class. */ - private static Logger logger = Logger.getLogger(FixationArtifact.class); + /** The log for this class. */ + private static Logger log = Logger.getLogger(FixationArtifact.class); /** The name of the artifact. */ public static final String ARTIFACT_NAME = "fixanalysis"; @@ -43,7 +43,7 @@ * The default constructor. */ public FixationArtifact() { - logger.debug("ctor()"); + log.debug("ctor()"); } /** @@ -78,7 +78,7 @@ wAtKm = StaticWKmsArtifact.getWAtKm(wkms, km); if (wAtKm == -1 || Double.isNaN(wAtKm)) { - logger.warn("Waterlevel at km " + km + " unknown."); + log.warn("Waterlevel at km " + km + " unknown."); return new Lines.LineData(new double[][] {{}}, 0d, 0d); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityMeasurementArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityMeasurementArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -42,8 +42,8 @@ extends StaticD4EArtifact implements FacetTypes { - /** The logger for this class. */ - private static Logger logger = + /** The log for this class. */ + private static Logger log = Logger.getLogger(FlowVelocityMeasurementArtifact.class); /** Artifact key name. */ @@ -75,7 +75,7 @@ * Trivial Constructor. */ public FlowVelocityMeasurementArtifact() { - logger.debug("FlowVelocityMeasurementArtifact.FlowVelocityMeasurementArtifact"); + log.debug("FlowVelocityMeasurementArtifact.FlowVelocityMeasurementArtifact"); } @@ -115,12 +115,12 @@ Document data, List<Class> loadFacets) { - logger.debug("FlowVelocityMeasurementArtifact.setup"); + log.debug("FlowVelocityMeasurementArtifact.setup"); state = new StaticState(STATIC_STATE_NAME); - if (logger.isDebugEnabled()) { - logger.debug(XMLUtils.toString(data)); + if (log.isDebugEnabled()) { + log.debug(XMLUtils.toString(data)); } List<Facet> fs = new ArrayList<Facet>(); @@ -136,7 +136,7 @@ FlowVelocityMeasurementFactory.getFlowVelocityMeasurement( Integer.parseInt(code)); String name = flowVelocityMeasurement.getDescription(); - logger.debug ("datetime " + flowVelocityMeasurement.getDatetime()); + log.debug ("datetime " + flowVelocityMeasurement.getDatetime()); name += " - " + dateFormatter.format( flowVelocityMeasurement.getDatetime()); @@ -231,7 +231,7 @@ Object context, CallMeta meta) { - logger.debug("initialize"); + log.debug("initialize"); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityModelArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityModelArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -40,8 +40,8 @@ extends StaticD4EArtifact implements FacetTypes { - /** The logger for this class. */ - private static Logger logger = + /** The log for this class. */ + private static Logger log = Logger.getLogger(FlowVelocityModelArtifact.class); /** Artifact key name. */ @@ -79,7 +79,7 @@ * Trivial Constructor. */ public FlowVelocityModelArtifact() { - logger.debug("FlowVelocityModelArtifact.FlowVelocityModelArtifact"); + log.debug("FlowVelocityModelArtifact.FlowVelocityModelArtifact"); } @@ -91,7 +91,7 @@ private Object getFlowVelocity() { - logger.debug("FlowVelocityModelArtifact.getFlowVelocity"); + log.debug("FlowVelocityModelArtifact.getFlowVelocity"); Integer id = getDataAsInteger(DATA_ID); FlowVelocityModel model = FlowVelocityModel.getModel(id); @@ -144,11 +144,11 @@ Document data, List<Class> loadFacets) { - logger.debug("FlowVelocityModelArtifact.setup"); + log.debug("FlowVelocityModelArtifact.setup"); state = newState(); - if (logger.isDebugEnabled()) { - logger.debug(XMLUtils.toString(data)); + if (log.isDebugEnabled()) { + log.debug(XMLUtils.toString(data)); } List<Facet> fs = new ArrayList<Facet>(); @@ -198,7 +198,7 @@ addStringData(DATA_ID, code); } else { - logger.error("No id given."); + log.error("No id given."); } spawnState(); @@ -264,7 +264,7 @@ Object context, CallMeta meta) { - logger.debug("FlowVelocityModelArtifact.initialize"); + log.debug("FlowVelocityModelArtifact.initialize"); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -49,8 +49,8 @@ extends WINFOArtifact implements FacetTypes { - /** The logger for this class. */ - private static Logger logger = Logger.getLogger(GaugeDischargeArtifact.class); + /** The log for this class. */ + private static Logger log = Logger.getLogger(GaugeDischargeArtifact.class); /** The name of the artifact. */ public static final String ARTIFACT_NAME = "gaugedischarge"; @@ -62,7 +62,7 @@ * Trivial Constructor. */ public GaugeDischargeArtifact() { - logger.debug("GaugeDischargeArtifact.GaugeDischargeArtifact()"); + log.debug("GaugeDischargeArtifact.GaugeDischargeArtifact()"); } @@ -81,10 +81,10 @@ Document data, List<Class> loadFacets) { - logger.debug("GaugeDischargeArtifact.setup"); + log.debug("GaugeDischargeArtifact.setup"); String ids = StaticD4EArtifact.getDatacageIDValue(data); addStringData("ids", ids); - logger.debug("id for gaugedischarge: " + ids); + log.debug("id for gaugedischarge: " + ids); String[] splitIds = ids.split(";"); /* We assume that if an id's string with a ; is given that the * format is <gauge_name>;<discharge_table_id>;<facet_desc> @@ -107,7 +107,7 @@ */ @Override protected void initialize(Artifact art, Object context, CallMeta meta) { - logger.debug("GaugeDischargeArtifact.initialize"); + log.debug("GaugeDischargeArtifact.initialize"); List<Facet> fs = new ArrayList<Facet>(); D4EArtifact artifact = (D4EArtifact) art; importData(artifact, "river"); @@ -121,12 +121,12 @@ DefaultState state = (DefaultState) getCurrentState(context); state.computeInit(this, hash(), context, meta, fs); if (!fs.isEmpty()) { - logger.debug("Facets to add in GaugeDischargeArtifact.initialize. (" + log.debug("Facets to add in GaugeDischargeArtifact.initialize. (" + state.getID() + "/ " + getCurrentStateId() + ")."); addFacets(getCurrentStateId(), fs); } else { - logger.debug("No facets to add in GaugeDischargeArtifact.initialize (" + log.debug("No facets to add in GaugeDischargeArtifact.initialize (" + state.getID() + "/ "+getCurrentStateId()+")."); } } @@ -161,14 +161,14 @@ /* // This one would allow to automatically pick the right Gauge. double [] distance = RiverUtils.getKmRange(this); - logger.debug("getDischargeCurveData: get range"); + log.debug("getDischargeCurveData: get range"); if (distance == null) { return error(new WQKms[0], "no.range.found"); } List<Gauge> gauges = river.determineGauges(distance[0], distance[1]); - logger.debug("getDischargeCurveData: got " + gauges.size() + " gauges"); + log.debug("getDischargeCurveData: got " + gauges.size() + " gauges"); if (gauges.isEmpty()) { return error(new WQKms[0], "no.gauge.selected"); @@ -178,7 +178,7 @@ for (int i = 0; i < names.length; ++i) { names[i] = gauges.get(i).getName(); - logger.debug("getDischargeCurveData: name " + names[i]); + log.debug("getDischargeCurveData: name " + names[i]); } */ @@ -193,7 +193,7 @@ try { tableId = Integer.parseInt(ids[1]); } catch (NumberFormatException e) { - logger.error("Discharge tables ids string is wrong." + + log.error("Discharge tables ids string is wrong." + " Fromat is <gauge_name>;<discharge_table_id>;<facet_desc>" + " Fix your Datacage!"); // Let's rather break down completly then show the wrong data. @@ -214,7 +214,7 @@ String name = getGaugeName(); double [][] values = map.get(name); if (values == null) { - logger.error("No values for this gauge / discharge found."); + log.error("No values for this gauge / discharge found."); return error(new WQKms[0], "no.gauge.found"); } for (int i = 0 ; i < values[0].length; i++) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeCurveArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeCurveArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -42,8 +42,8 @@ public class GaugeDischargeCurveArtifact extends AbstractStaticStateArtifact { - /** Private logger. */ - private static final Logger logger = + /** Private log. */ + private static final Logger log = Logger.getLogger(GaugeDischargeCurveArtifact.class); public static final String XPATH_RIVER = "/art:action/art:river/@art:name"; @@ -84,10 +84,10 @@ Document data, List<Class> loadFacets) { - logger.debug("GaugeDischargeCurveArtifact.setup"); + log.debug("GaugeDischargeCurveArtifact.setup"); - if (logger.isDebugEnabled()) { - logger.debug("GaugeDischargeCurveArtifact.setup" + XMLUtils.toString(data)); + if (log.isDebugEnabled()) { + log.debug("GaugeDischargeCurveArtifact.setup" + XMLUtils.toString(data)); } String gaugeref = XMLUtils.xpathString(data, XPATH_GAUGE, ArtifactNamespaceContext.INSTANCE);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/HYKArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/HYKArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -40,8 +40,8 @@ /** Name of data item keeping the km of cs master. */ public static final String HYK_KM = "hyk_artifact.data.km"; - /** Own logger. */ - private static final Logger logger = + /** Own log. */ + private static final Logger log = Logger.getLogger(HYKArtifact.class); static { @@ -67,11 +67,11 @@ Document data, List<Class> loadFacets) { - logger.info("HYKArtifact.setup"); + log.info("HYKArtifact.setup"); String ids = getDatacageIDValue(data); - logger.info("HYKArtifact.setup: id is " + ids); + log.info("HYKArtifact.setup: id is " + ids); addStringData(HYK_ID, ids); @@ -113,7 +113,7 @@ Object context, CallMeta callMeta) { - logger.debug("HYKArtifact.initialize"); + log.debug("HYKArtifact.initialize"); importData((D4EArtifact)artifact, "river"); List<Facet> fs = new ArrayList<Facet>(); @@ -121,11 +121,11 @@ DefaultState state = (DefaultState) getCurrentState(context); state.computeInit(this, hash(), context, callMeta, fs); if (!fs.isEmpty()) { - logger.debug("Facets to add in HYKArtifact.initialize ."); + log.debug("Facets to add in HYKArtifact.initialize ."); addFacets(getCurrentStateId(), fs); } else { - logger.debug("No facets to add in HYKArtifact.initialize (" + log.debug("No facets to add in HYKArtifact.initialize (" + state.getID() + ")."); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -56,8 +56,8 @@ extends StaticD4EArtifact implements FacetTypes { - /** The logger for this class. */ - private static Logger logger = Logger.getLogger(MainValuesArtifact.class); + /** The log for this class. */ + private static Logger log = Logger.getLogger(MainValuesArtifact.class); /** The name of the artifact. */ public static final String ARTIFACT_NAME = "mainvalue"; @@ -94,7 +94,7 @@ * Trivial Constructor. */ public MainValuesArtifact() { - logger.debug("MainValuesArtifact.MainValuesartifact()"); + log.debug("MainValuesArtifact.MainValuesartifact()"); } @@ -110,7 +110,7 @@ Document data, List<Class> loadFacets) { - logger.debug("MainValuesArtifact.setup"); + log.debug("MainValuesArtifact.setup"); state = new StaticState(STATIC_STATE_NAME); initFromGaugeDoc(data, callMeta); @@ -120,7 +120,7 @@ spawnState(); super.setup(identifier, factory, context, callMeta, data, loadFacets); String restriction = getDatacageIDValue(data); - logger.debug("mainvalue restriction " + restriction); + log.debug("mainvalue restriction " + restriction); boolean restricted = restriction.endsWith("q") || restriction.endsWith("w"); if (!restricted || restriction.endsWith("q")) { Facet qfacet0 = new MainValuesQFacet( @@ -201,7 +201,7 @@ if (rivername == null || gaugeref == null || rivername.equals("") || gaugeref.equals("")) { - logger.debug("Not setting MainValuesArtifact up from gauge doc."); + log.debug("Not setting MainValuesArtifact up from gauge doc."); return; } @@ -217,7 +217,7 @@ addData("ld_locations", new DefaultStateData("ld_locations", null, null, String.valueOf(gauge.getStation()))); } catch (NumberFormatException nfe) { - logger.debug("MainValuesArtifact could not parse gaugeref from doc."); + log.debug("MainValuesArtifact could not parse gaugeref from doc."); } } @@ -243,7 +243,7 @@ /** Get important data from the 'calling' artifact. */ @Override protected void initialize(Artifact artifact, Object context, CallMeta meta) { - logger.debug("MainValuesArtifact.initialize"); + log.debug("MainValuesArtifact.initialize"); D4EArtifact winfo = (D4EArtifact) artifact; RangeAccess rangeAccess = new RangeAccess(winfo); double [] locations = rangeAccess.getKmRange(); @@ -254,7 +254,7 @@ String.valueOf(location))); } else { - logger.error("No location for mainvalues given."); + log.error("No location for mainvalues given."); } importData(winfo, "river"); // In the case of DischargeWQCurves, there are no locations, but a gauge. @@ -268,7 +268,7 @@ String.valueOf(g.getStation()))); } else { - logger.error("MainValuesArtifact: No location/gauge."); + log.error("MainValuesArtifact: No location/gauge."); } } } @@ -330,7 +330,7 @@ River river = RiverUtils.getRiver(this); if (river == null) { - logger.error("River is null"); + log.error("River is null"); return null; } @@ -349,12 +349,12 @@ String locationStr = getDataAsString("ld_locations"); if (river == null) { - logger.error("River is null"); + log.error("River is null"); return null; } if (locationStr == null) { - logger.error("Locationstr is null"); + log.error("Locationstr is null"); return null; } @@ -379,7 +379,7 @@ * @return list of Q main values. */ public List<NamedDouble> getMainValuesQ(double[] kms) { - logger.debug("MainValuesArtifact.getMainValuesQ(d)"); + log.debug("MainValuesArtifact.getMainValuesQ(d)"); List<NamedDouble> filteredList = new ArrayList<NamedDouble>(); boolean atGauge = false; Gauge gauge = getGauge(kms[0]); @@ -416,7 +416,7 @@ * @return list of Q main values. */ public List<NamedDouble> getMainValuesQ(boolean atGauge) { - logger.debug("MainValuesArtifact.getMainValuesQ(b)"); + log.debug("MainValuesArtifact.getMainValuesQ(b)"); List<NamedDouble> filteredList = new ArrayList<NamedDouble>(); Gauge gauge = getGauge(); WstValueTable interpolator = WstValueTableFactory.getTable(RiverUtils.getRiver(this));
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/ManualPointsArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/ManualPointsArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -37,15 +37,15 @@ { private static final long serialVersionUID = 7096025125474986011L; - /** The logger for this class. */ - private static Logger logger = Logger.getLogger(ManualPointsArtifact.class); + /** The log for this class. */ + private static Logger log = Logger.getLogger(ManualPointsArtifact.class); /** The name of the artifact. */ public static final String ARTIFACT_NAME = "manualpoints"; public ManualPointsArtifact() { - logger.debug("ManualPointsArtifact.ManualPointsArtifact()"); + log.debug("ManualPointsArtifact.ManualPointsArtifact()"); } @@ -61,7 +61,7 @@ Document data, List<Class> loadFacets) { - logger.debug("ManualPointsArtifact.setup"); + log.debug("ManualPointsArtifact.setup"); super.setup(identifier, factory, context, callMeta, data, loadFacets); initialize(null, context, callMeta); } @@ -97,17 +97,17 @@ /** Setup state and facet. */ @Override protected void initialize(Artifact artifact, Object context, CallMeta meta) { - logger.debug("ManualPointsArtifact.initialize"); + log.debug("ManualPointsArtifact.initialize"); List<Facet> fs = new ArrayList<Facet>(); DefaultState state = (DefaultState) getCurrentState(context); state.computeInit(this, hash(), context, meta, fs); if (!fs.isEmpty()) { - logger.debug("Facets to add in ManualPointsArtifact.initialize ."); + log.debug("Facets to add in ManualPointsArtifact.initialize ."); addFacets(getCurrentStateId(), fs); } else { - logger.debug("No facets to add in ManualPointsArtifact.initialize (" + log.debug("No facets to add in ManualPointsArtifact.initialize (" + state.getID() + ")."); } } @@ -126,7 +126,7 @@ return array.getDouble(0); } catch(JSONException e){ - logger.error("Could not decode json for line."); + log.error("Could not decode json for line."); return 0d; } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/MapArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/MapArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -34,7 +34,7 @@ public class MapArtifact extends D4EArtifact { - private static final Logger logger = + private static final Logger log = Logger.getLogger(MapArtifact.class); @Override @@ -46,7 +46,7 @@ Document data, List<Class> loadFacets) { - logger.debug("MapArtifact.setup"); + log.debug("MapArtifact.setup"); this.identifier = identifier; name = "new_map"; @@ -93,23 +93,23 @@ RiverContext.STATE_ENGINE_KEY); for (String stateId: stateIds) { - logger.debug("Append output modes for state: " + stateId); + log.debug("Append output modes for state: " + stateId); DefaultState state = (DefaultState) engine.getState(stateId); List<Output> list = state.getOutputs(); if (list == null || list.isEmpty()) { - logger.debug("-> No output modes for this state."); + log.debug("-> No output modes for this state."); continue; } List<Facet> fs = getFacets(stateId); if (fs == null || fs.isEmpty()) { - logger.debug("No facets for previous state found."); + log.debug("No facets for previous state found."); continue; } - logger.debug("Found " + fs.size() + " facets in previous states."); + log.debug("Found " + fs.size() + " facets in previous states."); List<Output> generated = generateOutputs(list, fs); @@ -121,7 +121,7 @@ if (cur.validate(this)) { List<Output> list = cur.getOutputs(); if (list != null && list.size() > 0) { - logger.debug( + log.debug( "Append output modes for current state: " + cur.getID()); List<Facet> fs = getFacets(cur.getID()); @@ -129,14 +129,14 @@ if (fs != null && fs.size() > 0) { List<Output> generated = generateOutputs(list, fs); - logger.debug("Found " + fs.size() + " current facets."); + log.debug("Found " + fs.size() + " current facets."); if (!generated.isEmpty()) { ProtocolUtils.appendOutputModes( doc, outs, generated); } } else { - logger.debug("No facets found for the current state."); + log.debug("No facets found for the current state."); } } } @@ -156,7 +156,7 @@ List<Facet> facets, Object old) { - logger.debug("MapState.computeAdvance"); + log.debug("MapState.computeAdvance"); this.artifact = artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/QSectorArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/QSectorArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -40,8 +40,8 @@ public class QSectorArtifact extends StaticD4EArtifact { - /** The logger for this class. */ - private static Logger logger = Logger.getLogger(QSectorArtifact.class); + /** The log for this class. */ + private static Logger log = Logger.getLogger(QSectorArtifact.class); /** The name of the artifact. */ public static final String ARTIFACT_NAME = "qsector"; @@ -51,7 +51,7 @@ * Trivial Constructor. */ public QSectorArtifact() { - logger.debug("QSectorArtifact.QSectorArtifact()"); + log.debug("QSectorArtifact.QSectorArtifact()"); } @@ -67,7 +67,7 @@ Document data, List<Class> loadFacets) { - logger.debug("QSectorArtifact.setup"); + log.debug("QSectorArtifact.setup"); super.setup(identifier, factory, context, callMeta, data, loadFacets); initialize(null, context, callMeta); } @@ -89,19 +89,19 @@ GaugeFinder gf = ggf.getGaugeFinder(river); if (gf == null) { - logger.warn("No gauge finder found for river '" + river + "'"); + log.warn("No gauge finder found for river '" + river + "'"); return null; } GaugeRange gr = gf.find(km); if (gr == null) { - logger.debug("No gauge range found for km " + log.debug("No gauge range found for km " + km + " on river " + river + "."); return null; } - if (logger.isDebugEnabled()) { - logger.debug(gr); + if (log.isDebugEnabled()) { + log.debug(gr); } for (int i = 0; i < FixingsKMChartService.I18N_Q_SECTOR_BOARDERS.length; ++i) { @@ -119,7 +119,7 @@ /** Setup state and facet. */ @Override protected void initialize(Artifact artifact, Object context, CallMeta meta) { - logger.debug("QSectorArtifact.initialize"); + log.debug("QSectorArtifact.initialize"); List<Facet> fs = new ArrayList<Facet>(); D4EArtifact flys = (D4EArtifact) artifact; @@ -128,11 +128,11 @@ DefaultState state = (DefaultState) getCurrentState(context); state.computeInit(this, hash(), context, meta, fs); if (!fs.isEmpty()) { - logger.debug("Facets to add in QSectorArtifact.initialize ."); + log.debug("Facets to add in QSectorArtifact.initialize ."); addFacets(getCurrentStateId(), fs); } else { - logger.debug("No facets to add in QSectorArtifact.initialize (" + log.debug("No facets to add in QSectorArtifact.initialize (" + state.getID() + ")."); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/RiverAxisArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/RiverAxisArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,7 +31,7 @@ public static final String NAME = "riveraxis"; - private static final Logger logger = + private static final Logger log = Logger.getLogger(RiverAxisArtifact.class); @@ -62,7 +62,7 @@ public static class RiverAxisState extends WMSDBState implements FacetTypes { - private static final Logger logger = + private static final Logger log = Logger.getLogger(RiverAxisState.class); protected Geometry geom; @@ -121,7 +121,7 @@ getName(), Integer.parseInt(kind)); } else { if (reproject) { - logger.debug("Query extent for RiverAxis with Srid: " + getSrid()); + log.debug("Query extent for RiverAxis with Srid: " + getSrid()); return GeometryUtils.transform( GeometryUtils.getRiverBoundary(river.getName()), getSrid());
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/SQRelationArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/SQRelationArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,7 +31,7 @@ public class SQRelationArtifact extends StaticD4EArtifact { - private static final Logger logger = + private static final Logger log = Logger.getLogger(SQRelationArtifact.class); public static final String XPATH_RIVER = "/art:action/art:river/@art:name"; @@ -57,11 +57,11 @@ Document data, List<Class> loadFacets) { - logger.debug("SQRelationArtifact.setup()"); + log.debug("SQRelationArtifact.setup()"); String code = getDatacageIDValue(data); - logger.debug("SQRelationDCArtifact.setup Id: " + code); + log.debug("SQRelationDCArtifact.setup Id: " + code); if (code != null && !code.isEmpty()) { /* Case that we were instantiated from the datacage */ @@ -110,9 +110,9 @@ List<Facet> fs = new ArrayList<Facet>(); state.computeInit(this, hash(), context, callMeta, fs); - logger.debug("Init static state computed facets"); + log.debug("Init static state computed facets"); for (Facet face: fs) { - logger.debug("Got a facet with name: " + face.getName()); + log.debug("Got a facet with name: " + face.getName()); } if (hasParameter(StaticSQRelation.Parameter.A, fs)) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/SedimentDensityArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/SedimentDensityArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -36,8 +36,8 @@ extends StaticD4EArtifact implements FacetTypes { - /** The logger for this class. */ - private static Logger logger = + /** The log for this class. */ + private static Logger log = Logger.getLogger(SedimentDensityArtifact.class); /** Artifact key name. */ @@ -63,7 +63,7 @@ * Trivial Constructor. */ public SedimentDensityArtifact() { - logger.debug("SedimentDensityArtifact.SedimentDensityArtifact"); + log.debug("SedimentDensityArtifact.SedimentDensityArtifact"); } @@ -75,7 +75,7 @@ private Object getSedimentDensity() { - logger.debug("SedimentDensityArtifact.getSedimentDensity"); + log.debug("SedimentDensityArtifact.getSedimentDensity"); Integer id = getDataAsInteger(DATA_ID); // TODO use cache if possible @@ -121,11 +121,11 @@ Document data, List<Class> loadFacets) { - logger.debug("SedimentDensityArtifact.setup"); + log.debug("SedimentDensityArtifact.setup"); state = newDensityState(); - if (logger.isDebugEnabled()) { - logger.debug(XMLUtils.toString(data)); + if (log.isDebugEnabled()) { + log.debug(XMLUtils.toString(data)); } List<Facet> fs = new ArrayList<Facet>(); @@ -148,7 +148,7 @@ addStringData(DATA_ID, code); } else { - logger.error("No id given."); + log.error("No id given."); } spawnState(); @@ -214,7 +214,7 @@ Object context, CallMeta meta) { - logger.debug("SedimentDensityArtifact.initialize"); + log.debug("SedimentDensityArtifact.initialize"); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticD4EArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticD4EArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -35,8 +35,8 @@ */ public abstract class StaticD4EArtifact extends D4EArtifact { - /** Private logger. */ - private static final Logger logger = + /** Private log. */ + private static final Logger log = Logger.getLogger(StaticD4EArtifact.class); /** @@ -45,7 +45,7 @@ */ @Override public Document describe(Document data, CallContext cc) { - logger.debug("Describe artifact: " + identifier()); + log.debug("Describe artifact: " + identifier()); Document desc = XMLUtils.newDocument(); @@ -99,14 +99,14 @@ Document doc, ElementCreator creator) { - logger.debug("createOutputModes"); + log.debug("createOutputModes"); Element outs = ProtocolUtils.createArtNode( creator, "outputmodes", null, null); State state = getCurrentState(cc); - logger.debug("Current state is " + state.getID()); + log.debug("Current state is " + state.getID()); List<Output> list = state.getOutputs(); @@ -115,14 +115,14 @@ if (fs != null && fs.size() > 0) { List<Output> generated = generateOutputs(list, fs); - logger.debug("Found " + fs.size() + " current facets."); + log.debug("Found " + fs.size() + " current facets."); if (!generated.isEmpty()) { ProtocolUtils.appendOutputModes( doc, outs, generated); } } else { - logger.debug("No facets found for the current state."); + log.debug("No facets found for the current state."); } } @@ -138,7 +138,7 @@ Document data, List<Class> loadFacets) { - logger.debug("StaticD4EArtifact.setup"); + log.debug("StaticD4EArtifact.setup"); super.setup(identifier, factory, context, callMeta, data, loadFacets); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticMorphWidthArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticMorphWidthArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,8 +28,8 @@ public class StaticMorphWidthArtifact extends AbstractStaticStateArtifact { - /** The logger for this class. */ - private static Logger logger = + /** The log for this class. */ + private static Logger log = Logger.getLogger(StaticMorphWidthArtifact.class); private static final String NAME = "morph-width"; @@ -67,10 +67,10 @@ Document data, List<Class> loadFacets) { - logger.debug("setup"); + log.debug("setup"); - if (logger.isDebugEnabled()) { - logger.debug(XMLUtils.toString(data)); + if (log.isDebugEnabled()) { + log.debug(XMLUtils.toString(data)); } String code = getDatacageIDValue(data); @@ -94,7 +94,7 @@ @Override protected void initStaticState() { - logger.debug("initStaticState " + getName() + " " + identifier()); + log.debug("initStaticState " + getName() + " " + identifier()); StaticState state = new StaticState(STATIC_STATE_NAME); DefaultOutput output = new DefaultOutput(
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticWKmsArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticWKmsArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -58,8 +58,8 @@ extends StaticD4EArtifact implements FacetTypes, WaterLineArtifact { - /** The logger for this class. */ - private static Logger logger = + /** The log for this class. */ + private static Logger log = Logger.getLogger(StaticWKmsArtifact.class); private static final String NAME = "staticwkms"; @@ -86,7 +86,7 @@ * Trivial Constructor. */ public StaticWKmsArtifact() { - logger.debug("StaticWKmsArtifact.StaticWKmsArtifact"); + log.debug("StaticWKmsArtifact.StaticWKmsArtifact"); } @Override @@ -106,12 +106,12 @@ Document data, List<Class> loadFacets) { - logger.debug("StaticWKmsArtifact.setup"); + log.debug("StaticWKmsArtifact.setup"); state = new StaticState(STATIC_STATE_NAME); - if (logger.isDebugEnabled()) { - logger.debug(XMLUtils.toString(data)); + if (log.isDebugEnabled()) { + log.debug(XMLUtils.toString(data)); } List<Facet> fs = new ArrayList<Facet>(); @@ -213,7 +213,7 @@ Object context, CallMeta meta) { - logger.debug("StaticWKmsArtifact.initialize"); + log.debug("StaticWKmsArtifact.initialize"); D4EArtifact winfo = (D4EArtifact) artifact; // TODO: The river is of no interest, so far. addData("river", winfo.getData("river")); @@ -273,7 +273,7 @@ * @return WKms according to parameterization (can be null); */ public WKms getWKms(int idx) { - logger.debug("StaticWKmsArtifact.getWKms"); + log.debug("StaticWKmsArtifact.getWKms"); return WKmsFactory.getWKms( Integer.parseInt(getDataAsString("col_pos")), @@ -415,7 +415,7 @@ public Lines.LineData getWaterLines(int idx, FastCrossSectionLine csl, double next, double prev, CallContext context ) { - logger.debug("getWaterLines(" + idx + ")/" + identifier()); + log.debug("getWaterLines(" + idx + ")/" + identifier()); List<Point2D> points = csl.getPoints(); @@ -436,7 +436,7 @@ } if (wAtKm == -1 || Double.isNaN(wAtKm)) { - logger.warn("Waterlevel at km " + km + " unknown."); + log.warn("Waterlevel at km " + km + " unknown."); return new Lines.LineData(new double[][] {{}}, 0d, 0d); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticWQKmsArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticWQKmsArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -50,8 +50,8 @@ extends StaticD4EArtifact implements FacetTypes, WaterLineArtifact { - /** The logger for this class. */ - private static Logger logger = + /** The log for this class. */ + private static Logger log = Logger.getLogger(StaticWQKmsArtifact.class); public static final String STATIC_STATE_NAME = @@ -79,7 +79,7 @@ * Trivial Constructor. */ public StaticWQKmsArtifact() { - logger.debug("StaticWQKmsArtifact.StaticWQKmsArtifact"); + log.debug("StaticWQKmsArtifact.StaticWQKmsArtifact"); } @@ -99,11 +99,11 @@ Document data, List<Class> loadFacets) { - logger.debug("StaticWQKmsArtifact.setup"); + log.debug("StaticWQKmsArtifact.setup"); // Store the 'ids' (from datacage). - if (logger.isDebugEnabled()) { - logger.debug("StaticWQKmsArtifact.setup" + XMLUtils.toString(data)); + if (log.isDebugEnabled()) { + log.debug("StaticWQKmsArtifact.setup" + XMLUtils.toString(data)); } String code = getDatacageIDValue(data); @@ -141,7 +141,7 @@ Object context, CallMeta meta) { - logger.debug("StaticWQKmsArtifact.initialize"); + log.debug("StaticWQKmsArtifact.initialize"); D4EArtifact flys = (D4EArtifact) artifact; // TODO: The river is of no interest, so far., also use importData importData(flys, "river"); @@ -151,11 +151,11 @@ DefaultState state = (DefaultState) getCurrentState(context); state.computeInit(this, hash(), context, meta, fs); if (!fs.isEmpty()) { - logger.debug("Facets to add in StaticWQKmsArtifact.initialize ."); + log.debug("Facets to add in StaticWQKmsArtifact.initialize ."); addFacets(getCurrentStateId(), fs); } else { - logger.debug("No facets to add in StaticWQKmsArtifact.initialize (" + log.debug("No facets to add in StaticWQKmsArtifact.initialize (" + state.getID() + ")."); } } @@ -166,7 +166,7 @@ * @return WQKms according to parameterization (can be null); */ public WQKms getWQKms() { - logger.debug("StaticWQKmsArtifact.getWQKms"); + log.debug("StaticWQKmsArtifact.getWQKms"); int col = Integer.parseInt(getDataAsString("col_pos")); int wst = Integer.parseInt(getDataAsString("wst_id")); @@ -202,7 +202,7 @@ public Lines.LineData getWaterLines(int idx, FastCrossSectionLine csl, double next, double prev, CallContext context ) { - logger.debug("getWaterLines(" + idx + ")/" + identifier()); + log.debug("getWaterLines(" + idx + ")/" + identifier()); List<Point2D> points = csl.getPoints(); @@ -225,7 +225,7 @@ //} if (wAtKm == -1 || Double.isNaN(wAtKm)) { - logger.warn("Waterlevel at km " + km + " unknown."); + log.warn("Waterlevel at km " + km + " unknown."); return new Lines.LineData(new double[][] {{}}, 0d, 0d); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -72,8 +72,8 @@ extends D4EArtifact implements FacetTypes, WaterLineArtifact { - /** The logger for this class. */ - private static Logger logger = Logger.getLogger(WINFOArtifact.class); + /** The log for this class. */ + private static Logger log = Logger.getLogger(WINFOArtifact.class); /** The name of the artifact. */ public static final String ARTIFACT_NAME = "winfo"; @@ -193,7 +193,7 @@ */ public CalculationResult getWaterlevelData(CallContext context) { - logger.debug("WINFOArtifact.getWaterlevelData"); + log.debug("WINFOArtifact.getWaterlevelData"); String calculationMode = getDataAsString("calculation_mode"); @@ -212,7 +212,7 @@ this.compute(context, ComputeType.ADVANCE, true); } else { - logger.warn("Unhandled calculation_mode " + calculationMode); + log.warn("Unhandled calculation_mode " + calculationMode); } } @@ -234,7 +234,7 @@ Calculation report = new Calculation(); if (qs == null) { - logger.debug("Determine Q values based on a set of W values."); + log.debug("Determine Q values based on a set of W values."); qSel = false; ws = getWs(); double [][] qws = getQsForWs(ws); @@ -263,7 +263,7 @@ if (isFreeQ() || isFreeW()) { refKm = range[0]; - logger.debug("'free' calculation (km " + refKm + ")"); + log.debug("'free' calculation (km " + refKm + ")"); } else { Gauge gauge = river.determineGaugeByPosition(range[0]); @@ -274,7 +274,7 @@ refKm = gauge.getStation().doubleValue(); - logger.debug( + log.debug( "reference gauge: " + gauge.getName() + " (km " + refKm + ")"); } @@ -300,7 +300,7 @@ double refKm, Calculation report ) { - logger.info("WINFOArtifact.computeWaterlevelData"); + log.info("WINFOArtifact.computeWaterlevelData"); Calculation1 calc1 = new Calculation1(kms, qs, ws, refKm); @@ -318,7 +318,7 @@ * @return the data computed by a duration curve computation. */ public CalculationResult getDurationCurveData() { - logger.debug("WINFOArtifact.getDurationCurveData"); + log.debug("WINFOArtifact.getDurationCurveData"); River r = RiverUtils.getRiver(this); @@ -361,7 +361,7 @@ WstValueTable wst, double location) { - logger.info("WINFOArtifact.computeDurationCurveData"); + log.info("WINFOArtifact.computeDurationCurveData"); Object[] obj = gauge.fetchDurationCurveData(); @@ -382,7 +382,7 @@ public CalculationResult getComputedDischargeCurveData() throws NullPointerException { - logger.debug("WINFOArtifact.getComputedDischargeCurveData"); + log.debug("WINFOArtifact.getComputedDischargeCurveData"); River r = RiverUtils.getRiver(this); @@ -420,7 +420,7 @@ WstValueTable wst, double location) { - logger.info("WINFOArtifact.computeDischargeCurveData"); + log.info("WINFOArtifact.computeDischargeCurveData"); Calculation2 calculation = new Calculation2(location); @@ -481,16 +481,16 @@ StateData sd = getData("reference_startpoint"); if (sd == null) { - logger.warn("no reference start given."); + log.warn("no reference start given."); return null; } - logger.debug("Reference start km given: " + sd.getValue()); + log.debug("Reference start km given: " + sd.getValue()); String input = (String) sd.getValue(); if (input == null || (input = input.trim()).length() == 0) { - logger.warn("reference start string is empty."); + log.warn("reference start string is empty."); return null; } @@ -498,7 +498,7 @@ return Double.valueOf(input); } catch (NumberFormatException nfe) { - logger.warn("reference start string is not numeric."); + log.warn("reference start string is not numeric."); } return null; @@ -512,17 +512,17 @@ StateData sd = getData("reference_endpoint"); if (sd == null) { - logger.warn("no reference end given."); + log.warn("no reference end given."); return null; } else { - logger.debug("Reference end km : " + sd.getValue()); + log.debug("Reference end km : " + sd.getValue()); } String input = (String) sd.getValue(); if (input == null || (input = input.trim()).length() == 0) { - logger.warn("reference end string is empty."); + log.warn("reference end string is empty."); return null; } @@ -536,7 +536,7 @@ } } catch (NumberFormatException nfe) { - logger.warn("reference end string is not numeric."); + log.warn("reference end string is not numeric."); } } @@ -560,7 +560,7 @@ WQCKms triple = (WQCKms) wqckms[idx-1]; if (triple.size() == 0) { - logger.warn("Calculation of c/waterline is empty."); + log.warn("Calculation of c/waterline is empty."); return Lines.createWaterLines(points, 0.0f); } @@ -595,7 +595,7 @@ @Override public Lines.LineData getWaterLines(int idx, FastCrossSectionLine csl, double nextIgnored, double prevIgnored, CallContext context) { - logger.debug("getWaterLines(" + idx + ")"); + log.debug("getWaterLines(" + idx + ")"); List<Point2D> points = csl.getPoints(); @@ -611,12 +611,12 @@ } if (wqkms.length == 0) { - logger.error("No WQKms found."); + log.error("No WQKms found."); return Lines.createWaterLines(points, 0.0f); } if (wqkms.length <= idx) { - logger.error("getWaterLines() requested index (" + log.error("getWaterLines() requested index (" + idx + " not found."); return waterLineC(idx, csl); } @@ -628,7 +628,7 @@ double wishKM = csl.getKm(); if (triple.size() == 0) { - logger.warn("Calculation of waterline is empty."); + log.warn("Calculation of waterline is empty."); return Lines.createWaterLines(points, 0.0f); } @@ -638,7 +638,7 @@ if (wishKM < min_km || wishKM > max_km) { // TODO Does this have to be done in the other WaterlineArtifact // implementations, too? - logger.warn("Will not extrapolate waterlevels."); + log.warn("Will not extrapolate waterlevels."); return Lines.createWaterLines(points, 0.0f); } @@ -672,36 +672,36 @@ public double [][] getQsForWs(double[] ws) { if (ws == null) { - logger.error("getQsForWs: ws == null"); + log.error("getQsForWs: ws == null"); return null; } - boolean debug = logger.isDebugEnabled(); + boolean debug = log.isDebugEnabled(); if (debug) { - logger.debug("D4EArtifact.getQsForWs"); + log.debug("D4EArtifact.getQsForWs"); } River r = RiverUtils.getRiver(this); if (r == null) { - logger.warn("no river found"); + log.warn("no river found"); return null; } RangeAccess rangeAccess = new RangeAccess(this); double [] range = rangeAccess.getKmRange(); if (range == null) { - logger.warn("no ranges found"); + log.warn("no ranges found"); return null; } if (isFreeW()) { - logger.debug("Bezugslinienverfahren I: W auf freier Strecke"); + log.debug("Bezugslinienverfahren I: W auf freier Strecke"); // The simple case of the "Bezugslinienverfahren" // "W auf freier Strecke". WstValueTable wst = WstValueTableFactory.getTable(r); if (wst == null) { - logger.warn("no wst value table found"); + log.warn("no wst value table found"); return null; } double km = range[0]; @@ -714,7 +714,7 @@ for (int i = 0; i < ws.length; ++i) { double w = ws[i]; if (debug) { - logger.debug("getQsForWs: lookup Q for W: " + w); + log.debug("getQsForWs: lookup Q for W: " + w); } // There could bemore than one Q per W. double [] qs = wst.findQsForW(km, w); @@ -726,7 +726,7 @@ } if (debug) { - logger.debug("getQsForWs: number of Qs: " + outQs.size()); + log.debug("getQsForWs: number of Qs: " + outQs.size()); } return new double [][] { @@ -735,23 +735,23 @@ } if (debug) { - logger.debug("range: " + Arrays.toString(range)); + log.debug("range: " + Arrays.toString(range)); } Gauge g = r.determineGaugeByPosition(range[0]); if (g == null) { - logger.warn("no gauge found for km: " + range[0]); + log.warn("no gauge found for km: " + range[0]); return null; } if (debug) { - logger.debug("convert w->q with gauge '" + g.getName() + "'"); + log.debug("convert w->q with gauge '" + g.getName() + "'"); } DischargeTable dt = g.fetchMasterDischargeTable(); if (dt == null) { - logger.warn("No master discharge table found for gauge '" + log.warn("No master discharge table found for gauge '" + g.getName() + "'"); return null; } @@ -765,13 +765,13 @@ for (int i = 0; i < ws.length; i++) { if (Double.isNaN(ws[i])) { - logger.warn("W is NaN: ignored"); + log.warn("W is NaN: ignored"); continue; } double [] qs = DischargeTables.getQsForW(values, ws[i]); if (qs.length == 0) { - logger.warn("No Qs found for W = " + ws[i]); + log.warn("No Qs found for W = " + ws[i]); } else { for (double q: qs) { @@ -798,7 +798,7 @@ StateData mode = getData("ld_mode"); if (mode == null) { - logger.warn("No mode location/range chosen. Defaults to range."); + log.warn("No mode location/range chosen. Defaults to range."); return true; } @@ -835,7 +835,7 @@ StateData dStep = getData("ld_step"); if (dStep == null) { - logger.warn("No step width given. Cannot compute Kms."); + log.warn("No step width given. Cannot compute Kms."); return null; } @@ -936,7 +936,7 @@ } } else { - logger.warn("You try to get Qs, but W has been inserted."); + log.warn("You try to get Qs, but W has been inserted."); return null; } } @@ -980,7 +980,7 @@ StateData mode = getData("wq_isfree"); String value = (mode != null) ? (String) mode.getValue() : null; - logger.debug("isFreeQ: " + value); + log.debug("isFreeQ: " + value); return value != null && Boolean.valueOf(value); } @@ -1000,7 +1000,7 @@ return getWQForDist(range); } - logger.warn("You try to get Qs, but Ws has been inserted."); + log.warn("You try to get Qs, but Ws has been inserted."); return null; } @@ -1017,7 +1017,7 @@ return getWQForDist(range); } - logger.warn("You try to get Ws, but Qs has been inserted."); + log.warn("You try to get Ws, but Qs has been inserted."); return null; } @@ -1038,7 +1038,7 @@ } } else { - logger.warn("You try to get Ws, but Q has been inserted."); + log.warn("You try to get Ws, but Q has been inserted."); return null; } } @@ -1052,11 +1052,11 @@ * @return an array of W or Q values. */ protected double[] getWQForDist(double[] dist) { - logger.debug("Search wq values for range: " + dist[0] + " - " + dist[1]); + log.debug("Search wq values for range: " + dist[0] + " - " + dist[1]); StateData data = getData("wq_values"); if (data == null) { - logger.warn("Missing wq values!"); + log.warn("Missing wq values!"); return null; } @@ -1080,7 +1080,7 @@ res[i] = Double.parseDouble(values[i]); } catch (NumberFormatException nfe) { - logger.warn(nfe, nfe); + log.warn(nfe, nfe); } } @@ -1088,7 +1088,7 @@ } } - logger.warn("Specified range for WQ not found!"); + log.warn("Specified range for WQ not found!"); return null; } @@ -1105,7 +1105,7 @@ StateData dTo = getData("wq_to"); if (dFrom == null || dTo == null) { - logger.warn("Missing start or end value for range."); + log.warn("Missing start or end value for range."); return null; } @@ -1115,7 +1115,7 @@ StateData dStep = getData("wq_step"); if (dStep == null) { - logger.warn("No step width given. Cannot compute Qs."); + log.warn("No step width given. Cannot compute Qs."); return null; } @@ -1142,7 +1142,7 @@ StateData dSingle = getData("wq_single"); if (dSingle == null) { - logger.warn("Cannot determine single WQ values. No data given."); + log.warn("Cannot determine single WQ values. No data given."); return null; } @@ -1156,7 +1156,7 @@ values.add(Double.parseDouble(strValue)); } catch (NumberFormatException nfe) { - logger.warn(nfe, nfe); + log.warn(nfe, nfe); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSBackgroundArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSBackgroundArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -25,7 +25,7 @@ public static final String NAME = "wmsbackground"; - private static final Logger logger = + private static final Logger log = Logger.getLogger(WMSBackgroundArtifact.class); @@ -37,7 +37,7 @@ @Override protected void initialize(Artifact artifact, Object context, CallMeta meta) { - logger.debug("Initialize internal state with: "+ artifact.identifier()); + log.debug("Initialize internal state with: "+ artifact.identifier()); D4EArtifact flys = (D4EArtifact) artifact; addData("river", flys.getData("river"));
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSBuildingsArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSBuildingsArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -59,7 +59,7 @@ public static class BuildingsState extends WMSDBState implements FacetTypes { - private static final Logger logger = + private static final Logger log = Logger.getLogger(BuildingsState.class); protected int riverId;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSDBArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSDBArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -33,7 +33,7 @@ public abstract class WMSDBArtifact extends StaticD4EArtifact { - private static final Logger logger = Logger.getLogger(WMSDBArtifact.class); + private static final Logger log = Logger.getLogger(WMSDBArtifact.class); @Override public void setup( @@ -44,7 +44,7 @@ Document data, List<Class> loadFacets) { - logger.debug("WMSDBArtifact.setup"); + log.debug("WMSDBArtifact.setup"); super.setup(identifier, factory, context, callMeta, data, loadFacets); @@ -100,7 +100,7 @@ public static abstract class WMSDBState extends DefaultState { - private static final Logger logger = Logger.getLogger(WMSDBState.class); + private static final Logger log = Logger.getLogger(WMSDBState.class); protected D4EArtifact artifact; @@ -124,7 +124,7 @@ CallMeta meta, List<Facet> facets ) { - logger.debug("WMSDBState.computeInit"); + log.debug("WMSDBState.computeInit"); String type = getFacetType(); @@ -164,7 +164,7 @@ riverId = Integer.parseInt(rid); } catch (NumberFormatException nfe) { - logger.error("Cannot parse river id from '" + + log.error("Cannot parse river id from '" + artifact.getDataAsString("ids") + "'"); } } @@ -237,13 +237,13 @@ @Override public void endOfLife(Artifact owner, Object context) { - logger.info("Destroy WMSDBState: " + getID()); + log.info("Destroy WMSDBState: " + getID()); String p = RiverUtils.getXPathString(RiverUtils.XPATH_FLOODMAP_SHAPEFILE_DIR); File dir = new File(p, owner.identifier()); if (dir != null && dir.exists()) { - logger.debug("Try to delete directory '" + dir + "'"); + log.debug("Try to delete directory '" + dir + "'"); FileTools.deleteRecursive(dir); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSFixpointsArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSFixpointsArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,7 +32,7 @@ public static final String NAME = "fixpoints"; - private static final Logger logger = + private static final Logger log = Logger.getLogger(WMSFixpointsArtifact.class); @@ -63,7 +63,7 @@ public static class FixpointsState extends WMSDBState implements FacetTypes { - private static final Logger logger = + private static final Logger log = Logger.getLogger(FixpointsState.class); protected int riverId;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSFloodmapsArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSFloodmapsArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,7 +32,7 @@ public static final String NAME = "floodmaps"; - private static final Logger logger = + private static final Logger log = Logger.getLogger(WMSFloodmapsArtifact.class); @@ -63,7 +63,7 @@ public static class FloodmapsState extends WMSDBState implements FacetTypes { - private static final Logger logger = + private static final Logger log = Logger.getLogger(FloodmapsState.class); protected int riverId;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSFloodmarksArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSFloodmarksArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,7 +32,7 @@ public static final String NAME = "floodmarks"; - private static final Logger logger = + private static final Logger log = Logger.getLogger(WMSFloodmarksArtifact.class); @@ -63,7 +63,7 @@ public static class FloodmarksState extends WMSDBState implements FacetTypes { - private static final Logger logger = + private static final Logger log = Logger.getLogger(FloodmarksState.class); protected int riverId;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSFloodplainArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSFloodplainArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,7 +32,7 @@ public static final String NAME = "floodplain"; - private static final Logger logger = + private static final Logger log = Logger.getLogger(WMSFloodplainArtifact.class); @@ -63,7 +63,7 @@ public static class FloodplainState extends WMSDBState implements FacetTypes { - private static final Logger logger = + private static final Logger log = Logger.getLogger(FloodplainState.class); protected int riverId;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSGaugeLocationArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSGaugeLocationArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -33,7 +33,7 @@ public static final String NAME = "wmsgaugelocation"; - private static final Logger logger = + private static final Logger log = Logger.getLogger(WMSGaugeLocationArtifact.class); @@ -65,7 +65,7 @@ public static class WMSGaugeLocationState extends WMSDBState implements FacetTypes { - private static final Logger logger = + private static final Logger log = Logger.getLogger(WMSGaugeLocationState.class); protected Geometry geom;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSHWSLinesArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSHWSLinesArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,7 +32,7 @@ public static final String NAME = "hws_lines"; - private static final Logger logger = + private static final Logger log = Logger.getLogger(WMSHWSLinesArtifact.class); @@ -63,7 +63,7 @@ public static class HWSLinesState extends WMSDBState implements FacetTypes { - private static final Logger logger = + private static final Logger log = Logger.getLogger(HWSLinesState.class); protected int riverId; @@ -82,7 +82,7 @@ riverId = Integer.parseInt(parts[0]); } catch (NumberFormatException nfe) { - logger.error("Cannot parse river id from '" + parts[0] + "'"); + log.error("Cannot parse river id from '" + parts[0] + "'"); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSHWSPointsArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSHWSPointsArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,7 +32,7 @@ public static final String NAME = "hws_points"; - private static final Logger logger = + private static final Logger log = Logger.getLogger(WMSHWSPointsArtifact.class); @@ -63,7 +63,7 @@ public static class HWSPointsState extends WMSDBState implements FacetTypes { - private static final Logger logger = + private static final Logger log = Logger.getLogger(HWSPointsState.class); protected int riverId; @@ -82,7 +82,7 @@ riverId = Integer.parseInt(parts[0]); } catch (NumberFormatException nfe) { - logger.error("Cannot parse river id from '" + parts[0] + "'"); + log.error("Cannot parse river id from '" + parts[0] + "'"); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSHydrBoundaryArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSHydrBoundaryArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,7 +32,7 @@ public static final String NAME = "hydr_boundary"; - private static final Logger logger = + private static final Logger log = Logger.getLogger(WMSHydrBoundaryArtifact.class); @@ -63,7 +63,7 @@ public static class HydrBoundaryState extends WMSDBState implements FacetTypes { - private static final Logger logger = + private static final Logger log = Logger.getLogger(HydrBoundaryState.class); protected int riverId;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSHydrBoundaryPolyArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSHydrBoundaryPolyArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,7 +32,7 @@ public static final String NAME = "hydr_boundary_poly"; - private static final Logger logger = + private static final Logger log = Logger.getLogger(WMSHydrBoundaryPolyArtifact.class); @@ -63,7 +63,7 @@ public static class HydrBoundaryPolyState extends WMSDBState implements FacetTypes { - private static final Logger logger = + private static final Logger log = Logger.getLogger(HydrBoundaryPolyState.class); protected int riverId;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSJettiesArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSJettiesArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,7 +32,7 @@ public static final String NAME = "jetties"; - private static final Logger logger = + private static final Logger log = Logger.getLogger(WMSJettiesArtifact.class); @@ -63,7 +63,7 @@ public static class JettiesState extends WMSDBState implements FacetTypes { - private static final Logger logger = + private static final Logger log = Logger.getLogger(JettiesState.class); protected int riverId;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSKmArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSKmArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -39,7 +39,7 @@ public static final String NAME = "wmskm"; - private static final Logger logger = Logger.getLogger(WMSKmArtifact.class); + private static final Logger log = Logger.getLogger(WMSKmArtifact.class); @Override @@ -51,7 +51,7 @@ Document data, List<Class> loadFacets) { - logger.debug("WMSKmArtifact.setup"); + log.debug("WMSKmArtifact.setup"); super.setup(identifier, factory, context, callMeta, data, loadFacets); } @@ -85,7 +85,7 @@ public static class WMSKmState extends WMSDBState implements FacetTypes { - private static final Logger logger = Logger.getLogger(WMSKmState.class); + private static final Logger log = Logger.getLogger(WMSKmState.class); protected Geometry geom; protected int riverId; @@ -103,7 +103,7 @@ riverId = Integer.parseInt(ids); } catch (NumberFormatException nfe) { - logger.error("Cannot parse river id from '" + ids + "'"); + log.error("Cannot parse river id from '" + ids + "'"); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSQPSArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSQPSArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,7 +32,7 @@ public static final String NAME = "qps"; - private static final Logger logger = + private static final Logger log = Logger.getLogger(WMSQPSArtifact.class); @@ -63,7 +63,7 @@ public static class WMSQPSState extends WMSDBState implements FacetTypes { - private static final Logger logger = + private static final Logger log = Logger.getLogger(WMSQPSState.class); public WMSQPSState(WMSDBArtifact artifact) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WQKmsInterpolArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WQKmsInterpolArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -47,8 +47,8 @@ extends StaticD4EArtifact implements FacetTypes { - /** The logger for this class. */ - private static Logger logger = + /** The log for this class. */ + private static Logger log = Logger.getLogger(WQKmsInterpolArtifact.class); /** State name. */ @@ -72,7 +72,7 @@ * Trivial Constructor. */ public WQKmsInterpolArtifact() { - logger.debug("WQKmsInterpolArtifact.WQKmsInterpolArtifact"); + log.debug("WQKmsInterpolArtifact.WQKmsInterpolArtifact"); } @@ -95,7 +95,7 @@ Document data, List<Class> loadFacets) { - logger.debug("WQKmsInterpolArtifact.setup"); + log.debug("WQKmsInterpolArtifact.setup"); state = new StaticState(STATIC_STATE_NAME); @@ -107,7 +107,7 @@ if (code != null) { String [] parts = code.split("-"); - logger.debug("WQKmsInterpolArtifact.setup: code " + code); + log.debug("WQKmsInterpolArtifact.setup: code " + code); if (parts.length >= 4) { int wst = Integer.parseInt(parts[3]); @@ -154,7 +154,7 @@ } } else { - logger.warn("WQKmsInterpolArtifact: no code"); + log.warn("WQKmsInterpolArtifact: no code"); } spawnState(); @@ -193,7 +193,7 @@ Object context, CallMeta meta) { - logger.debug("WQKmsInterpolArtifact.initialize"); + log.debug("WQKmsInterpolArtifact.initialize"); D4EArtifact winfo = (D4EArtifact) artifact; importData(winfo, "river"); importData(winfo, "ld_locations"); @@ -267,7 +267,7 @@ tmp != null ? tmp : 0); for (int x = 0; x < vs[1].length; x++) { - logger.debug("getWQAtKm: Q/W " + vs[0][x] + " / " + vs[1][x]); + log.debug("getWQAtKm: Q/W " + vs[0][x] + " / " + vs[1][x]); } return vs; @@ -283,7 +283,7 @@ return Integer.parseInt(val); } catch (NumberFormatException e) { - logger.warn("Could not get data " + dataName + " as int", e); + log.warn("Could not get data " + dataName + " as int", e); return 0; } } @@ -329,8 +329,8 @@ * @return WQKms according to parameterization (can be null); */ public WQKms getWQKms(int idx) { - logger.debug("WQKmsInterpolArtifact.getWQKms"); - logger.warn("Stub, getWQKms not yet implemented."); + log.debug("WQKmsInterpolArtifact.getWQKms"); + log.warn("Stub, getWQKms not yet implemented."); return WQKmsFactory.getWQKms( Integer.parseInt(getDataAsString("col_pos")),
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WaterlevelArtifact.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WaterlevelArtifact.java Fri Sep 05 12:58:17 2014 +0200 @@ -35,8 +35,8 @@ */ public class WaterlevelArtifact extends WINFOArtifact { - /** The logger for this class. */ - private static Logger logger = Logger.getLogger(WaterlevelArtifact.class); + /** The log for this class. */ + private static Logger log = Logger.getLogger(WaterlevelArtifact.class); /** The name of the artifact. */ public static final String ARTIFACT_NAME = "waterlevel"; @@ -73,7 +73,7 @@ List<Facet> list = new ArrayList<Facet>(); List<Facet> wlist = filterFacets.get(ChartType.LS); if (wlist == null) { - logger.warn("No matching filterfacets found"); + log.warn("No matching filterfacets found"); dumpFilterFacets(); } else { for (Facet f: wlist) { @@ -103,17 +103,17 @@ { WINFOArtifact winfo = (WINFOArtifact) artifact; setData(winfo.cloneData()); - logger.debug("Cloned data of winfo artifact."); + log.debug("Cloned data of winfo artifact."); // Statically add Facets. List<Facet> fs = new ArrayList<Facet>(); DefaultState state = (DefaultState) getCurrentState(context); state.computeInit(this, hash(), context, meta, fs); if (!fs.isEmpty()) { - logger.debug("Facets to add in WaterlevelArtifact.initialize ."); + log.debug("Facets to add in WaterlevelArtifact.initialize ."); addFacets(getCurrentStateId(), fs); } else { - logger.debug("No facets to add in WaterlevelArtifact.initialize (" + log.debug("No facets to add in WaterlevelArtifact.initialize (" + state.getID() + ")."); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedDifferencesAccess.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedDifferencesAccess.java Fri Sep 05 12:58:17 2014 +0200 @@ -21,7 +21,7 @@ public class BedDifferencesAccess extends RiverAccess { - private static Logger logger = Logger.getLogger(BedDifferencesAccess.class); + private static Logger log = Logger.getLogger(BedDifferencesAccess.class); private String yearEpoch; private String [] diffs; @@ -40,8 +40,8 @@ public String [] getDiffs() { if (diffs == null) { diffs = getString("diffids").split("#"); - if (logger.isDebugEnabled()) { - logger.debug("diffs: " + Arrays.toString(diffs)); + if (log.isDebugEnabled()) { + log.debug("diffs: " + Arrays.toString(diffs)); } } return diffs; @@ -57,8 +57,8 @@ String diff2 = StringUtil.unbracket(diffs[1 + 2*i]); String[] diff1parts = diff1.split(";"); String[] diff2parts = diff2.split(";"); - if (logger.isDebugEnabled()) { - logger.debug("creating 2 artifacts." + diff1parts[0] + "; " + diff2parts[0]); + if (log.isDebugEnabled()) { + log.debug("creating 2 artifacts." + diff1parts[0] + "; " + diff2parts[0]); } differenceArtifactIds[i][0] = diff1parts[0]; differenceArtifactIds[i][1] = diff2parts[0];
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedHeightAccess.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedHeightAccess.java Fri Sep 05 12:58:17 2014 +0200 @@ -19,7 +19,7 @@ public class BedHeightAccess extends RangeAccess { - private static final Logger logger = Logger.getLogger(BedHeightAccess.class); + private static final Logger log = Logger.getLogger(BedHeightAccess.class); private int[] singleIDs; private int[] epochIDs; @@ -54,11 +54,11 @@ String data = getString("soundings"); if (data == null) { - logger.warn("No 'soundings' parameter specified!"); + log.warn("No 'soundings' parameter specified!"); return null; } else { - logger.debug("getBedHeightSingleIDs(): data=" + data); + log.debug("getBedHeightSingleIDs(): data=" + data); } String[] parts = data.split(";"); @@ -76,7 +76,7 @@ } } catch (NumberFormatException nfe) { - logger.warn("Cannot parse int from string: '" + tmp + "'"); + log.warn("Cannot parse int from string: '" + tmp + "'"); } } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedQualityAccess.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedQualityAccess.java Fri Sep 05 12:58:17 2014 +0200 @@ -25,7 +25,7 @@ public class BedQualityAccess extends RangeAccess { - private static final Logger logger = Logger + private static final Logger log = Logger .getLogger(BedQualityAccess.class); private List<String> bedDiameter; @@ -90,10 +90,10 @@ List<String> result = new LinkedList<String>(); String[] diameter = value.split(";"); for (String v : diameter) { - logger.debug("diameter: " + v); + log.debug("diameter: " + v); String[] parts = v.split("\\."); result.add(parts[parts.length - 1]); - logger.debug(parts[parts.length-1]); + log.debug(parts[parts.length-1]); } return result; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/ExtremeAccess.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/ExtremeAccess.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,8 +23,8 @@ public class ExtremeAccess extends RangeAccess { - /** Our private logger. */ - private static Logger logger = Logger.getLogger(ExtremeAccess.class); + /** Our private log. */ + private static Logger log = Logger.getLogger(ExtremeAccess.class); protected Long start; protected Long end; @@ -48,8 +48,8 @@ percent = getDouble("percent"); } - if (logger.isDebugEnabled()) { - logger.debug("percent: '" + percent + "'"); + if (log.isDebugEnabled()) { + log.debug("percent: '" + percent + "'"); } return percent; @@ -60,8 +60,8 @@ function = getString("function"); } - if (logger.isDebugEnabled()) { - logger.debug("function: '" + function + "'"); + if (log.isDebugEnabled()) { + log.debug("function: '" + function + "'"); } return function; @@ -73,7 +73,7 @@ * @return values of first suitable rangewithvalues or null. */ public double[] getValuesForRange(double location) { - logger.debug("ExtemeAcces.getValuesForRange"); + log.debug("ExtemeAcces.getValuesForRange"); for (RangeWithValues rangeValues: getRanges()) { if (rangeValues.inside(location)) { return rangeValues.getValues(); @@ -99,8 +99,8 @@ }); } - if (logger.isDebugEnabled()) { - logger.debug("ranges: " + ranges); + if (log.isDebugEnabled()) { + log.debug("ranges: " + ranges); } return ranges;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/RangeAccess.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/RangeAccess.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,7 +23,7 @@ public class RangeAccess extends RiverAccess { - private static Logger logger = Logger.getLogger(RangeAccess.class); + private static Logger log = Logger.getLogger(RangeAccess.class); public static enum KM_MODE { RANGE, LOCATIONS, NONE }; @@ -104,7 +104,7 @@ locations.add(Double.parseDouble(l)); } catch (NumberFormatException nfe) { - logger.debug(nfe.getLocalizedMessage(), nfe); + log.debug(nfe.getLocalizedMessage(), nfe); } } @@ -128,12 +128,12 @@ from = getDouble("ld_from"); } - if (logger.isDebugEnabled()) { - logger.debug("from from data: '" + from + "'"); + if (log.isDebugEnabled()) { + log.debug("from from data: '" + from + "'"); } if (from == null) { - logger.warn("No 'from' found. assume max of river."); + log.warn("No 'from' found. assume max of river."); return getRiver().determineMinMaxDistance()[0]; } @@ -147,12 +147,12 @@ to = getDouble("ld_to"); } - if (logger.isDebugEnabled()) { - logger.debug("to from data: '" + to + "'"); + if (log.isDebugEnabled()) { + log.debug("to from data: '" + to + "'"); } if (to == null) { - logger.warn("No 'to' found. assume max of river."); + log.warn("No 'to' found. assume max of river."); return getRiver().determineMinMaxDistance()[1]; } @@ -167,8 +167,8 @@ step = getDouble("ld_step"); } - if (logger.isDebugEnabled()) { - logger.debug("step: '" + step + "'"); + if (log.isDebugEnabled()) { + log.debug("step: '" + step + "'"); } return step; @@ -190,7 +190,7 @@ double[] locs = getLocations(); // if no locations, nPE. if (locs == null) { - logger.warn("no locations to get km range from."); + log.warn("no locations to get km range from."); return new double[] { Double.NaN, Double.NaN }; } return new double[] { locs[0], locs[locs.length-1] };
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/RiverAccess.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/RiverAccess.java Fri Sep 05 12:58:17 2014 +0200 @@ -20,7 +20,7 @@ public class RiverAccess extends Access { - /** Private logger. */ + /** Private log. */ private static Logger log = Logger.getLogger(RiverAccess.class); /** River name. */
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/SedimentLoadAccess.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/SedimentLoadAccess.java Fri Sep 05 12:58:17 2014 +0200 @@ -18,7 +18,7 @@ public class SedimentLoadAccess extends RangeAccess { - private static final Logger logger = Logger.getLogger(SedimentLoadAccess.class); + private static final Logger log = Logger.getLogger(SedimentLoadAccess.class); private String time; private String unit; @@ -57,7 +57,7 @@ Integer start = getInteger("start"); Integer end = getInteger("end"); if (start == null || end == null) { - logger.warn("No 'start' or 'end' parameter specified!"); + log.warn("No 'start' or 'end' parameter specified!"); return null; } @@ -81,7 +81,7 @@ String data = getString("epochs"); if (data == null) { - logger.warn("No 'epochs' parameter specified!"); + log.warn("No 'epochs' parameter specified!"); return null; } @@ -98,7 +98,7 @@ epochs[i] = ints.toNativeArray(); } catch (NumberFormatException nfe) { - logger.warn("Cannot parse int from string: '" + values + "'"); + log.warn("Cannot parse int from string: '" + values + "'"); } } return epochs;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/StaticSQRelationAccess.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/StaticSQRelationAccess.java Fri Sep 05 12:58:17 2014 +0200 @@ -16,8 +16,8 @@ public class StaticSQRelationAccess extends RiverAccess { - /** The logger that is used in this state. */ - private static final Logger logger = + /** The log that is used in this state. */ + private static final Logger log = Logger.getLogger(StaticSQRelationAccess.class); private String measurementStation; @@ -31,8 +31,8 @@ if (measurementStation == null) { measurementStation = getString("station"); } - if (logger.isDebugEnabled()) { - logger.debug("measurement station: '" + measurementStation + "'"); + if (log.isDebugEnabled()) { + log.debug("measurement station: '" + measurementStation + "'"); } return measurementStation; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/context/RiverContext.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/context/RiverContext.java Fri Sep 05 12:58:17 2014 +0200 @@ -26,8 +26,8 @@ */ public class RiverContext extends DefaultArtifactContext { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(RiverContext.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(RiverContext.class); /** The key that is used to store the StateEngine in the context. */ public static final String ARTIFACT_KEY = @@ -112,7 +112,7 @@ Pair<Class<OutGenerator>, Object> pair = generators.getGenerator(name); if (pair == null) { - logger.warn("No generator class found for " + name); + log.warn("No generator class found for " + name); return null; } @@ -123,10 +123,10 @@ return generator; } catch (InstantiationException ie) { - logger.error(ie, ie); + log.error(ie, ie); } catch (IllegalAccessException iae) { - logger.error(iae, iae); + log.error(iae, iae); } return null;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/context/RiverContextFactory.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/context/RiverContextFactory.java Fri Sep 05 12:58:17 2014 +0200 @@ -62,8 +62,8 @@ */ public class RiverContextFactory implements ArtifactContextFactory { - /** The logger that is used in this class. */ - private static Logger logger = Logger.getLogger(RiverContextFactory.class); + /** The log that is used in this class. */ + private static Logger log = Logger.getLogger(RiverContextFactory.class); /** The XPath to the artifacts configured in the configuration. */ public static final String XPATH_ARTIFACTS = @@ -207,7 +207,7 @@ TransitionEngine engine = new TransitionEngine(); List<Document> artifacts = getArtifactConfigurations(config); - logger.info("Found " + artifacts.size() + " artifacts in the config."); + log.info("Found " + artifacts.size() + " artifacts in the config."); for (Document doc: artifacts) { @@ -218,14 +218,14 @@ doc, XPATH_TRANSITIONS, XPathConstants.NODESET); if (list == null) { - logger.warn("The artifact " + artName + + log.warn("The artifact " + artName + " has no transitions configured."); continue; } int trans = list.getLength(); - logger.info( + log.info( "Artifact '" + artName + "' has " + trans + " transitions."); for (int i = 0; i < trans; i++) { @@ -264,7 +264,7 @@ File file = new File(xlink); if (!file.isFile() || !file.canRead()) { - logger.warn("Artifact configuration '" + file + "' not found."); + log.warn("Artifact configuration '" + file + "' not found."); continue; } @@ -287,7 +287,7 @@ StateEngine engine = new StateEngine(); List<Document> artifacts = getArtifactConfigurations(config); - logger.info("Found " + artifacts.size() + " artifacts in the config."); + log.info("Found " + artifacts.size() + " artifacts in the config."); for (Document doc: artifacts) { List<State> states = new ArrayList<State>(); @@ -299,14 +299,14 @@ doc, XPATH_STATES, XPathConstants.NODESET); if (stateList == null) { - logger.warn("The artifact " + artName + + log.warn("The artifact " + artName + " has no states configured."); continue; } int count = stateList.getLength(); - logger.info( + log.info( "Artifact '" + artName + "' has " + count + " states."); for (int i = 0; i < count; i++) { @@ -337,11 +337,11 @@ int num = outGenerators == null ? 0 : outGenerators.getLength(); if (num == 0) { - logger.warn("No output generators configured in this application."); + log.warn("No output generators configured in this application."); return; } - logger.info("Found " + num + " configured output generators."); + log.info("Found " + num + " configured output generators."); GeneratorLookup generators = new GeneratorLookup(); @@ -364,7 +364,7 @@ generatorClass = (Class<OutGenerator>)Class.forName(clazz); } catch (ClassNotFoundException cnfe) { - logger.error(cnfe, cnfe); + log.error(cnfe, cnfe); continue; } @@ -378,13 +378,13 @@ cfg = ec.convert(item); } catch (ClassNotFoundException cnfe) { - logger.error(cnfe, cnfe); + log.error(cnfe, cnfe); } catch (InstantiationException ie) { - logger.error(ie); + log.error(ie); } catch (IllegalAccessException iae) { - logger.error(iae); + log.error(iae); } } @@ -396,7 +396,7 @@ } } - logger.info("Successfully loaded " + idx + " output generators."); + log.info("Successfully loaded " + idx + " output generators."); context.put(RiverContext.OUTGENERATORS_KEY, generators); context.put(RiverContext.FACETFILTER_KEY, generators); } @@ -410,7 +410,7 @@ * @param context The RiverContext. */ protected void configureThemes(Document config, RiverContext context) { - logger.debug("RiverContextFactory.configureThemes"); + log.debug("RiverContextFactory.configureThemes"); Document cfg = getThemeConfig(config); @@ -420,10 +420,10 @@ int groupNum = themeGroups != null ? themeGroups.getLength() : 0; if (groupNum == 0) { - logger.warn("There are no theme groups configured!"); + log.warn("There are no theme groups configured!"); } - logger.info("Found " + groupNum + " theme groups in configuration"); + log.info("Found " + groupNum + " theme groups in configuration"); List<ThemeGroup> groups = new ArrayList<ThemeGroup>(); @@ -435,11 +435,11 @@ int num = themes != null ? themes.getLength() : 0; if (num == 0) { - logger.warn("There are no themes configured!"); + log.warn("There are no themes configured!"); return; } - logger.info("Theme group has " + num + " themes."); + log.info("Theme group has " + num + " themes."); Map<String, Theme> theThemes = new HashMap<String, Theme>(); @@ -455,7 +455,7 @@ String gName = themeGroup.getAttribute("name"); groups.add(new ThemeGroup(gName, theThemes)); - logger.info( + log.info( "Initialized " + theThemes.size() + "/" + num + " themes " + "of theme-group '" + gName + "'"); } @@ -477,14 +477,14 @@ themeConfig = Config.replaceConfigDir(themeConfig); - logger.debug("Parse theme cfg: " + themeConfig); + log.debug("Parse theme cfg: " + themeConfig); return XMLUtils.parseDocument(new File(themeConfig)); } protected void configureThemesMappings(Document cfg, RiverContext context) { - logger.debug("RiverContextFactory.configureThemesMappings"); + log.debug("RiverContextFactory.configureThemesMappings"); Document config = getThemeConfig(cfg); @@ -494,7 +494,7 @@ int num = mappings != null ? mappings.getLength() : 0; if (num == 0) { - logger.warn("No theme <--> facet mappins found!"); + log.warn("No theme <--> facet mappins found!"); return; } @@ -523,7 +523,7 @@ } } - logger.debug("Found " + mapping.size() + " theme mappings."); + log.debug("Found " + mapping.size() + " theme mappings."); context.put(RiverContext.THEME_MAPPING, mapping); } @@ -554,7 +554,7 @@ } } - logger.debug("Found " + riverWMS.size() + " river WMS."); + log.debug("Found " + riverWMS.size() + " river WMS."); context.put(RiverContext.RIVER_WMS, riverWMS); } @@ -579,7 +579,7 @@ String attrselected = e.getAttribute("selected"); boolean selected = attrselected == null ? false : attrselected.equalsIgnoreCase("true"); - logger.debug("Loaded module " + modulename); + log.debug("Loaded module " + modulename); NodeList children = e.getChildNodes(); List<String> rivers = new ArrayList<String>(children.getLength()); for (int j = 0; j < children.getLength(); j++) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/context/SessionCallContextListener.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/context/SessionCallContextListener.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,8 +31,8 @@ public static final String SESSION_KEY = "context.session"; - /** The logger that is used in this class.*/ - private static Logger logger = + /** The log that is used in this class.*/ + private static Logger log = Logger.getLogger(SessionCallContextListener.class); @@ -51,7 +51,7 @@ * @param context The CallContext. */ public void init(CallContext context) { - logger.debug("SessionCallContextListener.init"); + log.debug("SessionCallContextListener.init"); Session session = SessionHolder.acquire(); @@ -65,7 +65,7 @@ * @param context The CallContext. */ public void close(CallContext context) { - logger.debug("SessionCallContextListener.close"); + log.debug("SessionCallContextListener.close"); Session session = (Session)context.getContextValue(SESSION_KEY); session.close();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/DBConfig.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/DBConfig.java Fri Sep 05 12:58:17 2014 +0200 @@ -17,7 +17,7 @@ public class DBConfig { - private static Logger logger = Logger.getLogger(DBConfig.class); + private static Logger log = Logger.getLogger(DBConfig.class); /** * XPath to access the database driver within the global configuration.
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java Fri Sep 05 12:58:17 2014 +0200 @@ -40,7 +40,7 @@ public class FunctionResolver implements XPathFunctionResolver { - /** Home logger. */ + /** Home log. */ private static Logger log = Logger.getLogger(FunctionResolver.class); public static final String FUNCTION_NAMESPACE_URI = "dc";
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/map/RiverMapfileGeneratorStarter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/map/RiverMapfileGeneratorStarter.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,7 +23,7 @@ */ public class RiverMapfileGeneratorStarter implements LifetimeListener { - private static Logger logger = Logger.getLogger(RiverMapfileGeneratorStarter.class); + private static Logger log = Logger.getLogger(RiverMapfileGeneratorStarter.class); @Override public void setup(Document document) { @@ -35,7 +35,7 @@ */ @Override public void systemUp(GlobalContext globalContext) { - logger.debug("systemUp()"); + log.debug("systemUp()"); RiverMapfileGenerator fmfg = new RiverMapfileGenerator(); fmfg.generate();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/AnnotationFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/AnnotationFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -40,7 +40,7 @@ extends DefaultFacet { /** Logger for this class. */ - private static final Logger logger = Logger.getLogger(AnnotationFacet.class); + private static final Logger log = Logger.getLogger(AnnotationFacet.class); /**
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/AreaFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/AreaFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -36,7 +36,7 @@ public class AreaFacet extends DefaultFacet { - private static Logger logger = Logger.getLogger(AreaFacet.class); + private static Logger log = Logger.getLogger(AreaFacet.class); /** * Constructor, set (maybe localized) description and name. @@ -54,7 +54,7 @@ * @param context ignored */ public Object getData(Artifact art, CallContext context) { - logger.debug("Get data for area."); + log.debug("Get data for area."); // Get information from artifact about which // info to grab from blackboard. @@ -70,32 +70,32 @@ List<DataProvider> providers = context. getDataProvider(artifact.getLowerDPKey()); if (providers.size() < 1) { - logger.warn("No 'lower' provider given for area [" + + log.warn("No 'lower' provider given for area [" + artifact.getLowerDPKey() + "]"); } else { lowerData = providers.get(0).provideData( artifact.getLowerDPKey(), null, context); - logger.debug("'Lower' data provider key for area [" + + log.debug("'Lower' data provider key for area [" + artifact.getLowerDPKey() + "]"); lowerFacetName = artifact.getLowerDPKey().split(":")[1]; } providers = context.getDataProvider(artifact.getUpperDPKey()); if (providers.size() < 1) { - logger.warn("No 'upper' provider given for area [" + + log.warn("No 'upper' provider given for area [" + artifact.getUpperDPKey() + "]"); } else { upperData = providers.get(0).provideData( artifact.getUpperDPKey(), null, context); - logger.debug("'Upper' data provider key for area [" + + log.debug("'Upper' data provider key for area [" + artifact.getUpperDPKey() + "]"); upperFacetName = artifact.getUpperDPKey().split(":")[1]; } if (upperData == null && lowerData == null) { - logger.warn("Not given 'upper' and 'lower' for area"); + log.warn("Not given 'upper' and 'lower' for area"); } return new Data(upperFacetName, lowerFacetName, lowerData, upperData,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation1.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation1.java Fri Sep 05 12:58:17 2014 +0200 @@ -15,7 +15,7 @@ public class Calculation1 extends Calculation { - private static Logger logger = Logger.getLogger(Calculation1.class); + private static Logger log = Logger.getLogger(Calculation1.class); protected double [] kms; protected double [] qs; @@ -62,7 +62,7 @@ if (success) { WQKms result = new WQKms(kms, oqs, ows, prefix + origData[i]); if (oldNumProblems != newNumProblems) { - logger.debug( + log.debug( qs[i] + " caused " + (newNumProblems-oldNumProblems) + " new problem(s)."); result.removeNaNs();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation2.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation2.java Fri Sep 05 12:58:17 2014 +0200 @@ -20,7 +20,7 @@ public class Calculation2 extends Calculation { - private static Logger logger = Logger.getLogger(Calculation2.class); + private static Logger log = Logger.getLogger(Calculation2.class); protected double km; @@ -51,7 +51,7 @@ pw.flush(); } catch (IOException ioe) { - logger.error(ioe); + log.error(ioe); } finally { if (pw != null) { @@ -62,21 +62,21 @@ public CalculationResult calculate(WstValueTable wst) { - boolean debug = logger.isDebugEnabled(); + boolean debug = log.isDebugEnabled(); if (debug) { - logger.debug("Calculation2.calculate: km " + km); + log.debug("Calculation2.calculate: km " + km); } double [][] wqs = wst.interpolateWQ(km, this); if (debug) { if (hasProblems()) { - logger.debug("problems: " + problemsToString()); + log.debug("problems: " + problemsToString()); } - logger.debug("wqs: " + wqs); + log.debug("wqs: " + wqs); if (wqs != null && wqs[0] != null) { - logger.debug("wqs length: " + wqs[0].length); + log.debug("wqs length: " + wqs[0].length); // TODO: Uncomment to see the data externally. //dump(wqs); } @@ -96,7 +96,7 @@ WQKms wqkms = new WQKms(kms, qs, ws, String.valueOf(km)); if (hasProblems()) { - logger.debug("found " + numProblems() + " problems."); + log.debug("found " + numProblems() + " problems."); wqkms.removeNaNs(); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation3.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation3.java Fri Sep 05 12:58:17 2014 +0200 @@ -13,7 +13,7 @@ public class Calculation3 extends Calculation { - private static Logger logger = Logger.getLogger(Calculation3.class); + private static Logger log = Logger.getLogger(Calculation3.class); protected double km; protected int [] days; @@ -36,18 +36,18 @@ addProblem(km, "cannot.find.ds"); } - if (logger.isDebugEnabled()) { - logger.debug("Calculate duration curve data:"); - logger.debug(" km : " + km); - logger.debug(" num Days : " + (days != null ? days.length : 0)); - logger.debug(" num Qs : " + (qs != null ? qs.length : 0)); - logger.debug(" result Ws: " + (ws != null ? ws.length : 0)); + if (log.isDebugEnabled()) { + log.debug("Calculate duration curve data:"); + log.debug(" km : " + km); + log.debug(" num Days : " + (days != null ? days.length : 0)); + log.debug(" num Qs : " + (qs != null ? qs.length : 0)); + log.debug(" result Ws: " + (ws != null ? ws.length : 0)); } WQDay wqday = new WQDay(days, ws, qs); if (hasProblems()) { - logger.debug("calculation caused "+numProblems()+" problem(s)."); + log.debug("calculation caused "+numProblems()+" problem(s)."); wqday.removeNaNs(); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation4.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation4.java Fri Sep 05 12:58:17 2014 +0200 @@ -30,7 +30,7 @@ public class Calculation4 extends Calculation { - private static Logger logger = Logger.getLogger(Calculation4.class); + private static Logger log = Logger.getLogger(Calculation4.class); public static final double MINIMAL_STEP_WIDTH = 1e-5; @@ -46,7 +46,7 @@ } public Calculation4(Calculation4Access access) { - logger.debug("Calculation4Access.cnst"); + log.debug("Calculation4Access.cnst"); String river = access.getRiverName(); List<Segment> segments = access.getSegments(); double [] range = access.getFromToStep(); @@ -100,21 +100,21 @@ } protected CalculationResult innerCalculate(WstValueTable table) { - boolean debug = logger.isDebugEnabled(); + boolean debug = log.isDebugEnabled(); if (debug) { - logger.debug( + log.debug( "calculate from " + from + " to " + to + " step " + step); - logger.debug("# segments: " + segments.size()); + log.debug("# segments: " + segments.size()); for (Segment segment: segments) { - logger.debug(" " + segment); + log.debug(" " + segment); } } int numResults = segments.get(0).values.length; if (numResults < 1) { - logger.debug("no values given"); + log.debug("no values given"); addProblem("no.values.given"); return new CalculationResult(new WQKms[0], this); } @@ -148,13 +148,13 @@ ) { if (pos < s1.referencePoint || pos > s2.referencePoint) { if (debug) { - logger.debug("need to find new interval for " + pos); + log.debug("need to find new interval for " + pos); } // find new interval if (pos <= segments.get(0).referencePoint) { // before first segment -> "gleichwertig" if (debug) { - logger.debug("before first segment -> gleichwertig"); + log.debug("before first segment -> gleichwertig"); } Segment first = segments.get(0); double [] values = first.values; @@ -171,7 +171,7 @@ else if (pos >= segments.get(segments.size()-1).referencePoint) { // after last segment -> "gleichwertig" if (debug) { - logger.debug("after last segment -> gleichwertig"); + log.debug("after last segment -> gleichwertig"); } Segment last = segments.get(segments.size()-1); double [] values = last.values; @@ -188,14 +188,14 @@ else { // "ungleichwertig" // find matching interval if (debug) { - logger.debug("in segments -> ungleichwertig"); + log.debug("in segments -> ungleichwertig"); } s1 = s2 = null; for (int i = 1, N = segments.size(); i < N; ++i) { Segment si1 = segments.get(i-1); Segment si = segments.get(i); if (debug) { - logger.debug("check " + pos + " in " + + log.debug("check " + pos + " in " + si1.referencePoint + " - " + si.referencePoint); } if (pos >= si1.referencePoint @@ -236,7 +236,7 @@ anchor.values[i], free.values[i]); if (debug) { - logger.debug( + log.debug( anchor.referencePoint + ": " + qA + " -> " + functions[i].value(qA) + " / " + free.referencePoint + ": " +
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/CrossSectionFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/CrossSectionFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -40,7 +40,7 @@ = "crosssection.masterprofile.km.next"; - private static Logger logger = Logger.getLogger(CrossSectionFacet.class); + private static Logger log = Logger.getLogger(CrossSectionFacet.class); protected ComputeType type; @@ -98,7 +98,7 @@ Object obj = super.provideBlackboardData(artifact, key, param, context); if (obj == null) { - logger.warn("Cannot provide data for key: " + key); + log.warn("Cannot provide data for key: " + key); } return obj; } @@ -111,7 +111,7 @@ * @param context ignored */ public Object getData(Artifact art, CallContext context) { - logger.debug("Get data for cross section"); + log.debug("Get data for cross section"); CrossSectionArtifact artifact = (CrossSectionArtifact)art;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/CrossSectionWaterLineFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/CrossSectionWaterLineFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,8 +32,8 @@ extends BlackboardDataFacet implements FacetTypes { - /** Private logger to use. */ - private static Logger logger = + /** Private log to use. */ + private static Logger log = Logger.getLogger(CrossSectionWaterLineFacet.class); @@ -58,12 +58,12 @@ * Gets waterline (crossed with cross section) of waterlevel. */ public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for cross section water line"); + log.debug("Get data for cross section water line"); List<DataProvider> providers = context. getDataProvider(CrossSectionFacet.BLACKBOARD_CS_MASTER_DATA); if (providers.size() < 1) { - logger.warn("Could not find Cross-Section data provider."); + log.warn("Could not find Cross-Section data provider."); return new Lines.LineData(new double[][] {}, 0d, 0d); } @@ -80,7 +80,7 @@ nextKm = new Double(-1d); if (!(artifact instanceof WaterLineArtifact)) { - logger.error("CrossSectionWaterLineFacet needs WaterLineArtifact"); + log.error("CrossSectionWaterLineFacet needs WaterLineArtifact"); return new Lines.LineData(new double[][] {}, 0d,0d); } WaterLineArtifact lineArtifact = (WaterLineArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/DifferenceCurveFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/DifferenceCurveFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,7 +23,7 @@ */ public class DifferenceCurveFacet extends WaterlevelFacet { - private static Logger logger = Logger.getLogger(DifferenceCurveFacet.class); + private static Logger log = Logger.getLogger(DifferenceCurveFacet.class); public DifferenceCurveFacet() { @@ -55,7 +55,7 @@ WKms [] wkms = (WKms [])res.getData(); WKms result = wkms[index]; - logger.debug("Got difference curve data (" + result.getName() + log.debug("Got difference curve data (" + result.getName() + ") at index: " + index); return result;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/DischargeTables.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/DischargeTables.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,7 +31,7 @@ public class DischargeTables implements Serializable { - /** Private logger. */ + /** Private log. */ private static Logger log = Logger.getLogger(DischargeTables.class); public static final int MASTER = 0;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/DurationCurveFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/DurationCurveFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -30,7 +30,7 @@ */ public class DurationCurveFacet extends DefaultFacet { - private static Logger logger = Logger.getLogger(DurationCurveFacet.class); + private static Logger log = Logger.getLogger(DurationCurveFacet.class); /** Blackboard data provider key for durationcurve (wqday) data. */ public static String BB_DURATIONCURVE = "durationcurve"; @@ -50,7 +50,7 @@ * Expose state computation from WINFOArtifact. */ public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for duration curve data"); + log.debug("Get data for duration curve data"); WINFOArtifact winfo = (WINFOArtifact)artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityCalculation.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityCalculation.java Fri Sep 05 12:58:17 2014 +0200 @@ -26,26 +26,26 @@ /** Calculate flow velocity. */ public class FlowVelocityCalculation extends Calculation { - /** Own logger. */ - private static final Logger logger = + /** Own log. */ + private static final Logger log = Logger.getLogger(FlowVelocityCalculation.class); public CalculationResult calculate(FlowVelocityAccess access) { - logger.info("FlowVelocityCalculation.calculate"); + log.info("FlowVelocityCalculation.calculate"); int[] mainIds = access.getMainChannels(); int[] totalIds = access.getTotalChannels(); - if (logger.isDebugEnabled()) { + if (log.isDebugEnabled()) { Artifact a = access.getArtifact(); - logger.debug("Artifact '" + a.identifier() + "' contains:"); + log.debug("Artifact '" + a.identifier() + "' contains:"); if (mainIds != null) { - logger.debug(" " + mainIds.length + " main channel ids"); + log.debug(" " + mainIds.length + " main channel ids"); } if (totalIds != null) { - logger.debug(" " + totalIds.length + " total channel ids"); + log.debug(" " + totalIds.length + " total channel ids"); } } @@ -100,7 +100,7 @@ ) { String riverName = access.getRiverName(); if (riverName == null) { - logger.warn("No river name found"); + log.warn("No river name found"); return Collections.<FlowVelocityModel>emptyList(); } @@ -124,7 +124,7 @@ List<FlowVelocityModelValue> values = FlowVelocityModelValue.getValues(model, kmLo, kmHi); - logger.debug("Found " + values.size() + " values for model."); + log.debug("Found " + values.size() + " values for model."); for (FlowVelocityModelValue value: values) { data.addKM(value.getStation().doubleValue()); @@ -159,7 +159,7 @@ double kmLo = access.getLowerKM(); double kmHi = access.getUpperKM(); - logger.debug("Prepare data for km range: " + kmLo + " - " + kmHi); + log.debug("Prepare data for km range: " + kmLo + " - " + kmHi); FlowVelocityData[] data = new FlowVelocityData[models.size()]; for (int i = 0, n = models.size(); i < n; i++) { @@ -170,7 +170,7 @@ data[i] = d; } - logger.debug("Calculation contains " + data.length + " data items."); + log.debug("Calculation contains " + data.length + " data items."); return new CalculationResult(data, this); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -24,7 +24,7 @@ */ public class FlowVelocityFacet extends DataFacet { - private static Logger logger = Logger.getLogger(FlowVelocityFacet.class); + private static Logger log = Logger.getLogger(FlowVelocityFacet.class); public FlowVelocityFacet() { // required for clone operation deepCopy() @@ -46,7 +46,7 @@ public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for flow velocity at index: " + index); + log.debug("Get data for flow velocity at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFilterFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFilterFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,7 +28,7 @@ */ public class FlowVelocityFilterFacet extends DataFacet { - private static Logger logger = Logger.getLogger(FlowVelocityFilterFacet.class); + private static Logger log = Logger.getLogger(FlowVelocityFilterFacet.class); public FlowVelocityFilterFacet() { // required for clone operation deepCopy() @@ -50,7 +50,7 @@ public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for flow velocity at index: " + index); + log.debug("Get data for flow velocity at index: " + index); Double start = (Double)context.getContextValue("startkm"); Double end = (Double)context.getContextValue("endkm");
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/GaugeDischargeFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/GaugeDischargeFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -24,8 +24,8 @@ */ public class GaugeDischargeFacet extends DataFacet { - /** Private logger. */ - private static final Logger logger = + /** Private log. */ + private static final Logger log = Logger.getLogger(GaugeDischargeFacet.class); @@ -73,13 +73,13 @@ */ @Override public Object getData(Artifact artifact, CallContext context) { - if (logger.isDebugEnabled()) { - logger.debug("Get data for discharge curves at index: " + + if (log.isDebugEnabled()) { + log.debug("Get data for discharge curves at index: " + index + " / stateId: " + stateId); } if (stateId == null) { - logger.error("GaugeDischargeFacet.getData: stateId is null."); + log.error("GaugeDischargeFacet.getData: stateId is null."); } D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/HYKFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/HYKFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,8 +28,8 @@ extends DataFacet implements FacetTypes { - /** House logger. */ - private static Logger logger = Logger.getLogger(HYKFacet.class); + /** House log. */ + private static Logger log = Logger.getLogger(HYKFacet.class); /** Trivial constructor, set (maybe localized) description. */ public HYKFacet(int idx, String description) { @@ -46,13 +46,13 @@ */ @Override public Object getData(Artifact art, CallContext context) { - logger.debug("HYKFacet.getData"); + log.debug("HYKFacet.getData"); String dataKey = CrossSectionFacet.BLACKBOARD_CS_MASTER_DATA; List<DataProvider> providers = context.getDataProvider(dataKey); if (providers.size() < 1) { - logger.warn("Could not find Cross-Section data provider to get master cs km."); + log.warn("Could not find Cross-Section data provider to get master cs km."); return null; } @@ -60,12 +60,12 @@ .provideData(dataKey, null, context); if(crossSection == null) { - logger.debug("getData: crossSection is null"); + log.debug("getData: crossSection is null"); return null; } double km = crossSection.getKm(); - logger.debug("HYKFacet.getData: Master Cross Section is at km: " + km); + log.debug("HYKFacet.getData: Master Cross Section is at km: " + km); // Set this km at hyk artifact to be evaluated. HYKArtifact hyk = (HYKArtifact) art;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/HYKFactory.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/HYKFactory.java Fri Sep 05 12:58:17 2014 +0200 @@ -33,7 +33,7 @@ */ public class HYKFactory { - private static Logger logger = Logger.getLogger(HYKFactory.class); + private static Logger log = Logger.getLogger(HYKFactory.class); public static String HYK_CACHE_NAME = "hykache"; @@ -47,7 +47,7 @@ * Get List of Zones for given river and km. */ public static Object getHYKs(int hykid, double km) { - logger.debug("HYKFactory.getHYKs"); + log.debug("HYKFactory.getHYKs"); Cache cache = CacheFactory.getCache(HYK_CACHE_NAME); @@ -57,7 +57,7 @@ cacheKey = "" + hykid + "_" + km; Element element = cache.get(cacheKey); if (element != null) { - logger.debug("Got hyk from cache"); + log.debug("Got hyk from cache"); return element.getValue(); } } @@ -68,7 +68,7 @@ List<Zone> zones = getZonesUncached(hykid, km); if (zones != null && cacheKey != null) { - logger.debug("Store hykzones in cache."); + log.debug("Store hykzones in cache."); Element element = new Element(cacheKey, zones); cache.put(element); } @@ -79,7 +79,7 @@ /** Return name for hyk with given id. */ public static String getHykName(int hykid) { - logger.debug("HYKFactory.getHykName " + hykid); + log.debug("HYKFactory.getHykName " + hykid); Session session = SessionHolder.HOLDER.get(); @@ -98,8 +98,8 @@ * @return according zones. */ public static List<Zone> getZonesUncached(int hykid, double km) { - if (logger.isDebugEnabled()) { - logger.debug("HYKFactory.getZoneUncached " + hykid + " km " + km); + if (log.isDebugEnabled()) { + log.debug("HYKFactory.getZoneUncached " + hykid + " km " + km); } Session session = SessionHolder.HOLDER.get(); @@ -162,21 +162,21 @@ sqlQuery.setDouble("flowDir", flowDir); sqlQuery.setDouble("km", km); - boolean debug = logger.isDebugEnabled(); + boolean debug = log.isDebugEnabled(); if (debug) { - logger.debug("HYK SQL: " + sqlQuery.getQueryString()); + log.debug("HYK SQL: " + sqlQuery.getQueryString()); } List<Object[]> results = sqlQuery.list(); if (debug) { - logger.debug("Found " + results.size() + " HYKFormation IDs in DB."); + log.debug("Found " + results.size() + " HYKFormation IDs in DB."); } if (results == null || results.isEmpty()) { if (debug) { - logger.debug("No HYK found for ID " + hykid + " at km " + km); + log.debug("No HYK found for ID " + hykid + " at km " + km); } return new ArrayList<HYKFormation>(); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/HistoricalDischargeDifferenceFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/HistoricalDischargeDifferenceFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -24,7 +24,7 @@ public class HistoricalDischargeDifferenceFacet extends HistoricalDischargeFacet { - private static final Logger logger = + private static final Logger log = Logger.getLogger(HistoricalDischargeDifferenceFacet.class); @@ -52,8 +52,8 @@ @Override public Object getData(Artifact artifact, CallContext context) { - if (logger.isDebugEnabled()) { - logger.debug("Get data for historical discharge difference curves" + + if (log.isDebugEnabled()) { + log.debug("Get data for historical discharge difference curves" + " at index: " + index + " / stateId: " + stateId); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/HistoricalDischargeFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/HistoricalDischargeFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -24,7 +24,7 @@ */ public class HistoricalDischargeFacet extends DataFacet { - private static final Logger logger = + private static final Logger log = Logger.getLogger(HistoricalDischargeFacet.class); @@ -63,8 +63,8 @@ @Override public Object getData(Artifact artifact, CallContext context) { - if (logger.isDebugEnabled()) { - logger.debug("Get data for historical discharge curves at index: " + + if (log.isDebugEnabled()) { + log.debug("Get data for historical discharge curves at index: " + index + " / stateId: " + stateId); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/MainValuesQFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/MainValuesQFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -35,8 +35,8 @@ extends DefaultFacet implements FacetTypes { - /** Own logger. */ - private static Logger logger = Logger.getLogger(MainValuesQFacet.class); + /** Own log. */ + private static Logger log = Logger.getLogger(MainValuesQFacet.class); /** Do we want MainValues at Gauge (not interpolated)? */ protected boolean isAtGauge; @@ -63,8 +63,8 @@ if (day != null) { annotation.setHitPoint(day.floatValue()); } - else if (logger.isDebugEnabled()) { - logger.debug("StickyAnnotation does not hit wqday curve: " + q); + else if (log.isDebugEnabled()) { + log.debug("StickyAnnotation does not hit wqday curve: " + q); } } @@ -89,7 +89,7 @@ List<DataProvider> providers = context. getDataProvider(DurationCurveFacet.BB_DURATIONCURVE); if (providers.size() < 1) { - logger.warn("Could not find durationcurve data provider."); + log.warn("Could not find durationcurve data provider."); // Do we have a current km in context? // If so, we are likely fetching data for a navigable // diagram (i.e. in fixation branch). @@ -113,7 +113,7 @@ if (this.name.equals(DURATION_MAINVALUES_Q)) { for (NamedDouble q: qs) { if (Double.isNaN(q.getValue())) { - logger.warn("NaN MainValue " + q.getName()); + log.warn("NaN MainValue " + q.getName()); continue; } annotation = @@ -131,7 +131,7 @@ else { for (NamedDouble q: qs) { if (Double.isNaN(q.getValue())) { - logger.warn("NaN MainValue " + q.getName()); + log.warn("NaN MainValue " + q.getName()); continue; } annotation =
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/MainValuesWFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/MainValuesWFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,8 +32,8 @@ extends DefaultFacet implements FacetTypes { - /** Own logger. */ - private static Logger logger = Logger.getLogger(MainValuesWFacet.class); + /** Own log. */ + private static Logger log = Logger.getLogger(MainValuesWFacet.class); /** Do we want MainValues at Gauge (not interpolated)? */ protected boolean isAtGauge; @@ -60,8 +60,8 @@ if (day != null) { annotation.setHitPoint(day.floatValue()); } - else if (logger.isDebugEnabled()) { - logger.debug("StickyAnnotation does not hit wqday curve: " + w); + else if (log.isDebugEnabled()) { + log.debug("StickyAnnotation does not hit wqday curve: " + w); } } @@ -87,7 +87,7 @@ List<DataProvider> providers = context. getDataProvider(DurationCurveFacet.BB_DURATIONCURVE); if (providers.size() < 1) { - logger.warn("Could not find durationcurve data provider."); + log.warn("Could not find durationcurve data provider."); // Do we have a current km in context? // If so, we are likely fetching data for a navigable // diagram (i.e. in fixation branch). @@ -107,9 +107,9 @@ } for (NamedDouble w: ws) { - logger.debug("W Annotation at " + w.getValue() + " ("+w.getName()+")"+ wqdays); + log.debug("W Annotation at " + w.getValue() + " ("+w.getName()+")"+ wqdays); if (Double.isNaN(w.getValue())) { - logger.warn("NaN MainValue " + w.getName()); + log.warn("NaN MainValue " + w.getName()); continue; } StickyAxisAnnotation annotation =
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ManagedFacetAdapter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ManagedFacetAdapter.java Fri Sep 05 12:58:17 2014 +0200 @@ -30,7 +30,7 @@ } - protected Logger logger = Logger.getLogger(ManagedFacetAdapter.class); + protected Logger log = Logger.getLogger(ManagedFacetAdapter.class); public ManagedFacetAdapter( Facet facet,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ManualPointsFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ManualPointsFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -26,7 +26,7 @@ extends DefaultFacet { /** Logger for this class. */ - private static final Logger logger = Logger.getLogger(ManualPointsFacet.class); + private static final Logger log = Logger.getLogger(ManualPointsFacet.class); /**
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/QSectorFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/QSectorFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -26,7 +26,7 @@ extends DefaultFacet { /** Logger for this class. */ - private static final Logger logger = Logger.getLogger(QSectorFacet.class); + private static final Logger log = Logger.getLogger(QSectorFacet.class); /** @@ -59,7 +59,7 @@ QSectorArtifact qsectorArtifact = (QSectorArtifact) artifact; if (qsectorArtifact == null || context == null || context.getContextValue("currentKm") == null) { - logger.error("No artifact, context or currentKm in QSectorFacet"); + log.error("No artifact, context or currentKm in QSectorFacet"); return null; } double currentKm =
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/RelativePointFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/RelativePointFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,8 +28,8 @@ extends BlackboardDataFacet implements FacetTypes { - /** Own logger. */ - private static Logger logger = Logger.getLogger(RelativePointFacet.class); + /** Own log. */ + private static Logger log = Logger.getLogger(RelativePointFacet.class); /** Trivial Constructor. */ public RelativePointFacet(String description) { @@ -54,7 +54,7 @@ List<DataProvider> providers = context. getDataProvider(DurationCurveFacet.BB_DURATIONCURVE); if (providers.size() < 1) { - logger.warn("Could not find durationcurve data provider."); + log.warn("Could not find durationcurve data provider."); } else { wqdays = providers.get(0).provideData( @@ -65,10 +65,10 @@ List<DataProvider> kmproviders = context. getDataProvider(DurationCurveFacet.BB_DURATIONCURVE_KM); if (kmproviders.size() < 1) { - logger.warn("Could not find durationcurve.km data provider."); + log.warn("Could not find durationcurve.km data provider."); } else { - logger.debug("Found durationcurve.km data provider."); + log.debug("Found durationcurve.km data provider."); String dckm = providers.get(0).provideData( DurationCurveFacet.BB_DURATIONCURVE_KM, null, @@ -80,7 +80,7 @@ // Which W at this km? double w = StaticWKmsArtifact.getWAtKmLin(wKms, km); if (w == -1) { - logger.warn("w is -1, already bad sign!"); + log.warn("w is -1, already bad sign!"); } // Where is this W passed by in the wq-curve? WQDay wqday = (WQDay) wqdays; @@ -108,7 +108,7 @@ return new Point2D.Double((double) day, w); } - logger.warn("not wqkms / w / day found"); + log.warn("not wqkms / w / day found"); // TODO better signal failure. return new Point2D.Double(0d, 0d); } @@ -124,7 +124,7 @@ List<DataProvider> providers = context. getDataProvider(ReferenceCurveFacet.BB_REFERENCECURVE_STARTKM); if (providers.size() < 1) { - logger.warn("Could not find reference curve startkm data provider."); + log.warn("Could not find reference curve startkm data provider."); } Double start = (Double) providers.get(0). @@ -133,17 +133,17 @@ providers = context. getDataProvider(ReferenceCurveFacet.BB_REFERENCECURVE_ENDKMS); if (providers.size() < 1) { - logger.warn("Could not find reference curve endkms data provider."); + log.warn("Could not find reference curve endkms data provider."); } double[] ends = (double[]) providers.get(0). provideData(ReferenceCurveFacet.BB_REFERENCECURVE_ENDKMS, null, context); - logger.debug("Got s " + start + " e " + ends); + log.debug("Got s " + start + " e " + ends); double startW = StaticWKmsArtifact.getWAtKmLin(wKms, start.doubleValue()); // TODO handle multiple ends. double endW = StaticWKmsArtifact.getWAtKmLin(wKms, ends[0]); - logger.debug("Gotw s " + startW + " e " + endW); + log.debug("Gotw s " + startW + " e " + endW); return new Point2D.Double(startW, endW); } @@ -166,7 +166,7 @@ wKms = ((StaticWQKmsArtifact) artifact).getWQKms(); } else { - logger.error("Cannot handle Artifact to create relative point."); + log.error("Cannot handle Artifact to create relative point."); return null; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ReportFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ReportFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -25,7 +25,7 @@ extends DefaultFacet implements FacetTypes { - private static Logger logger = Logger.getLogger(ReportFacet.class); + private static Logger log = Logger.getLogger(ReportFacet.class); protected ComputeType type; protected String hash; @@ -49,7 +49,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("get report data"); + log.debug("get report data"); D4EArtifact flys = (D4EArtifact)artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WKmsFactory.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WKmsFactory.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,7 +31,7 @@ */ public class WKmsFactory { - /** Private logger to use here. */ + /** Private log to use here. */ private static Logger log = Logger.getLogger(WKmsFactory.class); /** Query to get km and ws for wst_id and column_pos. */
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WKmsJRDataSource.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WKmsJRDataSource.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,8 +23,8 @@ */ public class WKmsJRDataSource implements JRDataSource { - /** The logger used in this exporter.*/ - private static Logger logger = Logger.getLogger(WKmsJRDataSource.class); + /** The log used in this exporter.*/ + private static Logger log = Logger.getLogger(WKmsJRDataSource.class); /** *
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQKms.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQKms.java Fri Sep 05 12:58:17 2014 +0200 @@ -26,7 +26,7 @@ extends WQ implements WKms, QKms { - private static Logger logger = Logger.getLogger(WQKms.class); + private static Logger log = Logger.getLogger(WQKms.class); /** The array that contains the 'KMs' values. */ protected TDoubleArrayList kms;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQKmsFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQKmsFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -29,8 +29,8 @@ extends DataFacet implements FacetTypes { - /** House logger. */ - private static Logger logger = Logger.getLogger(WQKmsFacet.class); + /** House log. */ + private static Logger log = Logger.getLogger(WQKmsFacet.class); /** Trivial Constructor. */ public WQKmsFacet(String description) { @@ -56,7 +56,7 @@ */ @Override public Object getData(Artifact artifact, CallContext context) { - logger.debug("WQKmsFacet.getData"); + log.debug("WQKmsFacet.getData"); StaticWQKmsArtifact staticData = (StaticWQKmsArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQTJRDataSource.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQTJRDataSource.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,8 +23,8 @@ */ public class WQTJRDataSource implements JRDataSource { - /** The logger used in this exporter.*/ - private static Logger logger = Logger.getLogger(WQTJRDataSource.class); + /** The log used in this exporter.*/ + private static Logger log = Logger.getLogger(WQTJRDataSource.class); /** *
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WWQQJRDataSource.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WWQQJRDataSource.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,8 +23,8 @@ */ public class WWQQJRDataSource implements JRDataSource { - /** The logger used in this exporter.*/ - private static Logger logger = Logger.getLogger(WWQQJRDataSource.class); + /** The log used in this exporter.*/ + private static Logger log = Logger.getLogger(WWQQJRDataSource.class); /** *
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WaterlevelFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WaterlevelFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,7 +23,7 @@ */ public class WaterlevelFacet extends DataFacet { - private static Logger logger = Logger.getLogger(WaterlevelFacet.class); + private static Logger log = Logger.getLogger(WaterlevelFacet.class); public WaterlevelFacet(int index, String name, String description) { super(index, name, description, ComputeType.ADVANCE, null, null); @@ -52,7 +52,7 @@ return (WQKms []) res.getData(); } else { - logger.error("WaterlevelFacet got wrong data type " + res.getData()); + log.error("WaterlevelFacet got wrong data type " + res.getData()); return null; } } @@ -64,13 +64,13 @@ @Override public Object getData(Artifact artifact, CallContext context) { - if (logger.isDebugEnabled()) { - logger.debug("Get data for waterlevels at index: " + index + + if (log.isDebugEnabled()) { + log.debug("Get data for waterlevels at index: " + index + " /stateId: " + stateId); } if (artifact == null) { - logger.error("WaterlevelFacet.getData: artifact is null"); + log.error("WaterlevelFacet.getData: artifact is null"); return null; } @@ -80,7 +80,7 @@ winfo.compute(context, hash, stateId, type, false); if (res == null) { - logger.error("WaterlevelFacet.getData: null result"); + log.error("WaterlevelFacet.getData: null result"); return null; } @@ -92,7 +92,7 @@ linearInterpolate(wqkms[index], (Double) KM); } else { - logger.debug("Do not interpolate."); + log.debug("Do not interpolate."); } return wqkms != null ? wqkms[index] : null; @@ -105,7 +105,7 @@ * @return [w, q, km] */ public WQKms linearInterpolate(WQKms wqkms, double km) { - logger.debug("interpolate at given km (" + km + ")"); + log.debug("interpolate at given km (" + km + ")"); WQKms resultWQKms = new WQKms(); int size = wqkms.size(); @@ -149,7 +149,7 @@ resultWQKms.add(inW, inQ, km); } else { - logger.debug("waterlevelfacet stuff " + idx + " size " + size + " mod: " + mod); + log.debug("waterlevelfacet stuff " + idx + " size " + size + " mod: " + mod); } return resultWQKms;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ZoomScale.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ZoomScale.java Fri Sep 05 12:58:17 2014 +0200 @@ -21,7 +21,7 @@ /** Has to do with adaptive smoothing based on current diagram extent. */ public class ZoomScale { - private static Logger logger = Logger.getLogger(ZoomScale.class); + private static Logger log = Logger.getLogger(ZoomScale.class); private HashMap<String, TreeMap<Double, Double>> rivers;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/extreme/ExtremeCurveFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/extreme/ExtremeCurveFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -33,8 +33,8 @@ extends FixingsFacet implements FacetTypes { - /** House logger. */ - private static Logger logger = Logger.getLogger(ExtremeCurveFacet.class); + /** House log. */ + private static Logger log = Logger.getLogger(ExtremeCurveFacet.class); /** Trivial Constructor. */ @@ -76,7 +76,7 @@ */ @Override public Object getData(Artifact artifact, CallContext context) { - logger.debug("ExtremeCurveFacet.getData"); + log.debug("ExtremeCurveFacet.getData"); if (artifact instanceof D4EArtifact) { D4EArtifact flys = (D4EArtifact)artifact; CalculationResult res = @@ -92,7 +92,7 @@ KMIndex.Entry<Curve> curveEntry = curves.search(currentKm); if (curveEntry != null) { - logger.debug("A curve at km = " + currentKm); + log.debug("A curve at km = " + currentKm); Curve c = curveEntry.getValue(); // Find segment in which the curr. km is located. ExtremeAccess access = new ExtremeAccess(flys); @@ -109,12 +109,12 @@ return c; } else { - logger.debug("No curve at km = " + currentKm); + log.debug("No curve at km = " + currentKm); return null; } } else { - logger.debug("Not an instance of D4EArtifact / WINFOArtifact."); + log.debug("Not an instance of D4EArtifact / WINFOArtifact."); return null; } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAnalysisEventsFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAnalysisEventsFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,8 +31,8 @@ extends FixingsFacet implements FacetTypes { - /** House logger. */ - private static Logger logger = Logger.getLogger(FixAnalysisEventsFacet.class); + /** House log. */ + private static Logger log = Logger.getLogger(FixAnalysisEventsFacet.class); /** Trivial Constructor. */ public FixAnalysisEventsFacet() { @@ -62,10 +62,10 @@ */ @Override public Object getData(Artifact artifact, CallContext context) { - logger.debug("FixAnalysisEventsFacet.getData"); + log.debug("FixAnalysisEventsFacet.getData"); if (!(artifact instanceof D4EArtifact)) { - logger.debug("Not an instance of FixationArtifact."); + log.debug("Not an instance of FixationArtifact."); return null; } D4EArtifact flys = (D4EArtifact)artifact; @@ -83,13 +83,13 @@ kmPeriods.binarySearch(currentKm); if (kmPeriodsEntry == null) { - logger.debug("getData: kmPeriodsEntry == null"); + log.debug("getData: kmPeriodsEntry == null"); return null; } AnalysisPeriod[] periods = kmPeriodsEntry.getValue(); if (periods == null) { - logger.debug("getData: periods == null"); + log.debug("getData: periods == null"); return null; } int ndx = index >> 8;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAnalysisPeriodsFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAnalysisPeriodsFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,8 +32,8 @@ extends FixingsFacet implements FacetTypes { - /** House logger. */ - private static Logger logger = Logger.getLogger(FixAnalysisPeriodsFacet.class); + /** House log. */ + private static Logger log = Logger.getLogger(FixAnalysisPeriodsFacet.class); /** Trivial Constructor. */ public FixAnalysisPeriodsFacet() { @@ -63,7 +63,7 @@ */ @Override public Object getData(Artifact artifact, CallContext context) { - logger.debug("FixAnalysisPeriodsFacet.getData"); + log.debug("FixAnalysisPeriodsFacet.getData"); if (artifact instanceof D4EArtifact) { D4EArtifact flys = (D4EArtifact)artifact; @@ -96,7 +96,7 @@ return dates; } else { - logger.debug("Not an instance of FixationArtifact."); + log.debug("Not an instance of FixationArtifact."); return null; } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAvSectorFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAvSectorFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -34,8 +34,8 @@ extends FixingsFacet implements FacetTypes { - /** House logger. */ - private static Logger logger = Logger.getLogger(FixAvSectorFacet.class); + /** House log. */ + private static Logger log = Logger.getLogger(FixAvSectorFacet.class); /** Trivial Constructor. */ public FixAvSectorFacet() { @@ -63,7 +63,7 @@ */ @Override public Object getData(Artifact artifact, CallContext context) { - logger.debug("FixAvSectorFacet.getData"); + log.debug("FixAvSectorFacet.getData"); if (artifact instanceof D4EArtifact) { D4EArtifact flys = (D4EArtifact)artifact; @@ -81,14 +81,14 @@ kmPeriods.binarySearch(currentKm); if (kmPeriodsEntry == null) { - logger.warn("No analysis periods found for km '" + currentKm + "'"); + log.warn("No analysis periods found for km '" + currentKm + "'"); return null; } AnalysisPeriod[] periods = kmPeriodsEntry.getValue(); if (periods == null) { - logger.warn("No analysis periods specified!"); + log.warn("No analysis periods specified!"); return null; } @@ -100,9 +100,9 @@ qwdData = periods[periodNdx].getQSectorAverages(); } - if (logger.isDebugEnabled()) { + if (log.isDebugEnabled()) { int resSize = qwdData != null ? qwdData.length : -1; - logger.debug("Found " + resSize + " result elements."); + log.debug("Found " + resSize + " result elements."); } if (qwdData == null) { @@ -111,7 +111,7 @@ return new QWDDateRange(qwdData[sectorNdx], periods[periodNdx].getDateRange()); } else { - logger.warn("Artifact is no instance of D4EArtifact."); + log.warn("Artifact is no instance of D4EArtifact."); return null; } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixDerivateFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixDerivateFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -36,8 +36,8 @@ extends FixingsFacet implements FacetTypes { - /** House logger. */ - private static Logger logger = Logger.getLogger(FixDerivateFacet.class); + /** House log. */ + private static Logger log = Logger.getLogger(FixDerivateFacet.class); /** Trivial Constructor. */ @@ -68,9 +68,9 @@ @Override public Object getData(Artifact artifact, CallContext context) { - logger.debug("FixDerivateFacet.getData"); + log.debug("FixDerivateFacet.getData"); if (!(artifact instanceof D4EArtifact)) { - logger.debug("Not an instance of FixationArtifact."); + log.debug("Not an instance of FixationArtifact."); return null; } @@ -96,7 +96,7 @@ double[] coeffs = params.interpolate("km", currentKm, paramNames); if (coeffs == null) { - logger.warn("getData: coeffs == null"); + log.warn("getData: coeffs == null"); return null; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixDeviationFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixDeviationFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,8 +31,8 @@ extends FixingsFacet implements FacetTypes { - /** House logger. */ - private static Logger logger = Logger.getLogger(FixDeviationFacet.class); + /** House log. */ + private static Logger log = Logger.getLogger(FixDeviationFacet.class); public static final String [] STD_DEV_COLUMN = { "std-dev" }; @@ -63,7 +63,7 @@ */ @Override public Object getData(Artifact artifact, CallContext context) { - logger.debug("FixDeviationFacet.getData"); + log.debug("FixDeviationFacet.getData"); if (artifact instanceof D4EArtifact) { D4EArtifact flys = (D4EArtifact)artifact; @@ -81,14 +81,14 @@ params.interpolate("km", currentKm, STD_DEV_COLUMN); if (stdDev == null) { - logger.warn("getData: stdDev == null at km " + currentKm); + log.warn("getData: stdDev == null at km " + currentKm); return null; } return stdDev; } else { - logger.debug("Not an instance of FixationArtifact."); + log.debug("Not an instance of FixationArtifact."); return null; } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalAnalysisFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalAnalysisFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,8 +28,8 @@ extends DataFacet implements FacetTypes { - /** House logger. */ - private static Logger logger = Logger.getLogger(FixLongitudinalAnalysisFacet.class); + /** House log. */ + private static Logger log = Logger.getLogger(FixLongitudinalAnalysisFacet.class); /** Trivial Constructor. */ public FixLongitudinalAnalysisFacet() { @@ -61,7 +61,7 @@ */ @Override public Object getData(Artifact artifact, CallContext context) { - logger.debug("FixLongitudinalAnalysisFacet.getData"); + log.debug("FixLongitudinalAnalysisFacet.getData"); if (artifact instanceof D4EArtifact) { D4EArtifact flys = (D4EArtifact)artifact; @@ -75,7 +75,7 @@ KMIndex<AnalysisPeriod []> kmPeriods = result.getAnalysisPeriods(); if (kmPeriods == null) { - logger.warn("No analysis periods found."); + log.warn("No analysis periods found."); return null; } int periodNdx = index >> 8; @@ -96,7 +96,7 @@ return resPeriods; } else { - logger.warn("Artifact is no instance of D4EArtifact."); + log.warn("Artifact is no instance of D4EArtifact."); return null; } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalAvSectorFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalAvSectorFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,8 +23,8 @@ extends DataFacet implements FacetTypes { - /** House logger. */ - private static Logger logger = + /** House log. */ + private static Logger log = Logger.getLogger(FixLongitudinalAvSectorFacet.class); /** Trivial Constructor. */ @@ -57,7 +57,7 @@ */ @Override public Object getData(Artifact artifact, CallContext context) { - logger.debug("FixLongitudinalAvSectorFacet.getData"); + log.debug("FixLongitudinalAvSectorFacet.getData"); if (artifact instanceof D4EArtifact) { D4EArtifact flys = (D4EArtifact)artifact; @@ -71,7 +71,7 @@ KMIndex<AnalysisPeriod []> kmPeriods = result.getAnalysisPeriods(); if (kmPeriods == null) { - logger.warn("No analysis periods found."); + log.warn("No analysis periods found."); return null; } int periodNdx = index >> 2; @@ -85,7 +85,7 @@ return resPeriods; } else { - logger.warn("Artifact is no instance of D4EArtifact."); + log.warn("Artifact is no instance of D4EArtifact."); return null; } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalDeviationFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalDeviationFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -33,8 +33,8 @@ extends DataFacet implements FacetTypes { - /** House logger. */ - private static Logger logger = Logger.getLogger(FixLongitudinalDeviationFacet.class); + /** House log. */ + private static Logger log = Logger.getLogger(FixLongitudinalDeviationFacet.class); /** Trivial Constructor. */ public FixLongitudinalDeviationFacet() { @@ -66,7 +66,7 @@ */ @Override public Object getData(Artifact artifact, CallContext context) { - logger.debug("FixLongitudinalDeviationFacet.getData"); + log.debug("FixLongitudinalDeviationFacet.getData"); if (artifact instanceof D4EArtifact) { D4EArtifact flys = (D4EArtifact)artifact; @@ -81,7 +81,7 @@ KMIndex<AnalysisPeriod []> kmPeriods = result.getAnalysisPeriods(); if (kmPeriods == null) { - logger.warn("No analysis periods found."); + log.warn("No analysis periods found."); return null; } @@ -94,7 +94,7 @@ params.interpolate("km", km, new String[] {"std-dev"}); if(stdDev == null) { - logger.warn("getData: stdDev == null"); + log.warn("getData: stdDev == null"); continue; } kmIndex.add(km, stdDev); @@ -103,7 +103,7 @@ return kmIndex; } else { - logger.warn("Artifact is no instance of D4EArtifact."); + log.warn("Artifact is no instance of D4EArtifact."); return null; } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalReferenceFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalReferenceFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -33,8 +33,8 @@ extends DataFacet implements FacetTypes { - /** House logger. */ - private static Logger logger = Logger.getLogger(FixLongitudinalReferenceFacet.class); + /** House log. */ + private static Logger log = Logger.getLogger(FixLongitudinalReferenceFacet.class); /** Trivial Constructor. */ public FixLongitudinalReferenceFacet() { @@ -66,7 +66,7 @@ */ @Override public Object getData(Artifact artifact, CallContext context) { - logger.debug("FixLongitudinalReferenceFacet.getData"); + log.debug("FixLongitudinalReferenceFacet.getData"); if (artifact instanceof D4EArtifact) { D4EArtifact flys = (D4EArtifact)artifact; @@ -81,7 +81,7 @@ KMIndex<QWD []> kmReference = result.getReferenced(); if (kmReference == null) { - logger.warn("No references found."); + log.warn("No references found."); return null; } @@ -99,7 +99,7 @@ return resReference; } else { - logger.warn("Artifact is no instance of D4EArtifact."); + log.warn("Artifact is no instance of D4EArtifact."); return null; } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixOutlierFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixOutlierFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -27,8 +27,8 @@ extends FixingsFacet implements FacetTypes { - /** House logger. */ - private static Logger logger = Logger.getLogger(FixOutlierFacet.class); + /** House log. */ + private static Logger log = Logger.getLogger(FixOutlierFacet.class); /** Trivial Constructor. */ public FixOutlierFacet() { @@ -58,7 +58,7 @@ */ @Override public Object getData(Artifact artifact, CallContext context) { - logger.debug("FixOutlierFacet.getData"); + log.debug("FixOutlierFacet.getData"); if (artifact instanceof D4EArtifact) { D4EArtifact flys = (D4EArtifact)artifact; @@ -78,19 +78,19 @@ if (qwsEntry != null) { qws = qwsEntry.getValue(); - if (logger.isDebugEnabled()) { - logger.debug("Found " + (qws != null ? qws.length : 0) + if (log.isDebugEnabled()) { + log.debug("Found " + (qws != null ? qws.length : 0) + " KMIndex.Entry for km " + currentKm); } } else { - logger.debug("Found no KMIndex.Entry for km " + currentKm); + log.debug("Found no KMIndex.Entry for km " + currentKm); } return qws; } - logger.warn("Not an instance of D4EArtifact."); + log.warn("Not an instance of D4EArtifact."); return null; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixReferenceEventsFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixReferenceEventsFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,8 +28,8 @@ extends FixingsFacet implements FacetTypes { - /** House logger. */ - private static Logger logger = Logger.getLogger(FixReferenceEventsFacet.class); + /** House log. */ + private static Logger log = Logger.getLogger(FixReferenceEventsFacet.class); /** Trivial Constructor. */ public FixReferenceEventsFacet() { @@ -59,10 +59,10 @@ */ @Override public Object getData(Artifact artifact, CallContext context) { - logger.debug("FixReferenceEventsFacet.getData"); + log.debug("FixReferenceEventsFacet.getData"); if (!(artifact instanceof D4EArtifact)) { - logger.debug("Not an instance of FixationArtifact."); + log.debug("Not an instance of FixationArtifact."); return null; } @@ -76,8 +76,8 @@ FixResult result = (FixResult) res.getData(); double currentKm = getCurrentKm(context); - if (logger.isDebugEnabled()) { - logger.debug("current km in FRE: " + currentKm); + if (log.isDebugEnabled()) { + log.debug("current km in FRE: " + currentKm); } KMIndex<QWD []> kmQWs = result.getReferenced();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixWQCurveFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixWQCurveFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -35,8 +35,8 @@ extends FixingsFacet implements FacetTypes { - /** House logger. */ - private static Logger logger = Logger.getLogger(FixWQCurveFacet.class); + /** House log. */ + private static Logger log = Logger.getLogger(FixWQCurveFacet.class); /** Trivial Constructor. */ @@ -67,9 +67,9 @@ @Override public Object getData(Artifact artifact, CallContext context) { - logger.debug("getData"); + log.debug("getData"); if (!(artifact instanceof D4EArtifact)) { - logger.debug("Not an instance of D4EArtifact / FixationArtifact."); + log.debug("Not an instance of D4EArtifact / FixationArtifact."); return null; } @@ -84,13 +84,13 @@ FixResult result = (FixResult) res.getData(); double currentKm = getCurrentKm(context); - logger.debug("getData: km = " + currentKm); + log.debug("getData: km = " + currentKm); String function = access.getFunction(); Function ff = FunctionFactory.getInstance().getFunction(function); if (ff == null) { - logger.warn("getData: ff == null"); + log.warn("getData: ff == null"); return null; } @@ -101,7 +101,7 @@ "km", currentKm, paramNames, access.getStep() / 1000 + 1E-3); if (coeffs == null) { - logger.warn("getData: coeffs not in interpolation limits"); + log.warn("getData: coeffs not in interpolation limits"); return null; } @@ -109,7 +109,7 @@ ff.instantiate(coeffs); double maxQ = FixFacetUtils.getMaxQ(params, currentKm); - logger.debug("getData: maxQ = " + maxQ); + log.debug("getData: maxQ = " + maxQ); FixFunction fix = new FixFunction( ff.getName(),
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/HWSContainer.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/HWSContainer.java Fri Sep 05 12:58:17 2014 +0200 @@ -15,7 +15,7 @@ public class HWSContainer { - private static Logger logger = Logger.getLogger(HWSContainer.class); + private static Logger log = Logger.getLogger(HWSContainer.class); private String river; private HWS.TYPE type; private List<HWS> hws; @@ -52,7 +52,7 @@ } public void addHws(HWS hws) { - logger.debug("add hws: " + hws.getName()); + log.debug("add hws: " + hws.getName()); this.hws.add(hws); } @@ -74,7 +74,7 @@ } public List<HWS> getHws(String name) { - logger.debug("find: " + name + " in " + hws.size() + " elements"); + log.debug("find: " + name + " in " + hws.size() + " elements"); if (hws == null || hws.size() == 0) { return new ArrayList<HWS>(); } @@ -84,7 +84,7 @@ results.add(h); } } - logger.debug("found: " + results.size()); + log.debug("found: " + results.size()); return results; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/HWSFactory.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/HWSFactory.java Fri Sep 05 12:58:17 2014 +0200 @@ -27,7 +27,7 @@ public class HWSFactory { - /** Private logger to use here. */ + /** Private log to use here. */ private static Logger log = Logger.getLogger(HWSFactory.class); private static final int HWS_LINES = 0;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/ShapeFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/ShapeFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -13,7 +13,7 @@ public class ShapeFacet extends DefaultFacet { - private static Logger logger = Logger.getLogger(ShapeFacet.class); + private static Logger log = Logger.getLogger(ShapeFacet.class); private static final String BASE_DIR = "/artifact-database/floodmap/shapefile-path/@value";
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WMSLayerFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WMSLayerFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -41,7 +41,7 @@ protected String srid; - private static final Logger logger = Logger.getLogger(WMSLayerFacet.class); + private static final Logger log = Logger.getLogger(WMSLayerFacet.class); public WMSLayerFacet() { } @@ -107,7 +107,7 @@ this.extent = extent; } else { - logger.debug("setExtent(): extent is null"); + log.debug("setExtent(): extent is null"); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WSPLGENReportFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WSPLGENReportFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -25,7 +25,7 @@ */ public class WSPLGENReportFacet extends ReportFacet { - private static Logger logger = Logger.getLogger(WSPLGENReportFacet.class); + private static Logger log = Logger.getLogger(WSPLGENReportFacet.class); protected CalculationResult result;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDensitySubFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDensitySubFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,7 +28,7 @@ private static final long serialVersionUID = 1L; - private static Logger logger = Logger.getLogger(BedDensitySubFacet.class); + private static Logger log = Logger.getLogger(BedDensitySubFacet.class); public BedDensitySubFacet() { } @@ -41,7 +41,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed density at index: " + index); + log.debug("Get data for bed density at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDensityTopFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDensityTopFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,7 +28,7 @@ private static final long serialVersionUID = 1L; - private static Logger logger = Logger.getLogger(BedDensityTopFacet.class); + private static Logger log = Logger.getLogger(BedDensityTopFacet.class); public BedDensityTopFacet() { } @@ -41,7 +41,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed density at index: " + index); + log.debug("Get data for bed density at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterDataFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterDataFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -14,7 +14,7 @@ public class BedDiameterDataFacet extends DataFacet { - private static final Logger logger = Logger.getLogger(BedDiameterDataFacet.class); + private static final Logger log = Logger.getLogger(BedDiameterDataFacet.class); public BedDiameterDataFacet() { }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterSubFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterSubFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,7 +28,7 @@ private static final long serialVersionUID = 1L; - private static Logger logger = Logger.getLogger(BedDiameterSubFacet.class); + private static Logger log = Logger.getLogger(BedDiameterSubFacet.class); public BedDiameterSubFacet() { } @@ -41,7 +41,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed diameter at index: " + index); + log.debug("Get data for bed diameter at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterTopFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterTopFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,7 +28,7 @@ private static final long serialVersionUID = 1L; - private static Logger logger = Logger.getLogger(BedDiameterTopFacet.class); + private static Logger log = Logger.getLogger(BedDiameterTopFacet.class); public BedDiameterTopFacet() { } @@ -41,7 +41,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed diameter at index: " + index); + log.debug("Get data for bed diameter at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,7 +23,7 @@ public class BedDiffCalculation extends Calculation { - private static final Logger logger = + private static final Logger log = Logger.getLogger(BedDiffCalculation.class); protected String river; @@ -33,7 +33,7 @@ } public CalculationResult calculate(BedDifferencesAccess access, CallContext context) { - logger.info("BedDiffCalculation.calculate"); + log.info("BedDiffCalculation.calculate"); this.river = access.getRiverName(); this.heightIds = access.extractHeightIds(context); @@ -61,7 +61,7 @@ private BedDiffYearResult calculateYearDifference( BedHeightSingleData[] pair ) { - logger.debug("BedDiffCalculation.calculateYearDifference"); + log.debug("BedDiffCalculation.calculateYearDifference"); BedHeightSingleData s1 = pair[0]; BedHeightSingleData s2 = pair[1];
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -22,7 +22,7 @@ public class BedDiffFacet extends DataFacet { - private static Logger logger = Logger.getLogger(BedDiffFacet.class); + private static Logger log = Logger.getLogger(BedDiffFacet.class); public BedDiffFacet() { } @@ -35,7 +35,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed density at index: " + index); + log.debug("Get data for bed density at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffFilterFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffFilterFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -27,7 +27,7 @@ public class BedDiffFilterFacet extends DataFacet { - private static Logger logger = Logger.getLogger(BedDiffFilterFacet.class); + private static Logger log = Logger.getLogger(BedDiffFilterFacet.class); public BedDiffFilterFacet() { } @@ -40,7 +40,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed density at index: " + index); + log.debug("Get data for bed density at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightMinFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightMinFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -15,7 +15,7 @@ extends DataFacet implements FacetTypes { - private static Logger logger = Logger.getLogger(BedDiffHeightMinFacet.class); + private static Logger log = Logger.getLogger(BedDiffHeightMinFacet.class); public BedDiffHeightMinFacet() { } @@ -28,7 +28,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed density at index: " + index); + log.debug("Get data for bed density at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightMinFilterFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightMinFilterFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -27,7 +27,7 @@ public class BedDiffHeightMinFilterFacet extends DataFacet { - private static Logger logger = Logger.getLogger(BedDiffHeightMinFilterFacet.class); + private static Logger log = Logger.getLogger(BedDiffHeightMinFilterFacet.class); public BedDiffHeightMinFilterFacet() { } @@ -40,7 +40,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed density at index: " + index); + log.debug("Get data for bed density at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightSubFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightSubFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -15,7 +15,7 @@ extends DataFacet implements FacetTypes { - private static Logger logger = Logger.getLogger(BedDiffHeightSubFacet.class); + private static Logger log = Logger.getLogger(BedDiffHeightSubFacet.class); public BedDiffHeightSubFacet() { } @@ -28,7 +28,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed density at index: " + index); + log.debug("Get data for bed density at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightSubFilterFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightSubFilterFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -27,7 +27,7 @@ public class BedDiffHeightSubFilterFacet extends DataFacet { - private static Logger logger = Logger.getLogger(BedDiffHeightSubFilterFacet.class); + private static Logger log = Logger.getLogger(BedDiffHeightSubFilterFacet.class); public BedDiffHeightSubFilterFacet() { } @@ -40,7 +40,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed density at index: " + index); + log.debug("Get data for bed density at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffMorphMinFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffMorphMinFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -15,7 +15,7 @@ extends DataFacet implements FacetTypes { - private static Logger logger = Logger.getLogger(BedDiffMorphMinFacet.class); + private static Logger log = Logger.getLogger(BedDiffMorphMinFacet.class); public BedDiffMorphMinFacet() { } @@ -28,7 +28,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed density at index: " + index); + log.debug("Get data for bed density at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffMorphSubFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffMorphSubFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -15,7 +15,7 @@ extends DataFacet implements FacetTypes { - private static Logger logger = Logger.getLogger(BedDiffMorphSubFacet.class); + private static Logger log = Logger.getLogger(BedDiffMorphSubFacet.class); public BedDiffMorphSubFacet() { } @@ -28,7 +28,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed density at index: " + index); + log.debug("Get data for bed density at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffPerYearFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffPerYearFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -15,7 +15,7 @@ extends DataFacet implements FacetTypes { - private static Logger logger = Logger.getLogger(BedDiffPerYearFacet.class); + private static Logger log = Logger.getLogger(BedDiffPerYearFacet.class); public BedDiffPerYearFacet() { } @@ -28,7 +28,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed density at index: " + index); + log.debug("Get data for bed density at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffPerYearFilterFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffPerYearFilterFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -27,7 +27,7 @@ public class BedDiffPerYearFilterFacet extends DataFacet { - private static Logger logger = Logger.getLogger(BedDiffPerYearFilterFacet.class); + private static Logger log = Logger.getLogger(BedDiffPerYearFilterFacet.class); public BedDiffPerYearFilterFacet() { } @@ -40,7 +40,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed density at index: " + index); + log.debug("Get data for bed density at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffSoundingWidthFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffSoundingWidthFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -15,7 +15,7 @@ extends DataFacet implements FacetTypes { - private static Logger logger = Logger.getLogger(BedDiffSoundingWidthFacet.class); + private static Logger log = Logger.getLogger(BedDiffSoundingWidthFacet.class); public BedDiffSoundingWidthFacet() { } @@ -28,7 +28,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed density at index: " + index); + log.debug("Get data for bed density at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -26,7 +26,7 @@ extends BlackboardDataFacet implements FacetTypes { - private static final Logger logger = Logger.getLogger(BedHeightFacet.class); + private static final Logger log = Logger.getLogger(BedHeightFacet.class); private String type;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFactory.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFactory.java Fri Sep 05 12:58:17 2014 +0200 @@ -25,7 +25,7 @@ /** Create BedHeights from database. */ public class BedHeightFactory { - /** Private logger to use here. */ + /** Private log to use here. */ private static Logger log = Logger.getLogger(BedHeightFactory.class); /** Query to get km and ws for wst_id and column_pos. */
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedPorositySubFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedPorositySubFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,7 +28,7 @@ private static final long serialVersionUID = 1L; - private static Logger logger = Logger.getLogger(BedPorositySubFacet.class); + private static Logger log = Logger.getLogger(BedPorositySubFacet.class); public BedPorositySubFacet() { } @@ -41,7 +41,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed porosity at index: " + index); + log.debug("Get data for bed porosity at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedPorosityTopFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedPorosityTopFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,7 +28,7 @@ private static final long serialVersionUID = 1L; - private static Logger logger = Logger.getLogger(BedPorosityTopFacet.class); + private static Logger log = Logger.getLogger(BedPorosityTopFacet.class); public BedPorosityTopFacet() { } @@ -41,7 +41,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bed porosity at index: " + index); + log.debug("Get data for bed porosity at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java Fri Sep 05 12:58:17 2014 +0200 @@ -25,7 +25,7 @@ public class BedQualityCalculation extends Calculation { - private static final Logger logger = Logger + private static final Logger log = Logger .getLogger(BedQualityCalculation.class); protected String river; @@ -39,7 +39,7 @@ } public CalculationResult calculate(BedQualityAccess access) { - logger.info("BedQualityCalculation.calculate"); + log.info("BedQualityCalculation.calculate"); String river = access.getRiverName(); Double from = access.getFrom();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterDataFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterDataFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -15,7 +15,7 @@ public class BedloadDiameterDataFacet extends DataFacet { - private static final Logger logger = Logger.getLogger(BedloadDiameterDataFacet.class); + private static final Logger log = Logger.getLogger(BedloadDiameterDataFacet.class); public BedloadDiameterDataFacet() { }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,7 +28,7 @@ private static final long serialVersionUID = 1L; - private static Logger logger = Logger.getLogger(BedloadDiameterFacet.class); + private static Logger log = Logger.getLogger(BedloadDiameterFacet.class); public BedloadDiameterFacet() { // required for clone operation deepCopy() @@ -42,7 +42,7 @@ } public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for bedload diameter at index: " + index); + log.debug("Get data for bedload diameter at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/FlowVelocityMeasurementFactory.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/FlowVelocityMeasurementFactory.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,7 +23,7 @@ public class FlowVelocityMeasurementFactory { - /** Private logger to use here. */ + /** Private log to use here. */ private static Logger log = Logger.getLogger(FlowVelocityMeasurementFactory.class); /** Query to get description and start year, given name and a km range. */
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MiddleBedHeightCalculation.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MiddleBedHeightCalculation.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,22 +23,22 @@ public class MiddleBedHeightCalculation extends Calculation { - private static final Logger logger = + private static final Logger log = Logger.getLogger(MiddleBedHeightCalculation.class); public CalculationResult calculate(BedHeightAccess access) { - logger.info("MiddleBedHeightCalculation.calculate"); + log.info("MiddleBedHeightCalculation.calculate"); int[] singleIds = access.getBedHeightSingleIDs(); - if (logger.isDebugEnabled()) { + if (log.isDebugEnabled()) { Artifact artifact = access.getArtifact(); - logger.debug("Artifact '" + artifact.identifier() + "' contains:"); + log.debug("Artifact '" + artifact.identifier() + "' contains:"); if (singleIds != null) { - logger.debug(" " + singleIds.length + " single bedheight ids"); + log.debug(" " + singleIds.length + " single bedheight ids"); } } @@ -61,7 +61,7 @@ singles.add(s); } else { - logger.warn("Cannot find Single by id: " + id); + log.warn("Cannot find Single by id: " + id); // TODO ADD WARNING } } @@ -74,7 +74,7 @@ BedHeightAccess access, List<BedHeightSingle> singles ) { - logger.info("MiddleBedHeightCalculation.buildCalculationResult"); + log.info("MiddleBedHeightCalculation.buildCalculationResult"); double kmLo = access.getLowerKM(); double kmHi = access.getUpperKM(); @@ -89,7 +89,7 @@ } } - logger.debug("Calculation results in " + data.size() + " data objects."); + log.debug("Calculation results in " + data.size() + " data objects."); return new CalculationResult((MiddleBedHeightData[]) data.toArray(new MiddleBedHeightData[data.size()]), this); @@ -101,7 +101,7 @@ double kmLo, double kmHi ) { - logger.debug("Prepare data for single: " + single.getDescription()); + log.debug("Prepare data for single: " + single.getDescription()); List<BedHeightSingleValue> values = BedHeightSingleValue.getBedHeightSingleValues(single, kmLo, kmHi); @@ -157,7 +157,7 @@ } } - logger.debug("Single contains " + values.size() + " values"); + log.debug("Single contains " + values.size() + " values"); return data; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MiddleBedHeightData.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MiddleBedHeightData.java Fri Sep 05 12:58:17 2014 +0200 @@ -24,8 +24,8 @@ public class MiddleBedHeightData implements Serializable, Comparable<MiddleBedHeightData> { - /** Very private logger. */ - private static final Logger logger = Logger.getLogger(MiddleBedHeightData.class); + /** Very private log. */ + private static final Logger log = Logger.getLogger(MiddleBedHeightData.class); public static final String I18N_SINGLE_NAME = "facet.bedheight_middle.single"; public static final String I18N_EPOCH_NAME = "facet.bedheight_middle.epoch";
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MiddleBedHeightFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MiddleBedHeightFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -27,7 +27,7 @@ */ public class MiddleBedHeightFacet extends DataFacet { - private static Logger logger = Logger.getLogger(MiddleBedHeightFacet.class); + private static Logger log = Logger.getLogger(MiddleBedHeightFacet.class); public MiddleBedHeightFacet() { @@ -50,7 +50,7 @@ public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for middle bed height at index: " + index); + log.debug("Get data for middle bed height at index: " + index); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MorphologicWidthFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MorphologicWidthFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,7 +23,7 @@ extends DataFacet implements FacetTypes { - private static Logger logger = Logger.getLogger(MorphologicWidthFacet.class); + private static Logger log = Logger.getLogger(MorphologicWidthFacet.class); public MorphologicWidthFacet() {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MorphologicWidthFactory.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MorphologicWidthFactory.java Fri Sep 05 12:58:17 2014 +0200 @@ -25,7 +25,7 @@ public class MorphologicWidthFactory { - /** Private logger to use here. */ + /** Private log to use here. */ private static Logger log = Logger.getLogger(MorphologicWidthFactory.class); public static final String SQL_SELECT =
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/PorosityFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/PorosityFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,7 +28,7 @@ extends DataFacet implements FacetTypes, StaticFacet { - private static Logger logger = Logger.getLogger(PorosityFacet.class); + private static Logger log = Logger.getLogger(PorosityFacet.class); private static final String NAME = "porosity"; @@ -70,10 +70,10 @@ @Override public void setup(Artifact artifact, Document data, CallMeta callMeta) { - logger.debug("setup"); + log.debug("setup"); - if (logger.isDebugEnabled()) { - logger.debug(XMLUtils.toString(data)); + if (log.isDebugEnabled()) { + log.debug(XMLUtils.toString(data)); } String code = D4EArtifact.getDatacageIDValue(data);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/PorosityFactory.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/PorosityFactory.java Fri Sep 05 12:58:17 2014 +0200 @@ -25,7 +25,7 @@ public class PorosityFactory { - /** Private logger to use here. */ + /** Private log to use here. */ private static Logger log = Logger.getLogger(PorosityFactory.class); public static final String SQL_SELECT =
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/QualityMeasurement.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/QualityMeasurement.java Fri Sep 05 12:58:17 2014 +0200 @@ -15,7 +15,7 @@ /** A measurement of the bed quality, serving different diameter at given km. */ public class QualityMeasurement { - private static Logger logger = Logger.getLogger(QualityMeasurement.class); + private static Logger log = Logger.getLogger(QualityMeasurement.class); private double km; private Date date; @@ -71,7 +71,7 @@ public double getDiameter(String key) { Double diameter = charDiameter.get(key); if (diameter == null) { - logger.warn("No Diameter at km " + km + " for " + key); + log.warn("No Diameter at km " + km + " for " + key); } return (diameter != null) ? diameter : Double.NaN; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/QualityMeasurementFactory.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/QualityMeasurementFactory.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,7 +23,7 @@ public class QualityMeasurementFactory { - private static Logger logger = Logger.getLogger(QualityMeasurementFactory.class); + private static Logger log = Logger.getLogger(QualityMeasurementFactory.class); private static final String SQL_BED_MEASUREMENT = "SELECT st.km as km," +
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/QualityMeasurements.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/QualityMeasurements.java Fri Sep 05 12:58:17 2014 +0200 @@ -14,7 +14,7 @@ import org.apache.log4j.Logger; public class QualityMeasurements { - private static Logger logger = Logger.getLogger(QualityMeasurements.class); + private static Logger log = Logger.getLogger(QualityMeasurements.class); private List<QualityMeasurement> measurements; public QualityMeasurements() {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentDensity.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentDensity.java Fri Sep 05 12:58:17 2014 +0200 @@ -25,7 +25,7 @@ /** Sediment Densities for multiple years. */ public class SedimentDensity implements Serializable { - private static final Logger logger = Logger + private static final Logger log = Logger .getLogger(SedimentDensity.class); public static final double DEFAULT_SEDIMNET_DENSITY_FACTOR = 1.9; @@ -52,11 +52,11 @@ factor = Double.parseDouble(factorString.trim()); } catch (NumberFormatException nfe) { - logger.error(nfe); + log.error(nfe); } } - logger.info("Sedmiment density factor: " + factor); + log.info("Sedmiment density factor: " + factor); return factor; } @@ -82,8 +82,8 @@ public void addDensity(double km, double density, int year) { - if (logger.isDebugEnabled()) { - logger.debug("adding " + year); + if (log.isDebugEnabled()) { + log.debug("adding " + year); } Integer key = Integer.valueOf(year); @@ -214,7 +214,7 @@ double km ) { if (prev == null && next == null) { - logger.warn("prev and next are null -> NaN"); + log.warn("prev and next are null -> NaN"); return Double.NaN; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentDensityFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentDensityFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -26,8 +26,8 @@ public class SedimentDensityFacet extends DataFacet { - /** Very own logger. */ - private static Logger logger = Logger.getLogger(SedimentDensityFacet.class); + /** Very own log. */ + private static Logger log = Logger.getLogger(SedimentDensityFacet.class); /** Used as tolerance value when fetching measurement stations. */ private static double EPSILON = 1e-5; @@ -45,7 +45,7 @@ @Override public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for sediment density at index: " + index); + log.debug("Get data for sediment density at index: " + index); D4EArtifact flys = (D4EArtifact) artifact; @@ -53,7 +53,7 @@ stateId, type, false); if (res == null) { - logger.error("No SedimentDensity"); + log.error("No SedimentDensity"); } return res;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentDensityFactory.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentDensityFactory.java Fri Sep 05 12:58:17 2014 +0200 @@ -24,7 +24,7 @@ public class SedimentDensityFactory { - /** Private logger to use here. */ + /** Private log to use here. */ private static Logger log = Logger.getLogger(SedimentDensityFactory.class); private static final String DENSITY_CACHE_NAME = "sedimentdensity";
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,7 +23,7 @@ public class SedimentLoadData implements Serializable { - private static Logger logger = Logger.getLogger(SedimentLoadData.class); + private static Logger log = Logger.getLogger(SedimentLoadData.class); public static final int GF_UNKNOWN = -1; public static final int GF_COARSE = 0; @@ -138,7 +138,7 @@ this.sqStartTime = sqStartTime; this.sqStopTime = sqStopTime; this.sqRelId = sqRelId; - logger.debug("Creating Load with sqrelid: " + sqRelId + " start: "+ sqStartTime); + log.debug("Creating Load with sqrelid: " + sqRelId + " start: "+ sqStartTime); } public int getId() {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -42,8 +42,8 @@ public class SedimentLoadDataFacet extends DataFacet { - /** Very own logger. */ - private static Logger logger = Logger.getLogger(SedimentLoadDataFacet.class); + /** Very own log. */ + private static Logger log = Logger.getLogger(SedimentLoadDataFacet.class); private static final String BASE_NAME = "sedimentload"; @@ -99,7 +99,7 @@ Object payload = res.getData(); if (!(payload instanceof SedimentLoadDataResult)) { - logger.error("Invalid result!"); + log.error("Invalid result!"); } SedimentLoadDataResult sdResult = (SedimentLoadDataResult) payload; @@ -107,7 +107,7 @@ List<Fraction> fractions = sdResult.getFractions(); if (fractions.size() < index + 1) { - logger.error("No result for fraction '" + fraction + + log.error("No result for fraction '" + fraction + "' and period '" + period + "'"); return null; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -35,7 +35,7 @@ extends DataFacet implements StaticFacet { - private static Logger logger = Logger.getLogger(SedimentLoadFacet.class); + private static Logger log = Logger.getLogger(SedimentLoadFacet.class); private static final String NAME = "sedimentload"; @@ -51,7 +51,7 @@ @Override public Object getData(Artifact artifact, CallContext context) { - logger.debug("get Data"); + log.debug("get Data"); D4EArtifact arti = (D4EArtifact) artifact; RiverAccess access = new RiverAccess(arti); @@ -80,7 +80,7 @@ @Override public void setup(Artifact artifact, Document data, CallMeta callMeta) { - logger.debug("setup"); + log.debug("setup"); String code = D4EArtifact.getDatacageIDValue(data); String[] split = code.split(";"); String idStr = split[0]; @@ -90,7 +90,7 @@ // Name has the pattern sedimentload.<grainfraction_name> name = NAME + "." + fraction; - logger.debug("Created facet: " + name); + log.debug("Created facet: " + name); description = Resources.getMsg( callMeta,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadLSData.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadLSData.java Fri Sep 05 12:58:17 2014 +0200 @@ -24,8 +24,8 @@ public class SedimentLoadLSData extends NamedObjectImpl { - /** Private logger. */ - private static final Logger logger = Logger + /** Private log. */ + private static final Logger log = Logger .getLogger(SedimentLoadLSData.class); protected String description; @@ -106,7 +106,7 @@ public void setCoarse(double km, double coarse, Range range) { if (range == null) { - logger.error("coarse/range is null!"); + log.error("coarse/range is null!"); return; } SedimentLoadFraction f = getFraction(km); @@ -116,7 +116,7 @@ public void setFineMiddle(double km, double fine_middle, Range range) { if (range == null) { - logger.error("finemiddle/range is null!"); + log.error("finemiddle/range is null!"); return; } SedimentLoadFraction f = getFraction(km); @@ -127,7 +127,7 @@ public void setSand(double km, double sand, Range range) { if (range == null) { - logger.error("sand/range is null!"); + log.error("sand/range is null!"); return; } SedimentLoadFraction f = getFraction(km); @@ -137,7 +137,7 @@ public void setSuspSand(double km, double susp_sand, Range range) { if (range == null) { - logger.error("suspsand/range is null!"); + log.error("suspsand/range is null!"); return; } SedimentLoadFraction f = getFraction(km); @@ -147,7 +147,7 @@ public void setSuspSandBed(double km, double susp_sand_bed, Range range) { if (range == null) { - logger.error("suspsandbed/range is null!"); + log.error("suspsandbed/range is null!"); return; } SedimentLoadFraction f = getFraction(km); @@ -157,7 +157,7 @@ public void setSuspSediment(double km, double susp_sediment, Range range) { if (range == null) { - logger.error("suspsed/range is null!"); + log.error("suspsed/range is null!"); return; } SedimentLoadFraction f = getFraction(km); @@ -171,7 +171,7 @@ public void setLoadTotal(double km, double total, Range range) { if (range == null) { - logger.error("loadtotal/range is null!"); + log.error("loadtotal/range is null!"); return; } SedimentLoadFraction f = getFraction(km); @@ -181,7 +181,7 @@ public void setTotal(double km, double total, Range range) { if (range == null) { - logger.error("total/range is null!"); + log.error("total/range is null!"); return; } SedimentLoadFraction f = getFraction(km); @@ -191,7 +191,7 @@ public void setUnknown(double km, double unknown, Range range) { if (range == null) { - logger.error("unknown/range is null!"); + log.error("unknown/range is null!"); return; } SedimentLoadFraction f = getFraction(km);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadLSFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadLSFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -43,7 +43,7 @@ extends DataFacet implements StaticFacet { - private static Logger logger = Logger.getLogger(SedimentLoadLSFacet.class); + private static Logger log = Logger.getLogger(SedimentLoadLSFacet.class); /* Aheinecke we probably need to get the kind and split this up here * in some way */ @@ -61,7 +61,7 @@ @Override public Object getData(Artifact artifact, CallContext context) { - logger.debug("get Data"); + log.debug("get Data"); D4EArtifact arti = (D4EArtifact) artifact; String idStr = arti.getDataAsString("load_id"); @@ -70,7 +70,7 @@ SedimentLoadLS theLoad = SedimentLoadLS.getSedimentLoadById(id); if (theLoad == null) { - logger.error("No load found for id: " + idStr); + log.error("No load found for id: " + idStr); return null; } @@ -92,7 +92,7 @@ @Override public void setup(Artifact artifact, Document data, CallMeta callMeta) { - logger.debug("setup"); + log.debug("setup"); String code = D4EArtifact.getDatacageIDValue(data); String[] split = code.split(";"); String idStr = split[0]; @@ -101,15 +101,15 @@ int id = Integer.valueOf(idStr); SedimentLoadLS theLoad = SedimentLoadLS.getSedimentLoadById(id); if (theLoad == null) { - logger.error("No load found for id: " + idStr); + log.error("No load found for id: " + idStr); return; } - logger.debug("Setting up SedimentLoadLSFacet for id: " + id); + log.debug("Setting up SedimentLoadLSFacet for id: " + id); if (theLoad.getGrainFraction() != null) { - logger.debug("GrainFraction: " + theLoad.getGrainFraction().getName()); + log.debug("GrainFraction: " + theLoad.getGrainFraction().getName()); } - logger.debug("Kind: " + theLoad.getKind()); - logger.debug("Unit: " + theLoad.getUnit().getName()); + log.debug("Kind: " + theLoad.getKind()); + log.debug("Unit: " + theLoad.getUnit().getName()); /* Name has the pattern sedimentload.<unit>.<grainfraction_name> * this is partly done for backwards compatibility and theming. @@ -135,7 +135,7 @@ } name += "." + gfName; - logger.debug("Created facet: " + name); + log.debug("Created facet: " + name); description = Resources.getMsg( callMeta,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadResult.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadResult.java Fri Sep 05 12:58:17 2014 +0200 @@ -20,7 +20,7 @@ public class SedimentLoadResult implements Serializable { - private static final Logger logger = Logger + private static final Logger log = Logger .getLogger(SedimentLoadResult.class); protected int startYear; protected int endYear;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQOverviewFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQOverviewFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -24,7 +24,7 @@ extends DataFacet implements FacetTypes { - private static final Logger logger = Logger.getLogger(SQOverviewFacet.class); + private static final Logger log = Logger.getLogger(SQOverviewFacet.class); protected int fractionIdx; @@ -46,7 +46,7 @@ @Override public Object getData(Artifact artifact, CallContext context) { - logger.debug("SQOverviewFacet.getData"); + log.debug("SQOverviewFacet.getData"); switch(fractionIdx) { case 0: return "sq_relation_a";
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQRelationJRDataSource.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQRelationJRDataSource.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,8 +23,8 @@ */ public class SQRelationJRDataSource implements JRDataSource { - /** The logger used in this exporter.*/ - private static Logger logger = Logger.getLogger(SQRelationJRDataSource.class); + /** The log used in this exporter.*/ + private static Logger log = Logger.getLogger(SQRelationJRDataSource.class); private ArrayList<String[]> data; private HashMap<String, String> metaData;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/resources/Resources.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/resources/Resources.java Fri Sep 05 12:58:17 2014 +0200 @@ -24,8 +24,8 @@ */ public class Resources { - /** The logger that is used in this class.*/ - private static Logger logger = Logger.getLogger(Resources.class); + /** The log that is used in this class.*/ + private static Logger log = Logger.getLogger(Resources.class); /** The singleton instance.*/ private static Resources INSTANCE; @@ -178,7 +178,7 @@ return bundle.getString(key); } catch (MissingResourceException mre) { - logger.warn("No message found for key: " + key); + log.warn("No message found for key: " + key); return def; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/CrossSectionKMService.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/CrossSectionKMService.java Fri Sep 05 12:58:17 2014 +0200 @@ -59,7 +59,7 @@ public class CrossSectionKMService extends D4EService { - private static Logger logger = + private static Logger log = Logger.getLogger(CrossSectionKMService.class); public static final String CACHE_NAME = "cross-section-kms"; @@ -79,7 +79,7 @@ GlobalContext globalContext, CallMeta callMeta ) { - logger.debug("CrossSectionKMService.doProcess"); + log.debug("CrossSectionKMService.doProcess"); NodeList crossSectionNodes = data.getElementsByTagName("art:cross-section"); @@ -96,7 +96,7 @@ String neighborsString = crossSectionElement.getAttribute("n"); if (idString.length() == 0 || kmString.length() == 0) { - logger.debug("missing attributes in cross-section element"); + log.debug("missing attributes in cross-section element"); continue; } @@ -113,14 +113,14 @@ } } catch (NumberFormatException nfe) { - logger.debug("converting number failed", nfe); + log.debug("converting number failed", nfe); continue; } NavigableMap<Double, Integer> map = getKms(crossSectionId); if (map == null) { - logger.debug("cannot find cross section " + crossSectionId); + log.debug("cannot find cross section " + crossSectionId); continue; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/D4EService.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/D4EService.java Fri Sep 05 12:58:17 2014 +0200 @@ -24,7 +24,7 @@ public abstract class D4EService extends XMLService { - private static final Logger logger = Logger.getLogger(D4EService.class); + private static final Logger log = Logger.getLogger(D4EService.class); @Override @@ -52,14 +52,14 @@ protected void init() { - logger.debug("init"); + log.debug("init"); SessionHolder.acquire(); } /** Called when processing done, close session. */ protected void shutdown() { - logger.debug("shutdown"); + log.debug("shutdown"); Session session = SessionHolder.HOLDER.get(); session.close();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/DischargeInfoService.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/DischargeInfoService.java Fri Sep 05 12:58:17 2014 +0200 @@ -35,8 +35,8 @@ */ public class DischargeInfoService extends D4EService { - /** The logger used in this service. */ - private static Logger logger = Logger.getLogger(DischargeInfoService.class); + /** The log used in this service. */ + private static Logger log = Logger.getLogger(DischargeInfoService.class); public static final String GAUGE_XPATH = "/art:gauge/text()"; @@ -52,9 +52,9 @@ GlobalContext globalContext, CallMeta callMeta ) { - if (logger.isDebugEnabled()) { - logger.debug("DischargeInfoService.process"); - logger.debug(XMLUtils.toString(data)); + if (log.isDebugEnabled()) { + log.debug("DischargeInfoService.process"); + log.debug(XMLUtils.toString(data)); } String gaugeNumber = XMLUtils.xpathString( @@ -65,18 +65,18 @@ if (gaugeNumber == null || (gaugeNumber = gaugeNumber.trim()).length() == 0) { - logger.warn("No gauge specified. Cannot return discharge info."); + log.warn("No gauge specified. Cannot return discharge info."); return XMLUtils.newDocument(); } - logger.debug("Getting discharge for gauge: " + gaugeNumber + " at river: " + river); + log.debug("Getting discharge for gauge: " + gaugeNumber + " at river: " + river); long gn; try { gn = Long.parseLong(gaugeNumber); } catch (NumberFormatException nfe) { - logger.warn("Invalid gauge number. Cannot return discharge info."); + log.warn("Invalid gauge number. Cannot return discharge info."); return XMLUtils.newDocument(); } @@ -88,11 +88,11 @@ } if (gauge == null) { - logger.warn("No such gauge found."); + log.warn("No such gauge found."); return XMLUtils.newDocument(); } - logger.debug("Found gauge: " + gauge.getName() + " id: " + gauge.getId()); + log.debug("Found gauge: " + gauge.getName() + " id: " + gauge.getId()); return buildDocument(gauge); } @@ -104,7 +104,7 @@ List<DischargeTable> tables = gauge.getDischargeTables(); Collections.sort(tables); - logger.debug("# of tables:" + tables.size()); + log.debug("# of tables:" + tables.size()); Element all = result.createElement("discharges"); for (DischargeTable dt: tables) { @@ -118,7 +118,7 @@ TimeInterval ti = dt.getTimeInterval(); if (ti == null) { - logger.warn("DischargeTable has no TimeInterval set!"); + log.warn("DischargeTable has no TimeInterval set!"); continue; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/DistanceInfoService.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/DistanceInfoService.java Fri Sep 05 12:58:17 2014 +0200 @@ -33,8 +33,8 @@ */ public class DistanceInfoService extends D4EService { - /** The logger used in this service. */ - private static Logger logger = Logger.getLogger(DistanceInfoService.class); + /** The log used in this service. */ + private static Logger log = Logger.getLogger(DistanceInfoService.class); public static final String RIVER_XPATH = "/art:river/text()"; @@ -54,7 +54,7 @@ GlobalContext globalContext, CallMeta callMeta ) { - logger.debug("DistanceInfoService.process"); + log.debug("DistanceInfoService.process"); String river = XMLUtils.xpathString( data, RIVER_XPATH, ArtifactNamespaceContext.INSTANCE); @@ -63,11 +63,11 @@ data, FILTER_XPATH, ArtifactNamespaceContext.INSTANCE); if (river == null || (river = river.trim()).length() == 0) { - logger.warn("No river specified. Cannot return distance info!"); + log.warn("No river specified. Cannot return distance info!"); return XMLUtils.newDocument(); } - logger.debug("Search distances for river: " + river); + log.debug("Search distances for river: " + river); FastAnnotations fas = LocationProvider.getAnnotations(river);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/FileUploadService.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/FileUploadService.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,8 +31,8 @@ */ public class FileUploadService extends D4EService { - /** The logger used in this service.*/ - private static Logger logger = Logger.getLogger(FileUploadService.class); + /** The log used in this service.*/ + private static Logger log = Logger.getLogger(FileUploadService.class); /** XPath that points to the artifact uuid.*/ public static final String XPATH_ARTIFACT_UUID = @@ -50,7 +50,7 @@ GlobalContext context, CallMeta callMeta ) { - logger.debug("FileUploadService.process"); + log.debug("FileUploadService.process"); Document doc = XMLUtils.newDocument(); ElementCreator ec = new ElementCreator(doc, null, null); @@ -82,12 +82,12 @@ } } catch (IOException ioe) { - logger.warn(ioe, ioe); + log.warn(ioe, ioe); status.setTextContent("Upload fehlgeschlagen!"); } } else { - logger.debug("No data in uploaded xml."); + log.debug("No data in uploaded xml."); status.setTextContent("Upload fehlgeschlagen!"); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/GaugeInfoService.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/GaugeInfoService.java Fri Sep 05 12:58:17 2014 +0200 @@ -49,8 +49,8 @@ @Override public boolean apply(Gauge gauge) { - if (logger.isDebugEnabled()) { - logger.debug("Test gauge '" + gauge.getName() + "'"); + if (log.isDebugEnabled()) { + log.debug("Test gauge '" + gauge.getName() + "'"); } return gauge != null && gauge.getOfficialNumber() == refNr; @@ -58,8 +58,8 @@ } // end of ReferenceNumberFilter class - /** The logger that is used by this service.*/ - private static Logger logger = Logger.getLogger(GaugeInfoService.class); + /** The log that is used by this service.*/ + private static Logger log = Logger.getLogger(GaugeInfoService.class); public static final String XPATH_RIVERNAME = "/art:river/@name"; @@ -78,10 +78,10 @@ GlobalContext context, CallMeta callMeta ) { - logger.debug("GaugeInfoService.process"); + log.debug("GaugeInfoService.process"); - if (logger.isDebugEnabled()) { - logger.debug(XMLUtils.toString(data)); + if (log.isDebugEnabled()) { + log.debug(XMLUtils.toString(data)); } River river = getRiverFromRequest(data); @@ -109,7 +109,7 @@ XPATH_RIVERNAME, ArtifactNamespaceContext.INSTANCE); - logger.debug("Return Gauge info for River '" + rivername + "'"); + log.debug("Return Gauge info for River '" + rivername + "'"); return rivername != null ? RiverFactory.getRiver(rivername) : null; } @@ -129,7 +129,7 @@ new ReferenceNumberFilter(Long.parseLong(refNr))); } catch (NumberFormatException nfe) { - logger.warn(nfe, nfe); + log.warn(nfe, nfe); } } @@ -147,7 +147,7 @@ Element service = cr.create("service"); - logger.debug("Append " + gauges.size() + " gauges to info doc."); + log.debug("Append " + gauges.size() + " gauges to info doc."); for (Gauge g: gauges) { Range r = g.getRange();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/GaugeOverviewInfoService.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/GaugeOverviewInfoService.java Fri Sep 05 12:58:17 2014 +0200 @@ -29,7 +29,7 @@ */ public class GaugeOverviewInfoService extends RiverInfoService { - private static final Logger logger = Logger.getLogger( + private static final Logger log = Logger.getLogger( GaugeOverviewInfoService.class); @Override @@ -40,14 +40,14 @@ ) { Document result = super.doProcess(data, globalContext, callMeta); - logger.debug("GaugeOverviewInfoService.process"); + log.debug("GaugeOverviewInfoService.process"); Element egs = ec.create("gauges"); List<Gauge> gauges = river.getGauges(); - if (logger.isDebugEnabled()) { - logger.debug("Loaded gauges: " + gauges); + if (log.isDebugEnabled()) { + log.debug("Loaded gauges: " + gauges); } for (Gauge gauge: river.getGauges()) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/MainValuesService.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/MainValuesService.java Fri Sep 05 12:58:17 2014 +0200 @@ -41,8 +41,8 @@ */ public class MainValuesService extends D4EService { - /** The logger that is used by this service.*/ - private static Logger logger = Logger.getLogger(MainValuesService.class); + /** The log that is used by this service.*/ + private static Logger log = Logger.getLogger(MainValuesService.class); /** The XPath that points to the river definition of the incoming request.*/ public static final String XPATH_RIVER = "/art:mainvalues/art:river/text()"; @@ -63,7 +63,7 @@ } private static final Document error(String msg) { - logger.debug(msg); + log.debug(msg); return XMLUtils.newDocument(); } @@ -74,7 +74,7 @@ GlobalContext context, CallMeta callMeta ) { - logger.debug("MainValuesService.process"); + log.debug("MainValuesService.process"); this.callMeta = callMeta; @@ -108,7 +108,7 @@ protected River getRequestedRiver(Document data) throws NullPointerException { - logger.debug("MainValuesService.getRequestedRiver"); + log.debug("MainValuesService.getRequestedRiver"); String riverStr = XMLUtils.xpathString( data, XPATH_RIVER, ArtifactNamespaceContext.INSTANCE); @@ -131,7 +131,7 @@ * @return the start and end point. */ protected double[] getRequestedStartEnd(Document data, River river) { - logger.debug("MainValuesService.getStartEnd"); + log.debug("MainValuesService.getStartEnd"); String startStr = XMLUtils.xpathString( data, XPATH_START, ArtifactNamespaceContext.INSTANCE); @@ -147,15 +147,15 @@ double start = Double.parseDouble(startStr); double end = Double.parseDouble(endStr); - if (logger.isDebugEnabled()) { - logger.debug("Found start: " + start); - logger.debug("Found end: " + end); + if (log.isDebugEnabled()) { + log.debug("Found start: " + start); + log.debug("Found end: " + end); } return new double[] { start, end }; } catch (NumberFormatException nfe) { - logger.warn(nfe, nfe); + log.warn(nfe, nfe); return river.determineMinMaxDistance(); } } @@ -173,16 +173,16 @@ */ protected List<MainValue> getMainValues(River river, Gauge gauge) { - if (logger.isDebugEnabled()) { - logger.debug("MainValuesService.buildMainValues"); - logger.debug("River: " + river.getName()); - logger.debug("Gauge: " + gauge.getName()); + if (log.isDebugEnabled()) { + log.debug("MainValuesService.buildMainValues"); + log.debug("River: " + river.getName()); + log.debug("Gauge: " + gauge.getName()); } List<MainValue> mainValues = gauge.getMainValues(); - if (logger.isDebugEnabled()) { - logger.debug(mainValues.size() + " main values found."); + if (log.isDebugEnabled()) { + log.debug(mainValues.size() + " main values found."); } return mainValues; @@ -195,7 +195,7 @@ List<MainValue> mainValues, Object context) { - logger.debug("MainValuesService.buildDocument"); + log.debug("MainValuesService.buildDocument"); Document doc = XMLUtils.newDocument(); @@ -233,7 +233,7 @@ Gauge gauge, Object context) { - logger.debug("MainValuesService.appendMetaInformation"); + log.debug("MainValuesService.appendMetaInformation"); ElementCreator cr = new ElementCreator( doc, @@ -274,7 +274,7 @@ Integer riverId, Object context) { - logger.debug("MainValuesService.appendMainValues"); + log.debug("MainValuesService.appendMainValues"); ElementCreator cr = new ElementCreator( doc,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/MapInfoService.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/MapInfoService.java Fri Sep 05 12:58:17 2014 +0200 @@ -52,8 +52,8 @@ "/artifact-database/*[local-name()=$maptype]/river[@name=$river]/river-wms"; - /** The logger used in this service.*/ - private static Logger logger = Logger.getLogger(MapInfoService.class); + /** The log used in this service.*/ + private static Logger log = Logger.getLogger(MapInfoService.class); /** @@ -86,7 +86,7 @@ GlobalContext globalContext, CallMeta callMeta ) { - logger.debug("MapInfoService.process"); + log.debug("MapInfoService.process"); Document result = XMLUtils.newDocument(); ElementCreator cr = new ElementCreator(result, null, null); @@ -96,7 +96,7 @@ String river = extractRiver(data); if (river == null || river.length() == 0) { - logger.warn("Cannot generate information: river is empty!"); + log.warn("Cannot generate information: river is empty!"); return result; } @@ -113,8 +113,8 @@ Envelope env = GeometryUtils.getRiverBoundary(river); if (env != null) { String bounds = GeometryUtils.jtsBoundsToOLBounds(env); - if (logger.isDebugEnabled()) { - logger.debug("River '" + river + "' bounds: " + bounds); + if (log.isDebugEnabled()) { + log.debug("River '" + river + "' bounds: " + bounds); } Element bbox = cr.create("bbox"); @@ -134,8 +134,8 @@ root.appendChild(srid); } - if (logger.isDebugEnabled()) { - logger.debug("processXML: " + XMLUtils.toString(root)); + if (log.isDebugEnabled()) { + log.debug("processXML: " + XMLUtils.toString(root)); } root.appendChild( @@ -156,7 +156,7 @@ Map<String, String> vars, ElementCreator cr) { - logger.debug("createWMSElement()"); + log.debug("createWMSElement()"); Element el = cr.create(elementName); Element wms = (Element)getNodeXPath(xpath, vars); @@ -165,10 +165,10 @@ cr.addAttr(el, "url", wms.getAttribute("url")); cr.addAttr(el, "layers", wms.getAttribute("layers")); - logger.debug("createWMSElement: " + XMLUtils.toString(el)); + log.debug("createWMSElement: " + XMLUtils.toString(el)); } else { - logger.debug("createWMSElement: wms == null"); + log.debug("createWMSElement: wms == null"); } return el;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/MeasurementStationInfoService.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/MeasurementStationInfoService.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,7 +31,7 @@ */ public class MeasurementStationInfoService extends RiverInfoService { - private static final Logger logger = Logger.getLogger( + private static final Logger log = Logger.getLogger( MeasurementStationInfoService.class); public static final DateFormat DATE_FORMAT = DateFormat.getDateInstance( @@ -49,8 +49,8 @@ List<MeasurementStation> mstations = river.getMeasurementStations(); - if (logger.isDebugEnabled()) { - logger.debug("Loaded stations: " + mstations); + if (log.isDebugEnabled()) { + log.debug("Loaded stations: " + mstations); } for (MeasurementStation mstation: mstations) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/ModuleService.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/ModuleService.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,14 +28,14 @@ private static final String MODULE = "module"; - private static Logger logger = Logger.getLogger(ModuleService.class); + private static Logger log = Logger.getLogger(ModuleService.class); protected Document doProcess( Document data, GlobalContext globalContext, CallMeta callMeta ) { - logger.debug("ModuleService.process"); + log.debug("ModuleService.process"); Document result = XMLUtils.newDocument();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/RiverInfoService.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/RiverInfoService.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,7 +28,7 @@ */ public class RiverInfoService extends D4EService { - private static final Logger logger = Logger.getLogger( + private static final Logger log = Logger.getLogger( RiverInfoService.class); protected static final String RIVER_XPATH = "/art:river/text()"; @@ -51,7 +51,7 @@ Document result = XMLUtils.newDocument(); if (river == null) { - logger.warn("No river with name " + rivername + " found."); + log.warn("No river with name " + rivername + " found."); return null; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/RiverService.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/RiverService.java Fri Sep 05 12:58:17 2014 +0200 @@ -34,8 +34,8 @@ */ public class RiverService extends D4EService { - /** The logger used in this service.*/ - private static Logger logger = Logger.getLogger(RiverService.class); + /** The log used in this service.*/ + private static Logger log = Logger.getLogger(RiverService.class); protected Document doProcess( @@ -43,7 +43,7 @@ GlobalContext globalContext, CallMeta callMeta ) { - logger.debug("RiverService.process"); + log.debug("RiverService.process"); Document result = XMLUtils.newDocument();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/SedimentLoadInfoService.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/SedimentLoadInfoService.java Fri Sep 05 12:58:17 2014 +0200 @@ -27,8 +27,8 @@ public class SedimentLoadInfoService extends D4EService { - /** The logger used in this service. */ - private static Logger logger = Logger.getLogger(SedimentLoadInfoService.class); + /** The log used in this service. */ + private static Logger log = Logger.getLogger(SedimentLoadInfoService.class); public static final String RIVER_XPATH = "/art:river/text()"; public static final String TYPE_XPATH = "/art:river/art:type/text()"; @@ -66,7 +66,7 @@ toD = Double.parseDouble(to); } catch (NumberFormatException nfe) { - logger.warn("Invalid locations. Cannot return sediment loads."); + log.warn("Invalid locations. Cannot return sediment loads."); return XMLUtils.newDocument(); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/ServerInfoService.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/ServerInfoService.java Fri Sep 05 12:58:17 2014 +0200 @@ -20,15 +20,15 @@ */ public class ServerInfoService extends D4EService { - /** The logger used in this service.*/ - private static Logger logger = Logger.getLogger(ServerInfoService.class); + /** The log used in this service.*/ + private static Logger log = Logger.getLogger(ServerInfoService.class); private static final String XPATH_HELP_URL = "/artifact-database/help-url/text()"; @Override protected Document doProcess(Document data, GlobalContext globalContext, CallMeta callMeta) { - logger.debug("ServerInfoService.process"); + log.debug("ServerInfoService.process"); Document result = XMLUtils.newDocument();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/ThemeListingService.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/ThemeListingService.java Fri Sep 05 12:58:17 2014 +0200 @@ -34,8 +34,8 @@ */ public class ThemeListingService extends D4EService { - /** The logger used in this service.*/ - private static Logger logger = Logger.getLogger(ThemeListingService.class); + /** The log used in this service.*/ + private static Logger log = Logger.getLogger(ThemeListingService.class); private static final String XPATH_THEME_NAME = "/theme/@name"; @@ -44,11 +44,11 @@ GlobalContext context, CallMeta callMeta ) { - logger.debug("ThemeListingService.process"); + log.debug("ThemeListingService.process"); String name = XMLUtils.xpathString(data, XPATH_THEME_NAME, null); if (name == null) { - logger.warn("No theme name provided."); + log.warn("No theme name provided."); } Document result = XMLUtils.newDocument();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/AnnotationRiverState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/AnnotationRiverState.java Fri Sep 05 12:58:17 2014 +0200 @@ -35,8 +35,8 @@ /** Developer-centric description of facet. */ public static final String I18N_DESCRIPTION = "facet.longitudinal_section.annotations"; - /** The logger that is used in this state. */ - private static final Logger logger = Logger.getLogger(AnnotationRiverState.class); + /** The log that is used in this state. */ + private static final Logger log = Logger.getLogger(AnnotationRiverState.class); /** @@ -58,7 +58,7 @@ CallMeta meta, List<Facet> facets ) { - logger.debug("AnnotationRiverState.computeInit()"); + log.debug("AnnotationRiverState.computeInit()"); AnnotationArtifact annotationArtifact = (AnnotationArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/AreaCreationState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/AreaCreationState.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,8 +28,8 @@ extends DefaultState implements FacetTypes { - /** The logger that is used in this state. */ - private static Logger logger = Logger.getLogger(AreaCreationState.class); + /** The log that is used in this state. */ + private static Logger log = Logger.getLogger(AreaCreationState.class); /** @@ -49,7 +49,7 @@ List<Facet> facets, Object old ) { - logger.debug("AreaCreationState.compute"); + log.debug("AreaCreationState.compute"); if (facets != null) { AreaArtifact aArt = (AreaArtifact) areaArtifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/CalculationSelect.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/CalculationSelect.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,8 +28,8 @@ */ public class CalculationSelect extends DefaultState { - /** The logger that is used in this class. */ - private static Logger logger = Logger.getLogger(CalculationSelect.class); + /** The log that is used in this class. */ + private static Logger log = Logger.getLogger(CalculationSelect.class); /** Name of data item. */ public static final String FIELD_MODE = "calculation_mode"; @@ -127,7 +127,7 @@ public boolean validate(Artifact artifact) throws IllegalArgumentException { - logger.debug("CalculationSelect.validate"); + log.debug("CalculationSelect.validate"); D4EArtifact flys = (D4EArtifact) artifact; StateData data = getData(flys, FIELD_MODE);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/CalculationSelectMinfo.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/CalculationSelectMinfo.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,8 +28,8 @@ */ public class CalculationSelectMinfo extends DefaultState { - /** The logger that is used in this class. */ - private static Logger logger = Logger.getLogger(CalculationSelectMinfo.class); + /** The log that is used in this class. */ + private static Logger log = Logger.getLogger(CalculationSelectMinfo.class); public static final String FIELD_MODE = "calculation_mode"; @@ -93,7 +93,7 @@ public boolean validate(Artifact artifact) throws IllegalArgumentException { - logger.debug("CalculationSelect.validate"); + log.debug("CalculationSelect.validate"); D4EArtifact flys = (D4EArtifact) artifact; StateData data = getData(flys, FIELD_MODE);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputationRangeState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputationRangeState.java Fri Sep 05 12:58:17 2014 +0200 @@ -35,7 +35,7 @@ extends RangeState implements FacetTypes { - private static Logger logger = + private static Logger log = Logger.getLogger(ComputationRangeState.class); /** The default step width. */ @@ -95,7 +95,7 @@ maxVal = minmax[1]; } else { - logger.warn("Could not read min/max distance values!"); + log.warn("Could not read min/max distance values!"); } if (name.equals("ld_from")) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputedDischargeCurveState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputedDischargeCurveState.java Fri Sep 05 12:58:17 2014 +0200 @@ -42,8 +42,8 @@ extends DefaultState implements FacetTypes { - /** The logger that is used in this state. */ - private static Logger logger = + /** The log that is used in this state. */ + private static Logger log = Logger.getLogger(ComputedDischargeCurveState.class); @@ -63,7 +63,7 @@ List<Facet> facets, Object old ) { - logger.debug("ComputedDischargeCurveState.computeAdvance"); + log.debug("ComputedDischargeCurveState.computeAdvance"); if(artifact instanceof WINFOArtifact) { WINFOArtifact winfo = (WINFOArtifact)artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DGMSelect.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DGMSelect.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,7 +31,7 @@ */ public class DGMSelect extends DefaultState { - private static final Logger logger = Logger.getLogger(DGMSelect.class); + private static final Logger log = Logger.getLogger(DGMSelect.class); public static final String ERR_EMPTY = "error_no_dgm_selected"; public static final String ERR_INVALID_DGM = "error_invalid_dgm_selected"; @@ -69,7 +69,7 @@ public static String getLabel(CallContext cc, String value) { - logger.debug("Create label for value: " + value); + log.debug("Create label for value: " + value); try { DGM dgm = DGM.getDGM(Integer.parseInt(value)); @@ -78,7 +78,7 @@ return file.getName(); } catch (NumberFormatException nfe) { - logger.warn("Cannot parse int value: '" + value + "'"); + log.warn("Cannot parse int value: '" + value + "'"); } return ""; @@ -136,7 +136,7 @@ throw new IllegalArgumentException(ERR_EMPTY); } - logger.debug("Found selected dgm: '" + dgmId + "'"); + log.debug("Found selected dgm: '" + dgmId + "'"); return DGM.getDGM(dgmId); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DefaultState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DefaultState.java Fri Sep 05 12:58:17 2014 +0200 @@ -44,8 +44,8 @@ */ public abstract class DefaultState extends AbstractState { - /** The logger that is used in this class. */ - private static Logger logger = Logger.getLogger(DefaultState.class); + /** The log that is used in this class. */ + private static Logger log = Logger.getLogger(DefaultState.class); /** Determines, if the DESCRIBE document should contain default values or @@ -124,8 +124,8 @@ String type = data.getType(); - if (logger.isDebugEnabled()) { - logger.debug( + if (log.isDebugEnabled()) { + log.debug( "Append element " + type + "'" + name + "' (" + value + ")"); } @@ -421,8 +421,8 @@ String name, String val ) { - if (logger.isDebugEnabled()) { - logger.debug("Transform data ('" + name + "','" + val + "')"); + if (log.isDebugEnabled()) { + log.debug("Transform data ('" + name + "','" + val + "')"); } stateData.setValue(val);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DischargeState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DischargeState.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,7 +32,7 @@ public static final String TOTAL_CHANNEL = "total_channel"; - private static final Logger logger = Logger.getLogger(DischargeState.class); + private static final Logger log = Logger.getLogger(DischargeState.class); /** Let client display a matrix. */ @@ -171,7 +171,7 @@ List<DischargeZone> zones = DischargeZone.getDischargeZones(river); - logger.debug("Found " + zones.size() + " DischargeZones."); + log.debug("Found " + zones.size() + " DischargeZones."); return zones; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DistanceOnlySelect.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DistanceOnlySelect.java Fri Sep 05 12:58:17 2014 +0200 @@ -18,7 +18,7 @@ public class DistanceOnlySelect extends DistanceSelect { - private static Logger logger = Logger.getLogger(DistanceOnlySelect.class); + private static Logger log = Logger.getLogger(DistanceOnlySelect.class); @Override protected String getUIProvider() {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DistanceSelect.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DistanceSelect.java Fri Sep 05 12:58:17 2014 +0200 @@ -16,8 +16,8 @@ */ public class DistanceSelect extends ComputationRangeState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(DistanceSelect.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(DistanceSelect.class); public DistanceSelect() {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DurationCurveState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DurationCurveState.java Fri Sep 05 12:58:17 2014 +0200 @@ -45,8 +45,8 @@ extends DefaultState implements FacetTypes { - /** The logger that is used in this state. */ - private static Logger logger = Logger.getLogger(DurationCurveState.class); + /** The log that is used in this state. */ + private static Logger log = Logger.getLogger(DurationCurveState.class); public DurationCurveState() { }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/EnterMultipleLocationsState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/EnterMultipleLocationsState.java Fri Sep 05 12:58:17 2014 +0200 @@ -22,12 +22,12 @@ * Get me doubles (km). */ public class EnterMultipleLocationsState extends EnterLocationState { - /** The logger for this class. */ - private static Logger logger = Logger.getLogger(EnterMultipleLocationsState.class); + /** The log for this class. */ + private static Logger log = Logger.getLogger(EnterMultipleLocationsState.class); @Override protected String getUIProvider() { - logger.debug("multi location panel"); + log.debug("multi location panel"); return "multi_location_panel"; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.java Fri Sep 05 12:58:17 2014 +0200 @@ -71,8 +71,8 @@ extends DefaultState implements FacetTypes { - /** The logger that is used in this state. */ - private static Logger logger = Logger.getLogger(FloodMapState.class); + /** The log that is used in this state. */ + private static Logger log = Logger.getLogger(FloodMapState.class); public static final String KEEP_ARTIFACT_DIR = @@ -122,7 +122,7 @@ Object context, CallMeta callMeta ) { - logger.info("Initialize State with Artifact: " + orig.identifier()); + log.info("Initialize State with Artifact: " + orig.identifier()); copyShapeDir(orig, owner); modifyFacets(orig, owner, context, callMeta); @@ -132,7 +132,7 @@ amfg.generate(); } catch (IOException e) { - logger.error(e.getMessage(), e); + log.error(e.getMessage(), e); } } @@ -154,7 +154,7 @@ D4EArtifact flys = (D4EArtifact) owner; List<Facet> facets = flys.getFacets(); if (facets == null || facets.isEmpty()) { - logger.warn("No facets for '" + OUTPUT_NAME + "' given!"); + log.warn("No facets for '" + OUTPUT_NAME + "' given!"); return; } @@ -173,7 +173,7 @@ wms.addLayer(newLayer); - logger.debug( + log.debug( "Replaced layer: " + layer + " with " + newLayer); } } @@ -190,12 +190,12 @@ List<Facet> facets, Object old ) { - logger.debug("FloodMapState.computeAdvance"); + log.debug("FloodMapState.computeAdvance"); File artifactDir = getDirectory(artifact); if (artifactDir == null) { - logger.error("Could not create directory for WSPLGEN results!"); + log.error("Could not create directory for WSPLGEN results!"); return null; } @@ -227,7 +227,7 @@ "wsplgen.job.error", "wsplgen.job.error")); - logger.error("No WSPLGEN processing has been started!"); + log.error("No WSPLGEN processing has been started!"); return null; } @@ -280,21 +280,21 @@ File artifactDir = new File(shapePath, artifact.identifier()); if (artifactDir.exists()) { - logger.info("Delete directory: " + artifactDir.getAbsolutePath()); + log.info("Delete directory: " + artifactDir.getAbsolutePath()); if (!FileTools.deleteRecursive(artifactDir)) { - logger.warn("Could not delete directory: " + log.warn("Could not delete directory: " + artifactDir.getAbsolutePath()); } } else { - logger.debug("There is no directory to remove."); + log.debug("There is no directory to remove."); } } @Override public void endOfLife(Artifact artifact, Object callContext) { - logger.info("FloodMapState.endOfLife: " + artifact.identifier()); + log.info("FloodMapState.endOfLife: " + artifact.identifier()); D4EArtifact flys = (D4EArtifact) artifact; @@ -310,7 +310,7 @@ CallContext context, WSPLGENCalculation calculation ) { - logger.debug("FloodMapState.prepareWSPLGENJob"); + log.debug("FloodMapState.prepareWSPLGENJob"); String scenario = artifact.getDataAsString("scenario"); WSPLGENJob job = new WSPLGENJob( @@ -351,10 +351,10 @@ return job; } catch (IOException ioe) { - logger.warn("Cannot write PAR file: " + ioe.getMessage()); + log.warn("Cannot write PAR file: " + ioe.getMessage()); } catch (IllegalArgumentException iae) { - logger.warn("Cannot write PAR file: " + iae.getMessage()); + log.warn("Cannot write PAR file: " + iae.getMessage()); } return null; @@ -368,7 +368,7 @@ WSPLGENJob job) { File line = new File(dir, HWS_LINES_SHAPE); boolean lines = line.exists(); - logger.debug("shp file exists: " + lines); + log.debug("shp file exists: " + lines); if (lines) { job.addLin(dir + "/" + HWS_LINES_SHAPE); facetCreator.createShapeFacet(I18N_HWS_LINES_OFFICIAL, @@ -377,7 +377,7 @@ } File point = new File(dir, HWS_POINT_SHAPE); boolean points = point.exists(); - logger.debug("shp file exists: " + points); + log.debug("shp file exists: " + points); if (points) { facetCreator.createShapeFacet(I18N_HWS_POINTS_OFFICIAL, MapfileGenerator.MS_LAYER_PREFIX + HWS_POINTS, @@ -422,7 +422,7 @@ MapfileGenerator.MS_LAYER_PREFIX + HWS_LINES, FLOODMAP_HWS_LINES,2); } - else logger.warn("no lines written"); + else log.warn("no lines written"); } @@ -454,11 +454,11 @@ generator.generate(); } catch(FileNotFoundException fnfe) { - logger.warn("Could not find mapfile for hws layer"); + log.warn("Could not find mapfile for hws layer"); } catch (Exception ioe) { - logger.warn("Could not create mapfile for hws layer"); - logger.warn(Arrays.toString(ioe.getStackTrace())); + log.warn("Could not create mapfile for hws layer"); + log.warn(Arrays.toString(ioe.getStackTrace())); } } @@ -505,7 +505,7 @@ protected void setGel(D4EArtifact artifact, WSPLGENJob job) { String gel = artifact.getDataAsString("scenario"); - logger.debug("Selected gel = '" + gel + "'"); + log.debug("Selected gel = '" + gel + "'"); if (gel == null || gel.length() == 0) { job.setGel(WSPLGENJob.GEL_NOSPERRE); @@ -544,7 +544,7 @@ String geoJSON = access.getGeoJSON(); if (geoJSON == null || geoJSON.length() == 0) { - logger.debug("No barrier features in parameterization existing."); + log.debug("No barrier features in parameterization existing."); return; } @@ -557,7 +557,7 @@ List<SimpleFeature> features = GeometryUtils.parseGeoJSON(geoJSON, ft); if (features == null || features.isEmpty()) { - logger.debug("No barrier features extracted."); + log.debug("No barrier features extracted."); return; } @@ -578,7 +578,7 @@ fcs[0]); if (l) { - logger.debug( + log.debug( "Successfully created barrier line shapefile. " + "Write shapefile path into WSPLGEN job."); createMapfile( @@ -591,7 +591,7 @@ MapfileGenerator.MS_BARRIERS_PREFIX); if (scenario.equals(WSPLGENJob.GEL_NOSPERRE)) { - logger.debug("WSPLGEN will not use barrier features."); + log.debug("WSPLGEN will not use barrier features."); } else { job.addLin(shapeLines.getAbsolutePath()); @@ -605,7 +605,7 @@ if (p) { - logger.debug( + log.debug( "Successfully created barrier polygon shapefile. " + "Write shapefile path into WSPLGEN job."); createMapfile( @@ -618,7 +618,7 @@ MapfileGenerator.MS_BARRIERS_PREFIX); if (scenario.equals(WSPLGENJob.GEL_NOSPERRE)) { - logger.debug("WSPLGEN will not use barrier features."); + log.debug("WSPLGEN will not use barrier features."); } else { job.addLin(shapePolys.getAbsolutePath()); @@ -639,7 +639,7 @@ ) { File archive = new File(dir, WSPLGEN_USER_RGD_SHAPE); boolean exists = archive.exists(); - logger.debug("shp file exists: " + exists); + log.debug("shp file exists: " + exists); if (exists) { job.addLin(dir + "/" + WSPLGEN_USER_RGD_SHAPE); facetCreator.createShapeFacet(FacetCreator.I18N_USERSHAPE, @@ -680,12 +680,12 @@ polygons.add(feature); } else { - logger.warn("Feature not supported: " + geom.getClass()); + log.warn("Feature not supported: " + geom.getClass()); } } - logger.debug("Found " + lines.size() + " barrier lines."); - logger.debug("Found " + polygons.size() + " barrier polygons."); + log.debug("Found " + lines.size() + " barrier lines."); + log.debug("Found " + polygons.size() + " barrier polygons."); return new FeatureCollection[] { lines, polygons }; } @@ -695,7 +695,7 @@ SimpleFeature feature, Geometry geom ) { - logger.debug("Apply elevations for: " + geom.getClass()); + log.debug("Apply elevations for: " + geom.getClass()); List<Double> elevations = extractElevations(feature); int numPoints = geom.getNumPoints(); @@ -704,7 +704,7 @@ String typ = (String) feature.getAttribute("typ"); if (numPoints > numElevation) { - logger.warn("More vertices in Geometry than elevations given."); + log.warn("More vertices in Geometry than elevations given."); } Coordinate[] c = geom.getCoordinates(); @@ -739,7 +739,7 @@ list.add(Double.parseDouble(elevations[i])); } catch (NumberFormatException nfe) { - logger.warn("Error while parsing elevation at pos: " + i); + log.warn("Error while parsing elevation at pos: " + i); if (typ != null && typ.equals("Graben")) { list.add(new Double(-9999.0)); } @@ -764,11 +764,11 @@ axes = RiverAxis.getRiverAxis(river); } catch (HibernateException iae) { - logger.warn("No valid river axis found for " + river); + log.warn("No valid river axis found for " + river); return; } if (axes == null || axes.isEmpty()) { - logger.warn("Could not find river axis for: '" + river + "'"); + log.warn("Could not find river axis for: '" + river + "'"); return; } @@ -809,7 +809,7 @@ List<CrossSectionTrack> cst = CrossSectionTrack.getCrossSectionTrack(river, WSPLGEN_QPS_NAME); - logger.debug("Found " + cst.size() + " CrossSectionTracks."); + log.debug("Found " + cst.size() + " CrossSectionTracks."); Object[][] attrs = new Object[2][]; attrs[0] = new Object[] { "ELEVATION", Double.class }; @@ -853,7 +853,7 @@ DGM dgm = access.getDGM(); if (dgm == null) { - logger.warn("Could not find specified DGM."); + log.warn("Could not find specified DGM."); return; } @@ -872,7 +872,7 @@ protected void setArea(D4EArtifact artifact, File dir, WSPLGENJob job) { String useFloodplain = artifact.getDataAsString("use_floodplain"); if (!Boolean.valueOf(useFloodplain)) { - logger.debug("WSPLGEN will not use floodplain."); + log.debug("WSPLGEN will not use floodplain."); return; } @@ -884,13 +884,13 @@ Floodplain plain = Floodplain.getFloodplain(river); if (plain == null) { - logger.debug("No flood plain for river '" + river + "'"); + log.debug("No flood plain for river '" + river + "'"); return; } Polygon polygon = plain.getGeom(); if (polygon == null) { - logger.warn("Floodplain has no geometry."); + log.warn("Floodplain has no geometry."); return; } @@ -926,7 +926,7 @@ protected WQKms getWQKms(D4EArtifact flys, CallContext cc) { String wspString = flys.getDataAsString(WSP_ARTIFACT); if (wspString == null) { - logger.debug("getWQKms(): wspString == null"); + log.debug("getWQKms(): wspString == null"); return null; } String[] parts = wspString.split(";"); @@ -942,7 +942,7 @@ ? RiverUtils.getArtifact(otherArtifact, cc) : flys; - logger.debug("Use waterlevel provided by Artifact: " + src.identifier()); + log.debug("Use waterlevel provided by Artifact: " + src.identifier()); // The state actually depends on the kind of artifact. E.g. StaticWQKmsArtifact needs other state Object computed = src.compute( @@ -981,7 +981,7 @@ return wqkms; } - logger.warn("getWQKms cannot handle " + computed.getClass() + " " + src.getClass()); + log.warn("getWQKms cannot handle " + computed.getClass() + " " + src.getClass()); return null; } @@ -992,12 +992,12 @@ File dir, WSPLGENJob job) { - logger.debug("FloodMapState.setWsp"); + log.debug("FloodMapState.setWsp"); WQKms data = getWQKms(artifact, context); if (data == null) { - logger.warn("No WST data found!"); + log.warn("No WST data found!"); return; } @@ -1008,7 +1008,7 @@ boolean writeWspTag = true; double[] buf = new double[4]; - logger.debug("Add WST column: " + data.getName()); + log.debug("Add WST column: " + data.getName()); writer.addColumn(data.getName()); if (writeWspTag) { @@ -1032,7 +1032,7 @@ job.setWsp(wspFile.getAbsolutePath()); } catch (FileNotFoundException fnfe) { - logger.warn("Error while writing wsp file: " + fnfe.getMessage()); + log.warn("Error while writing wsp file: " + fnfe.getMessage()); } finally { if (fout != null) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodplainChoice.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodplainChoice.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,7 +32,7 @@ public static final String ACTIVE = "floodplain.active"; public static final String INACTIVE = "floodplain.inactive"; - private static final Logger logger = + private static final Logger log = Logger.getLogger(FloodplainChoice.class); @@ -66,7 +66,7 @@ String value, String type ) { - logger.debug("GET LABEL FOR '" + name + "' / '" + value + "'"); + log.debug("GET LABEL FOR '" + name + "' / '" + value + "'"); if (value != null && value.equals("true")) { return Resources.getMsg(cc.getMeta(), ACTIVE, ACTIVE); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FlowVelocityState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FlowVelocityState.java Fri Sep 05 12:58:17 2014 +0200 @@ -34,7 +34,7 @@ /* State in which flow velocities can/will be calculated. */ public class FlowVelocityState extends DefaultState implements FacetTypes { - private static Logger logger = Logger.getLogger(FlowVelocityState.class); + private static Logger log = Logger.getLogger(FlowVelocityState.class); public static final String I18N_MAINCHANNEL_FACET = "facet.flow_velocity.mainchannel"; @@ -66,7 +66,7 @@ List<Facet> facets, Object old ) { - logger.debug("FlowVelocityState.computeAdvance"); + log.debug("FlowVelocityState.computeAdvance"); List<Facet> newFacets = new ArrayList<Facet>(); @@ -82,7 +82,7 @@ FlowVelocityData[] data = (FlowVelocityData[]) res.getData(); - logger.debug("Calculated " + data.length + " FlowVelocityData objects"); + log.debug("Calculated " + data.length + " FlowVelocityData objects"); String id = getID(); int idx = 0; @@ -212,7 +212,7 @@ newFacets.add(csv); - logger.debug("Created " + newFacets.size() + " new Facets."); + log.debug("Created " + newFacets.size() + " new Facets."); facets.addAll(newFacets);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeDischargeState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeDischargeState.java Fri Sep 05 12:58:17 2014 +0200 @@ -48,8 +48,8 @@ /** Developer-centric description of facet. */ public static final String I18N_DESCRIPTION = "facet.discharge.curve"; - /** The logger that is used in this state. */ - private static final Logger logger = + /** The log that is used in this state. */ + private static final Logger log = Logger.getLogger(GaugeDischargeState.class); @@ -112,7 +112,7 @@ CallMeta meta, List<Facet> facets ) { - logger.debug("GaugeDischargeState.computeInit()"); + log.debug("GaugeDischargeState.computeInit()"); GaugeDischargeFacet facet = new GaugeDischargeFacet( 0, @@ -137,7 +137,7 @@ Object old ) { if (artifact instanceof GaugeDischargeArtifact) { - logger.debug("GaugeDischargeState.computeAdvance()"); + log.debug("GaugeDischargeState.computeAdvance()"); GaugeDischargeArtifact dischargeArtifact = (GaugeDischargeArtifact) artifact; CalculationResult res; @@ -153,7 +153,7 @@ WQKms[] wqkms = (WQKms[]) res.getData(); if (wqkms != null && facets != null) { - logger.debug("GaugeDischargeState.computeAdvance(): create facets"); + log.debug("GaugeDischargeState.computeAdvance(): create facets"); GaugeDischargeFacet facet = new GaugeDischargeFacet( 0, @@ -171,9 +171,9 @@ } else { if (wqkms == null) - logger.debug("GaugeDischargeState.computeAdvance(): wqkms 0"); + log.debug("GaugeDischargeState.computeAdvance(): wqkms 0"); else - logger.debug("GaugeDischargeState.computeAdvance(): facets 0"); + log.debug("GaugeDischargeState.computeAdvance(): facets 0"); } return res;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeTimerangeState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeTimerangeState.java Fri Sep 05 12:58:17 2014 +0200 @@ -27,8 +27,8 @@ */ public class GaugeTimerangeState extends IntRangeState { - /** Private logger. */ - private static final Logger logger = + /** Private log. */ + private static final Logger log = Logger.getLogger(GaugeTimerangeState.class); @@ -37,7 +37,7 @@ Gauge gauge = RiverUtils.getReferenceGauge(flys); if (gauge == null) { - logger.warn("No reference gauge specified!"); + log.warn("No reference gauge specified!"); return new long[] { 0, 0 }; } @@ -67,7 +67,7 @@ } } - logger.warn("Could not determine time range for gauge: " + gauge.getName() + log.warn("Could not determine time range for gauge: " + gauge.getName() + " id: " + gauge.getId()); return null;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSBarriersState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSBarriersState.java Fri Sep 05 12:58:17 2014 +0200 @@ -37,8 +37,8 @@ extends DefaultState { - /** The logger that is used in this class.*/ - private static Logger logger = Logger.getLogger(HWSBarriersState.class); + /** The log that is used in this class.*/ + private static Logger log = Logger.getLogger(HWSBarriersState.class); private static final String HWS_SHAPEFILE_LINES = "hws-lines.shp"; private static final String HWS_SHAPEFILE_POINTS = "hws-points.shp"; @@ -83,7 +83,7 @@ File artifactDir = getDirectory(artifact); if (artifactDir == null) { - logger.error("Could not create directory for HWS shapefile!"); + log.error("Could not create directory for HWS shapefile!"); return null; } @@ -166,7 +166,7 @@ proj.indexOf("\"]]")); } else { - logger.warn("Could not read EPSG code from shapefile."); + log.warn("Could not read EPSG code from shapefile."); return null; } if (type.contains("Line")) { @@ -188,7 +188,7 @@ FloodMapState.WSPLGEN_USER_RGD); } catch (IOException e) { - logger.warn("No mapfile for user-rgd created!"); + log.warn("No mapfile for user-rgd created!"); } } } @@ -198,7 +198,7 @@ private boolean extractUserShp(File dir) { File archive = new File(dir, FloodMapState.WSPLGEN_USER_RGD_ZIP); boolean exists = archive.exists(); - logger.debug("Zip file exists: " + exists); + log.debug("Zip file exists: " + exists); if (exists) { try { File tmpDir = new File(dir, "usr_tmp"); @@ -207,7 +207,7 @@ return true; } catch (IOException ioe) { - logger.warn("Zip archive " + dir + "/" + log.warn("Zip archive " + dir + "/" + FloodMapState.WSPLGEN_USER_RGD_ZIP + " could not be extracted."); return false; } @@ -241,7 +241,7 @@ FileTools.copyFile(file, new File(target, FloodMapState.WSPLGEN_USER_RGD + "." + suffix)); } catch (IOException ioe) { - logger.warn ("Error while copying file " + file.getName()); + log.warn ("Error while copying file " + file.getName()); return true; } } @@ -256,7 +256,7 @@ @Override public void endOfLife(Artifact artifact, Object callContext) { super.endOfLife(artifact, callContext); - logger.info("ScenarioSelect.endOfLife: " + artifact.identifier()); + log.info("ScenarioSelect.endOfLife: " + artifact.identifier()); D4EArtifact flys = (D4EArtifact) artifact; removeDirectory(flys); @@ -275,14 +275,14 @@ File artifactDir = new File(shapePath, artifact.identifier()); if (artifactDir.exists()) { - logger.debug("Delete directory: " + artifactDir.getAbsolutePath()); + log.debug("Delete directory: " + artifactDir.getAbsolutePath()); boolean success = FileTools.deleteRecursive(artifactDir); if (!success) { - logger.warn("could not remove dir '" + artifactDir + "'"); + log.warn("could not remove dir '" + artifactDir + "'"); } } else { - logger.debug("There is no directory to remove."); + log.debug("There is no directory to remove."); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSDatacageState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSDatacageState.java Fri Sep 05 12:58:17 2014 +0200 @@ -21,7 +21,7 @@ extends DefaultState { - private static final Logger logger = Logger.getLogger(HWSDatacageState.class); + private static final Logger log = Logger.getLogger(HWSDatacageState.class); @Override protected String getUIProvider() { @@ -53,7 +53,7 @@ public static String getLabel(CallContext cc, String value) { - logger.debug("Create label for value: " + value); + log.debug("Create label for value: " + value); return value; } @@ -65,7 +65,7 @@ { D4EArtifact flys = (D4EArtifact) artifact; String hws = flys.getDataAsString("uesk.hws"); - logger.debug("hws: " + hws); + log.debug("hws: " + hws); return true; } @@ -88,7 +88,7 @@ return null; } - logger.debug("Found selected hws: '" + hws + "'"); + log.debug("Found selected hws: '" + hws + "'"); return hws; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HistoricalDischargeComputeState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HistoricalDischargeComputeState.java Fri Sep 05 12:58:17 2014 +0200 @@ -57,7 +57,7 @@ extends DefaultState implements FacetTypes { - private static final Logger logger = Logger + private static final Logger log = Logger .getLogger(HistoricalDischargeComputeState.class); public static final String DEFAULT_UNIT = "cm"; @@ -73,7 +73,7 @@ @Override public Object computeAdvance(D4EArtifact artifact, String hash, CallContext context, List<Facet> facets, Object old) { - logger.debug("HistoricalDischargeComputeState.computeAdvance"); + log.debug("HistoricalDischargeComputeState.computeAdvance"); HistoricalDischargeAccess access = new HistoricalDischargeAccess(artifact); @@ -119,7 +119,7 @@ int i = 0; for (WQTimerange wqt : wqts) { - logger.debug("Prepare facet for: " + wqt.getName()); + log.debug("Prepare facet for: " + wqt.getName()); EvaluationMode evalMode = access.getEvaluationMode(); if (evalMode == EvaluationMode.W) { @@ -127,7 +127,7 @@ HISTORICAL_DISCHARGE_Q, createFacetTitle(wqt))); if (wqt instanceof HistoricalWQTimerange) { - logger + log .debug("Create another facet for historical differences."); // TODO CREATE BETTER TITLE FOR FACETS (issue1180) @@ -140,7 +140,7 @@ HISTORICAL_DISCHARGE_W, createFacetTitle(wqt))); if (wqt instanceof HistoricalWQTimerange) { - logger + log .debug("Create another facet for historical differences."); // TODO CREATE BETTER TITLE FOR FACETS
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HistoricalDischargeState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HistoricalDischargeState.java Fri Sep 05 12:58:17 2014 +0200 @@ -27,7 +27,7 @@ */ public class HistoricalDischargeState extends DefaultState { - private static final Logger logger = + private static final Logger log = Logger.getLogger(HistoricalDischargeState.class); public static final String I18N_MODE_W = "historical.mode.w"; @@ -76,7 +76,7 @@ String name, CallContext context ) { - logger.debug("createItems()"); + log.debug("createItems()"); if (name != null && name.equals(DATA_MODE)) { return createModeItem(creator, artifact, name, context); @@ -85,7 +85,7 @@ return createValuesItem(creator, artifact, name, context); } - logger.warn("Tried to create item for invalid data: " + name); + log.warn("Tried to create item for invalid data: " + name); return new Element[0]; } @@ -121,7 +121,7 @@ String name, CallContext context ) { - logger.debug("createModeItem()"); + log.debug("createModeItem()"); CallMeta meta = context.getMeta(); @@ -147,7 +147,7 @@ String name, CallContext context ) { - logger.debug("createValuesItem()"); + log.debug("createValuesItem()"); Element valuesW = createItem( creator, new String[] { "ws", "" } );
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/InputDoubleState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/InputDoubleState.java Fri Sep 05 12:58:17 2014 +0200 @@ -18,7 +18,7 @@ */ public class InputDoubleState extends MinMaxState { - private static final Logger logger = Logger.getLogger(InputDoubleState.class); + private static final Logger log = Logger.getLogger(InputDoubleState.class); @Override
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/IntRangeState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/IntRangeState.java Fri Sep 05 12:58:17 2014 +0200 @@ -18,7 +18,7 @@ */ public class IntRangeState extends MinMaxState { - private static final Logger logger = Logger.getLogger(IntRangeState.class); + private static final Logger log = Logger.getLogger(IntRangeState.class); @Override
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/LocationDistanceSelect.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/LocationDistanceSelect.java Fri Sep 05 12:58:17 2014 +0200 @@ -27,8 +27,8 @@ extends ComputationRangeState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(LocationDistanceSelect.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(LocationDistanceSelect.class); /** The name of the 'mode' field. */ public static final String MODE = "ld_mode"; @@ -55,7 +55,7 @@ public boolean validate(Artifact artifact) throws IllegalArgumentException { - logger.debug("LocationDistanceSelect.validate"); + log.debug("LocationDistanceSelect.validate"); D4EArtifact flys = (D4EArtifact)artifact; StateData mode = getData(flys, MODE); @@ -138,7 +138,7 @@ String value = data != null ? (String) data.getValue() : null; if (value == null || value.length() == 0) { - logger.warn("No location data given."); + log.warn("No location data given."); return null; } @@ -150,7 +150,7 @@ values.add(Double.valueOf(split)); } catch (NumberFormatException nfe) { - logger.warn(nfe, nfe); + log.warn(nfe, nfe); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/LocationSelect.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/LocationSelect.java Fri Sep 05 12:58:17 2014 +0200 @@ -34,8 +34,8 @@ */ public class LocationSelect extends LocationDistanceSelect { - /** The logger used in this class.*/ - private static Logger logger = Logger.getLogger(LocationSelect.class); + /** The log used in this class.*/ + private static Logger log = Logger.getLogger(LocationSelect.class); public LocationSelect() { @@ -66,7 +66,7 @@ maxVal = minmax[1]; } else { - logger.warn("Could not read min/max distance values!"); + log.warn("Could not read min/max distance values!"); } if (name.equals(LOCATIONS)) { @@ -90,7 +90,7 @@ public boolean validate(Artifact artifact) throws IllegalArgumentException { - logger.debug("LocationSelect.validate"); + log.debug("LocationSelect.validate"); D4EArtifact flys = (D4EArtifact) artifact; StateData data = getData(flys, LOCATIONS); @@ -100,15 +100,15 @@ : null; if (locationStr == null || locationStr.length() == 0) { - logger.error("No locations given."); + log.error("No locations given."); throw new IllegalArgumentException("error_empty_state"); } double[] minmax = getMinMax(artifact); double[] mm = extractLocations(locationStr); - logger.debug("Inserted min location: " + mm[0]); - logger.debug("Inserted max location: " + mm[mm.length-1]); + log.debug("Inserted min location: " + mm[0]); + log.debug("Inserted max location: " + mm[mm.length-1]); return validateBounds(minmax[0], minmax[1], mm[0], mm[mm.length-1], 0d); } @@ -131,7 +131,7 @@ locations.add(Double.parseDouble(l)); } catch (NumberFormatException nfe) { - logger.warn(nfe, nfe); + log.warn(nfe, nfe); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ManualPointsSingleState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ManualPointsSingleState.java Fri Sep 05 12:58:17 2014 +0200 @@ -43,8 +43,8 @@ protected static final String DOT_LINES = ".lines"; - /** The logger that is used in this state. */ - private static final Logger logger = + /** The log that is used in this state. */ + private static final Logger log = Logger.getLogger(ManualPointsSingleState.class); @@ -64,7 +64,7 @@ CallMeta meta, List<Facet> facets ) { - logger.debug("ManualPointsSingleState.compute()"); + log.debug("ManualPointsSingleState.compute()"); ManualPointsArtifact points = (ManualPointsArtifact) artifact; // Add Facet per Diagram type if data given. @@ -80,10 +80,10 @@ fName, Resources.getMsg(meta, MANUALPOINTS, "Manual Points")); facets.add(facet); - logger.debug("compute(): ManualPointsFacet for " + ct + " created"); + log.debug("compute(): ManualPointsFacet for " + ct + " created"); } else { - logger.debug("compute(): No points for " + ct); + log.debug("compute(): No points for " + ct); } // Handle lines. @@ -98,7 +98,7 @@ double y = array.getDouble(0); String name = array.getString(1); String fName = ct + "." + MANUALLINE; - logger.debug("have facet: " + y + " / " + name + " -> " + fName); + log.debug("have facet: " + y + " / " + name + " -> " + fName); CrossSectionWaterLineFacet facet = new CrossSectionWaterLineFacet( i, fName, @@ -108,12 +108,12 @@ } } catch(JSONException e){ - logger.error("Could not decode json."); + log.error("Could not decode json."); } } else { - //logger.debug("No points for " + ct); + //log.debug("No points for " + ct); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MiddleBedHeight.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MiddleBedHeight.java Fri Sep 05 12:58:17 2014 +0200 @@ -33,8 +33,8 @@ /** State in which Middle Bed Heights are generated. */ public class MiddleBedHeight extends DefaultState implements FacetTypes { - /** Private logger. */ - private static final Logger logger = Logger.getLogger(MiddleBedHeight.class); + /** Private log. */ + private static final Logger log = Logger.getLogger(MiddleBedHeight.class); @Override @@ -45,7 +45,7 @@ List<Facet> facets, Object old ) { - logger.debug("MiddleBedHeight.computeAdvance"); + log.debug("MiddleBedHeight.computeAdvance"); List<Facet> newFacets = new ArrayList<Facet>(); @@ -63,7 +63,7 @@ MiddleBedHeightData[] data = (MiddleBedHeightData[]) res.getData(); - logger.debug("Calculated " + data.length + " MiddleBedHeightData objects"); + log.debug("Calculated " + data.length + " MiddleBedHeightData objects"); String id = getID(); int idx = 0; @@ -130,7 +130,7 @@ newFacets.add(csv); - logger.debug("Created " + newFacets.size() + " new Facets."); + log.debug("Created " + newFacets.size() + " new Facets."); facets.addAll(newFacets);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MinMaxState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MinMaxState.java Fri Sep 05 12:58:17 2014 +0200 @@ -30,7 +30,7 @@ */ public abstract class MinMaxState extends DefaultState { - private static final Logger logger = Logger.getLogger(MinMaxState.class); + private static final Logger log = Logger.getLogger(MinMaxState.class); @Override protected void appendItems( @@ -144,11 +144,11 @@ String rawValue = flys.getDataAsString(name); if (rawValue == null) { - logger.debug("No value for '" + rawValue + "' existing."); + log.debug("No value for '" + rawValue + "' existing."); return null; } - logger.debug("Raw value for '" + name + "' = " + rawValue); + log.debug("Raw value for '" + name + "' = " + rawValue); return extractRangeAsString(rawValue); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MultiIntArrayState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MultiIntArrayState.java Fri Sep 05 12:58:17 2014 +0200 @@ -30,7 +30,7 @@ */ public abstract class MultiIntArrayState extends DefaultState { - private static final Logger logger = + private static final Logger log = Logger.getLogger(MultiIntArrayState.class); @@ -54,7 +54,7 @@ } } catch (IllegalArgumentException iae) { - logger.warn("Illegal argument", iae); + log.warn("Illegal argument", iae); } } @@ -85,7 +85,7 @@ data.appendChild(item); } catch (IllegalArgumentException iae) { - logger.warn("Cannot append item: " + val, iae); + log.warn("Cannot append item: " + val, iae); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MultiStringArrayState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MultiStringArrayState.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,7 +28,7 @@ */ public abstract class MultiStringArrayState extends DefaultState { - private static final Logger logger = + private static final Logger log = Logger.getLogger(MultiStringArrayState.class); @@ -52,7 +52,7 @@ } } catch (IllegalArgumentException iae) { - logger.warn("Illegal argument", iae); + log.warn("Illegal argument", iae); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/OutliersInput.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/OutliersInput.java Fri Sep 05 12:58:17 2014 +0200 @@ -18,8 +18,8 @@ */ public class OutliersInput extends DefaultState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(OutliersInput.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(OutliersInput.class); public static final String PARAMETER_NAME = "outliers";
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/PeriodsSelect.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/PeriodsSelect.java Fri Sep 05 12:58:17 2014 +0200 @@ -15,8 +15,8 @@ */ public class PeriodsSelect extends DefaultState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(PeriodsSelect.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(PeriodsSelect.class); /**
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/QSectorSingleState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/QSectorSingleState.java Fri Sep 05 12:58:17 2014 +0200 @@ -36,8 +36,8 @@ public static final String I18N_DESCRIPTION = "facet.qsector"; - /** The logger that is used in this state. */ - private static final Logger logger = + /** The log that is used in this state. */ + private static final Logger log = Logger.getLogger(QSectorSingleState.class); @@ -57,7 +57,7 @@ CallMeta meta, List<Facet> facets ) { - logger.debug("QSectorSingleState.compute()"); + log.debug("QSectorSingleState.compute()"); QSectorArtifact points = (QSectorArtifact) artifact; QSectorFacet qfacet = new QSectorFacet(
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/RangeState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/RangeState.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,8 +23,8 @@ */ public abstract class RangeState extends DefaultState { - /** The logger that is used in this class. */ - private Logger logger = Logger.getLogger(RangeState.class); + /** The log that is used in this class. */ + private Logger log = Logger.getLogger(RangeState.class); public RangeState() { @@ -39,12 +39,12 @@ throws IllegalArgumentException { if (from < fromValid) { - logger.error( + log.error( "Invalid 'from'. " + from + " is smaller than " + fromValid); throw new IllegalArgumentException("error_feed_from_out_of_range"); } else if (to > toValid) { - logger.error( + log.error( "Invalid 'to'. " + to + " is bigger than " + toValid); throw new IllegalArgumentException("error_feed_to_out_of_range"); } @@ -69,7 +69,7 @@ double from, double to, double step) throws IllegalArgumentException { - logger.debug("RangeState.validateRange"); + log.debug("RangeState.validateRange"); // XXX The step width is not validated at the moment! return validateBounds(fromValid, toValid, from, to);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ReferenceCurveState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ReferenceCurveState.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,7 +32,7 @@ extends DefaultState implements FacetTypes { - private static Logger logger = Logger.getLogger(ReferenceCurveState.class); + private static Logger log = Logger.getLogger(ReferenceCurveState.class); public ReferenceCurveState() { @@ -78,7 +78,7 @@ } if (wws.length > 0) { - logger.debug("Adding CSV and PDF data facet."); + log.debug("Adding CSV and PDF data facet."); Facet csv = new DataFacet (CSV, "CSV data", ComputeType.ADVANCE, hash, id); Facet pdf = new DataFacet (PDF, "PDF data", ComputeType.ADVANCE, hash, id); facets.add(csv);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/RiverSelect.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/RiverSelect.java Fri Sep 05 12:58:17 2014 +0200 @@ -35,8 +35,8 @@ */ public class RiverSelect extends DefaultState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(RiverSelect.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(RiverSelect.class); /** Error message that is thrown if no river was found based on a given * name.*/ @@ -133,7 +133,7 @@ Element value = ProtocolUtils.createArtNode(cr, "value", null, null); label.setTextContent(river.getName()); - logger.debug("model uuid: " + river.getModelUuid()); + log.debug("model uuid: " + river.getModelUuid()); value.setTextContent(river.getModelUuid()); item.appendChild(label); @@ -147,7 +147,7 @@ public boolean validate(Artifact artifact) throws IllegalArgumentException { - logger.debug("RiverSelect.validate"); + log.debug("RiverSelect.validate"); D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ScenarioSelect.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ScenarioSelect.java Fri Sep 05 12:58:17 2014 +0200 @@ -29,8 +29,8 @@ */ public class ScenarioSelect extends DefaultState { - /** The logger that is used in this class.*/ - private static Logger logger = Logger.getLogger(ScenarioSelect.class); + /** The log that is used in this class.*/ + private static Logger log = Logger.getLogger(ScenarioSelect.class); public static final String FIELD_MODE = "scenario"; @@ -111,7 +111,7 @@ @Override public void endOfLife(Artifact artifact, Object callContext) { super.endOfLife(artifact, callContext); - logger.info("ScenarioSelect.endOfLife: " + artifact.identifier()); + log.info("ScenarioSelect.endOfLife: " + artifact.identifier()); D4EArtifact flys = (D4EArtifact) artifact; removeDirectory(flys); @@ -130,14 +130,14 @@ File artifactDir = new File(shapePath, artifact.identifier()); if (artifactDir.exists()) { - logger.debug("Delete directory: " + artifactDir.getAbsolutePath()); + log.debug("Delete directory: " + artifactDir.getAbsolutePath()); boolean success = FileTools.deleteRecursive(artifactDir); if (!success) { - logger.warn("could not remove dir '" + artifactDir + "'"); + log.warn("could not remove dir '" + artifactDir + "'"); } } else { - logger.debug("There is no directory to remove."); + log.debug("There is no directory to remove."); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/SoundingsSelect.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/SoundingsSelect.java Fri Sep 05 12:58:17 2014 +0200 @@ -33,8 +33,8 @@ public static final String PREFIX_SINGLE = "single-"; - /** Private logger. */ - private static final Logger logger = Logger.getLogger(SoundingsSelect.class); + /** Private log. */ + private static final Logger log = Logger.getLogger(SoundingsSelect.class); @Override @@ -58,7 +58,7 @@ getOptions(artifact, name, context, creator, select); } catch (IllegalArgumentException iae) { - logger.warn("Illegal argument", iae); + log.warn("Illegal argument", iae); } } @@ -91,7 +91,7 @@ ) throws IllegalArgumentException { - logger.debug("Get options for parameter: '" + parameterName + "'"); + log.debug("Get options for parameter: '" + parameterName + "'"); if (!testParameterName(parameterName)) { throw new IllegalArgumentException( @@ -126,7 +126,7 @@ if (singles != null) { int size = singles.size(); - logger.debug("Found " + size + " singles."); + log.debug("Found " + size + " singles."); NumberFormat nf = Formatter.getCalculationKm(context.getMeta()); for (int i = 0; i < size; i++) { @@ -149,9 +149,9 @@ select.appendChild(item); } } - if (logger.isDebugEnabled()) { - logger.debug("appended singles"); - logger.debug(XMLUtils.toString(select)); + if (log.isDebugEnabled()) { + log.debug("appended singles"); + log.debug(XMLUtils.toString(select)); } } @@ -215,7 +215,7 @@ } } catch (NumberFormatException nfe) { - logger.warn("Could not parse id from string '" + id + "'", nfe); + log.warn("Could not parse id from string '" + id + "'", nfe); } return "n.A.";
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StateFactory.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StateFactory.java Fri Sep 05 12:58:17 2014 +0200 @@ -26,8 +26,8 @@ */ public class StateFactory { - /** The logger used in this class */ - private static Logger logger = Logger.getLogger(StateFactory.class); + /** The log used in this class */ + private static Logger log = Logger.getLogger(StateFactory.class); /** The XPath to the classname of the state */ public static final String XPATH_STATE = "@state"; @@ -60,20 +60,20 @@ State state = null; try { - logger.debug("Create a new State for class: " + clazz); + log.debug("Create a new State for class: " + clazz); state = (State) Class.forName(clazz).newInstance(); state.setup(stateConf); initializeStateData(state, stateConf); } catch (InstantiationException ie) { - logger.error(ie, ie); + log.error(ie, ie); } catch (IllegalAccessException iae) { - logger.error(iae, iae); + log.error(iae, iae); } catch (ClassNotFoundException cnfe) { - logger.error(cnfe, cnfe); + log.error(cnfe, cnfe); } return state; @@ -92,14 +92,14 @@ stateConf, XPATH_DATA, XPathConstants.NODESET); if (dataList == null || dataList.getLength() == 0) { - logger.debug("The state has no input data configured."); + log.debug("The state has no input data configured."); return; } int items = dataList.getLength(); - logger.debug("The state has " + items + " data items configured."); + log.debug("The state has " + items + " data items configured."); for (int i = 0; i < items; i++) { Node data = dataList.item(i); @@ -112,17 +112,17 @@ data, XPATH_DATA_DESCRIPTION, XPathConstants.STRING); if (name == null || name.length() == 0) { - logger.warn("No name for data item at pos " + i + " found."); + log.warn("No name for data item at pos " + i + " found."); continue; } if (type == null || type.length() == 0) { - logger.warn("No type for data item at pos " + i + " found."); - logger.warn("Default type 'string' used."); + log.warn("No type for data item at pos " + i + " found."); + log.warn("Default type 'string' used."); type = "string"; } - logger.debug("add StateData '" + name + "' (type '" + type + "')"); + log.debug("add StateData '" + name + "' (type '" + type + "')"); state.addData(name, new DefaultStateData(name, desc, type)); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticHYKState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticHYKState.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,8 +31,8 @@ extends DefaultState implements FacetTypes { - /** The logger that is used in this state. */ - transient private static final Logger logger = Logger.getLogger(StaticHYKState.class); + /** The log that is used in this state. */ + transient private static final Logger log = Logger.getLogger(StaticHYKState.class); /** @@ -54,7 +54,7 @@ List<Facet> facets, Object old ) { - logger.debug("StaticHYKState.compute"); + log.debug("StaticHYKState.compute"); String id = getID(); // Prepare comparison against cached result. @@ -69,7 +69,7 @@ HYKFactory.getHYKs(hyk.getHykId(), hyk.getKm()); if (facets == null) { - logger.debug("StaticHYKState.compute no facets"); + log.debug("StaticHYKState.compute no facets"); return zones; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticState.java Fri Sep 05 12:58:17 2014 +0200 @@ -30,8 +30,8 @@ extends DefaultState implements FacetTypes { - /** The logger that is used in this state. */ - private static final Logger logger = Logger.getLogger(StaticState.class); + /** The log that is used in this state. */ + private static final Logger log = Logger.getLogger(StaticState.class); private static String uiprovider;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticWQKmsState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticWQKmsState.java Fri Sep 05 12:58:17 2014 +0200 @@ -36,8 +36,8 @@ extends DefaultState implements FacetTypes { - /** The logger that is used in this state. */ - private static Logger logger = Logger.getLogger(StaticWQKmsState.class); + /** The log that is used in this state. */ + private static Logger log = Logger.getLogger(StaticWQKmsState.class); /**
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WDifferencesState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WDifferencesState.java Fri Sep 05 12:58:17 2014 +0200 @@ -48,8 +48,8 @@ extends DefaultState implements FacetTypes { - /** The logger that is used in this state. */ - private static Logger logger = Logger.getLogger(WDifferencesState.class); + /** The log that is used in this state. */ + private static Logger log = Logger.getLogger(WDifferencesState.class); private static final String I18N_DIFFERENCES_FACET_NAME = "facet.w_differences"; @@ -109,7 +109,7 @@ * Access the data (wkms) of an artifact, coded in mingle. */ public WKms getWKms(String mingle, CallContext context) { - logger.debug("WDifferencesState.getWKms " + mingle); + log.debug("WDifferencesState.getWKms " + mingle); String[] def = mingle.split(";"); String uuid = def[0]; String name = def[1]; @@ -120,10 +120,10 @@ (StaticWKmsArtifact) RiverUtils.getArtifact( uuid, context); - logger.debug("WDifferencesState obtain data from StaticWKms"); + log.debug("WDifferencesState obtain data from StaticWKms"); WKms wkms = staticWKms.getWKms(idx); if (wkms == null) - logger.error("No WKms from artifact."); + log.error("No WKms from artifact."); return wkms; } @@ -132,39 +132,39 @@ context); if (d4eArtifact == null) { - logger.warn("One of the artifacts (1) for diff calculation could not be loaded"); + log.warn("One of the artifacts (1) for diff calculation could not be loaded"); return null; } if (d4eArtifact instanceof WINFOArtifact) { - logger.debug("Get WKms from WINFOArtifact"); + log.debug("Get WKms from WINFOArtifact"); WINFOArtifact flys = (WINFOArtifact) d4eArtifact; WKms[] wkms = (WKms[]) flys.getWaterlevelData(context). getData(); if (wkms == null || wkms.length == 0) { - logger.warn("no waterlevels in artifact"); + log.warn("no waterlevels in artifact"); } else if (wkms.length < idx+1) { - logger.warn("Not enough waterlevels in artifact."); + log.warn("Not enough waterlevels in artifact."); return new WQKms(); } return wkms[idx]; } else if (d4eArtifact instanceof MINFOArtifact) { - logger.debug("Get WKms from MINFOArtifact"); + log.debug("Get WKms from MINFOArtifact"); CalculationResult r = (CalculationResult) d4eArtifact.compute(context, ComputeType.ADVANCE, false); } else if (d4eArtifact instanceof FixationArtifact) { - logger.debug ("Get WKms from FixationArtifact."); + log.debug ("Get WKms from FixationArtifact."); CalculationResult r = (CalculationResult) d4eArtifact.compute(context, ComputeType.ADVANCE, false); FixRealizingResult frR = (FixRealizingResult) r.getData(); return frR.getWQKms()[idx]; } - logger.error("Do not know how to handle (getWKms) minuend/subtrahend"); + log.error("Do not know how to handle (getWKms) minuend/subtrahend"); return null; } @@ -193,7 +193,7 @@ // Expected format is: // [42537f1e-3522-42ef-8968-635b03d8e9c6;longitudinal_section.w;0]#[1231f2-....] String diffids = winfo.getDataAsString("diffids"); - logger.debug("WDifferencesState has: " + diffids); + log.debug("WDifferencesState has: " + diffids); String datas[] = diffids.split("#"); // Validate the Data-Strings. @@ -229,7 +229,7 @@ subtrahendWKms); wkms.setName(facetName); wkmss.add(wkms); - logger.debug("WKMSSubtraction happened"); + log.debug("WKMSSubtraction happened"); } if (facets != null) { facets.add(new DifferenceCurveFacet( @@ -259,10 +259,10 @@ if (facets != null) { facets.add(new DataFacet(CSV, "CSV data")); facets.add(new DataFacet(PDF, "PDF data")); - logger.debug("Adding facets in WDifferencesState."); + log.debug("Adding facets in WDifferencesState."); } else { - logger.debug("Not adding facets in WDifferencesState."); + log.debug("Not adding facets in WDifferencesState."); } // TODO Evaluate whether null is okay as reports.
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WMSBackgroundState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WMSBackgroundState.java Fri Sep 05 12:58:17 2014 +0200 @@ -50,14 +50,14 @@ protected Map<String, String> variables; - private static final Logger logger = Logger.getLogger(WMSBackgroundState.class); + private static final Logger log = Logger.getLogger(WMSBackgroundState.class); @Override public void setup(Node config) { super.setup(config); - logger.debug("WMSBackgroundState.setup()"); + log.debug("WMSBackgroundState.setup()"); } @@ -69,7 +69,7 @@ CallMeta meta, List<Facet> facets ) { - logger.debug("WMSBackgroundState.computeInit()"); + log.debug("WMSBackgroundState.computeInit()"); initVariables(artifact); @@ -82,9 +82,9 @@ } if (url == null || layer == null) { - logger.warn("No background layers currently configured:"); - logger.warn("... add config for WMS url: " + XPATH_WMS_URL); - logger.warn("... add config for WMS layer: " + XPATH_WMS_LAYER); + log.warn("No background layers currently configured:"); + log.warn("... add config for WMS url: " + XPATH_WMS_URL); + log.warn("... add config for WMS layer: " + XPATH_WMS_LAYER); return null; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQAdapted.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQAdapted.java Fri Sep 05 12:58:17 2014 +0200 @@ -45,8 +45,8 @@ */ public class WQAdapted extends DefaultState { - /** The logger used in this state.*/ - private static Logger logger = Logger.getLogger(WQAdapted.class); + /** The log used in this state.*/ + private static Logger log = Logger.getLogger(WQAdapted.class); public static final String FIELD_WQ_MODE = "wq_isq"; @@ -95,7 +95,7 @@ String name, CallContext context) { - logger.debug("WQAdapted.createItems"); + log.debug("WQAdapted.createItems"); if (name != null && name.equals(FIELD_WQ_MODE)) { return createModeItems(cr, artifact, name, context); @@ -104,7 +104,7 @@ return createValueItems(cr, artifact, name, context); } else { - logger.warn("Unknown data object: " + name); + log.warn("Unknown data object: " + name); return null; } } @@ -117,7 +117,7 @@ String name, CallContext context) { - logger.debug("WQAdapted.createModeItems"); + log.debug("WQAdapted.createModeItems"); Element w = createItem(cr, new String[] { "w", "W" }); Element q = createItem(cr, new String[] { "q", "Q" }); @@ -133,7 +133,7 @@ String name, CallContext context) { - logger.debug("WQAdapted.createValueItems"); + log.debug("WQAdapted.createValueItems"); D4EArtifact flysArtifact = (D4EArtifact) artifact; @@ -147,7 +147,7 @@ int num = gauges != null ? gauges.size() : 0; if (num == 0) { - logger.warn("Selected distance matches no gauges."); + log.warn("Selected distance matches no gauges."); return null; } @@ -277,7 +277,7 @@ * @return the min and max Q values for the given gauge. */ protected double[] determineMinMaxQ(Gauge gauge, Wst wst) { - logger.debug("WQAdapted.determineMinMaxQ"); + log.debug("WQAdapted.determineMinMaxQ"); double[] minmaxQ = gauge != null ? wst.determineMinMaxQ(gauge.getRange()) @@ -301,7 +301,7 @@ public boolean validate(Artifact artifact) throws IllegalArgumentException { - logger.debug("WQAdapted.validate"); + log.debug("WQAdapted.validate"); D4EArtifact flys = (D4EArtifact) artifact; StateData data = getData(flys, FIELD_WQ_MODE); @@ -326,7 +326,7 @@ protected boolean validateW(Artifact artifact) throws IllegalArgumentException { - logger.debug("WQAdapted.validateW"); + log.debug("WQAdapted.validateW"); D4EArtifact flys = (D4EArtifact) artifact; RangeWithValues[] rwvs = extractInput(getData(flys, "wq_values")); @@ -356,7 +356,7 @@ protected boolean validateQ(Artifact artifact) throws IllegalArgumentException { - logger.debug("WQAdapted.validateQ"); + log.debug("WQAdapted.validateQ"); D4EArtifact flys = (D4EArtifact) artifact; RangeWithValues[] rwvs = extractInput(getData(flys, "wq_values")); @@ -393,15 +393,15 @@ : null; if (minmax == null) { - logger.warn("Could not determine min/max Q of gauge."); + log.warn("Could not determine min/max Q of gauge."); return true; } - if (logger.isDebugEnabled()) { - logger.debug("Validate Qs with:"); - logger.debug("-- Gauge: " + gauge.getName()); - logger.debug("-- Gauge min: " + minmax[0]); - logger.debug("-- Gauge max: " + minmax[1]); + if (log.isDebugEnabled()) { + log.debug("Validate Qs with:"); + log.debug("-- Gauge: " + gauge.getName()); + log.debug("-- Gauge min: " + minmax[0]); + log.debug("-- Gauge max: " + minmax[1]); } for (double q: qs) { @@ -423,15 +423,15 @@ : null; if (minmax == null) { - logger.warn("Could not determine min/max W of gauge."); + log.warn("Could not determine min/max W of gauge."); return true; } - if (logger.isDebugEnabled()) { - logger.debug("Validate Ws with:"); - logger.debug("-- Gauge: " + gauge.getName()); - logger.debug("-- Gauge min: " + minmax[0]); - logger.debug("-- Gauge max: " + minmax[1]); + if (log.isDebugEnabled()) { + log.debug("Validate Ws with:"); + log.debug("-- Gauge: " + gauge.getName()); + log.debug("-- Gauge min: " + minmax[0]); + log.debug("-- Gauge max: " + minmax[1]); } for (double w: ws) { @@ -471,7 +471,7 @@ res[i] = Double.parseDouble(values[i]); } catch (NumberFormatException nfe) { - logger.warn(nfe, nfe); + log.warn(nfe, nfe); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQFixing.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQFixing.java Fri Sep 05 12:58:17 2014 +0200 @@ -19,15 +19,15 @@ */ public class WQFixing extends WQAdapted { - /** The logger used in this state.*/ - private static Logger logger = Logger.getLogger(WQFixing.class); + /** The log used in this state.*/ + private static Logger log = Logger.getLogger(WQFixing.class); /** Simple sanity check if values are positive numbers **/ @Override public boolean validate(Artifact artifact) throws IllegalArgumentException { - logger.debug("WQFixing.validate"); + log.debug("WQFixing.validate"); RangeWithValues[] rwvs = extractInput(getData((D4EArtifact) artifact, "wq_values"));
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQSelect.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQSelect.java Fri Sep 05 12:58:17 2014 +0200 @@ -45,8 +45,8 @@ */ public class WQSelect extends DefaultState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(WQSelect.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(WQSelect.class); /** The default step width for Qs. */ public static final String DEFAULT_STEP_Q = "50"; @@ -180,7 +180,7 @@ Gauge gauge = winfo.getGauge(); - boolean debug = logger.isDebugEnabled(); + boolean debug = log.isDebugEnabled(); StringBuilder label = new StringBuilder(); @@ -194,7 +194,7 @@ if (mv != null && mv.length() > 0) { tmp = mv + ": " + tmp; if (debug) { - logger.debug("Add main value: '" + mv + "'"); + log.debug("Add main value: '" + mv + "'"); } } if (label.length() > 0) { @@ -399,7 +399,7 @@ * @return the min and max W values for the current gauge. */ protected double[] determineMinMaxW(Artifact artifact) { - logger.debug("WQSelect.determineCurrentGauge"); + log.debug("WQSelect.determineCurrentGauge"); Gauge gauge = ((WINFOArtifact) artifact).getGauge(); double[] minmaxW = gauge != null ? gauge.determineMinMaxW() : null; @@ -421,7 +421,7 @@ * @return the min and max W values. */ protected double[] determineMinMaxWFree(Artifact artifact) { - logger.debug("WQSelect.determineMinMaxWFree"); + log.debug("WQSelect.determineMinMaxWFree"); WINFOArtifact winfo = (WINFOArtifact) artifact; WstValueTable valueTable = WstValueTableFactory.getTable( @@ -456,7 +456,7 @@ * @return the min and max Q values for the current gauge. */ protected double[] determineMinMaxQAtGauge(Artifact artifact) { - logger.debug("WQSelect.determineMinMaxQAtGauge"); + log.debug("WQSelect.determineMinMaxQAtGauge"); WINFOArtifact flysArtifact = (WINFOArtifact) artifact; @@ -484,7 +484,7 @@ * @return the min and max Q values for the current kilometer range. */ protected double[] determineMinMaxQ(Artifact artifact) { - logger.debug("WQSelect.determineMinMaxQ"); + log.debug("WQSelect.determineMinMaxQ"); WINFOArtifact winfo = (WINFOArtifact) artifact; WstValueTable valueTable = WstValueTableFactory.getTable( @@ -521,7 +521,7 @@ public boolean validate(Artifact artifact) throws IllegalArgumentException { - logger.debug("WQSelect.validate"); + log.debug("WQSelect.validate"); WINFOArtifact flys = (WINFOArtifact) artifact; @@ -546,15 +546,15 @@ double from, double to, double step) throws IllegalArgumentException { - logger.debug("RangeState.validateRange"); + log.debug("RangeState.validateRange"); if (from < fromValid) { - logger.error( + log.error( "Invalid 'from'. " + from + " is smaller than " + fromValid); throw new IllegalArgumentException("error_feed_from_out_of_range"); } else if (to > toValid) { - logger.error( + log.error( "Invalid 'to'. " + to + " is bigger than " + toValid); throw new IllegalArgumentException("error_feed_to_out_of_range"); } @@ -566,7 +566,7 @@ protected boolean validateSingle(Artifact artifact) throws IllegalArgumentException { - logger.debug("WQSelect.validateSingle"); + log.debug("WQSelect.validateSingle"); WINFOArtifact flys = (WINFOArtifact) artifact; StateData data = getData(flys, WQ_SINGLE); @@ -585,7 +585,7 @@ all.add(Double.parseDouble(strValue)); } catch (NumberFormatException nfe) { - logger.warn(nfe, nfe); + log.warn(nfe, nfe); } } @@ -593,7 +593,7 @@ RiverUtils.WQ_MODE mode = RiverUtils.getWQMode(flys); - logger.debug("WQ Mode: " + mode); + log.debug("WQ Mode: " + mode); double[] minmax = null; @@ -613,8 +613,8 @@ double min = all.get(0); double max = all.get(all.size()-1); - logger.debug("Inserted min value = " + min); - logger.debug("Inserted max value = " + max); + log.debug("Inserted min value = " + min); + log.debug("Inserted max value = " + max); return validateBounds(minmax[0], minmax[1], min, max, 0d); } @@ -623,7 +623,7 @@ protected boolean validateRange(Artifact artifact) throws IllegalArgumentException { - logger.debug("WQSelect.validateRange"); + log.debug("WQSelect.validateRange"); WINFOArtifact flys = (WINFOArtifact) artifact; RiverUtils.WQ_MODE mode = RiverUtils.getWQMode(flys); @@ -689,7 +689,7 @@ double step) throws IllegalArgumentException { - logger.debug("WQSelect.validateGaugeW"); + log.debug("WQSelect.validateGaugeW"); double[] minmaxW = determineMinMaxW(artifact); @@ -715,7 +715,7 @@ double step) throws IllegalArgumentException { - logger.debug("WQSelect.validateGaugeQ"); + log.debug("WQSelect.validateGaugeQ"); double[] minmaxQ = determineMinMaxQAtGauge(artifact); @@ -741,7 +741,7 @@ double step) throws IllegalArgumentException { - logger.debug("WQSelect.validateFreeQ"); + log.debug("WQSelect.validateFreeQ"); double[] minmaxQ = determineMinMaxQ(artifact); @@ -767,7 +767,7 @@ double step) throws IllegalArgumentException { - logger.debug("WQSelect.validateFreeW"); + log.debug("WQSelect.validateFreeW"); double[] minmaxW = determineMinMaxWFree(artifact);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelGroundDifferences.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelGroundDifferences.java Fri Sep 05 12:58:17 2014 +0200 @@ -35,7 +35,7 @@ public static final double DEFAULT_STEP = 0d; - private static Logger logger = + private static Logger log = Logger.getLogger(WaterlevelGroundDifferences.class); @@ -88,7 +88,7 @@ maxVal = minmax[1]; } else { - logger.warn("Could not read min/max distance values!"); + log.warn("Could not read min/max distance values!"); } if (name.equals(LOWER_FIELD)) { @@ -168,7 +168,7 @@ double from, double to ) throws IllegalArgumentException { if (to < 0d) { - logger.error( + log.error( "Invalid 'to' " + to + " is lesser than zero."); throw new IllegalArgumentException("error_feed_from_out_of_range"); }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelInfoState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelInfoState.java Fri Sep 05 12:58:17 2014 +0200 @@ -33,8 +33,8 @@ extends DefaultState implements FacetTypes { - /** The logger that is used in this state. */ - private static Logger logger = Logger.getLogger(WaterlevelInfoState.class); + /** The log that is used in this state. */ + private static Logger log = Logger.getLogger(WaterlevelInfoState.class); @Override @@ -61,7 +61,7 @@ List<Facet> facets, Object old ) { - logger.debug("WaterlevelInfoState.compute"); + log.debug("WaterlevelInfoState.compute"); String id = getID(); CalculationResult res = old instanceof CalculationResult @@ -87,8 +87,8 @@ nameQ = "Q(" + nameQ + ")"; } - logger.debug("WaterlevelInfoState Create facet: " + nameW); - logger.debug("WaterlevelInfoState Create facet: " + nameQ); + log.debug("WaterlevelInfoState Create facet: " + nameW); + log.debug("WaterlevelInfoState Create facet: " + nameQ); Facet w = new WaterlevelFacet( i, LONGITUDINAL_W, nameW, ComputeType.ADVANCE, id, hash);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelPairSelectState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelPairSelectState.java Fri Sep 05 12:58:17 2014 +0200 @@ -35,8 +35,8 @@ extends DefaultState implements FacetTypes { - /** The logger that is used in this state. */ - private static Logger logger = Logger.getLogger( + /** The log that is used in this state. */ + private static Logger log = Logger.getLogger( WaterlevelPairSelectState.class); @@ -80,7 +80,7 @@ String name, CallContext context) { - logger.debug("createItems: " + name); + log.debug("createItems: " + name); if (name.equals("diffids")) { Element item = ProtocolUtils.createArtNode(cr, "item", null, null); Element label = ProtocolUtils.createArtNode(cr, "label", null, null);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelSelectState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelSelectState.java Fri Sep 05 12:58:17 2014 +0200 @@ -36,7 +36,7 @@ */ public class WaterlevelSelectState extends DefaultState { - private static final Logger logger = + private static final Logger log = Logger.getLogger(WaterlevelSelectState.class); public static final String SPLIT_CHAR = ";"; @@ -66,7 +66,7 @@ String val ) { if (!isValueValid(val)) { - logger.error("The given input string is not valid: '" + val + "'"); + log.error("The given input string is not valid: '" + val + "'"); return null; } @@ -163,17 +163,17 @@ } else { if (rawData == null) { - logger.error("Do not know how to handle null data " + + log.error("Do not know how to handle null data " + "from artifact class " + artifact.getClass()); } else { - logger.error("Do not know how to handle " + rawData.getClass()); + log.error("Do not know how to handle " + rawData.getClass()); } wkms = null; } if (wkms == null || wkms.length == 0) { - logger.error("No data for label generation."); + log.error("No data for label generation."); // This is critical, will fail without much grace later further down // the road. return new String[] {""}; @@ -183,7 +183,7 @@ try { idx = Integer.parseInt(parts[2]); if (wkms[idx] == null) { - logger.error("null label for " + value + " (" + parts[2] + ")"); + log.error("null label for " + value + " (" + parts[2] + ")"); return new String[] {""}; } String name = wkms[idx].getName(); @@ -191,7 +191,7 @@ return new String[] { StringUtil.wWrap(name) }; } catch (NumberFormatException nfe) { /* do nothing */ - logger.error("Cannot get label for " + value + " (" + parts[2] + ")"); + log.error("Cannot get label for " + value + " (" + parts[2] + ")"); return new String[] {""}; } } @@ -207,11 +207,11 @@ * false. */ public static boolean isValueValid(String value) { - logger.debug("Validate string: '" + value + "'"); + log.debug("Validate string: '" + value + "'"); value = StringUtil.unbracket(value); - logger.debug("Validate substring: '" + value + "'"); + log.debug("Validate substring: '" + value + "'"); if (value == null || value.length() == 0) { return false; @@ -235,7 +235,7 @@ Integer.parseInt(parts[2]); } catch (NumberFormatException nfe) { - logger.error("Index is not a valid integer!", nfe); + log.error("Index is not a valid integer!", nfe); } return true;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelState.java Fri Sep 05 12:58:17 2014 +0200 @@ -36,8 +36,8 @@ extends DefaultState implements FacetTypes { - /** The logger that is used in this state. */ - private static Logger logger = Logger.getLogger(WaterlevelState.class); + /** The log that is used in this state. */ + private static Logger log = Logger.getLogger(WaterlevelState.class); /** @@ -70,7 +70,7 @@ return res; } - boolean debug = logger.isDebugEnabled(); + boolean debug = log.isDebugEnabled(); WQKms [] wqkms = (WQKms []) res.getData(); @@ -88,8 +88,8 @@ } if (debug) { - logger.debug("Create facet: " + nameW); - logger.debug("Create facet: " + nameQ); + log.debug("Create facet: " + nameW); + log.debug("Create facet: " + nameQ); } Facet w = new WaterlevelFacet(
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/ExtremeCompute.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/ExtremeCompute.java Fri Sep 05 12:58:17 2014 +0200 @@ -41,8 +41,8 @@ extends DefaultState implements FacetTypes { - /** Private logger. */ - private static Logger logger = Logger.getLogger(ExtremeCompute.class); + /** Private log. */ + private static Logger log = Logger.getLogger(ExtremeCompute.class); public ExtremeCompute() { @@ -57,7 +57,7 @@ List<Facet> facets, Object old ) { - logger.debug("ExtremeCompute.computeAdvance"); + log.debug("ExtremeCompute.computeAdvance"); CalculationResult res; @@ -83,7 +83,7 @@ WQKms [] wqkms = (WQKms []) eres.getWQKms(); if (wqkms == null) { - logger.error("No computation result!"); + log.error("No computation result!"); return res; }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/ExtremeQInput.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/ExtremeQInput.java Fri Sep 05 12:58:17 2014 +0200 @@ -50,8 +50,8 @@ */ public class ExtremeQInput extends DefaultState { - /** The logger used in this state.*/ - private static Logger logger = Logger.getLogger(ExtremeQInput.class); + /** The log used in this state.*/ + private static Logger log = Logger.getLogger(ExtremeQInput.class); /** Trivial, empty constructor. */ @@ -81,7 +81,7 @@ String name, CallContext context) { - logger.debug("ExtremeQInput.createItems: " + name); + log.debug("ExtremeQInput.createItems: " + name); D4EArtifact flysArtifact = (D4EArtifact) artifact; @@ -95,7 +95,7 @@ int num = ranges != null ? ranges.size() : 0; if (num == 0) { - logger.warn("Selected distance matches no segments."); + log.warn("Selected distance matches no segments."); return null; } @@ -178,10 +178,10 @@ public boolean validate(Artifact artifact) throws IllegalArgumentException { - logger.debug("ExtremeQInput.validate"); + log.debug("ExtremeQInput.validate"); D4EArtifact flys = (D4EArtifact) artifact; - logger.debug("ExtremeQInput: " + getData(flys, "ranges")); + log.debug("ExtremeQInput: " + getData(flys, "ranges")); /* // TODO sort out what has to be validated (prevent negative values?). @@ -239,7 +239,7 @@ res[i] = Double.parseDouble(values[i]); } catch (NumberFormatException nfe) { - logger.warn(nfe, nfe); + log.warn(nfe, nfe); } }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/PercentInput.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/PercentInput.java Fri Sep 05 12:58:17 2014 +0200 @@ -20,8 +20,8 @@ */ public class PercentInput extends DefaultState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(PercentInput.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(PercentInput.class); public static final String PARAMETER_NAME = "percent";
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/AnalysisPeriods.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/AnalysisPeriods.java Fri Sep 05 12:58:17 2014 +0200 @@ -17,8 +17,8 @@ */ public class AnalysisPeriods extends DefaultState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(AnalysisPeriods.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(AnalysisPeriods.class); /**
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/EventSelect.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/EventSelect.java Fri Sep 05 12:58:17 2014 +0200 @@ -33,8 +33,8 @@ */ public class EventSelect extends DefaultState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(EventSelect.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(EventSelect.class); /** @@ -91,7 +91,7 @@ int value, FixingsOverview overview ) { - logger.debug("Create label for value: " + value); + log.debug("Create label for value: " + value); IdFilter filter = new IdFilter(value); List<Fixing.Column> columns = overview.filter(null, filter);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixRealizingCompute.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixRealizingCompute.java Fri Sep 05 12:58:17 2014 +0200 @@ -45,8 +45,8 @@ */ public class FixRealizingCompute extends DefaultState implements FacetTypes { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(FixRealizingCompute.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(FixRealizingCompute.class); public static final String I18N_WQ_CURVE = "fix.vollmer.wq.curve"; @@ -67,7 +67,7 @@ List<Facet> facets, Object old ) { - logger.debug("FixRealizingCompute.computeAdvance"); + log.debug("FixRealizingCompute.computeAdvance"); CalculationResult res;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixationPeriod.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixationPeriod.java Fri Sep 05 12:58:17 2014 +0200 @@ -17,8 +17,8 @@ */ public class FixationPeriod extends DefaultState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(FixationPeriod.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(FixationPeriod.class); /**
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/GaugeRange.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/GaugeRange.java Fri Sep 05 12:58:17 2014 +0200 @@ -17,8 +17,8 @@ */ public class GaugeRange extends DefaultState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(GaugeRange.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(GaugeRange.class); /**
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/LocationSelect.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/LocationSelect.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,8 +23,8 @@ */ public class LocationSelect extends RangeState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(LocationSelect.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(LocationSelect.class); /** * The default constructor that initializes an empty State object.
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/QSelect.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/QSelect.java Fri Sep 05 12:58:17 2014 +0200 @@ -17,8 +17,8 @@ */ public class QSelect extends DefaultState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(QSelect.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(QSelect.class); /**
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/ReferencePeriod.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/ReferencePeriod.java Fri Sep 05 12:58:17 2014 +0200 @@ -17,8 +17,8 @@ */ public class ReferencePeriod extends DefaultState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(ReferencePeriod.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(ReferencePeriod.class); /**
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/BedQualityPeriodsSelect.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/BedQualityPeriodsSelect.java Fri Sep 05 12:58:17 2014 +0200 @@ -14,8 +14,8 @@ public class BedQualityPeriodsSelect extends DefaultState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(BedQualityPeriodsSelect.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(BedQualityPeriodsSelect.class); /**
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/BedQualityState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/BedQualityState.java Fri Sep 05 12:58:17 2014 +0200 @@ -48,7 +48,7 @@ private static final long serialVersionUID = 1L; - private static final Logger logger = Logger + private static final Logger log = Logger .getLogger(BedQualityState.class); public static final String I18N_TOPLAYER = "bedquality.toplayer"; @@ -94,7 +94,7 @@ @Override public Object computeAdvance(D4EArtifact artifact, String hash, CallContext context, List<Facet> facets, Object old) { - logger.debug("BedQualityState.computeAdvance"); + log.debug("BedQualityState.computeAdvance"); List<Facet> newFacets = new ArrayList<Facet>(); @@ -110,12 +110,12 @@ BedQualityResult[] results = (BedQualityResult[]) res.getData(); if (results == null || results.length == 0) { - logger.warn("Calculation computed no results!"); + log.warn("Calculation computed no results!"); return res; } generateFacets(context, newFacets, results, getID(), hash); - logger.debug("Created " + newFacets.size() + " new Facets."); + log.debug("Created " + newFacets.size() + " new Facets."); generateDataFacets(context, newFacets, access, getID(), hash); facets.addAll(newFacets); @@ -250,7 +250,7 @@ protected void generateFacets(CallContext context, List<Facet> newFacets, BedQualityResult[] results, String stateId, String hash) { - logger.debug("BedQualityState.generateFacets"); + log.debug("BedQualityState.generateFacets"); CallMeta meta = context.getMeta();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/CharDiameter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/CharDiameter.java Fri Sep 05 12:58:17 2014 +0200 @@ -22,7 +22,7 @@ public class CharDiameter extends MultiStringArrayState { - private static final Logger logger = Logger.getLogger(CharDiameter.class); + private static final Logger log = Logger.getLogger(CharDiameter.class); public static final String UI_PROVIDER = "parameter-matrix";
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferencesState.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferencesState.java Fri Sep 05 12:58:17 2014 +0200 @@ -50,8 +50,8 @@ extends DefaultState implements FacetTypes { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(DifferencesState.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(DifferencesState.class); public static final String I18N_DIFF_YEAR = "beddifference.year"; public static final String I18N_FACET_BED_DIFF_YEAR = "facet.bedheight.diff.year"; @@ -74,7 +74,7 @@ @Override public Object computeAdvance(D4EArtifact artifact, String hash, CallContext context, List<Facet> facets, Object old) { - logger.debug("DifferencesState.computeAdvance"); + log.debug("DifferencesState.computeAdvance"); List<Facet> newFacets = new ArrayList<Facet>(); @@ -91,19 +91,19 @@ BedDifferencesResult[] results = (BedDifferencesResult[]) res.getData(); if (results == null || results.length == 0) { - logger.warn("Calculation computed no results!"); + log.warn("Calculation computed no results!"); return res; } generateFacets(context, newFacets, results, getID(), hash); - logger.debug("Created " + newFacets.size() + " new Facets."); + log.debug("Created " + newFacets.size() + " new Facets."); facets.addAll(newFacets); Calculation report = res.getReport(); if (report != null && report.hasProblems()) { facets.add(new ReportFacet(ComputeType.ADVANCE, hash, id)); - logger.warn("Problems: " + report.problemsToString()); + log.warn("Problems: " + report.problemsToString()); } return res; @@ -119,7 +119,7 @@ String stateId, String hash ) { - logger.debug("DifferencesState.generateFacets"); + log.debug("DifferencesState.generateFacets"); CallMeta meta = context.getMeta();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadDataCalculate.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadDataCalculate.java Fri Sep 05 12:58:17 2014 +0200 @@ -36,7 +36,7 @@ private static final long serialVersionUID = 1L; - private static final Logger logger = Logger + private static final Logger log = Logger .getLogger(SedimentLoadDataCalculate.class); public static final String I18N_FACET_SEDIMENTLOAD_COARSE = "facet.sedimentload.coarse"; @@ -75,7 +75,7 @@ @Override public Object computeAdvance(D4EArtifact artifact, String hash, CallContext context, List<Facet> facets, Object old) { - logger.debug("SedimentLoadDataCalculate.computeAdvance"); + log.debug("SedimentLoadDataCalculate.computeAdvance"); SedimentLoadAccess access = new SedimentLoadAccess(artifact); @@ -85,7 +85,7 @@ if (res == null) { - logger.error ("No calculation result."); + log.error ("No calculation result."); } if (facets == null) { @@ -97,12 +97,12 @@ if (report != null && report.hasProblems()) { facets.add(new ReportFacet(ComputeType.ADVANCE, hash, id)); - logger.warn ("Problems : " + report.problemsToString()); + log.warn ("Problems : " + report.problemsToString()); } Object raw = res.getData(); if (raw == null) { - logger.warn("No result data."); + log.warn("No result data."); return res; } @@ -110,14 +110,14 @@ if (raw instanceof SedimentLoadDataResult) { sdRes = (SedimentLoadDataResult) raw; } else { - logger.error ("Unknown result"); + log.error ("Unknown result"); return null; } String unit = access.getUnit().replace("_per_","/"); int i = 0; for (Fraction fract: sdRes.getFractions()) { - logger.debug("Adding facet for fraction '" + fract.getName() + + log.debug("Adding facet for fraction '" + fract.getName() + "' and period '" + fract.getPeriod() + "'"); facets.add(new SedimentLoadDataFacet(i, fract.getName(), unit, fract.getPeriod(),
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadEpochSelect.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadEpochSelect.java Fri Sep 05 12:58:17 2014 +0200 @@ -16,8 +16,8 @@ public class SedimentLoadEpochSelect extends DefaultState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(SedimentLoadEpochSelect.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(SedimentLoadEpochSelect.class); /**
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadOffEpochSelect.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadOffEpochSelect.java Fri Sep 05 12:58:17 2014 +0200 @@ -16,8 +16,8 @@ public class SedimentLoadOffEpochSelect extends DefaultState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(SedimentLoadOffEpochSelect.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(SedimentLoadOffEpochSelect.class); /**
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadUnit.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadUnit.java Fri Sep 05 12:58:17 2014 +0200 @@ -22,8 +22,8 @@ public class SedimentLoadUnit extends DefaultState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(SedimentLoadUnit.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(SedimentLoadUnit.class); /**
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadYearSelect.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadYearSelect.java Fri Sep 05 12:58:17 2014 +0200 @@ -22,8 +22,8 @@ public class SedimentLoadYearSelect extends DefaultState { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(SedimentLoadYearSelect.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(SedimentLoadYearSelect.class); /**
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/sq/OutlierMethod.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/sq/OutlierMethod.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,8 +23,8 @@ public class OutlierMethod extends DefaultState { - /** The logger that is used in this class.*/ - private static Logger logger = Logger.getLogger(OutlierMethod.class); + /** The log that is used in this class.*/ + private static Logger log = Logger.getLogger(OutlierMethod.class); public static final String STD_DEV = "outlier.method.std-dev"; public static final String GRUBBS = "outlier.method.grubbs";
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/sq/StaticSQRelationFacet.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/sq/StaticSQRelationFacet.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,7 +31,7 @@ private StaticSQRelation relation; - private static final Logger logger = + private static final Logger log = Logger.getLogger(StaticSQRelationFacet.class); public StaticSQRelationFacet( @@ -68,7 +68,7 @@ if (other == null) { // name is not really unique here but it's our only key // should not happen anyhow. - logger.error("Did not get data from: " + name); + log.error("Did not get data from: " + name); continue; } startingPoint = Math.min(other.getMinQ(), startingPoint);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/transitions/TransitionFactory.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/transitions/TransitionFactory.java Fri Sep 05 12:58:17 2014 +0200 @@ -24,8 +24,8 @@ */ public class TransitionFactory { - /** The logger used in this class */ - private static Logger logger = Logger.getLogger(TransitionFactory.class); + /** The log used in this class */ + private static Logger log = Logger.getLogger(TransitionFactory.class); /** The XPath to the classname of the transition */ public static final String XPATH_TRANSITION = "@transition"; @@ -64,13 +64,13 @@ transition.setTo(to); } catch (InstantiationException ie) { - logger.error(ie, ie); + log.error(ie, ie); } catch (IllegalAccessException iae) { - logger.error(iae, iae); + log.error(iae, iae); } catch (ClassNotFoundException cnfe) { - logger.error(cnfe, cnfe); + log.error(cnfe, cnfe); } return transition;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/transitions/ValueCompareTransition.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/transitions/ValueCompareTransition.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,7 +32,7 @@ */ public class ValueCompareTransition extends DefaultTransition { - /** The logger that is used in this transition.*/ + /** The log that is used in this transition.*/ private static Logger log = Logger.getLogger(ValueCompareTransition.class);
--- a/artifacts/src/main/java/org/dive4elements/river/collections/AttributeParser.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/collections/AttributeParser.java Fri Sep 05 12:58:17 2014 +0200 @@ -43,7 +43,7 @@ "/art:attribute/art:outputs/art:output"; - private static Logger logger = Logger.getLogger(AttributeParser.class); + private static Logger log = Logger.getLogger(AttributeParser.class); protected Document attributeDocument; @@ -58,7 +58,7 @@ public void parse() { - logger.debug("AttributeParser.parse"); + log.debug("AttributeParser.parse"); attribute = new CollectionAttribute(); @@ -70,7 +70,7 @@ int num = outs != null ? outs.getLength() : 0; - logger.debug("Attribute has " + num + " outputs."); + log.debug("Attribute has " + num + " outputs."); for (int i = 0; i < num; i++) { Node out = outs.item(i); @@ -112,14 +112,14 @@ String name = ((Element)out).getAttribute("name"); if (name.length() == 0) { - logger.warn("No Output name specified. Cancel parsing!"); + log.warn("No Output name specified. Cancel parsing!"); return; } Output o = attribute.getOutput(name); if (o == null) { - logger.debug("Create new output: " + name); + log.debug("Create new output: " + name); o = new DefaultOutput(name, null, null); attribute.addOutput(name, o); @@ -146,7 +146,7 @@ Node settingsNode = getChild((Element)out, "settings"); if (settingsNode == null) { - logger.debug("No Settings found for Output '" + outname + "'"); + log.debug("No Settings found for Output '" + outname + "'"); return; } @@ -163,7 +163,7 @@ int num = themes.getLength(); - logger.debug("Output has " + num + " themes."); + log.debug("Output has " + num + " themes."); for (int i = 0; i < num; i++) { Element theme = (Element) themes.item(i);
--- a/artifacts/src/main/java/org/dive4elements/river/collections/AttributeWriter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/collections/AttributeWriter.java Fri Sep 05 12:58:17 2014 +0200 @@ -57,7 +57,7 @@ protected CollectionAttribute attribute; - private static Logger logger = Logger.getLogger(AttributeWriter.class); + private static Logger log = Logger.getLogger(AttributeWriter.class); /** @@ -102,7 +102,7 @@ */ protected CollectionAttribute write() { - boolean debug = logger.isDebugEnabled(); + boolean debug = log.isDebugEnabled(); for (Map.Entry<String, Output> entry: newAttr.entrySet()) { String outName = entry.getKey(); @@ -115,9 +115,9 @@ attribute.clearFacets(outName); if (debug) { - logger.debug("Merge Output: " + outName); - logger.debug(" old Facets: " + oldFacets.size()); - logger.debug(" new Facets: " + newFacets.size()); + log.debug("Merge Output: " + outName); + log.debug(" old Facets: " + oldFacets.size()); + log.debug(" new Facets: " + newFacets.size()); } writeOutput(a.getName(), newFacets, oldFacets); @@ -142,10 +142,10 @@ ) { List<String> compatFacets = this.compatibilities.get(outputName); - if (logger.isDebugEnabled() && compatFacets != null) { - logger.debug("Compabitle Facets:"); + if (log.isDebugEnabled() && compatFacets != null) { + log.debug("Compabitle Facets:"); for (String compatible: compatFacets) { - logger.debug( "- " + compatible); + log.debug( "- " + compatible); } } @@ -153,7 +153,7 @@ writeFacets(outputName, newOutFacets, oldOutFacets, compatFacets); } catch (ArtifactDatabaseException ade) { - logger.error(ade, ade); + log.error(ade, ade); } } @@ -172,7 +172,7 @@ throws ArtifactDatabaseException { if (compatibleFacets == null) { - logger.warn("No compatible facets, not generating out " + outputName + "."); + log.warn("No compatible facets, not generating out " + outputName + "."); return false; } @@ -183,33 +183,33 @@ List<ManagedFacet> currentFacets = new ArrayList<ManagedFacet>(); List<ManagedFacet> genuinelyNewFacets = new ArrayList<ManagedFacet>(); - boolean debug = logger.isDebugEnabled(); + boolean debug = log.isDebugEnabled(); if (debug) { - logger.debug("Compatible facets are " + compatibleFacets); + log.debug("Compatible facets are " + compatibleFacets); } for (Facet fac: newFacets) { ManagedFacet facet = (ManagedFacet) fac; if (debug) { - logger.debug("Try to add Facet: " + facet.getName()); + log.debug("Try to add Facet: " + facet.getName()); } String bondage = facet.getBoundToOut(); if (bondage != null && bondage.equals(outputName)) { - logger.debug("Adding bound facet regardless of compatibility: " + + log.debug("Adding bound facet regardless of compatibility: " + facet.getName()); } else if (!compatibleFacets.contains(facet.getName())) { - logger.debug("Have incompatible facet, skip: " + facet.getName()); + log.debug("Have incompatible facet, skip: " + facet.getName()); continue; } else if (facet.getBoundToOut() != null && !facet.getBoundToOut().equals(outputName)) { - logger.debug("Skip facet " + facet.getName() + + log.debug("Skip facet " + facet.getName() + " because it is bound to: " + facet.getBoundToOut()); continue; } else { - logger.debug("Facet is bound to: " + facet.getBoundToOut()); - logger.debug("Have compatible facet: " + facet.getName()); + log.debug("Facet is bound to: " + facet.getBoundToOut()); + log.debug("Have compatible facet: " + facet.getName()); } ManagedFacet picked = pickFacet(facet, oldFacets); @@ -219,7 +219,7 @@ genuinelyNewFacets.add(picked); } else { - logger.debug("Skip clone facet that shall be present in two outs"); + log.debug("Skip clone facet that shall be present in two outs"); } } else { @@ -251,7 +251,7 @@ if (newMF.getPosition() == oldMF.getPosition()) { conflicts = true; if (debug) { - logger.debug( + log.debug( "Positional conflict while merging " + "facets, pushing newest facet 1 up (" + newMF.getPosition() + ")"); @@ -327,7 +327,7 @@ protected ManagedFacet pickFacet(ManagedFacet facet, List<Facet> oldFacets) { if (oldFacets == null) { - logger.debug("No old facets to compare a new to found."); + log.debug("No old facets to compare a new to found."); return facet; }
--- a/artifacts/src/main/java/org/dive4elements/river/collections/CollectionAttribute.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/collections/CollectionAttribute.java Fri Sep 05 12:58:17 2014 +0200 @@ -37,8 +37,8 @@ */ public class CollectionAttribute { - /** Privately owned logger. */ - private static final Logger logger = + /** Privately owned log. */ + private static final Logger log = Logger.getLogger(CollectionAttribute.class); protected ElementCreator ec; @@ -95,19 +95,19 @@ public void setSettings(String outputKey, Settings settings) { if (settings == null) { - logger.warn("Tried to set empty Settings for '" + outputKey + "'"); + log.warn("Tried to set empty Settings for '" + outputKey + "'"); return; } if (outputMap == null) { - logger.warn("Tried to add settings but no Outputs are existing yet."); + log.warn("Tried to add settings but no Outputs are existing yet."); return; } Output output = outputMap.get(outputKey); if (output == null) { - logger.warn("Tried to add settings for unknown Output: " + outputKey); + log.warn("Tried to add settings for unknown Output: " + outputKey); return; } @@ -117,23 +117,23 @@ public void addFacet(String outputKey, Facet facet) { if (facet == null) { - logger.warn("Tried to add null facet."); + log.warn("Tried to add null facet."); return; } if (outputMap == null) { - logger.warn("Tried to add facet but no Outputs are existing yet."); + log.warn("Tried to add facet but no Outputs are existing yet."); return; } Output output = outputMap.get(outputKey); if (output == null) { - logger.warn("Tried to add facet for unknown Output: " + outputKey); + log.warn("Tried to add facet for unknown Output: " + outputKey); return; } - logger.debug("Add facet for '" + outputKey + "': " + facet.getName()); + log.debug("Add facet for '" + outputKey + "': " + facet.getName()); output.addFacet(facet); } @@ -147,18 +147,18 @@ /** Empty facets list for outputKey output. */ public void clearFacets(String outputKey) { if (outputKey == null || outputKey.length() == 0) { - logger.warn("Tried to clear Facets, but no Output key specified!"); + log.warn("Tried to clear Facets, but no Output key specified!"); return; } if (outputMap == null) { - logger.warn("Tried to clear Facets, but no Outputs existing!"); + log.warn("Tried to clear Facets, but no Outputs existing!"); return; } Output output = outputMap.get(outputKey); if (output == null) { - logger.warn("Tried to clear Facets for unknown Out: " + outputKey); + log.warn("Tried to clear Facets for unknown Out: " + outputKey); return; } @@ -196,12 +196,12 @@ public Output getOutput(String name) { if (name == null || name.length() == 0) { - logger.warn("No Output name specified."); + log.warn("No Output name specified."); return null; } if (outputMap == null || outputMap.isEmpty()) { - logger.warn("Tried to retrieve Output, but no Outputs existing."); + log.warn("Tried to retrieve Output, but no Outputs existing."); return null; } @@ -211,19 +211,19 @@ public List<Facet> getFacets(String output) { if (output == null || output.length() == 0) { - logger.warn("No Output name specified."); + log.warn("No Output name specified."); return new ArrayList<Facet>(); } if (outputMap == null) { - logger.warn("Tried to retrieve facets, but no Outputs existing."); + log.warn("Tried to retrieve facets, but no Outputs existing."); return new ArrayList<Facet>(); } Output o = outputMap.get(output); if (o == null) { - logger.warn("No Output '" + output + "' existing."); + log.warn("No Output '" + output + "' existing."); return new ArrayList<Facet>(); } @@ -235,7 +235,7 @@ List<Facet> allFacets = new ArrayList<Facet>(); if (outputMap == null || outputMap.isEmpty()) { - logger.warn("No Outputs existing."); + log.warn("No Outputs existing."); return allFacets; } @@ -249,11 +249,11 @@ protected void appendOutputs(Element root) { if (outputMap == null || outputMap.isEmpty()) { - logger.warn("No outputs to append."); + log.warn("No outputs to append."); return; } - logger.debug("Append " + outputMap.size() + " Output Elements."); + log.debug("Append " + outputMap.size() + " Output Elements."); Element outputsEl = ec.create("outputs"); @@ -267,11 +267,11 @@ protected void appendOutput(Element root, String name, Output output) { if (name == null || name.length() == 0 || output == null) { - logger.warn("Tried to appendOutput, but Output is invalid."); + log.warn("Tried to appendOutput, but Output is invalid."); return; } - logger.debug("Append Output Element for '" + name + "'"); + log.debug("Append Output Element for '" + name + "'"); Element outputEl = ec.create("output"); ec.addAttr(outputEl, "name", name); @@ -285,7 +285,7 @@ protected void appendSettings(Element root, Settings settings) { if (settings == null) { - logger.warn("Tried to append Settings, but Settings is empty!"); + log.warn("Tried to append Settings, but Settings is empty!"); return; } @@ -295,13 +295,13 @@ protected void appendFacets(Element root, List<Facet> facets) { if (facets == null || facets.isEmpty()) { - logger.warn("Tried to append 0 Facets."); + log.warn("Tried to append 0 Facets."); return; } Document owner = root.getOwnerDocument(); - logger.debug("Append " + facets.size() + " facets."); + log.debug("Append " + facets.size() + " facets."); for (Facet facet: facets) { Node facetNode = facet.toXML(owner); @@ -315,7 +315,7 @@ protected void appendLoadedRecommendations(Element root) { if (loadedRecommendations == null) { - logger.debug("No loaded recommendations existing yet."); + log.debug("No loaded recommendations existing yet."); return; }
--- a/artifacts/src/main/java/org/dive4elements/river/collections/CollectionDescriptionHelper.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/collections/CollectionDescriptionHelper.java Fri Sep 05 12:58:17 2014 +0200 @@ -30,7 +30,7 @@ public class CollectionDescriptionHelper { - private static final Logger logger = + private static final Logger log = Logger.getLogger(CollectionDescriptionHelper.class); @@ -137,7 +137,7 @@ } } catch (ArtifactDatabaseException dbe) { - logger.warn(dbe, dbe); + log.warn(dbe, dbe); } } @@ -153,7 +153,7 @@ protected Element buildArtifactNode(String uuid) throws ArtifactDatabaseException { - logger.debug("Append artifact '" + uuid + "' to collection description"); + log.debug("Append artifact '" + uuid + "' to collection description"); // TODO String hash = "MYHASH";
--- a/artifacts/src/main/java/org/dive4elements/river/collections/D4EArtifactCollection.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/collections/D4EArtifactCollection.java Fri Sep 05 12:58:17 2014 +0200 @@ -50,7 +50,7 @@ * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> */ public class D4EArtifactCollection extends DefaultArtifactCollection { - /** The logger used in this class. */ + /** The log used in this class. */ private static Logger log = Logger.getLogger(D4EArtifactCollection.class); /** Constant XPath that points to the outputmodes of an artifact. */
--- a/artifacts/src/main/java/org/dive4elements/river/collections/OutputParser.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/collections/OutputParser.java Fri Sep 05 12:58:17 2014 +0200 @@ -38,7 +38,7 @@ public static final String XPATH_ARTIFACT_OUTPUTMODES = "/art:result/art:outputmodes/art:output"; - private static Logger logger = Logger.getLogger(OutputParser.class); + private static Logger log = Logger.getLogger(OutputParser.class); protected ArtifactDatabase db; protected CallMeta meta; @@ -71,17 +71,17 @@ public void parse(String uuid) throws ArtifactDatabaseException { - logger.debug("OutputParser.parse: " + uuid); + log.debug("OutputParser.parse: " + uuid); D4EArtifact flys = (D4EArtifact) db.getRawArtifact(uuid); List<Output> outList = flys.getOutputs(context); - logger.debug(" has " + outList.size() + " Outputs."); + log.debug(" has " + outList.size() + " Outputs."); for (Output out: outList) { String name = out.getName(); - logger.debug("Process Output '" + name + "'"); + log.debug("Process Output '" + name + "'"); Output o = outs.get(name); int pos = 1; @@ -96,7 +96,7 @@ outs.put(name, o); } else { - logger.debug("OutputParser.parse: Use 'old' Output"); + log.debug("OutputParser.parse: Use 'old' Output"); pos = o.getFacets().size() + 1; } @@ -135,7 +135,7 @@ { List<Facet> newFacets = new ArrayList<Facet>(old.size()); - logger.debug("There are " + old.size() + " Facets for this Output."); + log.debug("There are " + old.size() + " Facets for this Output."); for (Facet f: old) { newFacets.add(new ManagedFacetAdapter(f, uuid, pos++, 1, 1));
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ATExporter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ATExporter.java Fri Sep 05 12:58:17 2014 +0200 @@ -37,7 +37,7 @@ public class ATExporter implements OutGenerator { - private static Logger logger = Logger.getLogger(ATExporter.class); + private static Logger log = Logger.getLogger(ATExporter.class); public static final String DEFAULT_ENCODING = "UTF-8"; @@ -55,7 +55,7 @@ @Override public void setup(Object config) { - logger.debug("ATExporter.setup"); + log.debug("ATExporter.setup"); } @Override @@ -89,7 +89,7 @@ public void generate() throws IOException { if (data == null) { - logger.debug("no W/Q data"); + log.debug("no W/Q data"); return; }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ATWriter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ATWriter.java Fri Sep 05 12:58:17 2014 +0200 @@ -36,7 +36,7 @@ /** Write AT files. */ public class ATWriter { - private static Logger logger = Logger.getLogger(ATWriter.class); + private static Logger log = Logger.getLogger(ATWriter.class); public static final int COLUMNS = 10; @@ -58,7 +58,7 @@ } catch (FunctionEvaluationException aode) { // should not happen - logger.error("spline interpolation failed", aode); + log.error("spline interpolation failed", aode); return Double.NaN; } } @@ -155,8 +155,8 @@ int [] bounds = wq.longestIncreasingWRangeIndices(); - if (logger.isDebugEnabled()) { - logger.debug("exporting " + (isCalculation ? "calculated " : "") + + if (log.isDebugEnabled()) { + log.debug("exporting " + (isCalculation ? "calculated " : "") + "w between indices " + bounds[0] + " and " + bounds[1] + " (" + (int)Math.ceil(wq.getW(bounds[0])) + ", " + (int)Math.floor(wq.getW(bounds[1]))+ ")"); @@ -209,10 +209,10 @@ int startW = minW - rest; - if (logger.isDebugEnabled()) { - logger.debug("startW: " + startW); - logger.debug("rest: " + rest); - logger.debug("maxW: " + maxW); + if (log.isDebugEnabled()) { + log.debug("startW: " + startW); + log.debug("rest: " + rest); + log.debug("maxW: " + maxW); } int col = 0;
--- a/artifacts/src/main/java/org/dive4elements/river/exports/AbstractExporter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/AbstractExporter.java Fri Sep 05 12:58:17 2014 +0200 @@ -44,8 +44,8 @@ */ public abstract class AbstractExporter implements OutGenerator { - /** The logger used in this exporter.*/ - private static Logger logger = Logger.getLogger(AbstractExporter.class); + /** The log used in this exporter.*/ + private static Logger log = Logger.getLogger(AbstractExporter.class); /* XXX: Why does AbstractExporter do not implement FacetTypes? */ public static String FIX_PARAMETERS = "fix_parameters"; @@ -140,7 +140,7 @@ protected abstract void addData(Object data); public void setup(Object config) { - logger.debug("AbstractExporter.setup"); + log.debug("AbstractExporter.setup"); } @@ -151,7 +151,7 @@ OutputStream out, CallContext context ) { - logger.debug("AbstractExporter.init"); + log.debug("AbstractExporter.init"); this.outName = outName; this.request = request; @@ -198,10 +198,10 @@ ) { String name = artifactFacet.getFacetName(); - logger.debug("AbstractExporter.doOut: " + name); + log.debug("AbstractExporter.doOut: " + name); if (!isFacetValid(name)) { - logger.warn("Facet '" + name + "' not valid. No output created!"); + log.warn("Facet '" + name + "' not valid. No output created!"); return; } @@ -216,7 +216,7 @@ public void generate() throws IOException { - logger.debug("AbstractExporter.generate"); + log.debug("AbstractExporter.generate"); if (facet == null) { throw new IOException("invalid (null) facet for exporter"); @@ -244,7 +244,7 @@ * @return true, if <i>facet</i> is valid, otherwise false. */ protected boolean isFacetValid(String facet) { - logger.debug("AbstractExporter.isFacetValid : " + facet + " (" + getFacet() + ")" ); + log.debug("AbstractExporter.isFacetValid : " + facet + " (" + getFacet() + ")" ); String thisFacet = getFacet(); @@ -308,7 +308,7 @@ protected void generateCSV() throws IOException { - logger.info("AbstractExporter.generateCSV"); + log.info("AbstractExporter.generateCSV"); char quote = '"'; char escape = '\\'; @@ -331,7 +331,7 @@ protected void generatePDF() throws IOException { - logger.info("AbstractExporter.generatePDF"); + log.info("AbstractExporter.generatePDF"); writePDF(this.out); }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -89,7 +89,7 @@ */ public abstract class ChartGenerator implements OutGenerator { - private static Logger logger = Logger.getLogger(ChartGenerator.class); + private static Logger log = Logger.getLogger(ChartGenerator.class); public static final int DEFAULT_CHART_WIDTH = 600; public static final int DEFAULT_CHART_HEIGHT = 400; @@ -163,7 +163,7 @@ @Override public void setup(Object config) { - logger.debug("ChartGenerator.setup"); + log.debug("ChartGenerator.setup"); } /** @@ -212,7 +212,7 @@ AxisDataset dataset = getAxisDataset( new Integer(annotation.getAxisSymbol())); if (dataset == null) { - logger.warn("Annotation should stick to unfindable y-axis: " + log.warn("Annotation should stick to unfindable y-axis: " + annotation.getAxisSymbol()); rendererIndex = 0; } @@ -422,10 +422,10 @@ * @param plot Plot to add annotations to. */ protected void addAnnotationsToRenderer(XYPlot plot) { - logger.debug("addAnnotationsToRenderer"); + log.debug("addAnnotationsToRenderer"); if (annotations == null || annotations.isEmpty()) { - logger.debug("addAnnotationsToRenderer: no annotations."); + log.debug("addAnnotationsToRenderer: no annotations."); return; } @@ -610,7 +610,7 @@ ThemeDocument theme, boolean visible ){ - logger.debug("doAnnotations"); + log.debug("doAnnotations"); // Add all annotations to our annotation pool. annotations.setTheme(theme); @@ -618,7 +618,7 @@ annotations.setLabel(aandf.getFacetDescription()); } else { - logger.error( + log.error( "Art/Facet for Annotations is null. " + "This should never happen!"); } @@ -636,7 +636,7 @@ public void generate() throws IOException { - logger.debug("ChartGenerator.generate"); + log.debug("ChartGenerator.generate"); JFreeChart chart = generateChart(); @@ -687,7 +687,7 @@ @Override public void init(String outName, Document request, OutputStream out, CallContext context) { - logger.debug("ChartGenerator.init"); + log.debug("ChartGenerator.init"); this.outName = outName; this.request = request; @@ -1301,15 +1301,15 @@ Bounds[] xyBounds = ChartHelper.getBounds(dataset); if (xyBounds == null) { - logger.warn("Skip XYDataset for Axis (invalid ranges): " + idx); + log.warn("Skip XYDataset for Axis (invalid ranges): " + idx); return; } if (visible) { - if (logger.isDebugEnabled()) { - logger.debug("Add new AxisDataset at index: " + idx); - logger.debug("X extent: " + xyBounds[0]); - logger.debug("Y extent: " + xyBounds[1]); + if (log.isDebugEnabled()) { + log.debug("Add new AxisDataset at index: " + idx); + log.debug("X extent: " + xyBounds[0]); + log.debug("Y extent: " + xyBounds[1]); } axisDataset.addDataset(dataset); @@ -1461,7 +1461,7 @@ size[1] = Integer.parseInt(h); } catch (NumberFormatException nfe) { - logger.warn("Wrong values for chart width/height."); + log.warn("Wrong values for chart width/height."); } } } @@ -1559,7 +1559,7 @@ * @param plot plot to add datasets to. */ protected void addDatasets(XYPlot plot) { - logger.debug("addDatasets()"); + log.debug("addDatasets()"); // AxisDatasets are sorted, but some might be empty. // Thus, generate numbering on the fly. @@ -1631,7 +1631,7 @@ * @param idx The index of the renderer / dataset. */ protected void applyLineTheme(XYPlot plot, XYDataset dataset, int idx) { - logger.debug("Apply LineTheme for dataset at index: " + idx); + log.debug("Apply LineTheme for dataset at index: " + idx); LegendItemCollection lic = new LegendItemCollection(); LegendItemCollection anno = plot.getFixedLegendItems(); @@ -1666,7 +1666,7 @@ lic.add(legendItem); } else { - logger.warn("Could not get LegentItem for renderer: " + log.warn("Could not get LegentItem for renderer: " + idx + ", series-idx " + s); } } @@ -1696,7 +1696,7 @@ Font legendFont = createLegendLabelFont(); - logger.debug("Registering an 'area'renderer at idx: " + idx); + log.debug("Registering an 'area'renderer at idx: " + idx); StableXYDifferenceRenderer dRenderer = new StableXYDifferenceRenderer(); @@ -1721,7 +1721,7 @@ lic.add(legendItem); } else { - logger.warn("Could not get LegentItem for renderer: " + log.warn("Could not get LegentItem for renderer: " + idx + ", series-idx " + 0); } @@ -1762,7 +1762,7 @@ * @return a new instance of EnhancedLineAndShapeRenderer. */ protected XYLineAndShapeRenderer createRenderer(XYPlot plot, int idx) { - logger.debug("Create EnhancedLineAndShapeRenderer for idx: " + idx); + log.debug("Create EnhancedLineAndShapeRenderer for idx: " + idx); EnhancedLineAndShapeRenderer r = new EnhancedLineAndShapeRenderer(true, false);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator2.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator2.java Fri Sep 05 12:58:17 2014 +0200 @@ -79,7 +79,7 @@ */ public abstract class ChartGenerator2 implements OutGenerator { - private static Logger logger = Logger.getLogger(ChartGenerator2.class); + private static Logger log = Logger.getLogger(ChartGenerator2.class); public static final boolean USE_NOP_GRAPHICS = Boolean.getBoolean("info.rendering.nop.graphics"); @@ -259,7 +259,7 @@ @Override public void generate() throws IOException { - logger.debug("ChartGenerator2.generate"); + log.debug("ChartGenerator2.generate"); if (outName.indexOf("chartinfo") > 0) { generateInfo(); @@ -273,7 +273,7 @@ /** Generate only meta infos */ private void generateInfo() throws IOException { - logger.debug("ChartInfoGenerator2.generateInfo"); + log.debug("ChartInfoGenerator2.generateInfo"); JFreeChart chart = generateChart(); @@ -308,8 +308,8 @@ long stopTime = System.currentTimeMillis(); - if (logger.isDebugEnabled()) { - logger.debug("Rendering info took: " + + if (log.isDebugEnabled()) { + log.debug("Rendering info took: " + (stopTime-startTime) + "ms"); } @@ -322,7 +322,7 @@ /** Generate the diagram as an image. */ private void generateImage() throws IOException { - logger.debug("ChartGenerator2.generateImage"); + log.debug("ChartGenerator2.generateImage"); JFreeChart chart = generateChart(); @@ -373,7 +373,7 @@ @Override public void init(String outName, Document request, OutputStream out, CallContext context) { - logger.debug("ChartGenerator2.init"); + log.debug("ChartGenerator2.init"); this.outName = outName; this.request = request; @@ -949,15 +949,15 @@ Bounds[] xyBounds = ChartHelper.getBounds(dataset); if (xyBounds == null) { - logger.warn("Skip XYDataset for Axis (invalid ranges): " + idx); + log.warn("Skip XYDataset for Axis (invalid ranges): " + idx); return; } if (visible) { - if (logger.isDebugEnabled()) { - logger.debug("Add new AxisDataset at index: " + idx); - logger.debug("X extent: " + xyBounds[0]); - logger.debug("Y extent: " + xyBounds[1]); + if (log.isDebugEnabled()) { + log.debug("Add new AxisDataset at index: " + idx); + log.debug("X extent: " + xyBounds[0]); + log.debug("Y extent: " + xyBounds[1]); } axisDataset.addDataset(dataset); @@ -1109,7 +1109,7 @@ size[1] = Integer.parseInt(h); } catch (NumberFormatException nfe) { - logger.warn("Wrong values for chart width/height."); + log.warn("Wrong values for chart width/height."); } } } @@ -1207,7 +1207,7 @@ * @param plot plot to add datasets to. */ protected void addDatasets(XYPlot plot) { - logger.debug("addDatasets()"); + log.debug("addDatasets()"); // AxisDatasets are sorted, but some might be empty. // Thus, generate numbering on the fly. @@ -1279,7 +1279,7 @@ * @param idx The index of the renderer / dataset. */ protected void applyLineTheme(XYPlot plot, XYDataset dataset, int idx) { - logger.debug("Apply LineTheme for dataset at index: " + idx); + log.debug("Apply LineTheme for dataset at index: " + idx); LegendItemCollection lic = new LegendItemCollection(); LegendItemCollection anno = plot.getFixedLegendItems(); @@ -1314,7 +1314,7 @@ lic.add(legendItem); } else { - logger.warn("Could not get LegentItem for renderer: " + log.warn("Could not get LegentItem for renderer: " + idx + ", series-idx " + s); } } @@ -1344,7 +1344,7 @@ Font legendFont = createLegendLabelFont(); - logger.debug("Registering an 'area'renderer at idx: " + idx); + log.debug("Registering an 'area'renderer at idx: " + idx); StableXYDifferenceRenderer dRenderer = new StableXYDifferenceRenderer(); @@ -1369,7 +1369,7 @@ lic.add(legendItem); } else { - logger.warn("Could not get LegentItem for renderer: " + log.warn("Could not get LegentItem for renderer: " + idx + ", series-idx " + 0); } @@ -1410,7 +1410,7 @@ * @return a new instance of EnhancedLineAndShapeRenderer. */ protected XYLineAndShapeRenderer createRenderer(XYPlot plot, int idx) { - logger.debug("Create EnhancedLineAndShapeRenderer for idx: " + idx); + log.debug("Create EnhancedLineAndShapeRenderer for idx: " + idx); EnhancedLineAndShapeRenderer r = new EnhancedLineAndShapeRenderer(true, false);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartHelper.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartHelper.java Fri Sep 05 12:58:17 2014 +0200 @@ -27,7 +27,7 @@ */ public class ChartHelper { - private static final Logger logger = Logger.getLogger(ChartHelper.class); + private static final Logger log = Logger.getLogger(ChartHelper.class); /** @@ -42,7 +42,7 @@ int seriesCount = dataset != null ? dataset.getSeriesCount() : 0; if (seriesCount == 0) { - logger.warn("Dataset is empty or has no Series set."); + log.warn("Dataset is empty or has no Series set."); return null; } @@ -59,7 +59,7 @@ double y = dataset.getYValue(i, j); if (Double.isNaN(x) || Double.isNaN(y)) { - logger.warn("Item " + j + " in Series " + i + " is broken"); + log.warn("Item " + j + " in Series " + i + " is broken"); continue; } @@ -99,7 +99,7 @@ return getBounds((TimeSeriesCollection) dataset); } else { - logger.warn("Unknown XYDataset instance: " + dataset.getClass()); + log.warn("Unknown XYDataset instance: " + dataset.getClass()); return null; } } @@ -109,7 +109,7 @@ int seriesCount = collection != null ? collection.getSeriesCount() : 0; if (seriesCount == 0) { - logger.warn("TimeSeriesCollection is empty or has no Series set."); + log.warn("TimeSeriesCollection is empty or has no Series set."); return null; }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartInfoGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartInfoGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -53,8 +53,8 @@ public static final boolean USE_NOP_GRAPHICS = Boolean.getBoolean("info.rendering.nop.graphics"); - /** The logger used in this generator.*/ - private static Logger logger = + /** The log used in this generator.*/ + private static Logger log = Logger.getLogger(ChartInfoGenerator.class); @@ -70,7 +70,7 @@ } public void setup(Object config) { - logger.debug("ChartInfoGenerator.setup"); + log.debug("ChartInfoGenerator.setup"); } @@ -130,7 +130,7 @@ public void generate() throws IOException { - logger.debug("ChartInfoGenerator.generate"); + log.debug("ChartInfoGenerator.generate"); JFreeChart chart = generator.generateChart(); @@ -165,8 +165,8 @@ long stopTime = System.currentTimeMillis(); - if (logger.isDebugEnabled()) { - logger.debug("Rendering info took: " + + if (log.isDebugEnabled()) { + log.debug("Rendering info took: " + (stopTime-startTime) + "ms"); }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartSection.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartSection.java Fri Sep 05 12:58:17 2014 +0200 @@ -16,7 +16,7 @@ */ public class ChartSection extends TypeSection { - private static Logger logger = Logger.getLogger(ChartSection.class); + private static Logger log = Logger.getLogger(ChartSection.class); public static final String TITLE_ATTR = "title"; public static final String SUBTITLE_ATTR = "subtitle"; @@ -59,7 +59,7 @@ /** Set Property-value for display-logo property. */ public void setDisplayLogo(String logo) { - logger.debug("Setting Display logo string."); + log.debug("Setting Display logo string."); setChoiceStringValue(DISPLAYLOGO_ATTR, logo, "logo"); }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartSettings.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartSettings.java Fri Sep 05 12:58:17 2014 +0200 @@ -27,7 +27,7 @@ */ public class ChartSettings extends DefaultSettings { - private static final Logger logger = Logger.getLogger(ChartSettings.class); + private static final Logger log = Logger.getLogger(ChartSettings.class); protected ChartSection chartSection; protected LegendSection legendSection; @@ -170,7 +170,7 @@ */ public static ChartSettings parse(Node settings) { if (settings == null) { - logger.warn("Tried to parse ChartSettings from empty Node!"); + log.warn("Tried to parse ChartSettings from empty Node!"); return null; } @@ -192,7 +192,7 @@ int num = axesList != null ? axesList.getLength() : 0; if (num <= 0) { - logger.debug("No axis sections found."); + log.debug("No axis sections found."); return; } @@ -213,14 +213,14 @@ String up = XMLUtils.xpathString(axis, "upper", null); String sugLabel = XMLUtils.xpathString(axis, "suggested-label", null); - if (logger.isDebugEnabled()) { - logger.debug("Found axis id: '" + id + "'"); - logger.debug("Found axis label: '" + label + "'"); - logger.debug("Found axis font size: '" + fSize + "'"); - logger.debug("Found axis fixation: '" + fixation + "'"); - logger.debug("Found axis lower: '" + low + "'"); - logger.debug("Found axis upper: '" + up + "'"); - logger.debug("Found axis sug. label:'" + sugLabel + "'"); + if (log.isDebugEnabled()) { + log.debug("Found axis id: '" + id + "'"); + log.debug("Found axis label: '" + label + "'"); + log.debug("Found axis font size: '" + fSize + "'"); + log.debug("Found axis fixation: '" + fixation + "'"); + log.debug("Found axis lower: '" + low + "'"); + log.debug("Found axis upper: '" + up + "'"); + log.debug("Found axis sug. label:'" + sugLabel + "'"); } section.setIdentifier(id); @@ -249,13 +249,13 @@ String placeh = XMLUtils.xpathString(chart, "chart/logo-placeh", null); String placev = XMLUtils.xpathString(chart, "chart/logo-placev", null); - if (logger.isDebugEnabled()) { - logger.debug("Found chart title: '" + title + "'"); - logger.debug("Found chart subtitle: '" + sub + "'"); - logger.debug("Found chart grid: '" + grid + "'"); - logger.debug("Found chart logo: '" + logo + "'"); - logger.debug("Found chart logo placeh: '" + placeh + "'"); - logger.debug("Found chart logo placev: '" + placev + "'"); + if (log.isDebugEnabled()) { + log.debug("Found chart title: '" + title + "'"); + log.debug("Found chart subtitle: '" + sub + "'"); + log.debug("Found chart grid: '" + grid + "'"); + log.debug("Found chart logo: '" + logo + "'"); + log.debug("Found chart logo placeh: '" + placeh + "'"); + log.debug("Found chart logo placev: '" + placev + "'"); } chartSection.setTitle(title); @@ -276,10 +276,10 @@ String fSize = XMLUtils.xpathString(legend, "legend/font-size", null); String lthre = XMLUtils.xpathString(legend, "legend/aggregation-threshold", null); - if (logger.isDebugEnabled()) { - logger.debug("Found legend visibility: '" + vis + "'"); - logger.debug("Found legend font size : '" + fSize + "'"); - logger.debug("Found legend aggregation threshold : '" + lthre + "'"); + if (log.isDebugEnabled()) { + log.debug("Found legend visibility: '" + vis + "'"); + log.debug("Found legend font size : '" + fSize + "'"); + log.debug("Found legend aggregation threshold : '" + lthre + "'"); } section.setVisibility(Boolean.valueOf(vis)); @@ -296,9 +296,9 @@ String width = XMLUtils.xpathString(export, "export/width", null); String height = XMLUtils.xpathString(export, "export/height", null); - if (logger.isDebugEnabled()) { - logger.debug("Found export width : '" + width + "'"); - logger.debug("Found export height: '" + height + "'"); + if (log.isDebugEnabled()) { + log.debug("Found export width : '" + width + "'"); + log.debug("Found export height: '" + height + "'"); } section.setWidth(Integer.valueOf(width.length() > 0 ? width : "-1"));
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveExporter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveExporter.java Fri Sep 05 12:58:17 2014 +0200 @@ -53,8 +53,8 @@ */ public class ComputedDischargeCurveExporter extends AbstractExporter { - /** The logger used in this exporter.*/ - private static Logger logger = + /** The log used in this exporter.*/ + private static Logger log = Logger.getLogger(ComputedDischargeCurveExporter.class); public static final String CSV_W_HEADER = @@ -99,7 +99,7 @@ data.add((WQKms)d); referenceWQ = (WQKms)d; } else { - logger.warn("Can't add data for export. Unkown data type " + + log.warn("Can't add data for export. Unkown data type " + d.getClass().getName()); return; } @@ -113,7 +113,7 @@ double[] kms = rangeAccess.getKmRange(); Gauge gauge = river.determineGaugeByPosition(kms[0]); - logger.debug("Kms 0: " + kms[0]); + log.debug("Kms 0: " + kms[0]); if (Math.abs(kms[0] - gauge.getStation().doubleValue()) < 1e-4) { gaugeName = gauge.getName(); gaugeDatum = gauge.getDatum().doubleValue(); @@ -141,7 +141,7 @@ } protected void writeCSVData(CSVWriter writer) { - logger.info("ComputedDischargeCurveExporter.writeData"); + log.info("ComputedDischargeCurveExporter.writeData"); writeCSVHeader(writer); @@ -166,7 +166,7 @@ protected void writeCSVHeader(CSVWriter writer) { - logger.debug("ComputedDischargeCurveExporter.writeCSVHeader"); + log.debug("ComputedDischargeCurveExporter.writeCSVHeader"); RangeAccess access = new RangeAccess((D4EArtifact)master); double[] km = access.getLocations(); @@ -225,7 +225,7 @@ JasperExportManager.exportReportToPdfStream(print, out); } catch(JRException je) { - logger.warn("Error generating PDF Report!"); + log.warn("Error generating PDF Report!"); je.printStackTrace(); } }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -42,8 +42,8 @@ extends DischargeCurveGenerator implements FacetTypes { - /** The logger used in this generator. */ - private static Logger logger = + /** The log used in this generator. */ + private static Logger log = Logger.getLogger(ComputedDischargeCurveGenerator.class); public static final String I18N_CHART_TITLE = @@ -106,10 +106,10 @@ ) { String name = artifactFacet.getFacetName(); - logger.debug("ComputedDischargeCurveGenerator.doOut: " + name); + log.debug("ComputedDischargeCurveGenerator.doOut: " + name); if (name == null) { - logger.warn("Broken facet in computed discharge out generation."); + log.warn("Broken facet in computed discharge out generation."); return; } @@ -160,7 +160,7 @@ visible); } else { - logger.warn("Unknown facet type for computed discharge: " + name); + log.warn("Unknown facet type for computed discharge: " + name); return; } } @@ -176,7 +176,7 @@ ThemeDocument theme, boolean visible ) { - logger.debug("ComputedDischargeCurveGenerator: doWQOut"); + log.debug("ComputedDischargeCurveGenerator: doWQOut"); XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), theme); if (wq instanceof double[][]) { double [][] data = (double [][]) wq; @@ -201,7 +201,7 @@ ThemeDocument theme, boolean visible ) { - logger.debug("ComputedDischargeCurveGenerator: doDischargeQOut"); + log.debug("ComputedDischargeCurveGenerator: doDischargeQOut"); XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), theme); double subtractPNP = getCurrentGaugeDatum(); @@ -233,7 +233,7 @@ ThemeDocument theme, boolean visible ) { - logger.debug("ComputedDischargeCurveGenerator: doQOut (add W/Q data)."); + log.debug("ComputedDischargeCurveGenerator: doQOut (add W/Q data)."); XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), theme); StyledSeriesBuilder.addPointsQW(series, wqkms); @@ -283,7 +283,7 @@ List<StickyAxisAnnotation> xy = new ArrayList<StickyAxisAnnotation>(); // Try to find them as WKms as well... if (wqkms instanceof double[][]) { - logger.debug("its double[][] time, baby"); + log.debug("its double[][] time, baby"); double [][] data = (double [][]) wqkms; // TODO Do we need interpolation? for (int i = 0; i< data[0].length; i++) { @@ -295,7 +295,7 @@ aandf, theme, visible); } else { - logger.debug("its wkms time, baby"); + log.debug("its wkms time, baby"); WKms data = (WKms) wqkms; // Assume its WKms. // XXX DEAD CODE // double location = getRange()[0];
--- a/artifacts/src/main/java/org/dive4elements/river/exports/CrossSectionGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/CrossSectionGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -47,8 +47,8 @@ extends LongitudinalSectionGenerator implements FacetTypes { - /** The logger that is used in this generator. */ - private static Logger logger = + /** The log that is used in this generator. */ + private static Logger log = Logger.getLogger(CrossSectionGenerator.class); public static final String I18N_CHART_TITLE = @@ -132,7 +132,7 @@ km }; - logger.debug("Locale: " + Resources.getLocale(context.getMeta())); + log.debug("Locale: " + Resources.getLocale(context.getMeta())); return msg(I18N_CHART_SUBTITLE, "", args); } @@ -158,7 +158,7 @@ } else { // Default. - logger.debug("Unknown zone type found."); + log.debug("Unknown zone type found."); return new Color(255, 0, 0); } } @@ -259,10 +259,10 @@ ) { String name = artifactFacet.getFacetName(); - logger.debug("CrossSectionGenerator.doOut: " + name); + log.debug("CrossSectionGenerator.doOut: " + name); if (name == null) { - logger.error("No facet name for doOut(). No output generated!"); + log.error("No facet name for doOut(). No output generated!"); return; } @@ -305,7 +305,7 @@ attr, visible, YAXIS.W.idx); } else { - logger.warn("CrossSection.doOut: Unknown facet name: " + name); + log.warn("CrossSection.doOut: Unknown facet name: " + name); return; } } @@ -331,7 +331,7 @@ ThemeDocument theme, boolean visible ) { - logger.debug("CrossSectionGenerator.doCrossSectionWaterLineOut"); + log.debug("CrossSectionGenerator.doCrossSectionWaterLineOut"); Lines.LineData lines = (Lines.LineData) o; // DO NOT SORT DATA! This destroys the gaps indicated by NaNs. @@ -390,12 +390,12 @@ ThemeDocument theme, boolean visible ) { - logger.debug("CrossSectionGenerator.doHyk"); + log.debug("CrossSectionGenerator.doHyk"); List<HYKFactory.Zone> zones = (List<HYKFactory.Zone>) o; if (zones == null || zones.isEmpty()) { - logger.warn("CrossSectionGenerator.doHYK: empty zone list received."); + log.warn("CrossSectionGenerator.doHYK: empty zone list received."); return; } @@ -418,7 +418,7 @@ ThemeDocument theme, boolean visible ) { - logger.debug("CrossSectionGenerator.doCrossSectionOut"); + log.debug("CrossSectionGenerator.doCrossSectionOut"); XYSeries series = new StyledXYSeries(seriesName, theme);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -98,8 +98,8 @@ public static final int AXIS_SPACE = 5; - /** The logger that is used in this generator. */ - private static Logger logger = Logger.getLogger(DiagramGenerator.class); + /** The log that is used in this generator. */ + private static Logger log = Logger.getLogger(DiagramGenerator.class); protected List<Marker> domainMarkers = new ArrayList<Marker>(); @@ -136,7 +136,7 @@ public void setup(Object config) { if (!(config instanceof DiagramAttributes)) { - logger.error("invalid config type"); + log.error("invalid config type"); return; } DiagramAttributes da = (DiagramAttributes)config; @@ -162,9 +162,9 @@ if (dx != null) { inverted = (Boolean)dx.isInverted() .evaluate((D4EArtifact)getMaster(), context); - logger.debug("setInvertedFromConfig: " + inverted); + log.debug("setInvertedFromConfig: " + inverted); } else { - logger.debug("setInvertedFromConfig no domain axis found?"); + log.debug("setInvertedFromConfig no domain axis found?"); } } @@ -173,7 +173,7 @@ */ @Override public JFreeChart generateChart() { - logger.debug("DiagramGenerator.generateChart"); + log.debug("DiagramGenerator.generateChart"); JFreeChart chart = ChartFactory.createXYLineChart( getChartTitle(), @@ -265,7 +265,7 @@ protected void addLogo(XYPlot plot) { String logo = showLogo(); if (logo == null) { - logger.debug("No logo to show chosen"); + log.debug("No logo to show chosen"); return; } @@ -311,7 +311,7 @@ yPos = ((Double)getYBounds(0).getUpper() + (Double)getYBounds(0).getLower())/2d; } else { - logger.debug("Unknown place-v value: " + placev); + log.debug("Unknown place-v value: " + placev); } if (placeh == null || placeh.equals("none")) { @@ -327,10 +327,10 @@ xPos = ((Double)getXBounds(0).getUpper() + (Double)getXBounds(0).getLower())/2d; } else { - logger.debug("Unknown place-h value: " + placeh); + log.debug("Unknown place-h value: " + placeh); } - logger.debug("logo position: " + xPos + "/" + yPos); + log.debug("logo position: " + xPos + "/" + yPos); org.jfree.ui.RectangleAnchor anchor = org.jfree.ui.RectangleAnchor.TOP; @@ -396,7 +396,7 @@ @Override protected AxisDataset createAxisDataset(int idx) { - logger.debug("Create new AxisDataset for index: " + idx); + log.debug("Create new AxisDataset for index: " + idx); return new AxisDataset(idx); } @@ -405,17 +405,17 @@ * Put debug output about datasets. */ public void debugDatasets(XYPlot plot) { - logger.debug("Number of datasets: " + plot.getDatasetCount()); + log.debug("Number of datasets: " + plot.getDatasetCount()); for (int i = 0, P = plot.getDatasetCount(); i < P; i++) { if (plot.getDataset(i) == null) { - logger.debug("Dataset #" + i + " is null"); + log.debug("Dataset #" + i + " is null"); continue; } - logger.debug("Dataset #" + i + ":" + plot.getDataset(i)); + log.debug("Dataset #" + i + ":" + plot.getDataset(i)); XYSeriesCollection series = (XYSeriesCollection) plot.getDataset(i); - logger.debug("X-Extend of Dataset: " + series.getSeries(0).getMinX() + log.debug("X-Extend of Dataset: " + series.getSeries(0).getMinX() + " " + series.getSeries(0).getMaxX()); - logger.debug("Y-Extend of Dataset: " + series.getSeries(0).getMinY() + log.debug("Y-Extend of Dataset: " + series.getSeries(0).getMinY() + " " + series.getSeries(0).getMaxY()); } } @@ -425,12 +425,12 @@ * Put debug output about axes. */ public void debugAxis(XYPlot plot) { - logger.debug("..............."); + log.debug("..............."); for (int i = 0, P = plot.getRangeAxisCount(); i < P; i++) { if (plot.getRangeAxis(i) == null) - logger.debug("Range-Axis #" + i + " == null"); + log.debug("Range-Axis #" + i + " == null"); else { - logger.debug("Range-Axis " + i + " != null [" + + log.debug("Range-Axis " + i + " != null [" + plot.getRangeAxis(i).getRange().getLowerBound() + " " + plot.getRangeAxis(i).getRange().getUpperBound() + "]"); @@ -438,15 +438,15 @@ } for (int i = 0, P = plot.getDomainAxisCount(); i < P; i++) { if (plot.getDomainAxis(i) == null) - logger.debug("Domain-Axis #" + i + " == null"); + log.debug("Domain-Axis #" + i + " == null"); else { - logger.debug("Domain-Axis " + i + " != null [" + + log.debug("Domain-Axis " + i + " != null [" + plot.getDomainAxis(i).getRange().getLowerBound() + " " + plot.getDomainAxis(i).getRange().getUpperBound() + "]"); } } - logger.debug("..............."); + log.debug("..............."); } /** @@ -467,7 +467,7 @@ */ public void addAreaSeries(StyledAreaSeriesCollection area, int index, boolean visible) { if (area == null) { - logger.warn("Cannot yet render above/under curve."); + log.warn("Cannot yet render above/under curve."); return; } @@ -494,7 +494,7 @@ return; } - logger.debug("Y Range of XYSeries: " + + log.debug("Y Range of XYSeries: " + series.getMinY() + " | " + series.getMaxY()); addAxisDataset(new XYMetaSeriesCollection(series), index, visible); @@ -576,7 +576,7 @@ @Override protected void combineXBounds(Bounds bounds, int index) { if (!(bounds instanceof DoubleBounds)) { - logger.warn("Unsupported Bounds type: " + bounds.getClass()); + log.warn("Unsupported Bounds type: " + bounds.getClass()); return; } @@ -601,7 +601,7 @@ @Override protected void combineYBounds(Bounds bounds, int index) { if (!(bounds instanceof DoubleBounds)) { - logger.warn("Unsupported Bounds type: " + bounds.getClass()); + log.warn("Unsupported Bounds type: " + bounds.getClass()); return; } @@ -628,7 +628,7 @@ */ private void recoverEmptyPlot(XYPlot plot) { if (plot.getRangeAxis() == null) { - logger.debug("debug: No range axis"); + log.debug("debug: No range axis"); plot.setRangeAxis(createYAxis(0)); } } @@ -645,7 +645,7 @@ if (b != null && b.getLower().equals(b.getUpper())) { - logger.debug("Check whether to expand a x axis.i ("+b.getLower() + "-" + b.getUpper()+")"); + log.debug("Check whether to expand a x axis.i ("+b.getLower() + "-" + b.getUpper()+")"); setXBounds(key, ChartHelper.expandBounds(b, 5)); } } @@ -662,7 +662,7 @@ * @param plot The XYPlot. */ protected void autoZoom(XYPlot plot) { - logger.debug("Zoom to specified ranges."); + log.debug("Zoom to specified ranges."); Range xrange = getDomainAxisRange(); Range yrange = getValueAxisRange(); @@ -691,11 +691,11 @@ } if (yaxis == null) { - logger.debug("Zoom problem: no Y Axis for index: " + i); + log.debug("Zoom problem: no Y Axis for index: " + i); continue; } - logger.debug("Prepare zoom settings for y axis at index: " + i); + log.debug("Prepare zoom settings for y axis at index: " + i); zoomY(plot, yaxis, getYBounds(Integer.valueOf(i)), yrange); } } @@ -705,7 +705,7 @@ String[] ranges = getDomainAxisRangeFromRequest(); if (ranges == null || ranges.length < 2) { - logger.debug("No zoom range for domain axis specified."); + log.debug("No zoom range for domain axis specified."); return null; } @@ -715,7 +715,7 @@ double to = Double.parseDouble(ranges[1]); if (from == 0 && to == 0) { - logger.debug("No range specified. Lower and upper X == 0"); + log.debug("No range specified. Lower and upper X == 0"); return null; } @@ -728,7 +728,7 @@ return new Range(from, to); } catch (NumberFormatException nfe) { - logger.warn("Wrong values for domain axis range."); + log.warn("Wrong values for domain axis range."); } } @@ -740,7 +740,7 @@ String[] ranges = getValueAxisRangeFromRequest(); if (ranges == null || ranges.length < 2) { - logger.debug("No range specified. Lower and upper Y == 0"); + log.debug("No range specified. Lower and upper Y == 0"); return null; } @@ -750,7 +750,7 @@ double to = Double.parseDouble(ranges[1]); if (from == 0 && to == 0) { - logger.debug("No range specified. Lower and upper Y == 0"); + log.debug("No range specified. Lower and upper Y == 0"); return null; } @@ -759,7 +759,7 @@ : new Range(from, to); } catch (NumberFormatException nfe) { - logger.warn("Wrong values for value axis range."); + log.warn("Wrong values for value axis range."); } } @@ -797,7 +797,7 @@ Bounds computed = calculateZoom(bounds, x); computed.applyBounds(axis, AXIS_SPACE); - logger.debug("Zoom axis to: " + computed); + log.debug("Zoom axis to: " + computed); return true; } @@ -817,11 +817,11 @@ double min = bounds.getLower().doubleValue(); double max = bounds.getUpper().doubleValue(); - if (logger.isDebugEnabled()) { - logger.debug("Minimum is: " + min); - logger.debug("Maximum is: " + max); - logger.debug("Lower zoom is: " + range.getLowerBound()); - logger.debug("Upper zoom is: " + range.getUpperBound()); + if (log.isDebugEnabled()) { + log.debug("Minimum is: " + min); + log.debug("Maximum is: " + max); + log.debug("Lower zoom is: " + range.getLowerBound()); + log.debug("Upper zoom is: " + range.getUpperBound()); } double diff = max > min ? max - min : min - max; @@ -842,18 +842,18 @@ */ @Override public Range[] getRangesForAxis(int index) { - logger.debug("getRangesForAxis " + index); + log.debug("getRangesForAxis " + index); Bounds rx = getXBounds(Integer.valueOf(0)); Bounds ry = getYBounds(Integer.valueOf(index)); if (rx == null) { - logger.warn("Range for x axis not set." + + log.warn("Range for x axis not set." + " Using default values: 0 - 1."); rx = new DoubleBounds(0, 1); } if (ry == null) { - logger.warn("Range for y" + index + + log.warn("Range for y" + index + " axis not set. Using default values: 0 - 1."); ry = new DoubleBounds(0, 1); } @@ -922,7 +922,7 @@ xaxis.setLabelFont(labelFont); xaxis.setTickLabelFont(labelFont); - logger.debug("Adjusting xAxis. Inverted?: " + inverted); + log.debug("Adjusting xAxis. Inverted?: " + inverted); if (inverted) { xaxis.setInverted(true); } @@ -944,7 +944,7 @@ localizeDomainAxis(axis); } else { - logger.warn("Domain axis at " + i + " is null."); + log.warn("Domain axis at " + i + " is null."); } } @@ -955,7 +955,7 @@ localizeRangeAxis(axis); } else { - logger.warn("Range axis at " + i + " is null."); + log.warn("Range axis at " + i + " is null."); } } } @@ -1094,7 +1094,7 @@ @Override protected String getDefaultYAxisLabel(String axisName) { Set labelSet = axesLabels.get(diagramAttributes.getAxisIndex(axisName)); - logger.debug("Labels for axis: " + labelSet); + log.debug("Labels for axis: " + labelSet); if (labelSet != null && !labelSet.isEmpty()) { String label = StringUtils.join(labelSet, ", "); Matcher units = UNIT_PATTERN.matcher(label); @@ -1194,11 +1194,11 @@ /* A conservative security check */ if (facetName == null || facet == null) { /* Can't happen,.. */ - logger.error("doOut called with null facet."); + log.error("doOut called with null facet."); return; } - logger.debug("DoOut for facet: " + facetName); + log.debug("DoOut for facet: " + facetName); boolean found = false; List<Processor> prL = diagramAttributes.getProcessors(); @@ -1220,11 +1220,11 @@ } } if (!found) { - logger.warn("No processor found for: " + facetName); - if (logger.isDebugEnabled()) { - logger.debug("Configured processors for this diagram are:"); + log.warn("No processor found for: " + facetName); + if (log.isDebugEnabled()) { + log.debug("Configured processors for this diagram are:"); for (Processor pr: prL) { - logger.debug(pr.getClass().getName()); + log.debug(pr.getClass().getName()); } } }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -57,8 +57,8 @@ } } - /** The logger used in this generator. */ - private static Logger logger = + /** The log used in this generator. */ + private static Logger log = Logger.getLogger(DischargeCurveGenerator.class); public static final String I18N_CHART_TITLE = @@ -87,7 +87,7 @@ Gauge gauge = RiverUtils.getRiver(artifact).determineGauge(km-0.1d, km+0.1d); if (gauge == null) { - logger.error("No Gauge could be found at station " + km + "!"); + log.error("No Gauge could be found at station " + km + "!"); return 0d; } double subtractPNP = 0d; @@ -154,7 +154,7 @@ fixedWinMRange.getUpperBound()); } - logger.debug("Syncing Axis Bounds. Bounds W: " + boundsInMGauge.toString() + + log.debug("Syncing Axis Bounds. Bounds W: " + boundsInMGauge.toString() + " Bounds Wcm: " + boundsInCM.toString()); double datum = getCurrentGaugeDatum(); @@ -174,7 +174,7 @@ // Set the new combined bounds setYBounds(YAXIS.W.idx, boundsInMGauge); setYBounds(YAXIS.WCm.idx, boundsInCM); - logger.debug("Synced Bounds W: " + boundsInMGauge.toString() + + log.debug("Synced Bounds W: " + boundsInMGauge.toString() + " Bounds Wcm: " + boundsInCM.toString()); } @@ -237,7 +237,7 @@ if (getCurrentGaugeDatum() == 0d) { return; } - logger.debug("Translate some river annotation."); + log.debug("Translate some river annotation."); double translate = getCurrentGaugeDatum(); double factor = 100d; for (StickyAxisAnnotation annotation: riverAnnotation.getAxisTextAnnotations()){ @@ -258,7 +258,7 @@ boolean visible ) { String name = artifactFacet.getFacetName(); - logger.debug("DischargeCurveGenerator.doOut: " + name); + log.debug("DischargeCurveGenerator.doOut: " + name); MiscDischargeProcessor dProcessor = new MiscDischargeProcessor(getRange()[0]); if (dProcessor.canHandle(name)) { @@ -286,7 +286,7 @@ visible); } else { - logger.warn("DischargeCurveGenerator.doOut: Unknown facet name: " + name); + log.warn("DischargeCurveGenerator.doOut: Unknown facet name: " + name); return; } } @@ -302,7 +302,7 @@ ThemeDocument theme, boolean visible) { - logger.debug("DischargeCurveGenerator.doDischargeOut"); + log.debug("DischargeCurveGenerator.doDischargeOut"); WQKms wqkms = (WQKms) o; String gaugeName = wqkms.getName(); @@ -310,14 +310,14 @@ River river = RiverUtils.getRiver(artifact); if (river == null) { - logger.debug("no river found"); + log.debug("no river found"); return; } Gauge gauge = river.determineGaugeByName(gaugeName); if (gauge == null) { - logger.debug("no gauge found"); + log.debug("no gauge found"); return; } @@ -339,7 +339,7 @@ ThemeDocument theme, boolean visible ) { - logger.debug("DischargeCurveGenerator: doQOut (add W/Q data)."); + log.debug("DischargeCurveGenerator: doQOut (add W/Q data)."); XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), theme); StyledSeriesBuilder.addPointsQW(series, (WQKms) wqkms); @@ -400,7 +400,7 @@ ThemeDocument theme, boolean visible ) { - logger.debug("DischargeCurveGenerator: doWQOut"); + log.debug("DischargeCurveGenerator: doWQOut"); double [][] data = (double [][]) wq; String title = aaf.getFacetDescription();
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DischargeLongitudinalSectionExporter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/DischargeLongitudinalSectionExporter.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,8 +23,8 @@ */ public class DischargeLongitudinalSectionExporter extends WaterlevelExporter { - /** The logger used in this exporter.*/ - private static Logger logger = + /** The log used in this exporter.*/ + private static Logger log = Logger.getLogger(DischargeLongitudinalSectionExporter.class); @@ -63,7 +63,7 @@ boolean atGauge, boolean isQ ) { - logger.info("WaterlevelExporter.writeCSVHeader"); + log.info("WaterlevelExporter.writeCSVHeader"); writer.writeNext(new String[] { msg(CSV_KM_HEADER, DEFAULT_CSV_KM_HEADER), @@ -81,7 +81,7 @@ boolean atGauge, boolean isQ ) { - logger.debug("WaterlevelExporter.wQKms2CSV"); + log.debug("WaterlevelExporter.wQKms2CSV"); int size = wqkms.size(); double[] result = new double[4];
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DurationCurveExporter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/DurationCurveExporter.java Fri Sep 05 12:58:17 2014 +0200 @@ -47,8 +47,8 @@ */ public class DurationCurveExporter extends AbstractExporter { - /** The logger used in this exporter. */ - private static Logger logger = Logger.getLogger(DurationCurveExporter.class); + /** The log used in this exporter. */ + private static Logger log = Logger.getLogger(DurationCurveExporter.class); public static final String CSV_DURATION_HEADER = @@ -86,7 +86,7 @@ protected void writeCSVData(CSVWriter writer) { - logger.info("DurationCurveExporter.writeData"); + log.info("DurationCurveExporter.writeData"); writeCSVHeader(writer); @@ -97,7 +97,7 @@ protected void writeCSVHeader(CSVWriter writer) { - logger.info("DurationCurveExporter.writeCSVHeader"); + log.info("DurationCurveExporter.writeCSVHeader"); writer.writeNext(new String[] { msg(CSV_W_HEADER, DEFAULT_CSV_W_HEADER), @@ -108,7 +108,7 @@ protected void wQDay2CSV(CSVWriter writer, WQDay wqday) { - logger.debug("DurationCurveExporter.wQDay2CSV"); + log.debug("DurationCurveExporter.wQDay2CSV"); int size = wqday.size(); @@ -189,7 +189,7 @@ JasperExportManager.exportReportToPdfStream(print, out); } catch(JRException je) { - logger.warn("Error generating PDF Report!"); + log.warn("Error generating PDF Report!"); je.printStackTrace(); } }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DurationCurveGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/DurationCurveGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -45,8 +45,8 @@ } } - /** Local logger. */ - private static Logger logger = + /** Local log. */ + private static Logger log = Logger.getLogger(DurationCurveGenerator.class); public static final String I18N_CHART_TITLE = @@ -178,10 +178,10 @@ ) { String name = artifactFacet.getFacetName(); - logger.debug("DurationCurveGenerator.doOut: " + name); + log.debug("DurationCurveGenerator.doOut: " + name); if (name == null || name.length() == 0) { - logger.error("No facet given. Cannot create dataset."); + log.error("No facet given. Cannot create dataset."); return; } @@ -223,7 +223,7 @@ attr, visible, YAXIS.W.idx); } else { - logger.warn("Unknown facet name: " + name); + log.warn("Unknown facet name: " + name); return; } } @@ -241,7 +241,7 @@ ThemeDocument theme, boolean visible ) { - logger.debug("DurationCurveGenerator.doWOut"); + log.debug("DurationCurveGenerator.doWOut"); XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), theme); @@ -262,7 +262,7 @@ ThemeDocument theme, boolean visible ){ - logger.debug("DurationCurveGenerator.doPointOut"); + log.debug("DurationCurveGenerator.doPointOut"); XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); @@ -284,7 +284,7 @@ ThemeDocument theme, boolean visible ) { - logger.debug("DurationCurveGenerator.doQOut"); + log.debug("DurationCurveGenerator.doQOut"); XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), theme);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityExporter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityExporter.java Fri Sep 05 12:58:17 2014 +0200 @@ -29,7 +29,7 @@ */ public class FlowVelocityExporter extends AbstractExporter { - private static final Logger logger = + private static final Logger log = Logger.getLogger(FlowVelocityExporter.class); @@ -64,7 +64,7 @@ d = ((CalculationResult) d).getData(); if (d instanceof FlowVelocityData[]) { - logger.debug("Add new data of type FlowVelocityData"); + log.debug("Add new data of type FlowVelocityData"); data.add((FlowVelocityData[]) d); } } @@ -73,8 +73,8 @@ @Override protected void writeCSVData(CSVWriter writer) { - logger.info("FlowVelocityExporter.writeCSVData"); - logger.debug("CSV gets " + data.size() + " FlowVelocityData objects."); + log.info("FlowVelocityExporter.writeCSVData"); + log.debug("CSV gets " + data.size() + " FlowVelocityData objects."); writeCSVHeader(writer); @@ -97,7 +97,7 @@ protected void data2CSV(CSVWriter writer, FlowVelocityData[] fData) { - logger.debug("Add next FlowVelocityData to CSV"); + log.debug("Add next FlowVelocityData to CSV"); D4EArtifact flys = (D4EArtifact) master; @@ -122,7 +122,7 @@ @Override protected void writePDF(OutputStream out) { - logger.error("TODO: Implement FlowVelocityExporter.writePDF"); + log.error("TODO: Implement FlowVelocityExporter.writePDF"); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :
--- a/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveExporter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveExporter.java Fri Sep 05 12:58:17 2014 +0200 @@ -48,7 +48,7 @@ */ public class HistoricalDischargeCurveExporter extends AbstractExporter { - private static final Logger logger = + private static final Logger log = Logger.getLogger(HistoricalDischargeCurveExporter.class); @@ -84,18 +84,18 @@ @Override protected void addData(Object d) { - logger.debug("Add data of class: " + d.getClass()); + log.debug("Add data of class: " + d.getClass()); if (d instanceof CalculationResult) { d = ((CalculationResult) d).getData(); - logger.debug("Internal data of CalculationResult: " + d.getClass()); + log.debug("Internal data of CalculationResult: " + d.getClass()); if (d instanceof HistoricalDischargeData) { d = (WQTimerange[]) ((HistoricalDischargeData) d).getWQTimeranges(); if (d instanceof WQTimerange[]) { - logger.debug("Add new data of type WQTimerange"); + log.debug("Add new data of type WQTimerange"); data.add((WQTimerange[]) d); } } @@ -105,8 +105,8 @@ @Override protected void writeCSVData(CSVWriter writer) { - logger.info("HistoricalDischargeCurveExporter.writeCSVData"); - logger.debug("CSV gets " + data.size() + " WQTimerange[] objects."); + log.info("HistoricalDischargeCurveExporter.writeCSVData"); + log.debug("CSV gets " + data.size() + " WQTimerange[] objects."); writeCSVHeader(writer); @@ -138,7 +138,7 @@ JasperExportManager.exportReportToPdfStream(print, out); } catch(JRException je) { - logger.warn("Error generating PDF Report!"); + log.warn("Error generating PDF Report!"); je.printStackTrace(); } } @@ -159,7 +159,7 @@ protected void wqt2CSV(CSVWriter writer, WQTimerange wqt) { - logger.debug("Add next WQTimerange to CSV"); + log.debug("Add next WQTimerange to CSV"); DateFormat df = Formatter.getMediumDateFormat(context); NumberFormat wf = Formatter.getHistoricalDischargeW(context);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -44,7 +44,7 @@ public class HistoricalDischargeCurveGenerator extends TimeseriesChartGenerator implements FacetTypes { - private static Logger logger = Logger + private static Logger log = Logger .getLogger(HistoricalDischargeCurveGenerator.class); public static final String I18N_CHART_TITLE = "chart.historical.discharge.title"; @@ -129,8 +129,8 @@ public void doOut(ArtifactAndFacet artifactFacet, ThemeDocument theme, boolean visible) { String name = artifactFacet.getFacetName(); - logger.debug("HistoricalDischargeCurveGenerator.doOut: " + name); - logger.debug("Theme description is: " + log.debug("HistoricalDischargeCurveGenerator.doOut: " + name); + log.debug("Theme description is: " + artifactFacet.getFacetDescription()); if (name.equals(HISTORICAL_DISCHARGE_Q)) { @@ -168,14 +168,14 @@ visible, axis); } else { - logger.warn("doOut(): unknown facet name: " + name); + log.warn("doOut(): unknown facet name: " + name); return; } } protected void doHistoricalDischargeOutQ(D4EArtifact artifact, Object data, String desc, ThemeDocument theme, boolean visible) { - logger.debug("doHistoricalDischargeOut(): description = " + desc); + log.debug("doHistoricalDischargeOut(): description = " + desc); WQTimerange wqt = (WQTimerange) data; @@ -187,7 +187,7 @@ protected void doHistoricalDischargeOutW(D4EArtifact artifact, Object data, String desc, ThemeDocument theme, boolean visible) { - logger.debug("doHistoricalDischargeOut(): description = " + desc); + log.debug("doHistoricalDischargeOut(): description = " + desc); WQTimerange wqt = (WQTimerange) data; @@ -199,7 +199,7 @@ protected void doHistoricalDischargeDifferenceOutQ(D4EArtifact artifact, Object data, String desc, ThemeDocument theme, boolean visible) { - logger.debug("doHistoricalDischargeDifferenceOut: desc = " + desc); + log.debug("doHistoricalDischargeDifferenceOut: desc = " + desc); HistoricalWQTimerange wqt = (HistoricalWQTimerange) data; @@ -211,7 +211,7 @@ protected void doHistoricalDischargeDifferenceOutW(D4EArtifact artifact, Object data, String desc, ThemeDocument theme, boolean visible) { - logger.debug("doHistoricalDischargeDifferenceOut: desc = " + desc); + log.debug("doHistoricalDischargeDifferenceOut: desc = " + desc); HistoricalWQTimerange wqt = (HistoricalWQTimerange) data; @@ -229,7 +229,7 @@ */ protected TimeSeriesCollection newTimeSeriesCollection( Timerange[] timeranges, double[] values, ThemeDocument theme, String desc) { - logger.debug("Create new TimeSeriesCollection for: " + desc); + log.debug("Create new TimeSeriesCollection for: " + desc); TimeSeriesCollection tsc = new TimeSeriesCollection(); TimeSeries series = new StyledTimeSeries(desc, theme); @@ -239,21 +239,21 @@ try { if (Double.isNaN(values[i])) { - logger.warn("Skip TimePeriod because value is NaN."); + log.warn("Skip TimePeriod because value is NaN."); continue; } series.add(rtp[0], values[i]); series.add(rtp[1], values[i]); - if (logger.isDebugEnabled()) { - logger.debug("added Item to TimeSeries:"); - logger.debug(" TimePeriod: " + rtp[0] + " - " + rtp[1]); - logger.debug(" Value: " + values[i]); + if (log.isDebugEnabled()) { + log.debug("added Item to TimeSeries:"); + log.debug(" TimePeriod: " + rtp[0] + " - " + rtp[1]); + log.debug(" Value: " + values[i]); } } catch (SeriesException se) { - logger.warn("Error while adding TimePeriod: " + se); + log.warn("Error while adding TimePeriod: " + se); } }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeWQCurveGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeWQCurveGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,8 +32,8 @@ extends XYChartGenerator implements FacetTypes { - /** Private logger. */ - private static Logger logger = Logger + /** Private log. */ + private static Logger log = Logger .getLogger(HistoricalDischargeWQCurveGenerator.class); public static final String I18N_CHART_TITLE = "chart.historical.discharge.wq.title"; @@ -108,8 +108,8 @@ public void doOut(ArtifactAndFacet artifactFacet, ThemeDocument theme, boolean visible) { String name = artifactFacet.getFacetName(); - logger.debug("HistoricalDischargeWQCurveGenerator.doOut: " + name); - logger.debug("Theme description is: " + log.debug("HistoricalDischargeWQCurveGenerator.doOut: " + name); + log.debug("Theme description is: " + artifactFacet.getFacetDescription()); if (name.equals(HISTORICAL_DISCHARGE_WQ_Q)) { @@ -144,7 +144,7 @@ artifactFacet.getData(context), artifactFacet, theme, visible); } else { - logger.warn("doOut(): unknown facet name: " + name); + log.warn("doOut(): unknown facet name: " + name); return; } }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/InfoGeneratorHelper.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/InfoGeneratorHelper.java Fri Sep 05 12:58:17 2014 +0200 @@ -43,7 +43,7 @@ public class InfoGeneratorHelper { /** Private logging instance. */ - private static final Logger logger = + private static final Logger log = Logger.getLogger(InfoGeneratorHelper.class); protected ChartGenerator generator; @@ -64,7 +64,7 @@ JFreeChart chart, ChartRenderingInfo info) { - logger.debug("InfoGeneratorHelper.createInfoDocument"); + log.debug("InfoGeneratorHelper.createInfoDocument"); Document doc = XMLUtils.newDocument(); @@ -97,7 +97,7 @@ ElementCreator cr, JFreeChart chart) { - logger.debug("InfoGeneratorHelper.createRangeElements"); + log.debug("InfoGeneratorHelper.createRangeElements"); Element axes = cr.create("axes"); @@ -120,7 +120,7 @@ XYDataset data = plot.getDataset(i); if (axis == null || data == null) { - logger.warn("Axis or dataset is empty at pos: " + i); + log.warn("Axis or dataset is empty at pos: " + i); continue; } @@ -151,8 +151,8 @@ String type, int pos) { - logger.debug("createAxisElement " + pos); - logger.debug("Axis is from type: " + axis.getClass()); + log.debug("createAxisElement " + pos); + log.debug("Axis is from type: " + axis.getClass()); Element e = cr.create(type); cr.addAttr(e, "pos", String.valueOf(pos), true); @@ -246,7 +246,7 @@ JFreeChart chart, ChartRenderingInfo info) { - logger.debug("InfoGeneratorHelper.createTransformationElements"); + log.debug("InfoGeneratorHelper.createTransformationElements"); Element tf = cr.create("transformation-matrix"); @@ -256,7 +256,7 @@ ValueAxis xAxis = plot.getDomainAxis(); if (xAxis == null) { - logger.error("There is no x axis in the chart!"); + log.error("There is no x axis in the chart!"); return null; } @@ -264,7 +264,7 @@ ValueAxis yAxis = plot.getRangeAxis(i); if (yAxis == null) { - logger.warn("No y axis at pos " + i + " existing."); + log.warn("No y axis at pos " + i + " existing."); continue; } @@ -340,7 +340,7 @@ ValueAxis xAxis, ValueAxis yAxis) { - logger.debug("InfoGeneratorHelper.createTransformationMatrix"); + log.debug("InfoGeneratorHelper.createTransformationMatrix"); double offsetX = dataArea.getX(); double width = dataArea.getWidth(); @@ -356,7 +356,7 @@ double upperY = yRange.getUpperBound(); if (xAxis.isInverted()) { - logger.info("X-Axis is inverted!"); + log.info("X-Axis is inverted!"); double tmp = upperX; upperX = lowerX; @@ -388,7 +388,7 @@ } catch (NoninvertibleTransformException e) { // do nothing - logger.warn("Matrix is not invertible."); + log.warn("Matrix is not invertible."); } return new double[] { 1d, 1d, 0d, 0d };
--- a/artifacts/src/main/java/org/dive4elements/river/exports/InfoGeneratorHelper2.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/InfoGeneratorHelper2.java Fri Sep 05 12:58:17 2014 +0200 @@ -41,7 +41,7 @@ public class InfoGeneratorHelper2 { /** Private logging instance. */ - private static final Logger logger = + private static final Logger log = Logger.getLogger(InfoGeneratorHelper2.class); protected ChartGenerator2 generator; @@ -62,7 +62,7 @@ JFreeChart chart, ChartRenderingInfo info) { - logger.debug("InfoGeneratorHelper.createInfoDocument"); + log.debug("InfoGeneratorHelper.createInfoDocument"); Document doc = XMLUtils.newDocument(); @@ -95,7 +95,7 @@ ElementCreator cr, JFreeChart chart) { - logger.debug("InfoGeneratorHelper.createRangeElements"); + log.debug("InfoGeneratorHelper.createRangeElements"); Element axes = cr.create("axes"); @@ -118,7 +118,7 @@ XYDataset data = plot.getDataset(i); if (axis == null || data == null) { - logger.warn("Axis or dataset is empty at pos: " + i); + log.warn("Axis or dataset is empty at pos: " + i); continue; } @@ -149,8 +149,8 @@ String type, int pos) { - logger.debug("createAxisElement " + pos); - logger.debug("Axis is from type: " + axis.getClass()); + log.debug("createAxisElement " + pos); + log.debug("Axis is from type: " + axis.getClass()); Element e = cr.create(type); cr.addAttr(e, "pos", String.valueOf(pos), true); @@ -244,7 +244,7 @@ JFreeChart chart, ChartRenderingInfo info) { - logger.debug("InfoGeneratorHelper.createTransformationElements"); + log.debug("InfoGeneratorHelper.createTransformationElements"); Element tf = cr.create("transformation-matrix"); @@ -254,7 +254,7 @@ ValueAxis xAxis = plot.getDomainAxis(); if (xAxis == null) { - logger.error("There is no x axis in the chart!"); + log.error("There is no x axis in the chart!"); return null; } @@ -262,7 +262,7 @@ ValueAxis yAxis = plot.getRangeAxis(i); if (yAxis == null) { - logger.warn("No y axis at pos " + i + " existing."); + log.warn("No y axis at pos " + i + " existing."); continue; } @@ -338,7 +338,7 @@ ValueAxis xAxis, ValueAxis yAxis) { - logger.debug("InfoGeneratorHelper.createTransformationMatrix"); + log.debug("InfoGeneratorHelper.createTransformationMatrix"); double offsetX = dataArea.getX(); double width = dataArea.getWidth(); @@ -354,7 +354,7 @@ double upperY = yRange.getUpperBound(); if (xAxis.isInverted()) { - logger.info("X-Axis is inverted!"); + log.info("X-Axis is inverted!"); double tmp = upperX; upperX = lowerX; @@ -386,7 +386,7 @@ } catch (NoninvertibleTransformException e) { // do nothing - logger.warn("Matrix is not invertible."); + log.warn("Matrix is not invertible."); } return new double[] { 1d, 1d, 0d, 0d };
--- a/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -54,8 +54,8 @@ } } - /** The logger that is used in this generator. */ - private static Logger logger = + /** The log that is used in this generator. */ + private static Logger log = Logger.getLogger(LongitudinalSectionGenerator.class); /** Key to look up internationalized String for annotations label. */ @@ -306,7 +306,7 @@ */ protected void invertXAxis(ValueAxis xaxis) { if (isInverted()) { - logger.debug("X-Axis.setInverted(true)"); + log.debug("X-Axis.setInverted(true)"); xaxis.setInverted(true); } } @@ -325,10 +325,10 @@ ) { String name = artifactAndFacet.getFacetName(); - logger.debug("LongitudinalSectionGenerator.doOut: " + name); + log.debug("LongitudinalSectionGenerator.doOut: " + name); if (name == null) { - logger.error("No facet name for doOut(). No output generated!"); + log.error("No facet name for doOut(). No output generated!"); return; } @@ -382,7 +382,7 @@ YAXIS.W.idx); } else { - logger.warn("Unknown facet name: " + name); + log.warn("Unknown facet name: " + name); return; } } @@ -396,20 +396,20 @@ ThemeDocument theme, boolean visible ) { - logger.debug("WDifferencesCurveGenerator.doWDifferencesOut"); + log.debug("WDifferencesCurveGenerator.doWDifferencesOut"); if (wkms == null) { - logger.warn("No data to add to WDifferencesChart."); + log.warn("No data to add to WDifferencesChart."); return; } XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); - if (logger.isDebugEnabled()) { + if (log.isDebugEnabled()) { if (wkms.size() > 0) { - logger.debug("Generate series: " + series.getKey()); - logger.debug("Start km: " + wkms.getKm(0)); - logger.debug("End km: " + wkms.getKm(wkms.size() - 1)); - logger.debug("Values : " + wkms.size()); + log.debug("Generate series: " + series.getKey()); + log.debug("Start km: " + wkms.getKm(0)); + log.debug("End km: " + wkms.getKm(wkms.size() - 1)); + log.debug("Values : " + wkms.size()); } } @@ -442,7 +442,7 @@ return YAXIS.Q.idx; } else { - logger.warn("Could not find axis for facet " + facetName); + log.warn("Could not find axis for facet " + facetName); return YAXIS.W.idx; } } @@ -459,7 +459,7 @@ ThemeDocument theme, boolean visible ) { - logger.debug("LongitudinalSectionGenerator.doArea"); + log.debug("LongitudinalSectionGenerator.doArea"); StyledAreaSeriesCollection area = new StyledAreaSeriesCollection(theme); String seriesName = aandf.getFacetDescription(); @@ -489,7 +489,7 @@ StyledSeriesBuilder.addPoints(up, ((Lines.LineData) data.getUpperData()).points, false); } else { - logger.error("Do not know how to deal with (up) area info from: " + log.error("Do not know how to deal with (up) area info from: " + data.getUpperData()); } } @@ -518,7 +518,7 @@ StyledSeriesBuilder.addPoints(down, ((Lines.LineData) data.getLowerData()).points, false); } else { - logger.error("Do not know how to deal with (down) area info from: " + log.error("Do not know how to deal with (down) area info from: " + data.getLowerData()); } }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -44,7 +44,7 @@ public class MapGenerator implements OutGenerator, FacetTypes { - private static Logger logger = Logger.getLogger(MapGenerator.class); + private static Logger log = Logger.getLogger(MapGenerator.class); protected D4EArtifactCollection collection; @@ -69,12 +69,12 @@ @Override public void setup(Object config) { - logger.debug("MapGenerator.setup"); + log.debug("MapGenerator.setup"); } @Override public void init(String outName, Document request, OutputStream out, CallContext context) { - logger.debug("MapGenerator.init"); + log.debug("MapGenerator.init"); this.outName = outName; this.request = request; @@ -90,7 +90,7 @@ @Override public void setMasterArtifact(Artifact master) { - logger.debug("MapGenerator.setMasterArtifact"); + log.debug("MapGenerator.setMasterArtifact"); this.master = master; } @@ -107,7 +107,7 @@ { String name = artifactFacet.getFacetName(); - logger.debug("MapGenerator.doOut: " + + log.debug("MapGenerator.doOut: " + artifactFacet.getArtifact().identifier() + " | " + name); D4EArtifact flys = (D4EArtifact) artifactFacet.getArtifact(); @@ -132,12 +132,12 @@ // createUserShapeLayer(flys, wms); //} else { - logger.debug("doOut: createDatabaseLayer for facet name: " + name); + log.debug("doOut: createDatabaseLayer for facet name: " + name); createDatabaseLayer(flys, wms, attr); } } else { - logger.warn("Facet not supported: " + nativeFacet.getClass()); + log.warn("Facet not supported: " + nativeFacet.getClass()); } } @@ -171,12 +171,12 @@ context); } else { - logger.warn("Cannot create WSPLGEN layer from: " + + log.warn("Cannot create WSPLGEN layer from: " + wms.getClass()); } } catch (IOException ioe) { - logger.error(ioe, ioe); + log.error(ioe, ioe); } } @@ -188,10 +188,10 @@ mfg.createUserShapeLayer(flys, wms); } catch (FileNotFoundException fnfe) { - logger.error(fnfe, fnfe); + log.error(fnfe, fnfe); } catch (IOException ioe) { - logger.error(ioe, ioe); + log.error(ioe, ioe); } } @@ -201,7 +201,7 @@ WMSLayerFacet wms, ThemeDocument attr ) { - logger.debug("createDatabaseLayer for facet: " + wms.getName()); + log.debug("createDatabaseLayer for facet: " + wms.getName()); ArtifactMapfileGenerator mfg = new ArtifactMapfileGenerator(); @@ -210,7 +210,7 @@ File artDir = new File(baseDir, flys.identifier()); if (artDir != null && !artDir.exists()) { - logger.debug("Create new directory: " + artDir.getPath()); + log.debug("Create new directory: " + artDir.getPath()); artDir.mkdir(); } @@ -221,14 +221,14 @@ attr.createMapserverStyle()); } else { - logger.warn("Cannot create DB layer from: " + wms.getClass()); + log.warn("Cannot create DB layer from: " + wms.getClass()); } } catch (FileNotFoundException fnfe) { - logger.error(fnfe, fnfe); + log.error(fnfe, fnfe); } catch (IOException ioe) { - logger.error(ioe, ioe); + log.error(ioe, ioe); } } @@ -237,7 +237,7 @@ public void generate() throws IOException { - logger.debug("MapGenerator.generate"); + log.debug("MapGenerator.generate"); ArtifactMapfileGenerator mfg = new ArtifactMapfileGenerator(); mfg.generate(); @@ -274,7 +274,7 @@ } if (this.maxExtent == null) { - logger.debug("Set max extent to: " + maxExtent); + log.debug("Set max extent to: " + maxExtent); this.maxExtent = new Envelope(maxExtent); return; } @@ -285,7 +285,7 @@ protected void setInitialExtent(Envelope initialExtent) { if (this.initialExtent == null && initialExtent != null) { - logger.debug("Set initial extent to: " + initialExtent); + log.debug("Set initial extent to: " + initialExtent); this.initialExtent = new Envelope(initialExtent); } }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightExporter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightExporter.java Fri Sep 05 12:58:17 2014 +0200 @@ -35,8 +35,8 @@ */ public class MiddleBedHeightExporter extends AbstractExporter { - /** Private logger. */ - private static final Logger logger = + /** Private log. */ + private static final Logger log = Logger.getLogger(MiddleBedHeightExporter.class); public static final String CSV_KM = @@ -102,7 +102,7 @@ d = ((CalculationResult) d).getData(); if (d instanceof MiddleBedHeightData[]) { - logger.debug("Add new data of type MiddleBedHeightData"); + log.debug("Add new data of type MiddleBedHeightData"); for (MiddleBedHeightData mD :(MiddleBedHeightData[]) d) { data.add(mD); } @@ -113,8 +113,8 @@ @Override protected void writeCSVData(CSVWriter writer) { - logger.info("MiddleBedHeightExporter.writeCSVData"); - logger.debug("CSV gets " + data.size() + " MiddleBedHeightData objects."); + log.info("MiddleBedHeightExporter.writeCSVData"); + log.debug("CSV gets " + data.size() + " MiddleBedHeightData objects."); Collections.sort(data); @@ -142,7 +142,7 @@ protected void data2CSV(CSVWriter writer, MiddleBedHeightData data) { - logger.debug("Add next MiddleBedHeightData to CSV"); + log.debug("Add next MiddleBedHeightData to CSV"); D4EArtifact flys = (D4EArtifact) master; @@ -234,7 +234,7 @@ @Override protected void writePDF(OutputStream out) { - logger.error("TODO: Implement FlowVelocityExporter.writePDF"); + log.error("TODO: Implement FlowVelocityExporter.writePDF"); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :
--- a/artifacts/src/main/java/org/dive4elements/river/exports/OutputHelper.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/OutputHelper.java Fri Sep 05 12:58:17 2014 +0200 @@ -44,7 +44,7 @@ import org.dive4elements.river.themes.ThemeFactory; public class OutputHelper { - /** The logger used in this class. */ + /** The log used in this class. */ private static Logger log = Logger.getLogger(OutputHelper.class); protected String identifier; @@ -490,7 +490,7 @@ * Inner class to structure/order the themes of a chart. */ private static class ThemeList { - private Logger logger = Logger.getLogger(ThemeList.class); + private Logger log = Logger.getLogger(ThemeList.class); protected List<ManagedFacet> themes; public ThemeList(Document output) { @@ -507,7 +507,7 @@ int num = themeList != null ? themeList.getLength() : 0; - logger.debug("Output has " + num + " elements."); + log.debug("Output has " + num + " elements."); if (num == 0) { return;
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ReferenceCurveExporter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ReferenceCurveExporter.java Fri Sep 05 12:58:17 2014 +0200 @@ -50,8 +50,8 @@ */ public class ReferenceCurveExporter extends AbstractExporter { - /** The logger used in this exporter. */ - private static Logger logger = Logger.getLogger(ReferenceCurveExporter.class); + /** The log used in this exporter. */ + private static Logger log = Logger.getLogger(ReferenceCurveExporter.class); public static final String RC_CSV_KM_HEADER = "export.reference_curve.csv.header.km"; @@ -99,7 +99,7 @@ public void generate() throws IOException { - logger.debug("ReferenceCurveExporter.generate"); + log.debug("ReferenceCurveExporter.generate"); if (facet == null) { throw new IOException("invalid (null) facet for exporter"); @@ -122,7 +122,7 @@ */ @Override protected void addData(Object d) { - logger.debug("ReferenceCurveExporter.addData"); + log.debug("ReferenceCurveExporter.addData"); if (d instanceof CalculationResult) { d = ((CalculationResult)d).getData(); @@ -138,15 +138,15 @@ } } data.add(wwqqs); - logger.debug("ReferenceCurveExporter.addData wwqq[]."); + log.debug("ReferenceCurveExporter.addData wwqq[]."); } else { - logger.warn("ReferenceCurveExporter.addData/1 unknown type (" + log.warn("ReferenceCurveExporter.addData/1 unknown type (" + d + ")."); } } else { - logger.warn("ReferenceCurveExporter.addData/2 unknown type (" + log.warn("ReferenceCurveExporter.addData/2 unknown type (" + d + ")."); } } @@ -158,7 +158,7 @@ */ @Override protected void writeCSVData(CSVWriter writer) { - logger.debug("ReferenceCurveExporter.writeData"); + log.debug("ReferenceCurveExporter.writeData"); writeCSVHeader(writer); @@ -175,7 +175,7 @@ * @param writer Writer to write header with. */ protected void writeCSVHeader(CSVWriter writer) { - logger.info("ReferenceCurveExporter.writeCSVHeader"); + log.info("ReferenceCurveExporter.writeCSVHeader"); StepCSVWriter stepWriter = new StepCSVWriter(); stepWriter.setCSVWriter(writer); @@ -209,7 +209,7 @@ protected void wWQQ2CSV(CSVWriter writer, WWQQ ww) { - logger.debug("ReferenceCurveExporter.wWQQ2CSV"); + log.debug("ReferenceCurveExporter.wWQQ2CSV"); NumberFormat kmf = getKmFormatter(); NumberFormat wf = getWFormatter(); @@ -288,7 +288,7 @@ JasperExportManager.exportReportToPdfStream(print, out); } catch(JRException je) { - logger.warn("Error generating PDF Report!"); + log.warn("Error generating PDF Report!"); je.printStackTrace(); } }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ReferenceCurveGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ReferenceCurveGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -43,8 +43,8 @@ } } - /** House logger. */ - private static Logger logger = + /** House log. */ + private static Logger log = Logger.getLogger(ReferenceCurveGenerator.class); public static final String I18N_CHART_TITLE = @@ -142,10 +142,10 @@ ) { String name = artifactFacet.getFacetName(); - logger.debug("ReferenceCurveGenerator.doOut: " + name); + log.debug("ReferenceCurveGenerator.doOut: " + name); if (name == null || name.length() == 0) { - logger.error("No facet given. Cannot create dataset."); + log.error("No facet given. Cannot create dataset."); return; } @@ -176,7 +176,7 @@ } else { - logger.warn("Unknown facet name: " + name); + log.warn("Unknown facet name: " + name); } } @@ -221,7 +221,7 @@ ThemeDocument theme, boolean visible ){ - logger.debug("ReferenceCurveGenerator.doPointOut"); + log.debug("ReferenceCurveGenerator.doPointOut"); XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ReportGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ReportGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,7 +31,7 @@ public class ReportGenerator implements OutGenerator { - private static Logger logger = Logger.getLogger(ReportGenerator.class); + private static Logger log = Logger.getLogger(ReportGenerator.class); protected Document result; protected OutputStream out; @@ -43,12 +43,12 @@ @Override public void setup(Object config) { - logger.debug("ReportGenerator.setup"); + log.debug("ReportGenerator.setup"); } @Override public void init(String outName, Document request, OutputStream out, CallContext context) { - logger.debug("init"); + log.debug("init"); this.outName = outName; this.out = out; this.context = context; @@ -71,7 +71,7 @@ ThemeDocument attr, boolean visible ) { - logger.debug("doOut"); + log.debug("doOut"); Facet facet = artifactFacet.getFacet(); if (facet != null) { Calculation report = (Calculation) artifactFacet.getData(context); @@ -84,7 +84,7 @@ @Override public void generate() throws IOException { - logger.debug("generate"); + log.debug("generate"); XMLUtils.toStream(result != null ? result : XMLUtils.newDocument(), out);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ShapeExporter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ShapeExporter.java Fri Sep 05 12:58:17 2014 +0200 @@ -21,7 +21,7 @@ public class ShapeExporter implements OutGenerator { private static final String XPATH_FACET = "/art:action/@art:type"; - private static Logger logger = Logger.getLogger(ShapeExporter.class); + private static Logger log = Logger.getLogger(ShapeExporter.class); private Artifact master; private Document request; private OutputStream out; @@ -33,7 +33,7 @@ @Override public void setup(Object config) { - logger.debug("ShapeExporter.setup"); + log.debug("ShapeExporter.setup"); } @Override @@ -59,7 +59,7 @@ String name = bundle.getFacetName(); if (!isFacetValid(name)) { - logger.debug("Facet '" + name + "' is not valid for this exporter!"); + log.debug("Facet '" + name + "' is not valid for this exporter!"); return; }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/StyledSeriesBuilder.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/StyledSeriesBuilder.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,7 +28,7 @@ */ final static double BIG_DOUBLE_VALUE = 1234567d; - private static final Logger logger = Logger.getLogger + private static final Logger log = Logger.getLogger (StyledSeriesBuilder.class); @@ -67,7 +67,7 @@ for (int i = 0; i < xPoints.length; i++) { if (skipNANs && (Double.isNaN(xPoints[i]) || Double.isNaN(yPoints[i]))) { - logger.warn ("Skipping NaN in StyledSeriesBuilder."); + log.warn ("Skipping NaN in StyledSeriesBuilder."); continue; } // Create gap if distance >= distance. @@ -107,7 +107,7 @@ for (int i = 0; i < xPoints.length; i++) { if (skipNANs && (Double.isNaN(xPoints[i]) || Double.isNaN(yPoints[i]))) { - logger.warn ("Skipping NaN in StyledSeriesBuilder."); + log.warn ("Skipping NaN in StyledSeriesBuilder."); continue; } // Create gap if distance >= distance. @@ -149,7 +149,7 @@ for (int i = 0; i < xPoints.length; i++) { if (skipNANs && (Double.isNaN(xPoints[i]) || Double.isNaN(yPoints[i]))) { - logger.warn ("Skipping NaN in StyledSeriesBuilder."); + log.warn ("Skipping NaN in StyledSeriesBuilder."); continue; } series.add(xPoints[i], factorY * (transY+yPoints[i]), false); @@ -173,7 +173,7 @@ for (int i = 0; i < xPoints.length; i++) { if (skipNANs && (Double.isNaN(xPoints[i]) || Double.isNaN(yPoints[i]))) { - logger.warn ("Skipping NaN in StyledSeriesBuilder."); + log.warn ("Skipping NaN in StyledSeriesBuilder."); continue; } series.add(xPoints[i], yPoints[i], false);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/TimeseriesChartGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/TimeseriesChartGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -69,7 +69,7 @@ protected boolean domainZeroLineVisible; - private static final Logger logger = + private static final Logger log = Logger.getLogger(TimeseriesChartGenerator.class); public static final int AXIS_SPACE = 5; @@ -96,7 +96,7 @@ @Override public JFreeChart generateChart() { - logger.info("Generate Timeseries Chart."); + log.info("Generate Timeseries Chart."); JFreeChart chart = ChartFactory.createTimeSeriesChart( getChartTitle(), @@ -158,7 +158,7 @@ protected void addLogo(XYPlot plot) { String logo = showLogo(); if (logo == null) { - logger.debug("No logo to show chosen"); + log.debug("No logo to show chosen"); return; } @@ -202,7 +202,7 @@ yPos = ((Double)getYBounds(0).getUpper() + (Double)getYBounds(0).getLower())/2d; } else { - logger.debug("Unknown place-v value: " + placev); + log.debug("Unknown place-v value: " + placev); } if (placeh == null || placeh.equals("none")) { @@ -218,10 +218,10 @@ xPos = ((Long)getXBounds(0).getUpper() + (Long)getXBounds(0).getLower())/2d; } else { - logger.debug("Unknown place-h value: " + placeh); + log.debug("Unknown place-h value: " + placeh); } - logger.debug("logo position: " + xPos + "/" + yPos); + log.debug("logo position: " + xPos + "/" + yPos); org.jfree.ui.RectangleAnchor anchor = org.jfree.ui.RectangleAnchor.TOP; @@ -276,7 +276,7 @@ * @param plot The XYPlot. */ protected void consumeAxisSettings(XYPlot plot) { - logger.debug("Zoom to specified ranges."); + log.debug("Zoom to specified ranges."); Bounds xrange = getDomainAxisRange(); Bounds yrange = getValueAxisRange(); @@ -305,11 +305,11 @@ } if (yaxis == null) { - logger.debug("Zoom problem: no Y Axis for index: " + i); + log.debug("Zoom problem: no Y Axis for index: " + i); continue; } - logger.debug("Prepare zoom settings for y axis at index: " + i); + log.debug("Prepare zoom settings for y axis at index: " + i); zoomY(plot, yaxis, getYBounds(Integer.valueOf(i)), yrange); } } @@ -328,7 +328,7 @@ */ @Override protected AxisDataset createAxisDataset(int idx) { - logger.debug("Create a new AxisDataset for index: " + idx); + log.debug("Create a new AxisDataset for index: " + idx); return new AxisDataset(idx); } @@ -405,25 +405,25 @@ public Bounds[] getBoundsForAxis(int index) { - logger.debug("Return x and y bounds for axis at: " + index); + log.debug("Return x and y bounds for axis at: " + index); Bounds rx = getXBounds(Integer.valueOf(index)); Bounds ry = getYBounds(Integer.valueOf(index)); if (rx == null) { - logger.warn("Range for x axis not set." + + log.warn("Range for x axis not set." + " Using default values: 0 - 1."); rx = new TimeBounds(0l, 1l); } if (ry == null) { - logger.warn("Range for y axis not set." + + log.warn("Range for y axis not set." + " Using default values: 0 - 1."); ry = new DoubleBounds(0l, 1l); } - logger.debug("X Bounds at index " + index + " is: " + rx); - logger.debug("Y Bounds at index " + index + " is: " + ry); + log.debug("X Bounds at index " + index + " is: " + rx); + log.debug("Y Bounds at index " + index + " is: " + ry); return new Bounds[] {rx, ry}; } @@ -434,12 +434,12 @@ String[] ranges = getDomainAxisRangeFromRequest(); if (ranges == null || ranges.length < 2) { - logger.debug("No zoom range for domain axis specified."); + log.debug("No zoom range for domain axis specified."); return null; } if (ranges[0] == null || ranges[1] == null) { - logger.warn("Invalid ranges for domain axis specified!"); + log.warn("Invalid ranges for domain axis specified!"); return null; } @@ -450,7 +450,7 @@ return new DoubleBounds(lower, upper); } catch (NumberFormatException nfe) { - logger.warn("Invalid ranges for domain axis specified: " + nfe); + log.warn("Invalid ranges for domain axis specified: " + nfe); } return null; @@ -461,12 +461,12 @@ String[] ranges = getValueAxisRangeFromRequest(); if (ranges == null || ranges.length < 2) { - logger.debug("No zoom range for domain axis specified."); + log.debug("No zoom range for domain axis specified."); return null; } if (ranges[0] == null || ranges[1] == null) { - logger.warn("Invalid ranges for domain axis specified!"); + log.warn("Invalid ranges for domain axis specified!"); return null; } @@ -477,7 +477,7 @@ return new DoubleBounds(lower, upper); } catch (NumberFormatException nfe) { - logger.warn("Invalid ranges for domain axis specified: " + nfe); + log.warn("Invalid ranges for domain axis specified: " + nfe); } return null; @@ -485,7 +485,7 @@ protected void adaptZoom(XYPlot plot) { - logger.debug("Adapt zoom of Timeseries chart."); + log.debug("Adapt zoom of Timeseries chart."); zoomX(plot, plot.getDomainAxis(), getXBounds(0), getDomainAxisRange()); @@ -512,10 +512,10 @@ Bounds total,//we could equally nicely getXBounds(0) Bounds user ) { - if (logger.isDebugEnabled()) { - logger.debug("== Zoom X axis =="); - logger.debug(" Total axis range : " + total); - logger.debug(" User defined range: " + user); + if (log.isDebugEnabled()) { + log.debug("== Zoom X axis =="); + log.debug(" Total axis range : " + total); + log.debug(" User defined range: " + user); } if (user != null) { @@ -528,12 +528,12 @@ TimeBounds newBounds = new TimeBounds(newMin, newMax); - logger.debug(" Zoom axis to: " + newBounds); + log.debug(" Zoom axis to: " + newBounds); newBounds.applyBounds(axis, AXIS_SPACE); } else { - logger.debug("No user specified zoom values found!"); + log.debug("No user specified zoom values found!"); if (total != null && axis != null) { total.applyBounds(axis, AXIS_SPACE); } @@ -550,10 +550,10 @@ Bounds total, Bounds user ) { - if (logger.isDebugEnabled()) { - logger.debug("== Zoom Y axis =="); - logger.debug(" Total axis range : " + total); - logger.debug(" User defined range: " + user); + if (log.isDebugEnabled()) { + log.debug("== Zoom Y axis =="); + log.debug(" Total axis range : " + total); + log.debug(" User defined range: " + user); } if (user != null) { @@ -566,12 +566,12 @@ DoubleBounds newBounds = new DoubleBounds(newMin, newMax); - logger.debug(" Zoom axis to: " + newBounds); + log.debug(" Zoom axis to: " + newBounds); newBounds.applyBounds(axis, AXIS_SPACE); } else { - logger.debug("No user specified zoom values found!"); + log.debug("No user specified zoom values found!"); if (total != null && axis != null) { total.applyBounds(axis, AXIS_SPACE); } @@ -660,10 +660,10 @@ } } catch(JSONException ex) { - logger.error("Could not decode json"); + log.error("Could not decode json"); } catch(ParseException ex) { - logger.error("Could not parse date string"); + log.error("Could not parse date string"); } TimeSeriesCollection tsc = new TimeSeriesCollection(); @@ -674,7 +674,7 @@ double y = tsc.getYValue(0, i); xy.add(new CollisionFreeXYTextAnnotation( names.get(series.getTimePeriod(i)), x, y)); - logger.debug("doPoints(): x=" + x + " y=" + y); + log.debug("doPoints(): x=" + x + " y=" + y); } RiverAnnotation annotations = new RiverAnnotation(null, null, null, theme); @@ -687,9 +687,9 @@ } public void addDomainAxisMarker(XYPlot plot) { - logger.debug("domainmarkers: " + domainMarker.size()); + log.debug("domainmarkers: " + domainMarker.size()); for (Marker marker: domainMarker) { - logger.debug("adding domain marker"); + log.debug("adding domain marker"); plot.addDomainMarker(marker, Layer.BACKGROUND); } domainMarker.clear(); @@ -697,7 +697,7 @@ public void addValueAxisMarker(XYPlot plot) { for (Marker marker: valueMarker) { - logger.debug("adding value marker.."); + log.debug("adding value marker.."); plot.addRangeMarker(marker, Layer.BACKGROUND); } valueMarker.clear(); @@ -763,7 +763,7 @@ legendItem.getLinePaint() ); interLegend.setSeriesKey(series.getKey()); - logger.debug("applySeriesAttributes: draw unfilled legend item"); + log.debug("applySeriesAttributes: draw unfilled legend item"); plot.getLegendItems().add(interLegend); } }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/TypeSection.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/TypeSection.java Fri Sep 05 12:58:17 2014 +0200 @@ -19,7 +19,7 @@ */ public class TypeSection extends DefaultSection { - private static final Logger logger = Logger.getLogger(TypeSection.class); + private static final Logger log = Logger.getLogger(TypeSection.class); public TypeSection(String key) { super(key); @@ -66,7 +66,7 @@ return (String) attr.getValue(); } - logger.debug("attribute " + key + " not found in typesection.getString"); + log.debug("attribute " + key + " not found in typesection.getString"); return null; }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/WDifferencesExporter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/WDifferencesExporter.java Fri Sep 05 12:58:17 2014 +0200 @@ -46,8 +46,8 @@ */ public class WDifferencesExporter extends AbstractExporter { - /** The logger used in this exporter. */ - private static Logger logger = Logger.getLogger(WDifferencesExporter.class); + /** The log used in this exporter. */ + private static Logger log = Logger.getLogger(WDifferencesExporter.class); public static final String WDIFF_CSV_KM_HEADER = @@ -76,7 +76,7 @@ public void generate() throws IOException { - logger.debug("WDifferencesExporter.generate"); + log.debug("WDifferencesExporter.generate"); if (facet == null) { throw new IOException("invalid (null) facet for exporter"); @@ -117,7 +117,7 @@ */ @Override protected void writeCSVData(CSVWriter writer) { - logger.info("WDifferencesExporter.writeData"); + log.info("WDifferencesExporter.writeData"); writeCSVHeader(writer); @@ -134,7 +134,7 @@ * @param writer Writer to write header with. */ protected void writeCSVHeader(CSVWriter writer) { - logger.info("WDifferencesExporter.writeCSVHeader"); + log.info("WDifferencesExporter.writeCSVHeader"); writer.writeNext(new String[] { msg(WDIFF_CSV_KM_HEADER, WDIFF_DEFAULT_CSV_KM_HEADER), @@ -144,7 +144,7 @@ protected void wKms2CSV(CSVWriter writer, WKms wkms) { - logger.debug("WDifferencesExporter.wKms2CSV"); + log.debug("WDifferencesExporter.wKms2CSV"); NumberFormat kmf = getKmFormatter(); NumberFormat wf = getWFormatter(); @@ -200,7 +200,7 @@ JasperExportManager.exportReportToPdfStream(print, out); } catch(JRException je) { - logger.warn("Error generating PDF Report!"); + log.warn("Error generating PDF Report!"); je.printStackTrace(); } }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java Fri Sep 05 12:58:17 2014 +0200 @@ -68,8 +68,8 @@ */ public class WaterlevelExporter extends AbstractExporter { - /** The logger used in this exporter.*/ - private static Logger logger = Logger.getLogger(WaterlevelExporter.class); + /** The log used in this exporter.*/ + private static Logger log = Logger.getLogger(WaterlevelExporter.class); public static final String FACET_WST = "wst"; @@ -154,7 +154,7 @@ public void generate() throws IOException { - logger.debug("WaterlevelExporter.generate"); + log.debug("WaterlevelExporter.generate"); /* Check for official fixings. They should also be included in the * export but only the calculation result is added with addData */ @@ -183,7 +183,7 @@ } if (!exists) { officalFixings.add(toAdd); - logger.debug("Adding additional offical fixing: " + newName); + log.debug("Adding additional offical fixing: " + newName); } } } @@ -228,11 +228,11 @@ * @param wqkms A WQKms object that should be prepared. */ protected String getColumnTitle(WINFOArtifact winfo, WQKms wqkms) { - logger.debug("WaterlevelExporter.getColumnTitle"); + log.debug("WaterlevelExporter.getColumnTitle"); String name = wqkms.getName(); - logger.debug("Name of WQKms = '" + name + "'"); + log.debug("Name of WQKms = '" + name + "'"); if (name.indexOf("W=") >= 0) { return name; @@ -251,7 +251,7 @@ if (nmv != null && nmv.length() > 0) { nmv = RiverUtils.stripNamedMainValue(nmv); nmv += "=" + String.valueOf(v); - logger.debug("Set named main value '" + nmv + "'"); + log.debug("Set named main value '" + nmv + "'"); return nmv; } @@ -266,11 +266,11 @@ protected String getCSVRowTitle(WINFOArtifact winfo, WQKms wqkms) { - logger.debug("WaterlevelExporter.prepareNamedValue"); + log.debug("WaterlevelExporter.prepareNamedValue"); String name = wqkms.getName(); - logger.debug("Name of WQKms = '" + name + "'"); + log.debug("Name of WQKms = '" + name + "'"); WQ_MODE wqmode = RiverUtils.getWQMode(winfo); @@ -284,7 +284,7 @@ if (nmv != null && nmv.length() > 0) { nmv = RiverUtils.stripNamedMainValue(nmv); - logger.debug("Set named main value '" + nmv + "'"); + log.debug("Set named main value '" + nmv + "'"); return nmv; } @@ -318,7 +318,7 @@ @Override protected void writeCSVData(CSVWriter writer) { - logger.info("WaterlevelExporter.writeData"); + log.info("WaterlevelExporter.writeData"); WQ_MODE mode = RiverUtils.getWQMode((D4EArtifact)master); boolean atGauge = mode == WQ_MODE.QGAUGE || mode == WQ_MODE.WGAUGE; @@ -377,7 +377,7 @@ */ private WQKms filterWQKms(WQKms wqkms, Double first, Double last) { if (first.isNaN() || last.isNaN()) { - logger.warn("Filtering official fixing without valid first/last."); + log.warn("Filtering official fixing without valid first/last."); return wqkms; } int firstIdx = first > last ? wqkms.size() - 1 : 0; @@ -407,7 +407,7 @@ protected void writeCSVMeta(CSVWriter writer) { - logger.info("WaterlevelExporter.writeCSVMeta"); + log.info("WaterlevelExporter.writeCSVMeta"); // TODO use Access instead of RiverUtils @@ -489,7 +489,7 @@ } } else { - logger.warn("Could not determine Q range!"); + log.warn("Could not determine Q range!"); } writer.writeNext(new String[] { @@ -511,7 +511,7 @@ upper = String.valueOf(ws[ws.length-1]); } else { - logger.warn("Could not determine W range!"); + log.warn("Could not determine W range!"); } writer.writeNext(new String[] { @@ -536,7 +536,7 @@ boolean atGauge, boolean isQ ) { - logger.info("WaterlevelExporter.writeCSVHeader"); + log.info("WaterlevelExporter.writeCSVHeader"); String unit = RiverUtils.getRiver((D4EArtifact) master).getWstUnit().getName(); @@ -657,7 +657,7 @@ boolean atGauge, boolean isQ ) { - logger.debug("WaterlevelExporter.wQKms2CSV"); + log.debug("WaterlevelExporter.wQKms2CSV"); // Skip constant data. if (wqkms instanceof ConstantWQKms) { @@ -751,8 +751,8 @@ long stopTime = System.currentTimeMillis(); - if (logger.isDebugEnabled()) { - logger.debug("Writing CSV took " + + if (log.isDebugEnabled()) { + log.debug("Writing CSV took " + (float)(stopTime-startTime)/1000f + " secs."); } } @@ -764,7 +764,7 @@ protected void generateWST() throws IOException { - logger.info("WaterlevelExporter.generateWST"); + log.info("WaterlevelExporter.generateWST"); int cols = data.get(0).length + officalFixings.size(); WstWriter writer = new WstWriter(cols); @@ -776,7 +776,7 @@ protected void writeWSTData(WstWriter writer) { - logger.debug("WaterlevelExporter.writeWSTData"); + log.debug("WaterlevelExporter.writeWSTData"); double[] result = new double[4]; @@ -850,7 +850,7 @@ } catch (FunctionEvaluationException aode) { // should not happen - logger.error("spline interpolation failed", aode); + log.error("spline interpolation failed", aode); // entry.getValue().add(Double.NaN, entry.getValue().getQ(0)); } }*/ @@ -895,7 +895,7 @@ @Override protected void writePDF(OutputStream out) { - logger.debug("write PDF"); + log.debug("write PDF"); WKmsJRDataSource source = createJRData(); String jasperFile = Resources.getMsg( @@ -915,7 +915,7 @@ JasperExportManager.exportReportToPdfStream(print, out); } catch(JRException je) { - logger.warn("Error generating PDF Report!", je); + log.warn("Error generating PDF Report!", je); } } @@ -993,7 +993,7 @@ boolean isQ, WKmsJRDataSource source) { - logger.debug("WaterlevelExporter.addWKmsData"); + log.debug("WaterlevelExporter.addWKmsData"); // Skip constant data. if (wqkms instanceof ConstantWQKms) { @@ -1052,8 +1052,8 @@ long stopTime = System.currentTimeMillis(); - if (logger.isDebugEnabled()) { - logger.debug("Writing PDF data took " + + if (log.isDebugEnabled()) { + log.debug("Writing PDF data took " + (float)(stopTime-startTime)/1000f + " secs."); } }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/WstWriter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/WstWriter.java Fri Sep 05 12:58:17 2014 +0200 @@ -45,8 +45,8 @@ */ public class WstWriter { - /** The logger used in this class. */ - private static Logger logger = Logger.getLogger(WstWriter.class); + /** The log used in this class. */ + private static Logger log = Logger.getLogger(WstWriter.class); /** The default unit that is written into the header of the WST. */ public static final String DEFAULT_UNIT = "Wassserstand [NN + m]"; @@ -101,7 +101,7 @@ * @param out Where to write to. */ public void write(OutputStream out) { - logger.info("WstWriter.write"); + log.info("WstWriter.write"); PrintWriter writer = new PrintWriter( new BufferedWriter( @@ -181,7 +181,7 @@ * @param writer The PrintWriter that creates the output. */ protected void writeHeader(PrintWriter writer) { - logger.debug("WstWriter.writeHeader"); + log.debug("WstWriter.writeHeader"); writer.println(cols);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/XYChartGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/XYChartGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -74,8 +74,8 @@ public static final int AXIS_SPACE = 5; - /** The logger that is used in this generator. */ - private static Logger logger = Logger.getLogger(XYChartGenerator.class); + /** The log that is used in this generator. */ + private static Logger log = Logger.getLogger(XYChartGenerator.class); protected List<Marker> domainMarkers = new ArrayList<Marker>(); @@ -103,7 +103,7 @@ */ @Override public JFreeChart generateChart() { - logger.debug("XYChartGenerator.generateChart"); + log.debug("XYChartGenerator.generateChart"); JFreeChart chart = ChartFactory.createXYLineChart( getChartTitle(), @@ -186,7 +186,7 @@ protected void addLogo(XYPlot plot) { String logo = showLogo(); if (logo == null) { - logger.debug("No logo to show chosen"); + log.debug("No logo to show chosen"); return; } @@ -232,7 +232,7 @@ yPos = ((Double)getYBounds(0).getUpper() + (Double)getYBounds(0).getLower())/2d; } else { - logger.debug("Unknown place-v value: " + placev); + log.debug("Unknown place-v value: " + placev); } if (placeh == null || placeh.equals("none")) { @@ -248,10 +248,10 @@ xPos = ((Double)getXBounds(0).getUpper() + (Double)getXBounds(0).getLower())/2d; } else { - logger.debug("Unknown place-h value: " + placeh); + log.debug("Unknown place-h value: " + placeh); } - logger.debug("logo position: " + xPos + "/" + yPos); + log.debug("logo position: " + xPos + "/" + yPos); org.jfree.ui.RectangleAnchor anchor = org.jfree.ui.RectangleAnchor.TOP; @@ -308,7 +308,7 @@ @Override protected AxisDataset createAxisDataset(int idx) { - logger.debug("Create new AxisDataset for index: " + idx); + log.debug("Create new AxisDataset for index: " + idx); return new AxisDataset(idx); } @@ -317,17 +317,17 @@ * Put debug output about datasets. */ public void debugDatasets(XYPlot plot) { - logger.debug("Number of datasets: " + plot.getDatasetCount()); + log.debug("Number of datasets: " + plot.getDatasetCount()); for (int i = 0, P = plot.getDatasetCount(); i < P; i++) { if (plot.getDataset(i) == null) { - logger.debug("Dataset #" + i + " is null"); + log.debug("Dataset #" + i + " is null"); continue; } - logger.debug("Dataset #" + i + ":" + plot.getDataset(i)); + log.debug("Dataset #" + i + ":" + plot.getDataset(i)); XYSeriesCollection series = (XYSeriesCollection) plot.getDataset(i); - logger.debug("X-Extend of Dataset: " + series.getSeries(0).getMinX() + log.debug("X-Extend of Dataset: " + series.getSeries(0).getMinX() + " " + series.getSeries(0).getMaxX()); - logger.debug("Y-Extend of Dataset: " + series.getSeries(0).getMinY() + log.debug("Y-Extend of Dataset: " + series.getSeries(0).getMinY() + " " + series.getSeries(0).getMaxY()); } } @@ -337,12 +337,12 @@ * Put debug output about axes. */ public void debugAxis(XYPlot plot) { - logger.debug("..............."); + log.debug("..............."); for (int i = 0, P = plot.getRangeAxisCount(); i < P; i++) { if (plot.getRangeAxis(i) == null) - logger.debug("Range-Axis #" + i + " == null"); + log.debug("Range-Axis #" + i + " == null"); else { - logger.debug("Range-Axis " + i + " != null [" + + log.debug("Range-Axis " + i + " != null [" + plot.getRangeAxis(i).getRange().getLowerBound() + " " + plot.getRangeAxis(i).getRange().getUpperBound() + "]"); @@ -350,15 +350,15 @@ } for (int i = 0, P = plot.getDomainAxisCount(); i < P; i++) { if (plot.getDomainAxis(i) == null) - logger.debug("Domain-Axis #" + i + " == null"); + log.debug("Domain-Axis #" + i + " == null"); else { - logger.debug("Domain-Axis " + i + " != null [" + + log.debug("Domain-Axis " + i + " != null [" + plot.getDomainAxis(i).getRange().getLowerBound() + " " + plot.getDomainAxis(i).getRange().getUpperBound() + "]"); } } - logger.debug("..............."); + log.debug("..............."); } @@ -370,7 +370,7 @@ */ public void addAreaSeries(StyledAreaSeriesCollection area, int index, boolean visible) { if (area == null) { - logger.warn("Cannot yet render above/under curve."); + log.warn("Cannot yet render above/under curve."); return; } @@ -398,7 +398,7 @@ return; } - logger.debug("Y Range of XYSeries: " + + log.debug("Y Range of XYSeries: " + series.getMinY() + " | " + series.getMaxY()); addAxisDataset(new XYSeriesCollection(series), index, visible); @@ -467,7 +467,7 @@ @Override protected void combineXBounds(Bounds bounds, int index) { if (!(bounds instanceof DoubleBounds)) { - logger.warn("Unsupported Bounds type: " + bounds.getClass()); + log.warn("Unsupported Bounds type: " + bounds.getClass()); return; } @@ -492,7 +492,7 @@ @Override protected void combineYBounds(Bounds bounds, int index) { if (!(bounds instanceof DoubleBounds)) { - logger.warn("Unsupported Bounds type: " + bounds.getClass()); + log.warn("Unsupported Bounds type: " + bounds.getClass()); return; } @@ -519,7 +519,7 @@ */ private void recoverEmptyPlot(XYPlot plot) { if (plot.getRangeAxis() == null) { - logger.debug("debug: No range axis"); + log.debug("debug: No range axis"); plot.setRangeAxis(createYAxis(0)); } } @@ -536,7 +536,7 @@ if (b != null && b.getLower().equals(b.getUpper())) { - logger.debug("Check whether to expand a x axis.i ("+b.getLower() + "-" + b.getUpper()+")"); + log.debug("Check whether to expand a x axis.i ("+b.getLower() + "-" + b.getUpper()+")"); setXBounds(key, ChartHelper.expandBounds(b, 5)); } } @@ -553,7 +553,7 @@ * @param plot The XYPlot. */ protected void autoZoom(XYPlot plot) { - logger.debug("Zoom to specified ranges."); + log.debug("Zoom to specified ranges."); Range xrange = getDomainAxisRange(); Range yrange = getValueAxisRange(); @@ -582,11 +582,11 @@ } if (yaxis == null) { - logger.debug("Zoom problem: no Y Axis for index: " + i); + log.debug("Zoom problem: no Y Axis for index: " + i); continue; } - logger.debug("Prepare zoom settings for y axis at index: " + i); + log.debug("Prepare zoom settings for y axis at index: " + i); zoomY(plot, yaxis, getYBounds(Integer.valueOf(i)), yrange); } } @@ -596,7 +596,7 @@ String[] ranges = getDomainAxisRangeFromRequest(); if (ranges == null || ranges.length < 2) { - logger.debug("No zoom range for domain axis specified."); + log.debug("No zoom range for domain axis specified."); return null; } @@ -606,7 +606,7 @@ double to = Double.parseDouble(ranges[1]); if (from == 0 && to == 0) { - logger.debug("No range specified. Lower and upper X == 0"); + log.debug("No range specified. Lower and upper X == 0"); return null; } @@ -619,7 +619,7 @@ return new Range(from, to); } catch (NumberFormatException nfe) { - logger.warn("Wrong values for domain axis range."); + log.warn("Wrong values for domain axis range."); } } @@ -631,7 +631,7 @@ String[] ranges = getValueAxisRangeFromRequest(); if (ranges == null || ranges.length < 2) { - logger.debug("No range specified. Lower and upper Y == 0"); + log.debug("No range specified. Lower and upper Y == 0"); return null; } @@ -641,7 +641,7 @@ double to = Double.parseDouble(ranges[1]); if (from == 0 && to == 0) { - logger.debug("No range specified. Lower and upper Y == 0"); + log.debug("No range specified. Lower and upper Y == 0"); return null; } @@ -650,7 +650,7 @@ : new Range(from, to); } catch (NumberFormatException nfe) { - logger.warn("Wrong values for value axis range."); + log.warn("Wrong values for value axis range."); } } @@ -688,7 +688,7 @@ Bounds computed = calculateZoom(bounds, x); computed.applyBounds(axis, AXIS_SPACE); - logger.debug("Zoom axis to: " + computed); + log.debug("Zoom axis to: " + computed); return true; } @@ -708,11 +708,11 @@ double min = bounds.getLower().doubleValue(); double max = bounds.getUpper().doubleValue(); - if (logger.isDebugEnabled()) { - logger.debug("Minimum is: " + min); - logger.debug("Maximum is: " + max); - logger.debug("Lower zoom is: " + range.getLowerBound()); - logger.debug("Upper zoom is: " + range.getUpperBound()); + if (log.isDebugEnabled()) { + log.debug("Minimum is: " + min); + log.debug("Maximum is: " + max); + log.debug("Lower zoom is: " + range.getLowerBound()); + log.debug("Upper zoom is: " + range.getUpperBound()); } double diff = max > min ? max - min : min - max; @@ -733,18 +733,18 @@ */ @Override public Range[] getRangesForAxis(int index) { - logger.debug("getRangesForAxis " + index); + log.debug("getRangesForAxis " + index); Bounds rx = getXBounds(Integer.valueOf(0)); Bounds ry = getYBounds(Integer.valueOf(index)); if (rx == null) { - logger.warn("Range for x axis not set." + + log.warn("Range for x axis not set." + " Using default values: 0 - 1."); rx = new DoubleBounds(0, 1); } if (ry == null) { - logger.warn("Range for y" + index + + log.warn("Range for y" + index + " axis not set. Using default values: 0 - 1."); ry = new DoubleBounds(0, 1); } @@ -830,7 +830,7 @@ localizeDomainAxis(axis); } else { - logger.warn("Domain axis at " + i + " is null."); + log.warn("Domain axis at " + i + " is null."); } } @@ -841,7 +841,7 @@ localizeRangeAxis(axis); } else { - logger.warn("Range axis at " + i + " is null."); + log.warn("Range axis at " + i + " is null."); } } } @@ -898,13 +898,13 @@ if (!act) { continue; } - //logger.debug(" x " + x + " y " + y ); + //log.debug(" x " + x + " y " + y ); series.add(x, y, false); xy.add(new CollisionFreeXYTextAnnotation(name, x, y)); } } catch(JSONException e){ - logger.error("Could not decode json."); + log.error("Could not decode json."); } RiverAnnotation annotations = new RiverAnnotation(null, null, null, theme);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -44,8 +44,8 @@ extends FixWQCurveGenerator implements FacetTypes { - /** Private logger. */ - private static Logger logger = + /** Private log. */ + private static Logger log = Logger.getLogger(ExtremeWQCurveGenerator.class); public static final String I18N_CHART_TITLE = @@ -104,11 +104,11 @@ /** Do Extreme Curve nonextrapolated points out. */ protected void doExtremeCurveBaseOut(ArtifactAndFacet aaf, ThemeDocument theme, boolean visible) { - logger.debug("doExtremeCurveBaseOut"); + log.debug("doExtremeCurveBaseOut"); ExtremeCurveFacet facet = (ExtremeCurveFacet) aaf.getFacet(); Curve curve = (Curve) facet.getData(aaf.getArtifact(), context); if (curve == null) { - logger.warn("doExtremeCurveBaseOut: Facet does not contain Curve"); + log.warn("doExtremeCurveBaseOut: Facet does not contain Curve"); return; } @@ -136,11 +136,11 @@ /** Do Extreme Curve out */ protected void doExtremeCurveOut(ArtifactAndFacet aaf, ThemeDocument theme, boolean visible) { - logger.debug("doExtremeCurveOut"); + log.debug("doExtremeCurveOut"); ExtremeCurveFacet facet = (ExtremeCurveFacet) aaf.getFacet(); Curve curve = (Curve) facet.getData(aaf.getArtifact(), context); if (curve == null) { - logger.warn("doExtremeCurveOut: Facet does not contain Curve"); + log.warn("doExtremeCurveOut: Facet does not contain Curve"); return; }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/DeltaWtExporter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/DeltaWtExporter.java Fri Sep 05 12:58:17 2014 +0200 @@ -42,7 +42,7 @@ public class DeltaWtExporter extends AbstractExporter { - /** Private logger. */ + /** Private log. */ private static Logger log = Logger.getLogger(DeltaWtExporter.class); public static final String CSV_KM_HEADER =
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixATExport.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixATExport.java Fri Sep 05 12:58:17 2014 +0200 @@ -43,8 +43,8 @@ /** Export result of fixation analysis. */ public class FixATExport extends AbstractExporter { - /** Private logger. */ - private static Logger logger = + /** Private log. */ + private static Logger log = Logger.getLogger(FixATExport.class); protected Function function; @@ -53,7 +53,7 @@ @Override public void doOut(ArtifactAndFacet bundle, ThemeDocument attr, boolean visible) { - logger.debug("AT Export doOut()."); + log.debug("AT Export doOut()."); Object data = bundle.getData(context); if (data instanceof CalculationResult) { CalculationResult cr = (CalculationResult)data; @@ -63,13 +63,13 @@ } } else { - logger.debug("No CalculationResult found for AT export."); + log.debug("No CalculationResult found for AT export."); return; } 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."); + log.debug("No function found for AT export."); return; } this.function = FunctionFactory.getInstance().getFunction(f); @@ -78,7 +78,7 @@ @Override public void generate() throws IOException { if (this.function == null || this.parameters == null) { - logger.debug("No function or paramters for AT export."); + log.debug("No function or paramters for AT export."); return; }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixATWriter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixATWriter.java Fri Sep 05 12:58:17 2014 +0200 @@ -33,7 +33,7 @@ /** Export Fixation Analysis Results to AT. */ public class FixATWriter { - /** Private logger. */ + /** Private log. */ private static Logger log = Logger.getLogger(FixATWriter.class); public static final String I18N_HEADER_KEY =
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixChartGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixChartGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -24,8 +24,8 @@ public abstract class FixChartGenerator extends XYChartGenerator { - /** Private logger. */ - private static Logger logger = Logger.getLogger(FixChartGenerator.class); + /** Private log. */ + private static Logger log = Logger.getLogger(FixChartGenerator.class); public static final Double INVALID_KM = Double.valueOf(-1d); public static final String CURRENT_KM = "currentKm"; @@ -38,8 +38,8 @@ Double currentKm = getCurrentKmFromRequest(request); - if (logger.isDebugEnabled()) { - logger.debug("currentKm = " + currentKm); + if (log.isDebugEnabled()) { + log.debug("currentKm = " + currentKm); } if (currentKm != INVALID_KM) {
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixDeltaWtGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixDeltaWtGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -52,8 +52,8 @@ extends TimeseriesChartGenerator implements FacetTypes { - /** Private logger. */ - private static Logger logger = + /** Private log. */ + private static Logger log = Logger.getLogger(FixDeltaWtGenerator.class); public static final String I18N_CHART_TITLE = @@ -164,8 +164,8 @@ boolean visible ) { String name = artifactFacet.getFacetName(); - logger.debug("FixDeltaWtGenerator.doOut: " + name); - logger.debug("Theme description is: " + artifactFacet.getFacetDescription()); + log.debug("FixDeltaWtGenerator.doOut: " + name); + log.debug("Theme description is: " + artifactFacet.getFacetDescription()); this.artifact = (D4EArtifact)artifactFacet.getArtifact(); @@ -223,7 +223,7 @@ theme, visible, YAXIS.dW.idx); } else { - logger.warn("doOut(): unknown facet name: " + name); + log.warn("doOut(): unknown facet name: " + name); return; } } @@ -236,7 +236,7 @@ ThemeDocument theme, boolean visible) { - logger.debug("doReferencePeriodsOut()"); + log.debug("doReferencePeriodsOut()"); if (visible) { FixAnalysisAccess access = new FixAnalysisAccess(artifact); @@ -266,7 +266,7 @@ ThemeDocument theme, boolean visible) { - logger.debug("doSectorAverageOut(): description = " + desc); + log.debug("doSectorAverageOut(): description = " + desc); QWDDateRange qwd = (QWDDateRange) data; TimeSeriesCollection tsc = new TimeSeriesCollection(); @@ -311,7 +311,7 @@ ThemeDocument theme, boolean visible ) { - logger.debug("doAnalysisEventsOut: desc = " + desc); + log.debug("doAnalysisEventsOut: desc = " + desc); QWD qwd = (QWD) data; doQWDEventsOut(qwd, desc, theme, visible); @@ -326,7 +326,7 @@ TimeSeries interpol = new StyledTimeSeries(desc + "interpol", theme); if (qwd == null) { - logger.debug("doQWDEventsOut: qwd == null"); + log.debug("doQWDEventsOut: qwd == null"); return; } @@ -371,10 +371,10 @@ protected void doQWDTextAnnotations(Map<Integer, int[]> annoIdxMap, TimeSeriesCollection tsc, QWD qwd, ThemeDocument theme, boolean visible) { - logger.debug("doQWDTextAnnotation()"); + log.debug("doQWDTextAnnotation()"); if (!visible || !theme.parseShowPointLabel()) { - logger.debug("doQWDTextAnnotation: annotation not visible"); + log.debug("doQWDTextAnnotation: annotation not visible"); return; } @@ -407,7 +407,7 @@ ThemeDocument theme, boolean visible ) { - logger.debug("doReferenceEventsOut: desc = " + desc); + log.debug("doReferenceEventsOut: desc = " + desc); QWD qwd = (QWD) data; doQWDEventsOut(qwd, desc, theme, visible); @@ -421,10 +421,10 @@ ThemeDocument theme, boolean visible ) { - logger.debug("doDeviationOut: desc = " + desc); + log.debug("doDeviationOut: desc = " + desc); if (data == null || !visible) { - logger.debug("no standard deviation"); + log.debug("no standard deviation"); return; } double[] value = (double[]) data; @@ -448,7 +448,7 @@ return; } for (int i = 0; i < ranges.length; i++) { - logger.debug("creating domain marker"); + log.debug("creating domain marker"); RegularTimePeriod start = new FixedMillisecond(ranges[i].getFrom()); RegularTimePeriod end = new FixedMillisecond(ranges[i].getTo()); StyledDomainMarker marker = @@ -457,7 +457,7 @@ marker.useSecondColor(i % 2 == 0); domainMarker.add(marker); } - logger.debug("domainmarkers: " + domainMarker.size()); + log.debug("domainmarkers: " + domainMarker.size()); } @@ -467,8 +467,8 @@ Double currentKm = FixChartGenerator.getCurrentKmFromRequest(request); - if (logger.isDebugEnabled()) { - logger.debug("currentKm = " + currentKm); + if (log.isDebugEnabled()) { + log.debug("currentKm = " + currentKm); } context.putContextValue("currentKm", currentKm);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixDerivedCurveGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixDerivedCurveGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -29,8 +29,8 @@ extends FixChartGenerator implements FacetTypes { - /** Private logger. */ - private static Logger logger = + /** Private log. */ + private static Logger log = Logger.getLogger(FixDerivedCurveGenerator.class); public static final String I18N_CHART_TITLE = @@ -66,7 +66,7 @@ @Override public void doOut(ArtifactAndFacet aaf, ThemeDocument doc, boolean visible) { - logger.debug("doOut"); + log.debug("doOut"); if (FacetTypes.IS.MANUALPOINTS(aaf.getFacetName())) { doPoints(aaf.getData(context), @@ -79,7 +79,7 @@ aaf.getArtifact(), context); if (func == null) { - logger.warn("doOut: Facet does not contain FixFunction"); + log.warn("doOut: Facet does not contain FixFunction"); return; }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -70,8 +70,8 @@ extends FixChartGenerator implements FacetTypes { - /** Private logger. */ - private static Logger logger = + /** Private log. */ + private static Logger log = Logger.getLogger(FixWQCurveGenerator.class); public static final String I18N_CHART_TITLE = @@ -156,7 +156,7 @@ fixedWinMRange.getUpperBound()); } - logger.debug("Syncing Axis Bounds. Bounds W: " + boundsInMGauge.toString() + + log.debug("Syncing Axis Bounds. Bounds W: " + boundsInMGauge.toString() + " Bounds Wcm: " + boundsInCM.toString()); double datum = getCurrentGaugeDatum(); @@ -176,15 +176,15 @@ // Set the new combined bounds setYBounds(YAXIS.W.idx, boundsInMGauge); setYBounds(YAXIS.WCm.idx, boundsInCM); - logger.debug("Synced Bounds W: " + boundsInMGauge.toString() + + log.debug("Synced Bounds W: " + boundsInMGauge.toString() + " Bounds Wcm: " + boundsInCM.toString()); } @Override public void doOut(ArtifactAndFacet aaf, ThemeDocument doc, boolean visible) { - logger.debug("doOut: " + aaf.getFacetName()); + log.debug("doOut: " + aaf.getFacetName()); if (!prepareChartData(aaf, doc, visible)) { - logger.warn("Unknown facet, name " + aaf.getFacetName()); + log.warn("Unknown facet, name " + aaf.getFacetName()); } } @@ -237,7 +237,7 @@ doWQOut(aaf.getData(context), aaf, doc, visible); } else if (name.equals(DISCHARGE_CURVE)) { - logger.debug("diso " + name); + log.debug("diso " + name); doDischargeOut( (WINFOArtifact) aaf.getArtifact(), aaf.getData(context), @@ -267,7 +267,7 @@ /** Add sector average points to chart. */ protected void doSectorAverageOut(ArtifactAndFacet aaf, ThemeDocument doc, boolean visible) { - logger.debug("doSectorAverageOut"); + log.debug("doSectorAverageOut"); QWDDateRange qwdd = (QWDDateRange) aaf.getData(context); QWD qwd = qwdd != null ? qwdd.getQWD() : null; @@ -276,7 +276,7 @@ addQWSeries(new QWD[] { qwd }, aaf, doc, visible); } else { - logger.debug("doSectorAverageOut: qwd == null"); + log.debug("doSectorAverageOut: qwd == null"); } } @@ -286,12 +286,12 @@ ThemeDocument doc, boolean visible ) { - logger.debug("doAnalysisEventsOut"); + log.debug("doAnalysisEventsOut"); QWD qwd = (QWD)aaf.getData(context); if (qwd == null) { - logger.debug("doAnalysisEventsOut: qwd == null"); + log.debug("doAnalysisEventsOut: qwd == null"); return; } @@ -340,11 +340,11 @@ /** Add reference event points to chart. */ protected void doReferenceEventsOut(ArtifactAndFacet aaf, ThemeDocument doc, boolean visible) { - logger.debug("doReferenceEventsOut"); + log.debug("doReferenceEventsOut"); QWI qwd = (QWI)aaf.getData(context); if (qwd == null) { - logger.debug("doReferenceEventsOut: qwds == null"); + log.debug("doReferenceEventsOut: qwds == null"); return; } @@ -398,7 +398,7 @@ XYSeries series = new StyledXYSeries(title, theme); Double ckm = (Double) context.getContextValue(CURRENT_KM); if (wqkms == null || wqkms.getKms().length == 0 || ckm == null) { - logger.info("addPointFromWQKms: No event data to show."); + log.info("addPointFromWQKms: No event data to show."); return; } double[] kms = wqkms.getKms(); @@ -425,7 +425,7 @@ } protected void doEventsOut(ArtifactAndFacet aaf, ThemeDocument doc, boolean visible) { - logger.debug("doEventsOut"); + log.debug("doEventsOut"); // Find W/Q at km. addPointFromWQKms((WQKms) aaf.getData(context), aaf.getFacetDescription(), doc, visible); @@ -433,14 +433,14 @@ protected void doWQCurveOut(ArtifactAndFacet aaf, ThemeDocument doc, boolean visible) { - logger.debug("doWQCurveOut"); + log.debug("doWQCurveOut"); FixWQCurveFacet facet = (FixWQCurveFacet)aaf.getFacet(); FixFunction func = (FixFunction)facet.getData( aaf.getArtifact(), context); if (func == null) { - logger.warn("doWQCurveOut: Facet does not contain FixFunction"); + log.warn("doWQCurveOut: Facet does not contain FixFunction"); return; } @@ -478,12 +478,12 @@ } } else { - logger.warn("doWQCurveOut: maxQ <= 0"); + log.warn("doWQCurveOut: maxQ <= 0"); } } protected void doOutlierOut(ArtifactAndFacet aaf, ThemeDocument doc, boolean visible) { - logger.debug("doOutlierOut"); + log.debug("doOutlierOut"); QWI[] qws = (QWI[])aaf.getData(context); addQWSeries(qws, aaf, doc, visible); @@ -492,20 +492,20 @@ /** Add markers for q sectors. */ protected void doQSectorOut(ArtifactAndFacet aaf, ThemeDocument theme, boolean visible) { - logger.debug("doQSectorOut"); + log.debug("doQSectorOut"); if (!visible) { return; } Object qsectorsObj = aaf.getData(context); if (qsectorsObj == null || !(qsectorsObj instanceof List)) { - logger.warn("No QSectors coming from data."); + log.warn("No QSectors coming from data."); return; } List<?> qsectorsList = (List<?>) qsectorsObj; if (qsectorsList.size() == 0 || !(qsectorsList.get(0) instanceof NamedDouble)) { - logger.warn("No QSectors coming from data."); + log.warn("No QSectors coming from data."); return; } @@ -567,7 +567,7 @@ List<StickyAxisAnnotation> xy = new ArrayList<StickyAxisAnnotation>(); if (wqkms instanceof double[][]) { - logger.debug("Got double[][]"); + log.debug("Got double[][]"); double [][] data = (double [][]) wqkms; for (int i = 0; i< data[0].length; i++) { xy.add(new StickyAxisAnnotation(aandf.getFacetDescription(), @@ -579,7 +579,7 @@ } else { // Assume its WKms. - logger.debug("Got WKms"); + log.debug("Got WKms"); WKms data = (WKms) wqkms; Double ckm = (Double) context.getContextValue(CURRENT_KM); @@ -613,14 +613,14 @@ River river = RiverUtils.getRiver(artifact); if (river == null) { - logger.debug("no river found"); + log.debug("no river found"); return; } Gauge gauge = river.determineGaugeByName(gaugeName); if (gauge == null) { - logger.debug("no gauge found"); + log.debug("no gauge found"); return; } @@ -654,16 +654,16 @@ ThemeDocument theme, boolean visible ) { - logger.debug("FixWQCurveGenerator: doWQOut"); + log.debug("FixWQCurveGenerator: doWQOut"); if (wqkms instanceof WQKms) { // TODO As in doEventsOut, the value-searching should // be delivered by the facet already (instead of in the Generator). - logger.debug("FixWQCurveGenerator: doWQOut: WQKms"); + log.debug("FixWQCurveGenerator: doWQOut: WQKms"); addPointFromWQKms((WQKms) aaf.getData(context), aaf.getFacetDescription(), theme, visible); } else { - logger.debug("FixWQCurveGenerator: doWQOut: double[][]"); + log.debug("FixWQCurveGenerator: doWQOut: double[][]"); double [][] data = (double [][]) wqkms; XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), false, true, theme);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceExporter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceExporter.java Fri Sep 05 12:58:17 2014 +0200 @@ -46,8 +46,8 @@ extends AbstractExporter { - /** Private logger. */ - private static Logger logger = + /** Private log. */ + private static Logger log = Logger.getLogger(BedDifferenceExporter.class); private static final String CSV_HEADER_KM = @@ -120,13 +120,13 @@ @Override protected void addData(Object data) { if (!(data instanceof CalculationResult)) { - logger.warn("Invalid data type."); + log.warn("Invalid data type."); return; } Object[] d = (Object[])((CalculationResult)data).getData(); if (!(d instanceof BedDifferencesResult[])) { - logger.warn("Invalid result object."); + log.warn("Invalid result object."); return; } results = (BedDifferencesResult[])d; @@ -170,7 +170,7 @@ protected void writeCSVHeader(CSVWriter writer) { - logger.debug("writeCSVHeader()"); + log.debug("writeCSVHeader()"); List<String> header = new ArrayList<String>(); if (results != null) { @@ -213,7 +213,7 @@ @Override protected void writePDF(OutputStream out) { - logger.debug("write PDF"); + log.debug("write PDF"); BedDifferenceJRDataSource source = createJRData(); String jasperFile = Resources.getMsg( @@ -234,7 +234,7 @@ JasperExportManager.exportReportToPdfStream(print, out); } catch(JRException je) { - logger.warn("Error generating PDF Report!", je); + log.warn("Error generating PDF Report!", je); } } }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java Fri Sep 05 12:58:17 2014 +0200 @@ -33,8 +33,8 @@ public class BedQualityExporter extends AbstractExporter { - /** Private logger. */ - private static Logger logger = Logger.getLogger(BedQualityExporter.class); + /** Private log. */ + private static Logger log = Logger.getLogger(BedQualityExporter.class); private static final String CSV_HEADER_KM = "export.minfo.bedquality.km"; @@ -155,7 +155,7 @@ NumberFormat nf = Formatter.getFormatter(context, 1, 3); for (double[] d : createDataRows()) { - logger.debug("row + " + Arrays.toString(d)); + log.debug("row + " + Arrays.toString(d)); List<String> cells = new ArrayList<String>(d.length); for (int i = 0; i < d.length; i++) { if (!Double.isNaN(d[i])) { @@ -178,22 +178,22 @@ @Override protected void addData(Object data) { // TODO Auto-generated method stub - logger.debug("addData()"); + log.debug("addData()"); if (!(data instanceof CalculationResult)) { - logger.warn("Invalid data type."); + log.warn("Invalid data type."); return; } Object[] d = (Object[])((CalculationResult)data).getData(); if (!(d instanceof BedQualityResult[])) { - logger.warn("Invalid result object."); + log.warn("Invalid result object."); return; } results = (BedQualityResult[])d; } protected void writeCSVHeader(CSVWriter writer) { - logger.debug("writeCSVHeader()"); + log.debug("writeCSVHeader()"); List<String> header = new ArrayList<String>(); if (results != null) {
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/SedimentLoadExporter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/SedimentLoadExporter.java Fri Sep 05 12:58:17 2014 +0200 @@ -39,8 +39,8 @@ public class SedimentLoadExporter extends AbstractExporter { - /** Private logger. */ - private static Logger logger = Logger.getLogger(SedimentLoadExporter.class); + /** Private log. */ + private static Logger log = Logger.getLogger(SedimentLoadExporter.class); // i18n keys. public static final String CSV_KM = @@ -181,7 +181,7 @@ /** Writes i18ned header for csv file/stream. */ protected void writeCSVHeader(CSVWriter writer) { - logger.debug("writeCSVHeader()"); + log.debug("writeCSVHeader()"); List<String> header = new LinkedList<String>(); SedimentLoadAccess access = @@ -212,23 +212,23 @@ @Override protected void addData(Object data) { if (!(data instanceof CalculationResult)) { - logger.warn("Invalid data type."); + log.warn("Invalid data type."); return; } Object d = ((CalculationResult)data).getData(); if (!(d instanceof SedimentLoadDataResult)) { - logger.warn("Invalid result object."); + log.warn("Invalid result object."); return; } - logger.debug("addData: Data added."); + log.debug("addData: Data added."); result = (SedimentLoadDataResult)d; } /** Write PDF to outputstream (not implemented yet). */ @Override protected void writePDF(OutputStream out) { - logger.warn("Not implemented."); + log.warn("Not implemented."); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/AnnotationProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/AnnotationProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -24,8 +24,8 @@ */ public class AnnotationProcessor extends DefaultProcessor { - /** Private logger. */ - private static final Logger logger = + /** Private log. */ + private static final Logger log = Logger.getLogger(AnnotationProcessor.class); @Override @@ -41,7 +41,7 @@ CallContext context = generator.getCallContext(); if (!(bundle.getData(context) instanceof RiverAnnotation)) { // Just a bit defensive should not happen - logger.error("Incompatible facet in doOut"); + log.error("Incompatible facet in doOut"); return; } RiverAnnotation ra = (RiverAnnotation)bundle.getData(context); @@ -65,7 +65,7 @@ CallContext context = generator.getCallContext(); if (!(bundle.getData(context) instanceof RiverAnnotation)) { // Just a bit defensive should not happen - logger.error("Incompatible facet in doOut"); + log.error("Incompatible facet in doOut"); return; } RiverAnnotation ra = (RiverAnnotation)bundle.getData(context);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/AreaProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/AreaProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,7 +31,7 @@ public class AreaProcessor extends DefaultProcessor { - private static final Logger logger = Logger.getLogger(AreaProcessor.class); + private static final Logger log = Logger.getLogger(AreaProcessor.class); protected XYSeries getSeries(String seriesName, Object data, String facetType, ThemeDocument theme) { @@ -65,7 +65,7 @@ StyledSeriesBuilder.addPoints(series, ((Lines.LineData) data).points, false); } else { - logger.error("Do not know how to deal with (up) area info from: " + log.error("Do not know how to deal with (up) area info from: " + data); } return series; @@ -82,7 +82,7 @@ String seriesName = bundle.getFacetDescription(); StyledAreaSeriesCollection area = new StyledAreaSeriesCollection(theme); - logger.debug("Area Processor processing: " + seriesName); + log.debug("Area Processor processing: " + seriesName); AreaFacet.Data data = (AreaFacet.Data) bundle.getData(context); @@ -137,7 +137,7 @@ if (FacetTypes.IS.Q(facetName)) { return "Q"; } - logger.warn("Could not find axis for facet " + facetName); + log.warn("Could not find axis for facet " + facetName); return "W"; }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/BedDiffHeightYearProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/BedDiffHeightYearProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,7 +31,7 @@ public class BedDiffHeightYearProcessor extends DefaultProcessor implements FacetTypes { - private final static Logger logger = + private final static Logger log = Logger.getLogger(BedDiffHeightYearProcessor.class); protected static double GAP_TOLERANCE = 0.101d; @@ -57,7 +57,7 @@ if (!(data instanceof double[][])) { // Should not happen if canHandle is correct - logger.error("Can't process " + data.getClass().getName() + " objects"); + log.error("Can't process " + data.getClass().getName() + " objects"); return; } @@ -109,7 +109,7 @@ if (!(data instanceof double[][])) { // Should not happen if canHandle is correct - logger.error("Can't process " + data.getClass().getName() + " objects"); + log.error("Can't process " + data.getClass().getName() + " objects"); return; }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/BedDiffYearProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/BedDiffYearProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -28,7 +28,7 @@ public class BedDiffYearProcessor extends DefaultProcessor implements FacetTypes { - private final static Logger logger = + private final static Logger log = Logger.getLogger(BedDiffYearProcessor.class); protected static double GAP_TOLERANCE = 0.101d; @@ -62,7 +62,7 @@ } if (!(data instanceof double[][])) { - logger.error("Can't process " + data.getClass().getName() + " objects"); + log.error("Can't process " + data.getClass().getName() + " objects"); return; } double[][] bData = (double[][]) data;
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/BedHeightProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/BedHeightProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -26,7 +26,7 @@ public class BedHeightProcessor extends DefaultProcessor { - private final static Logger logger = + private final static Logger log = Logger.getLogger(BedHeightProcessor.class); public static final String I18N_AXIS_LABEL_DEFAULT @@ -82,7 +82,7 @@ return null; } if (!(raw instanceof double[][])) { - logger.error("Unkown datatype: " + raw.getClass().getName()); + log.error("Unkown datatype: " + raw.getClass().getName()); return null; }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/BedQualityDensityProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/BedQualityDensityProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -21,7 +21,7 @@ public class BedQualityDensityProcessor extends DefaultProcessor { - private final static Logger logger = + private final static Logger log = Logger.getLogger(BedQualityDensityProcessor.class); public static final String I18N_AXIS_LABEL_DEFAULT = @@ -48,7 +48,7 @@ return; } if (!(data instanceof double[][])) { - logger.error("Unknown data type: " + data.getClass().getName()); + log.error("Unknown data type: " + data.getClass().getName()); return; }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/BedQualityDiameterProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/BedQualityDiameterProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -21,7 +21,7 @@ public class BedQualityDiameterProcessor extends DefaultProcessor { - private final static Logger logger = + private final static Logger log = Logger.getLogger(BedQualityDiameterProcessor.class); public static final String I18N_AXIS_LABEL_DEFAULT = @@ -47,7 +47,7 @@ return; } if (!(data instanceof double[][])) { - logger.error("Unknown data type: " + data.getClass().getName()); + log.error("Unknown data type: " + data.getClass().getName()); return; } double[][] values = (double[][])data;
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/BedQualityPorosityProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/BedQualityPorosityProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -21,7 +21,7 @@ public class BedQualityPorosityProcessor extends DefaultProcessor { - private final static Logger logger = + private final static Logger log = Logger.getLogger(BedQualityPorosityProcessor.class); public static final String I18N_AXIS_LABEL_DEFAULT = @@ -49,7 +49,7 @@ return; } if (!(raw instanceof double[][])) { - logger.error("Unknown data type: " + raw.getClass().getName()); + log.error("Unknown data type: " + raw.getClass().getName()); return; }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/BedWidthProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/BedWidthProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -24,7 +24,7 @@ public class BedWidthProcessor extends DefaultProcessor { - private final static Logger logger = + private final static Logger log = Logger.getLogger(BedWidthProcessor.class); public static final String I18N_AXIS_LABEL_DEFAULT = @@ -63,7 +63,7 @@ gi.add(values[0][i], values[1][i]); } } else { - logger.error("Unknown data for facet: " + bundle.getFacetName()); + log.error("Unknown data for facet: " + bundle.getFacetName()); } generator.addAxisSeries(series, axisName, visible);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/ComputedDischargeProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/ComputedDischargeProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -16,7 +16,7 @@ extends DefaultProcessor implements FacetTypes { - private static Logger logger = + private static Logger log = Logger.getLogger(ComputedDischargeProcessor.class);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/DeltaWProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/DeltaWProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -35,7 +35,7 @@ * historic reason for this is that they have in common that they * work on deltaW data from the fixing analysis. */ - private static final Logger logger = Logger.getLogger(DeltaWProcessor.class); + private static final Logger log = Logger.getLogger(DeltaWProcessor.class); public static final String I18N_DW_YAXIS_LABEL_DEFAULT = "delta W [cm]"; @@ -53,7 +53,7 @@ if (!visible) { return; } - logger.debug("Doing out for: " + bundle.getFacetName()); + log.debug("Doing out for: " + bundle.getFacetName()); if (facettype.equals(FacetTypes.FIX_REFERENCE_EVENTS_LS)) { doReferenceEventsOut(generator, bundle, theme, visible); } else if (facettype.equals(FacetTypes.FIX_ANALYSIS_EVENTS_LS)) { @@ -65,7 +65,7 @@ } else if (facettype.startsWith(FacetTypes.FIX_SECTOR_AVERAGE_LS)) { doSectorAverageOut(generator, bundle, theme, visible); } else { - logger.error("Could not handle: " + facettype); + log.error("Could not handle: " + facettype); } }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/DischargeProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/DischargeProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -29,7 +29,7 @@ public class DischargeProcessor extends DefaultProcessor implements FacetTypes { - private final static Logger logger = + private final static Logger log = Logger.getLogger(DischargeProcessor.class); /** Station for which the diagram is shown. */ @@ -69,7 +69,7 @@ visible); } else { - logger.error("Can't process " + log.error("Can't process " + data.getClass().getName() + " objects of facet " + bundle.getFacetName()); } @@ -98,7 +98,7 @@ ThemeDocument theme, boolean visible) { - logger.debug("DischargeCurveGenerator.doDischargeOut"); + log.debug("DischargeCurveGenerator.doDischargeOut"); CallContext context = generator.getCallContext(); WQKms data = (WQKms)bundle.getData(context); XYSeries series = new StyledXYSeries(name, theme); @@ -114,14 +114,14 @@ River river = access.getRiver(); if (river == null) { - logger.debug("no river found"); + log.debug("no river found"); return; } Gauge gauge = river.determineGaugeByName(gaugeName); if (gauge == null) { - logger.debug("no gauge found"); + log.debug("no gauge found"); return; }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/FixDeltaWAProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/FixDeltaWAProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -25,7 +25,7 @@ public class FixDeltaWAProcessor extends DefaultProcessor implements FacetTypes { - private final static Logger logger = + private final static Logger log = Logger.getLogger(FixDeltaWAProcessor.class); public static final String I18N_AXIS_LABEL =
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/FixDeltaWProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/FixDeltaWProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -25,7 +25,7 @@ public class FixDeltaWProcessor extends DefaultProcessor implements FacetTypes { - private final static Logger logger = + private final static Logger log = Logger.getLogger(FixDeltaWProcessor.class); public static final String I18N_AXIS_LABEL =
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/FlowVelocityProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/FlowVelocityProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -30,7 +30,7 @@ public class FlowVelocityProcessor extends DefaultProcessor { - private final static Logger logger = + private final static Logger log = Logger.getLogger(FlowVelocityProcessor.class); public static final String I18N_AXIS_LABEL = @@ -60,7 +60,7 @@ if (data == null) { // Check has been here before so we keep it for security reasons // this should never happen though. - logger.error("Data is null for facet: " + facetName); + log.error("Data is null for facet: " + facetName); return; } double [][] points; @@ -78,14 +78,14 @@ (FastFlowVelocityMeasurementValue) data; points = new double[][] {{fData.getStation()},{fData.getV()}}; } else { - logger.error("Unknown facet name: " + facetName); + log.error("Unknown facet name: " + facetName); return; } StyledSeriesBuilder.addPoints(series, points, true); Double start = (Double)context.getContextValue("startkm"); Double end = (Double)context.getContextValue("endkm"); if (start != null && end != null) { - logger.debug("start: " + start + " end: " + end); + log.debug("start: " + start + " end: " + end); D4EArtifact artifact = (D4EArtifact)bundle.getArtifact(); RiverContext fc = (RiverContext)context.globalContext(); // Adaptive smoothing, based on zoom factor/diagram extents.
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/HistoricalDischargeProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/HistoricalDischargeProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -17,7 +17,7 @@ implements FacetTypes { - private final static Logger logger = + private final static Logger log = Logger.getLogger(HistoricalDischargeProcessor.class); /** Station for which the diagram is shown. */ @@ -46,7 +46,7 @@ ThemeDocument theme, boolean visible ) { - logger.debug("do out: " + bundle.getFacetName()); + log.debug("do out: " + bundle.getFacetName()); CallContext context = generator.getCallContext(); Object data = bundle.getData(context); if (data instanceof WQKms) {
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/ManualPointsProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/ManualPointsProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,7 +31,7 @@ public class ManualPointsProcessor extends DefaultProcessor { - private static final Logger logger = Logger.getLogger(ManualPointsProcessor.class); + private static final Logger log = Logger.getLogger(ManualPointsProcessor.class); @Override public void doOut( @@ -58,13 +58,13 @@ if (!act) { continue; } - //logger.debug(" x " + x + " y " + y ); + //log.debug(" x " + x + " y " + y ); series.add(x, y, false); xy.add(new CollisionFreeXYTextAnnotation(name, x, y)); } } catch(JSONException e){ - logger.error("Could not decode json."); + log.error("Could not decode json."); } RiverAnnotation annotation = new RiverAnnotation(null, null, null, theme);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/MiddleBedHeightProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/MiddleBedHeightProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -25,8 +25,8 @@ public class MiddleBedHeightProcessor extends DefaultProcessor { - /** Private logger. */ - private static final Logger logger = + /** Private log. */ + private static final Logger log = Logger.getLogger(MiddleBedHeightProcessor.class); public static final String I18N_AXIS_LABEL = @@ -52,7 +52,7 @@ return; } if (!(raw instanceof double[][])) { - logger.error("Unkonwn data type: " + raw.getClass().getName()); + log.error("Unkonwn data type: " + raw.getClass().getName()); return; }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/MiscDischargeProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/MiscDischargeProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -36,7 +36,7 @@ public class MiscDischargeProcessor extends DefaultProcessor implements FacetTypes { - private final static Logger logger = + private final static Logger log = Logger.getLogger(MiscDischargeProcessor.class); /** Station for which the diagram is shown. */ @@ -83,7 +83,7 @@ doPointsOut(generator, (double[][])data, bundle, theme, visible); } else { - logger.error("Can't process " + log.error("Can't process " + data.getClass().getName() + " objects of facet " + bundle.getFacetName()); } @@ -121,7 +121,7 @@ return; } else { - logger.error("Can't process " + log.error("Can't process " + data.getClass().getName() + " objects of facet " + bundle.getFacetName()); } @@ -154,7 +154,7 @@ boolean visible, int axidx ) { - logger.debug("doWQKmsPointOut"); + log.debug("doWQKmsPointOut"); String title = bundle.getFacetDescription(); XYSeries series = new StyledXYSeries( title, @@ -182,7 +182,7 @@ } } - logger.warn("No WQ found for km " + getKm()); + log.warn("No WQ found for km " + getKm()); } protected void doRiverAnnotationOut(XYChartGenerator generator, @@ -192,11 +192,11 @@ boolean visible ) { if (!(generator instanceof DischargeCurveGenerator)) { - logger.error("DischargeProcessor can only be used in " + + log.error("DischargeProcessor can only be used in " + " in DischargeCurveGenerator-classes."); return; } - logger.debug("doRiverAnnotationOut"); + log.debug("doRiverAnnotationOut"); DischargeCurveGenerator dGenerator = (DischargeCurveGenerator) generator; @@ -217,7 +217,7 @@ ThemeDocument theme, boolean visible ) { - logger.debug("doMarksOut"); + log.debug("doMarksOut"); if (!visible) { return; @@ -303,7 +303,7 @@ ThemeDocument theme, boolean visible ) { - logger.debug("doWQKmsPointOut"); + log.debug("doWQKmsPointOut"); String title = bundle.getFacetDescription(); XYSeries series = new StyledXYSeries( title, @@ -331,7 +331,7 @@ } } - logger.warn("No WQ found for km " + getKm()); + log.warn("No WQ found for km " + getKm()); } protected void doRiverAnnotationOut(DiagramGenerator generator,
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/QOutProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/QOutProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -37,8 +37,8 @@ public static final String I18N_LONGITUDINAL_LABEL_DEFAULT = "Q [m\u00b3/s]"; - /** Private logger. */ - private static final Logger logger = + /** Private log. */ + private static final Logger log = Logger.getLogger(QOutProcessor.class); @Override
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/SQRelationProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/SQRelationProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,7 +31,7 @@ public static final String I18N_AXIS_LABEL_DEFAULT = ""; - private final static Logger logger = + private final static Logger log = Logger.getLogger(SQRelationProcessor.class); @Override @@ -50,7 +50,7 @@ if (data == null) { // Check has been here before so we keep it but // this should never happen. - logger.error("Data is null for facet: " + facetName); + log.error("Data is null for facet: " + facetName); return; } @@ -79,19 +79,19 @@ } } } else { - logger.error("Could not handle: " + facetName); + log.error("Could not handle: " + facetName); return; } series.putMetaData(metaData, bundle.getArtifact(), context); - if (logger.isDebugEnabled()) { - logger.debug("Series '" + desc + "' has " + if (log.isDebugEnabled()) { + log.debug("Series '" + desc + "' has " + series.getItemCount() + " items."); - logger.debug(" -> min x = " + series.getMinX()); - logger.debug(" -> max x = " + series.getMaxX()); - logger.debug(" -> min y = " + series.getMinY()); - logger.debug(" -> max y = " + series.getMaxY()); + log.debug(" -> min x = " + series.getMinX()); + log.debug(" -> max x = " + series.getMaxX()); + log.debug(" -> min y = " + series.getMinY()); + log.debug(" -> max y = " + series.getMaxY()); } generator.addAxisSeries(series, axisName, visible);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/SedimentDensityProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/SedimentDensityProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -26,8 +26,8 @@ /** Process Sediment Density data. */ public class SedimentDensityProcessor extends DefaultProcessor { - /** Private logger. */ - private final static Logger logger = + /** Private log. */ + private final static Logger log = Logger.getLogger(SedimentDensityProcessor.class); public static final String I18N_AXIS_LABEL_DEFAULT = @@ -51,7 +51,7 @@ if (facetName.equals(FacetTypes.SEDIMENT_DENSITY)) { points =((SedimentDensity) data).getAllDensities(); } else { - logger.error("Unknown facet name: " + facetName); + log.error("Unknown facet name: " + facetName); return; } StyledSeriesBuilder.addPoints(series, points, true);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/SedimentLoadM3AProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/SedimentLoadM3AProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -13,7 +13,7 @@ public class SedimentLoadM3AProcessor extends SedimentLoadProcessor { - private final static Logger logger = + private final static Logger log = Logger.getLogger(SedimentLoadM3AProcessor.class); public static final String I18N_YAXIS_LABEL =
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/SedimentLoadProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/SedimentLoadProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -21,7 +21,7 @@ // Base class for SedimantLoad$UNITProcessors public class SedimentLoadProcessor extends DefaultProcessor { - private final static Logger logger = + private final static Logger log = Logger.getLogger(SedimentLoadProcessor.class); @Override @@ -30,7 +30,7 @@ ArtifactAndFacet bundle, ThemeDocument theme, boolean visible) { - logger.debug("doOut " + bundle.getFacetName()); + log.debug("doOut " + bundle.getFacetName()); CallContext context = generator.getCallContext(); XYSeries series = new StyledXYSeries(bundle.getFacetDescription(), false, // Handle NaN @@ -39,11 +39,11 @@ String facetName = bundle.getFacetName(); double [][] points; - logger.debug("Do out for: " + facetName); + log.debug("Do out for: " + facetName); if (facetName.startsWith("sedimentload.")) { points = (double[][]) data; } else { - logger.error("Unknown facet name: " + facetName); + log.error("Unknown facet name: " + facetName); return; }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/SedimentLoadTAProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/SedimentLoadTAProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -14,7 +14,7 @@ public class SedimentLoadTAProcessor extends SedimentLoadProcessor{ - private final static Logger logger = + private final static Logger log = Logger.getLogger(SedimentLoadTAProcessor.class); public static final String I18N_YAXIS_LABEL =
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/ShearStressProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/ShearStressProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,7 +23,7 @@ public class ShearStressProcessor extends DefaultProcessor { - private final static Logger logger = + private final static Logger log = Logger.getLogger(ShearStressProcessor.class); public static final String I18N_AXIS_LABEL =
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/WOutProcessor.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/WOutProcessor.java Fri Sep 05 12:58:17 2014 +0200 @@ -33,8 +33,8 @@ */ public class WOutProcessor extends DefaultProcessor { - /** Private logger. */ - private static final Logger logger = + /** Private log. */ + private static final Logger log = Logger.getLogger(WOutProcessor.class); public static final String I18N_AXIS_LABEL = @@ -49,7 +49,7 @@ ThemeDocument theme, boolean visible ) { - logger.debug("Processing facet: " + bundle.getFacetName()); + log.debug("Processing facet: " + bundle.getFacetName()); CallContext context = generator.getCallContext(); Object data = bundle.getData(context); @@ -103,7 +103,7 @@ bundle.getFacetName().equals(FacetTypes.DISCHARGE_LONGITUDINAL_C)) { /* Only use W values to check if the diagram should be inverted * see flys/issue1290 for details */ - logger.debug("Check for RTL data: "+ wkms.guessRTLData()); + log.debug("Check for RTL data: "+ wkms.guessRTLData()); generator.setInverted(wkms.guessRTLData()); } } @@ -116,7 +116,7 @@ boolean visible, int index) { - logger.debug("doOut"); + log.debug("doOut"); CallContext context = generator.getCallContext();
--- a/artifacts/src/main/java/org/dive4elements/river/exports/sq/SQOverviewGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/sq/SQOverviewGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -43,7 +43,7 @@ public class SQOverviewGenerator implements OutGenerator { - private static Logger logger = Logger.getLogger(SQOverviewGenerator.class); + private static Logger log = Logger.getLogger(SQOverviewGenerator.class); public static final String XPATH_CHART_SIZE = "/art:action/art:attributes/art:size"; @@ -66,7 +66,7 @@ @Override public void setup(Object config) { - logger.debug("SQOverviewGenerator.setup"); + log.debug("SQOverviewGenerator.setup"); } /** @@ -80,13 +80,13 @@ ThemeDocument attr, boolean visible ) { - logger.debug("doOut()"); + log.debug("doOut()"); // TODO: Why not using outName for this. String name = artifactAndFacet.getData(context).toString(); if(name != null) { - logger.debug("name: " + name); + log.debug("name: " + name); ChartGenerator2 g = (ChartGenerator2)RiverContext.getOutGenerator( context, @@ -96,7 +96,7 @@ g.setMasterArtifact(master); if (g == null) { - logger.debug("generator is null."); + log.debug("generator is null."); return; } @@ -113,10 +113,10 @@ charts.add(chart); } catch (IOException e) { - logger.warn(e); + log.warn(e); } catch (ArtifactDatabaseException e) { - logger.warn(e); + log.warn(e); } } } @@ -142,7 +142,7 @@ @Override public void generate() throws IOException { - logger.debug("SQOverviewGenerator.generate"); + log.debug("SQOverviewGenerator.generate"); int[] size = getSize(); @@ -152,7 +152,7 @@ BufferedImage result = new BufferedImage(size[0], size[1], BufferedImage.TYPE_INT_RGB); for (int i = 0, S = charts.size(); i < S; i++) { - logger.debug("index: " + i); + log.debug("index: " + i); JFreeChart chart = charts.get(i); ChartRenderingInfo info = new ChartRenderingInfo(); BufferedImage img = @@ -198,7 +198,7 @@ String output) throws ArtifactDatabaseException { - logger.debug("find specific XML node for Output: " + output); + log.debug("find specific XML node for Output: " + output); Map<String, String> vars = new HashMap<String, String>(); vars.put("output", output); @@ -249,7 +249,7 @@ size[1] = Integer.parseInt(h); } catch (NumberFormatException nfe) { - logger.warn("Wrong values for chart width/height."); + log.warn("Wrong values for chart width/height."); } } }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/sq/SQRelationExporter.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/sq/SQRelationExporter.java Fri Sep 05 12:58:17 2014 +0200 @@ -53,8 +53,8 @@ */ public class SQRelationExporter extends AbstractExporter { - /** Private logger. */ - private static final Logger logger = + /** Private log. */ + private static final Logger log = Logger.getLogger(SQRelationExporter.class); public static final String INFO_COEFF_A = @@ -190,7 +190,7 @@ @Override protected void writeCSVData(CSVWriter writer) { - logger.debug("writeCSVData"); + log.debug("writeCSVData"); writeCSVInfo(writer, new String[] { msg(INFO_COEFF_A), @@ -338,7 +338,7 @@ @Override protected void writePDF(OutputStream out) { - logger.debug("write PDF"); + log.debug("write PDF"); SQRelationJRDataSource source = createJRData(); String jasperFile = Resources.getMsg( @@ -359,7 +359,7 @@ JasperExportManager.exportReportToPdfStream(print, out); } catch(JRException je) { - logger.warn("Error generating PDF Report!", je); + log.warn("Error generating PDF Report!", je); } } }
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/AnnotationHelper.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/jfree/AnnotationHelper.java Fri Sep 05 12:58:17 2014 +0200 @@ -33,7 +33,7 @@ /** Annotation helper class, handles plotting of annotations. */ public class AnnotationHelper { - private static final Logger logger = Logger.getLogger(AnnotationHelper.class); + private static final Logger log = Logger.getLogger(AnnotationHelper.class); protected static float ANNOTATIONS_AXIS_OFFSET = 0.02f; @@ -49,10 +49,10 @@ */ public static void addAnnotationsToRenderer(List<RiverAnnotation> annotations, XYPlot plot, ChartSettings settings, Map<Integer, AxisDataset> datasets) { - logger.debug("addAnnotationsToRenderer"); + log.debug("addAnnotationsToRenderer"); if (annotations == null || annotations.isEmpty()) { - logger.debug("addAnnotationsToRenderer: no annotations."); + log.debug("addAnnotationsToRenderer: no annotations."); return; } @@ -167,7 +167,7 @@ // There is one nasty case (duration curves, where annotations // might stick to the second y-axis). if (dataset == null) { - logger.warn("Annotation should stick to unfindable y-axis: " + log.warn("Annotation should stick to unfindable y-axis: " + annotation.getAxisSymbol()); rendererIndex = 0; }
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/AxisDataset.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/jfree/AxisDataset.java Fri Sep 05 12:58:17 2014 +0200 @@ -25,7 +25,7 @@ */ public class AxisDataset { - private static Logger logger = Logger.getLogger(AxisDataset.class); + private static Logger log = Logger.getLogger(AxisDataset.class); /** Symbolic integer, but also coding the priority (0 goes first). */ protected int axisSymbol;
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/EnhancedLineAndShapeRenderer.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/jfree/EnhancedLineAndShapeRenderer.java Fri Sep 05 12:58:17 2014 +0200 @@ -44,8 +44,8 @@ */ private static final long serialVersionUID = 1L; - /** Own logger. */ - private static final Logger logger = + /** Own log. */ + private static final Logger log = Logger.getLogger(EnhancedLineAndShapeRenderer.class); protected BooleanList isMinimumShapeVisible; @@ -150,7 +150,7 @@ return b; } - logger.warn("Item paint is no instance of Color!"); + log.warn("Item paint is no instance of Color!"); return p; } @@ -170,7 +170,7 @@ return b; } - logger.warn("Item paint is no instance of Color!"); + log.warn("Item paint is no instance of Color!"); return p; } @@ -223,11 +223,11 @@ && isMaximum(dataset, series, item); if (isMinimum) { - logger.debug("Create a Minimum shape."); + log.debug("Create a Minimum shape."); shape = getMinimumShape(series, item); } else if (isMaximum) { - logger.debug("Create a Maximum shape."); + log.debug("Create a Maximum shape."); shape = getMaximumShape(series, item); } else { @@ -486,7 +486,7 @@ return old.doubleValue(); } - logger.debug("Compute minimum of Series: " + series); + log.debug("Compute minimum of Series: " + series); double min = Double.MAX_VALUE; @@ -525,7 +525,7 @@ return old.doubleValue(); } - logger.debug("Compute minimum of Series: " + series); + log.debug("Compute minimum of Series: " + series); double min = Double.MAX_VALUE; @@ -564,7 +564,7 @@ return old.doubleValue(); } - logger.debug("Compute maximum of Series: " + series); + log.debug("Compute maximum of Series: " + series); double max = -Double.MAX_VALUE;
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/JFreeUtil.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/jfree/JFreeUtil.java Fri Sep 05 12:58:17 2014 +0200 @@ -22,7 +22,7 @@ public class JFreeUtil { - private static final Logger logger = Logger.getLogger(JFreeUtil.class); + private static final Logger log = Logger.getLogger(JFreeUtil.class); /** Do not instantiate. */ private JFreeUtil() { @@ -98,7 +98,7 @@ x[i] = startX + xFac * (endX - startX); y[i] = startY + yFac * (endY - startY); - logger.debug("Created new point: " + x[i] + "|" + y[i]); + log.debug("Created new point: " + x[i] + "|" + y[i]); } return new double[][] { x, y };
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/StyledTimeSeries.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/jfree/StyledTimeSeries.java Fri Sep 05 12:58:17 2014 +0200 @@ -19,7 +19,7 @@ */ public class StyledTimeSeries extends TimeSeries implements StyledSeries { - private static final Logger logger = + private static final Logger log = Logger.getLogger(StyledTimeSeries.class);
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/StyledXYSeries.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/jfree/StyledXYSeries.java Fri Sep 05 12:58:17 2014 +0200 @@ -33,7 +33,7 @@ extends XYSeries implements StyledSeries, HasLabel, XYMetaDataset { - private static final Logger logger = Logger.getLogger(StyledXYSeries.class); + private static final Logger log = Logger.getLogger(StyledXYSeries.class); protected Style style;
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/XYStyle.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/jfree/XYStyle.java Fri Sep 05 12:58:17 2014 +0200 @@ -25,7 +25,7 @@ */ public class XYStyle implements Style { - private static Logger logger = Logger.getLogger(XYStyle.class); + private static Logger log = Logger.getLogger(XYStyle.class); protected ThemeDocument theme;
--- a/artifacts/src/main/java/org/dive4elements/river/themes/ThemeDocument.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/themes/ThemeDocument.java Fri Sep 05 12:58:17 2014 +0200 @@ -27,7 +27,7 @@ public class ThemeDocument { - private static Logger logger = Logger.getLogger(ThemeDocument.class); + private static Logger log = Logger.getLogger(ThemeDocument.class); private static final String MSG_ISOBATH_CLASS = "floodmap.isobath.class"; @@ -144,7 +144,7 @@ private static Map<String, String> extractValues(Document document) { Map<String, String> values = new HashMap<String, String>(); if (document == null) { - logger.error("Invalid null document given."); + log.error("Invalid null document given."); return values; } @@ -157,8 +157,8 @@ values.put(name, value); } } - if (logger.isDebugEnabled()) { - logger.debug("Theme values: " + values); + if (log.isDebugEnabled()) { + log.debug("Theme values: " + values); } return values; } @@ -258,7 +258,7 @@ public Font parseFont() { String font = getValue(FONT); - logger.debug(" font is " + font); + log.debug(" font is " + font); if (font == null) { return null; } @@ -310,7 +310,7 @@ return Integer.parseInt(size); } catch (NumberFormatException nfe) { - logger.warn("Unable to set line size from string: '" + size + "'"); + log.warn("Unable to set line size from string: '" + size + "'"); } return 0; } @@ -336,7 +336,7 @@ return dashes; } catch (NumberFormatException nfe) { - logger.warn("Unable to set dash from string: '" + dash + "'"); + log.warn("Unable to set dash from string: '" + dash + "'"); return def; } } @@ -598,8 +598,8 @@ */ public Color parseLineColorField() { String lineColorStr = getLineColorString(); - if (logger.isDebugEnabled()) { - logger.debug("parseLineColorField: lineColorStr = " + + if (log.isDebugEnabled()) { + log.debug("parseLineColorField: lineColorStr = " + (lineColorStr == null ? "null" : lineColorStr)); @@ -610,8 +610,8 @@ public Color parseAreaLineColorField() { String lineColorStr = getAreaLineColorString(); - if (logger.isDebugEnabled()) { - logger.debug("parseLineColorField: lineColorStr = " + + if (log.isDebugEnabled()) { + log.debug("parseLineColorField: lineColorStr = " + (lineColorStr == null ? "null" : lineColorStr)); @@ -742,7 +742,7 @@ String backcolor = getLabelBackgroundColorString(); String linecolor = getLineColorString(); if (linecolor == null) { - logger.warn("createMapserverStyle: linecolor String is empty"); + log.warn("createMapserverStyle: linecolor String is empty"); linecolor = "0,128,255"; }
--- a/artifacts/src/main/java/org/dive4elements/river/themes/ThemeFactory.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/themes/ThemeFactory.java Fri Sep 05 12:58:17 2014 +0200 @@ -34,7 +34,7 @@ */ public class ThemeFactory { - private static Logger logger = Logger.getLogger(ThemeFactory.class); + private static Logger log = Logger.getLogger(ThemeFactory.class); /** Trivial, hidden constructor. */ private ThemeFactory() { @@ -54,7 +54,7 @@ String name = getName(config); String desc = getDescription(config); - logger.debug("Create new theme: " + name); + log.debug("Create new theme: " + name); Theme theme = new DefaultTheme(name, desc); @@ -82,13 +82,13 @@ String output, String groupName) { - if (logger.isDebugEnabled()) { - logger.debug( + if (log.isDebugEnabled()) { + log.debug( "Search theme for: " + name + " - pattern: " + pattern); } if (c == null || name == null) { - logger.warn("Cannot search for theme."); + log.warn("Cannot search for theme."); return null; } @@ -110,7 +110,7 @@ } if (group == null) { - logger.warn("No theme group found: '" + groupName + "'"); + log.warn("No theme group found: '" + groupName + "'"); return null; } @@ -119,14 +119,14 @@ D4EArtifact artifact = (D4EArtifact) c.get(RiverContext.ARTIFACT_KEY); if (map == null || map.isEmpty() || t == null || t.isEmpty()) { - logger.warn("No mappings or themes found. Cannot retrieve theme!"); + log.warn("No mappings or themes found. Cannot retrieve theme!"); return null; } List<ThemeMapping> mapping = map.get(name); if (mapping == null) { - logger.warn("No theme found for mapping: " + name); + log.warn("No theme found for mapping: " + name); return null; } @@ -139,7 +139,7 @@ { String target = tm.getTo(); - logger.debug("Found theme '" + target + "'"); + log.debug("Found theme '" + target + "'"); return t.get(target); } } @@ -148,7 +148,7 @@ "No theme found for '" + name + "' with pattern '" + pattern + "' and output " + output + "."; - logger.warn(msg); + log.warn(msg); return null; } @@ -197,18 +197,18 @@ Theme t, Map<String, Node> themes ) { - logger.debug("ThemeFactory.parseInherits"); + log.debug("ThemeFactory.parseInherits"); NodeList inherits = ((Element)cfg).getElementsByTagName("inherit"); int num = inherits.getLength(); if (num == 0) { - logger.debug("Theme does not inherit from other themes."); + log.debug("Theme does not inherit from other themes."); return; } - logger.debug("Theme inherits from " + num + " other themes."); + log.debug("Theme inherits from " + num + " other themes."); if (themes == null) { themes = buildThemeMap(themeCfg); @@ -245,7 +245,7 @@ protected static void parseFields(Node config, Theme theme) { if (config == null || theme == null) { - logger.warn("Parsing fields without node or theme is senseless!"); + log.warn("Parsing fields without node or theme is senseless!"); return; } @@ -253,10 +253,10 @@ int num = fields.getLength(); - logger.debug("Found " + num + " own fields in this theme."); + log.debug("Found " + num + " own fields in this theme."); if (num == 0) { - logger.debug("Theme has no own fields."); + log.debug("Theme has no own fields."); return; } @@ -271,14 +271,14 @@ protected static void addField(Theme theme, Node field) { String name = ((Element)field).getAttribute("name"); - logger.debug("Add field " + name + " to theme " + theme.getName()); + log.debug("Add field " + name + " to theme " + theme.getName()); NamedNodeMap attrs = field.getAttributes(); int num = attrs != null ? attrs.getLength() : 0; if (num == 0) { - logger.warn("This field has no attributes."); + log.warn("This field has no attributes."); return; } @@ -303,7 +303,7 @@ int num = attrs != null ? attrs.getLength() : 0; if (num == 0) { - logger.debug("Theme has no attributes set."); + log.debug("Theme has no attributes set."); return; }
--- a/artifacts/src/main/java/org/dive4elements/river/themes/ThemeMapping.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/themes/ThemeMapping.java Fri Sep 05 12:58:17 2014 +0200 @@ -21,8 +21,8 @@ */ public class ThemeMapping implements Serializable { - /** The logger that is used in this class */ - private static Logger logger = Logger.getLogger(ThemeMapping.class); + /** The log that is used in this class */ + private static Logger log = Logger.getLogger(ThemeMapping.class); /** Name from which to map. */ protected String from; @@ -98,11 +98,11 @@ Matcher m = pattern.matcher(text); if (m.matches()) { - logger.debug("Pattern matches: " + text); + log.debug("Pattern matches: " + text); return true; } else { - logger.debug( + log.debug( "Pattern '"+ text + "' does not match: " + this.patternStr); return false; } @@ -127,7 +127,7 @@ // Operator split. String[] parts = masterAttr.split("=="); if (parts.length != 2) { - logger.error("ThemeMapping could not parse masterAttr.-condition:_" + log.error("ThemeMapping could not parse masterAttr.-condition:_" + masterAttr + "_"); return false; } @@ -135,11 +135,11 @@ // Test. String artData = artifact.getDataAsString(parts[0]); if (artData != null && artData.equals(parts[1])) { - logger.debug("Matches master Attribute."); + log.debug("Matches master Attribute."); return true; } else { - logger.debug("Does not match master Attribute."); + log.debug("Does not match master Attribute."); return false; } } @@ -155,11 +155,11 @@ } if (this.output.equals(output)) { - logger.debug("Output matches this mapping: " + output); + log.debug("Output matches this mapping: " + output); return true; } else { - logger.debug("Output '"+ output +"' does not match: "+ this.output); + log.debug("Output '"+ output +"' does not match: "+ this.output); return false; } }
--- a/artifacts/src/main/java/org/dive4elements/river/utils/ArtifactMapfileGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/utils/ArtifactMapfileGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -31,7 +31,7 @@ public class ArtifactMapfileGenerator extends MapfileGenerator { - private static Logger logger = Logger.getLogger(ArtifactMapfileGenerator.class); + private static Logger log = Logger.getLogger(ArtifactMapfileGenerator.class); public static final String FLOODMAP_UESK_KEY = "floodmap.uesk"; @@ -63,7 +63,7 @@ { File[] userDirs = getUserDirs(); List<String> layers = parseLayers(userDirs); - logger.info("Found " + layers.size() + " layers for user mapfile."); + log.info("Found " + layers.size() + " layers for user mapfile."); writeMapfile(layers); } @@ -82,7 +82,7 @@ CallContext context ) throws FileNotFoundException, IOException { - logger.debug("createUeskLayer"); + log.debug("createUeskLayer"); String identifier = flys.identifier(); @@ -116,7 +116,7 @@ Template template = getTemplateByName(WSPLGEN_LAYER_TEMPLATE); if (template == null) { - logger.warn("Template '" + WSPLGEN_LAYER_TEMPLATE + "' found."); + log.warn("Template '" + WSPLGEN_LAYER_TEMPLATE + "' found."); return; } @@ -125,8 +125,8 @@ writeLayer(layerinfo, new File(dir, name), template); } catch (FileNotFoundException fnfe) { - logger.error(fnfe, fnfe); - logger.warn("Unable to write layer: " + name); + log.error(fnfe, fnfe); + log.warn("Unable to write layer: " + name); } } @@ -141,14 +141,14 @@ public void createUserShapeLayer(D4EArtifact flys, WMSLayerFacet wms) throws FileNotFoundException, IOException { - logger.debug("createUserShapeLayer"); + log.debug("createUserShapeLayer"); String uuid = flys.identifier(); File dir = new File(getShapefileBaseDir(), uuid); File test = new File(dir, WSPLGEN_USER_SHAPE); if (!test.exists() || !test.canRead()) { - logger.debug("No user layer existing."); + log.debug("No user layer existing."); return; } @@ -186,7 +186,7 @@ Template tpl = getTemplateByName(SHP_LAYER_TEMPLATE); if (tpl == null) { - logger.warn("Template '" + SHP_LAYER_TEMPLATE + "' found."); + log.warn("Template '" + SHP_LAYER_TEMPLATE + "' found."); return; } @@ -194,8 +194,8 @@ writeLayer(info, new File(dir, nameUser), tpl); } catch (FileNotFoundException fnfe) { - logger.error(fnfe, fnfe); - logger.warn("Unable to write layer: " + nameUser); + log.error(fnfe, fnfe); + log.warn("Unable to write layer: " + nameUser); } } @@ -215,7 +215,7 @@ ) throws FileNotFoundException, IOException { - logger.debug("createDatabaseLayer"); + log.debug("createDatabaseLayer"); LayerInfo layerinfo = new LayerInfo(); layerinfo.setName(wms.getName() + "-" + flys.identifier()); @@ -236,7 +236,7 @@ Template template = getTemplateByName(DB_LAYER_TEMPLATE); if (template == null) { - logger.warn("Template '" + DB_LAYER_TEMPLATE + "' found."); + log.warn("Template '" + DB_LAYER_TEMPLATE + "' found."); return; } @@ -245,8 +245,8 @@ writeLayer(layerinfo, new File(dir, name), template); } catch (FileNotFoundException fnfe) { - logger.error(fnfe, fnfe); - logger.warn("Unable to write layer: " + name); + log.error(fnfe, fnfe); + log.warn("Unable to write layer: " + name); } }
--- a/artifacts/src/main/java/org/dive4elements/river/utils/DoubleUtil.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/utils/DoubleUtil.java Fri Sep 05 12:58:17 2014 +0200 @@ -20,7 +20,7 @@ /** Utils to deal with Double precision values. */ public class DoubleUtil { - /** Private logger. */ + /** Private log. */ private static Logger log = Logger.getLogger(DoubleUtil.class); public static final double DEFAULT_STEP_PRECISION = 1e6;
--- a/artifacts/src/main/java/org/dive4elements/river/utils/GeometryUtils.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/utils/GeometryUtils.java Fri Sep 05 12:58:17 2014 +0200 @@ -49,7 +49,7 @@ public class GeometryUtils { - private static final Logger logger = Logger.getLogger(GeometryUtils.class); + private static final Logger log = Logger.getLogger(GeometryUtils.class); public static final String PREFIX_EPSG = "EPSG:"; @@ -81,10 +81,10 @@ } } catch(HibernateException iae) { - logger.warn("Exception, no valid river axis found for " + rivername); + log.warn("Exception, no valid river axis found for " + rivername); return null; } - logger.warn("No valid river axis found for " + rivername); + log.warn("No valid river axis found for " + rivername); return null; } @@ -226,7 +226,7 @@ String epsg ) { if (epsg == null) { - logger.warn("cannot create CoordinateReferenceSystem with null"); + log.warn("cannot create CoordinateReferenceSystem with null"); return null; } @@ -238,7 +238,7 @@ return CRS.decode(epsg); } catch (FactoryException fe) { - logger.error( + log.error( "unable to get CoordinateReferenceSystem for: " + epsg, fe); } @@ -258,11 +258,11 @@ String origSrs ) { if (targetSrs == null || orig == null || origSrs == null) { - logger.warn("unable to transform envelope: empty parameters"); + log.warn("unable to transform envelope: empty parameters"); return orig; } - logger.debug("Transform envlope to '" + targetSrs + "'"); + log.debug("Transform envlope to '" + targetSrs + "'"); try { CoordinateReferenceSystem sourceCRS = getCoordinateReferenceSystem(origSrs); @@ -276,22 +276,22 @@ Envelope target = tmpEnv.transform(targetCRS, false); - if (logger.isDebugEnabled()) { - logger.debug(" orig envelope : " + orig); - logger.debug(" transformed envelope: " + target); + if (log.isDebugEnabled()) { + log.debug(" orig envelope : " + orig); + log.debug(" transformed envelope: " + target); } return target; } } catch (NoSuchAuthorityCodeException nsae) { - logger.error("Cannot get CoordinateReferenceSystem!", nsae); + log.error("Cannot get CoordinateReferenceSystem!", nsae); } catch (FactoryException fe) { - logger.error("Cannot get CoordinateReferenceSystem!", fe); + log.error("Cannot get CoordinateReferenceSystem!", fe); } catch (TransformException te) { - logger.error("Cannot transform envelope from source " + log.error("Cannot transform envelope from source " + origSrs + " to target srs " + targetSrs); } @@ -310,7 +310,7 @@ SimpleFeatureType featureType, FeatureCollection<?, ?> collection, CoordinateReferenceSystem crs) { if (collection.isEmpty()) { - logger.warn("Shapefile is not written - no features given!"); + log.warn("Shapefile is not written - no features given!"); return false; } @@ -360,21 +360,21 @@ return true; } catch (MalformedURLException mue) { - logger.error("Unable to prepare shapefile: " + mue.getMessage()); + log.error("Unable to prepare shapefile: " + mue.getMessage()); } catch (IOException ioe) { - logger.error("Unable to write shapefile: " + ioe.getMessage()); + log.error("Unable to write shapefile: " + ioe.getMessage()); } catch (NoSuchAuthorityCodeException nsae) { - logger.error("Cannot get CoordinateReferenceSystem for '" + log.error("Cannot get CoordinateReferenceSystem for '" + DEFAULT_EPSG + "'"); } catch (FactoryException fe) { - logger.error("Cannot get CoordinateReferenceSystem for '" + log.error("Cannot get CoordinateReferenceSystem for '" + DEFAULT_EPSG + "'"); } catch (TransformException te) { - logger.error("Was not able to transform geometry!", te); + log.error("Was not able to transform geometry!", te); } finally { if (transaction != null) {
--- a/artifacts/src/main/java/org/dive4elements/river/utils/MapUtils.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/utils/MapUtils.java Fri Sep 05 12:58:17 2014 +0200 @@ -19,7 +19,7 @@ public class MapUtils { - private static final Logger logger = Logger.getLogger(MapUtils.class); + private static final Logger log = Logger.getLogger(MapUtils.class); public static final Pattern DB_URL_PATTERN = Pattern.compile("(.*)\\/\\/(.*):([0-9]+)\\/([\\.a-zA-Z0-9_-]+)"); @@ -41,23 +41,23 @@ String pass = SessionFactoryProvider.getPass(sf); String url = SessionFactoryProvider.getURL(sf); - logger.debug("Parse connection url: " + url); + log.debug("Parse connection url: " + url); Matcher m = DB_URL_PATTERN.matcher(url); if (!m.matches()) { - logger.warn("Could not parse Connection string." + + log.warn("Could not parse Connection string." + "Try to parse PostgreSQL string."); // maybe this is a PostgreSQL connection... return getPostgreSQLConnection(); } - logger.debug("Groups for connection string: " + m.groupCount()); + log.debug("Groups for connection string: " + m.groupCount()); int groups = m.groupCount(); - if (logger.isDebugEnabled()) { + if (log.isDebugEnabled()) { for (int i = 0; i <= groups; i++) { - logger.debug("Group " + i + ": " + m.group(i)); + log.debug("Group " + i + ": " + m.group(i)); } } @@ -65,7 +65,7 @@ if (RiverUtils.isUsingOracle()) { if (groups < 4) { - logger.warn("Could only partially parse connection string."); + log.warn("Could only partially parse connection string."); return null; } @@ -76,7 +76,7 @@ } else { if (groups < 4) { - logger.warn("Could only partially parse connection string."); + log.warn("Could only partially parse connection string."); return null; } @@ -118,23 +118,23 @@ Matcher m = DB_PSQL_URL_PATTERN.matcher(url); if (!m.matches()) { - logger.warn("Could not parse PostgreSQL Connection string."); + log.warn("Could not parse PostgreSQL Connection string."); return null; } int groups = m.groupCount(); - logger.debug("Groups for PostgreSQL connection string: " + groups); + log.debug("Groups for PostgreSQL connection string: " + groups); - if (logger.isDebugEnabled()) { + if (log.isDebugEnabled()) { for (int i = 0; i <= groups; i++) { - logger.debug("Group " + i + ": " + m.group(i)); + log.debug("Group " + i + ": " + m.group(i)); } } String connection = null; if (groups < 4) { - logger.warn("Could only partially parse connection string."); + log.warn("Could only partially parse connection string."); return null; } @@ -144,7 +144,7 @@ connection = createConnectionString(user, pass, host, db, port); - logger.debug("Created connection: '" + connection + "'"); + log.debug("Created connection: '" + connection + "'"); return connection; }
--- a/artifacts/src/main/java/org/dive4elements/river/utils/MapfileGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/utils/MapfileGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -53,7 +53,7 @@ public static final String MS_LAYER_PREFIX = "ms_layer-"; public static final String MS_USERSHAPE_PREFIX = "user-"; - private static Logger logger = Logger.getLogger(MapfileGenerator.class); + private static Logger log = Logger.getLogger(MapfileGenerator.class); private File shapefileDirectory; @@ -91,7 +91,7 @@ setupVelocity(velocityEngine); } catch (Exception e) { - logger.error(e, e); + log.error(e, e); return null; } } @@ -146,11 +146,11 @@ } catch (FileNotFoundException fnfe) { // this is bad - logger.warn(fnfe, fnfe); + log.warn(fnfe, fnfe); } catch (IOException ioe) { // this is also bad - logger.warn(ioe, ioe); + log.warn(ioe, ioe); } return context; @@ -171,14 +171,14 @@ try { VelocityEngine engine = getVelocityEngine(); if (engine == null) { - logger.error("Error while fetching VelocityEngine."); + log.error("Error while fetching VelocityEngine."); return null; } return engine.getTemplate(model); } catch (Exception e) { - logger.warn(e, e); + log.warn(e, e); } return null; @@ -268,7 +268,7 @@ layers.add(layer.getCanonicalPath()); } catch (IOException ioe) { - logger.warn(ioe, ioe); + log.warn(ioe, ioe); } } } @@ -296,9 +296,9 @@ ) throws FileNotFoundException { - if (logger.isDebugEnabled()) { - logger.debug("Write layer for:"); - logger.debug(" directory/file: " + layerFile.getName()); + if (log.isDebugEnabled()) { + log.debug("Write layer for:"); + log.debug(" directory/file: " + layerFile.getName()); } Writer writer = null; @@ -312,13 +312,13 @@ tpl.merge(context, writer); } catch (FileNotFoundException fnfe) { - logger.error(fnfe, fnfe); + log.error(fnfe, fnfe); } catch (IOException ioe) { - logger.error(ioe, ioe); + log.error(ioe, ioe); } catch (Exception e) { - logger.error(e, e); + log.error(e, e); } finally { try { @@ -327,7 +327,7 @@ } } catch (IOException ioe) { - logger.debug(ioe, ioe); + log.debug(ioe, ioe); } } } @@ -357,7 +357,7 @@ Template mapTemplate = getMapfileTemplateObj(); if (mapTemplate == null) { - logger.warn("No mapfile template found."); + log.warn("No mapfile template found."); return; } @@ -369,13 +369,13 @@ tmp.renameTo(mapfile); } catch (FileNotFoundException fnfe) { - logger.error(fnfe, fnfe); + log.error(fnfe, fnfe); } catch (IOException ioe) { - logger.error(ioe, ioe); + log.error(ioe, ioe); } catch (Exception e) { - logger.error(e, e); + log.error(e, e); } finally { try { @@ -388,7 +388,7 @@ } } catch (IOException ioe) { - logger.debug(ioe, ioe); + log.debug(ioe, ioe); } } }
--- a/artifacts/src/main/java/org/dive4elements/river/utils/RiverMapfileGenerator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/utils/RiverMapfileGenerator.java Fri Sep 05 12:58:17 2014 +0200 @@ -56,14 +56,14 @@ public static final Pattern DB_PSQL_URL_PATTERN = Pattern.compile("(.*)\\/\\/(.*):([0-9]+)\\/([a-zA-Z0-9]+)"); - private static Logger logger = Logger.getLogger(RiverMapfileGenerator.class); + private static Logger log = Logger.getLogger(RiverMapfileGenerator.class); /** * Generate river axis mapfile. */ @Override public void generate() { - logger.debug("generate()"); + log.debug("generate()"); List<River> rivers = RiverFactory.getRivers(); List<String> riverFiles = new ArrayList<String>(); @@ -77,16 +77,16 @@ riverAxis = RiverAxis.getRiverAxis(river.getName()); } catch (HibernateException iae) { - logger.error("No valid riveraxis found for " + river.getName()); + log.error("No valid riveraxis found for " + river.getName()); continue; } if (riverAxis == null) { - logger.warn("River " + river.getName() + " has no river axis!"); + log.warn("River " + river.getName() + " has no river axis!"); continue; } if (riverAxis.get(0).getGeom() == null) { - logger.warn("River " + river.getName() + + log.warn("River " + river.getName() + " has no riveraxis geometry!"); continue; } @@ -127,7 +127,7 @@ File layerFile = new File("river-" + riverName + ".map"); Template template = getTemplateByName("riveraxis-layer.vm"); if (template == null) { - logger.warn("Template riveraxis-layer.vm not found."); + log.warn("Template riveraxis-layer.vm not found."); return; } @@ -135,7 +135,7 @@ writeLayer(layerInfo, layerFile, template); } catch (FileNotFoundException e) { - logger.warn(e.getLocalizedMessage(), e); + log.warn(e.getLocalizedMessage(), e); } }
--- a/artifacts/src/main/java/org/dive4elements/river/utils/RiverUtils.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/utils/RiverUtils.java Fri Sep 05 12:58:17 2014 +0200 @@ -58,8 +58,8 @@ @Deprecated public class RiverUtils { - /** The logger that is used in this utility. */ - private static Logger logger = Logger.getLogger(RiverUtils.class); + /** The log that is used in this utility. */ + private static Logger log = Logger.getLogger(RiverUtils.class); /** * An enum that represents the 5 possible WQ modes in FLYS. The 5 values are @@ -120,12 +120,12 @@ Artifact artifact = context.getDatabase().getRawArtifact(uuid); if (artifact == null) { - logger.error("Artifact '" + uuid + "' does not exist."); + log.error("Artifact '" + uuid + "' does not exist."); return null; } if (!(artifact instanceof D4EArtifact)) { - logger.error("Artifact '" +uuid+ "' is no valid D4EArtifact."); + log.error("Artifact '" +uuid+ "' is no valid D4EArtifact."); return null; } @@ -133,7 +133,7 @@ } // TODO: catch more selective catch (Exception e) { - logger.error("Cannot get D4EArtifact " + uuid + log.error("Cannot get D4EArtifact " + uuid + " from database (" + e.getMessage() + ")."); return null; } @@ -251,7 +251,7 @@ riverName = ""; } - logger.debug("Search for the min/max distances of '" + riverName + "'"); + log.debug("Search for the min/max distances of '" + riverName + "'"); // Why not use getRiver(flysArtifact) ? River river = RiverFactory.getRiver(riverName); @@ -319,7 +319,7 @@ locations.add(Double.parseDouble(l)); } catch (NumberFormatException nfe) { - logger.debug(nfe.getLocalizedMessage(), nfe); + log.debug(nfe.getLocalizedMessage(), nfe); } } @@ -343,7 +343,7 @@ return ((WINFOArtifact) flys).getQs(); } - logger.warn("This method (getQs) currently supports WINFOArtifact only!"); + log.warn("This method (getQs) currently supports WINFOArtifact only!"); return null; } @@ -363,7 +363,7 @@ return ((WINFOArtifact) flys).getWs(); } - logger.warn("This method (getWs) currently supports WINFOArtifact only!"); + log.warn("This method (getWs) currently supports WINFOArtifact only!"); return null; } @@ -442,7 +442,7 @@ River river = getRiver(flys); if (river == null) { - logger.debug("no river found"); + log.debug("no river found"); return null; } @@ -450,20 +450,20 @@ double[] dist = rangeAccess.getKmRange(); if (dist == null) { - logger.debug("no range found"); + log.debug("no range found"); return null; } - if (logger.isDebugEnabled()) { - logger.debug("Determine gauge for:"); - logger.debug("... river: " + river.getName()); - logger.debug("... distance: " + dist[0] + " - " + dist[1]); + if (log.isDebugEnabled()) { + log.debug("Determine gauge for:"); + log.debug("... river: " + river.getName()); + log.debug("... distance: " + dist[0] + " - " + dist[1]); } Gauge gauge = river.determineGauge(dist[0], dist[1]); String name = gauge != null ? gauge.getName() : "'n/a"; - logger.debug("Found gauge: " + name); + log.debug("Found gauge: " + name); return gauge; } @@ -506,7 +506,7 @@ Matcher m = NUMBERS_PATTERN.matcher(wq.getName()); if (m.matches()) { - logger.debug("Found a number."); + log.debug("Found a number."); String raw = m.group(1); @@ -546,7 +546,7 @@ namedMainValue = getNamedMainValue(winfo.getGauge(), v); } catch (NumberFormatException nfe) { - logger.warn("Cannot parse Double of: '" + parts[1] + "'"); + log.warn("Cannot parse Double of: '" + parts[1] + "'"); return name; } @@ -588,7 +588,7 @@ namedMainValue = getNamedMainValue(winfo.getGauge(), v); } catch (NumberFormatException nfe) { - logger.warn("Cannot parse Double of: '" + parts[1] + "'"); + log.warn("Cannot parse Double of: '" + parts[1] + "'"); return name; } @@ -631,16 +631,16 @@ public static String getNamedMainValue(Gauge gauge, double value) { List<MainValue> mainValues = gauge.getMainValues(); - logger.debug("Search named main value for: " + value); + log.debug("Search named main value for: " + value); for (MainValue mv: mainValues) { if (mv.getValue().doubleValue() == value) { - logger.debug("Found named main value: " + mv.getMainValue().getName()); + log.debug("Found named main value: " + mv.getMainValue().getName()); return mv.getMainValue().getName(); } } - logger.debug("Did not find a named main value for: " + value); + log.debug("Did not find a named main value for: " + value); return null; } @@ -755,7 +755,7 @@ return diffs; } else { - logger.warn("Not a valid state for differences."); + log.warn("Not a valid state for differences."); return ""; } } @@ -772,7 +772,7 @@ String[] splitted = raw != null ? raw.split(";") : null; if (splitted == null || splitted.length == 0) { - logger.warn("No integer values found in '" + raw + "'"); + log.warn("No integer values found in '" + raw + "'"); return new int[0]; } @@ -783,7 +783,7 @@ integers.add(Integer.parseInt(value)); } catch (NumberFormatException nfe) { - logger.warn("Parsing integer failed: " + nfe); + log.warn("Parsing integer failed: " + nfe); } } @@ -803,7 +803,7 @@ String[] splitted = raw != null ? raw.split(";") : null; if (splitted == null || splitted.length == 0) { - logger.warn("No long values found in '" + raw + "'"); + log.warn("No long values found in '" + raw + "'"); return new long[0]; } @@ -814,7 +814,7 @@ longs.add(Long.valueOf(value)); } catch (NumberFormatException nfe) { - logger.warn("Parsing long failed: " + nfe); + log.warn("Parsing long failed: " + nfe); } } @@ -835,7 +835,7 @@ String[] splitted = raw != null ? raw.split(";") : null; if (splitted == null || splitted.length == 0) { - logger.warn("No double values found in '" + raw + "'"); + log.warn("No double values found in '" + raw + "'"); return new double[0]; } @@ -846,7 +846,7 @@ doubles.add(Double.valueOf(value)); } catch (NumberFormatException nfe) { - logger.warn("Parsing double failed: " + nfe); + log.warn("Parsing double failed: " + nfe); } } @@ -866,17 +866,17 @@ River river = getRiver(flys); if (river == null) { - logger.debug("getGauges: no river!"); + log.debug("getGauges: no river!"); return null; } RangeAccess rangeAccess = new RangeAccess(flys); double[] dist = rangeAccess.getKmRange(); if (dist == null) { - logger.debug("getGauges: no dist!"); + log.debug("getGauges: no dist!"); return null; } - logger.debug("getGauges: " + dist[0] + " - " + dist[1]); + log.debug("getGauges: " + dist[0] + " - " + dist[1]); return river.determineGauges(dist[0], dist[1]); } @@ -910,8 +910,8 @@ return; } - if (logger.isDebugEnabled()) { - logger.debug("currentKm = " + dKm); + if (log.isDebugEnabled()) { + log.debug("currentKm = " + dKm); } context.putContextValue(CURRENT_KM, dKm); }
--- a/artifacts/src/main/java/org/dive4elements/river/wsplgen/FacetCreator.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/wsplgen/FacetCreator.java Fri Sep 05 12:58:17 2014 +0200 @@ -52,7 +52,7 @@ protected String stateId; - private static Logger logger = Logger.getLogger(FacetCreator.class); + private static Logger log = Logger.getLogger(FacetCreator.class); public FacetCreator( @@ -88,9 +88,9 @@ RangeAccess rangeAccess = new RangeAccess(artifact); double kms[] = rangeAccess.getKmRange(); - logger.debug("### getWSPLGENBounds"); - logger.debug("### from km: " + kms[0]); - logger.debug("### to km: " + kms[1]); + log.debug("### getWSPLGENBounds"); + log.debug("### from km: " + kms[0]); + log.debug("### to km: " + kms[1]); CrossSectionTrack a = CrossSectionTrack.getCrossSectionTrack(river, kms[0]); @@ -108,7 +108,7 @@ envA.expandToInclude(envB); envA = GeometryUtils.transform(envA, getSrid()); - logger.debug("### => " + envA); + log.debug("### => " + envA); return envA; }
--- a/artifacts/src/main/java/org/dive4elements/river/wsplgen/JobObserver.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/wsplgen/JobObserver.java Fri Sep 05 12:58:17 2014 +0200 @@ -23,7 +23,7 @@ public class JobObserver extends Thread { - private static Logger logger = Logger.getLogger(JobObserver.class); + private static Logger log = Logger.getLogger(JobObserver.class); public static final String WSPLGEN_ENCODING = @@ -74,7 +74,7 @@ public void run() { - logger.debug("Start observation..."); + log.debug("Start observation..."); prepareRegexes(); try { @@ -86,27 +86,27 @@ while ((line = reader.readLine()) != null) { if (copy) { - logger.debug(line); + log.debug(line); } update(line); } } catch (IOException ioe) { - logger.warn("Observation canceled: " + ioe.getMessage()); + log.warn("Observation canceled: " + ioe.getMessage()); } } - protected void update(String log) { + protected void update(String s) { for (int num = patterns.length, i = 0; i < num; i++) { - Matcher m = patterns[i].matcher(log); + Matcher m = patterns[i].matcher(s); if (m.matches()) { job.getCallContext().addBackgroundMessage( - new CalculationMessage(num, i+1, log)); + new CalculationMessage(num, i+1, s)); - logger.info("Finished step " + (i+1) + " / " + num); + log.info("Finished step " + (i+1) + " / " + num); } } }
--- a/artifacts/src/main/java/org/dive4elements/river/wsplgen/ProblemObserver.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/wsplgen/ProblemObserver.java Fri Sep 05 12:58:17 2014 +0200 @@ -19,7 +19,7 @@ public class ProblemObserver extends JobObserver { - private static Logger logger = Logger.getLogger(ProblemObserver.class); + private static Logger log = Logger.getLogger(ProblemObserver.class); public static final Pattern WSPLGEN_ERROR_START = Pattern.compile( @@ -54,7 +54,7 @@ public void run() { - logger.debug("Start observation..."); + log.debug("Start observation..."); super.run(); }
--- a/artifacts/src/main/java/org/dive4elements/river/wsplgen/Scheduler.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/wsplgen/Scheduler.java Fri Sep 05 12:58:17 2014 +0200 @@ -50,7 +50,7 @@ private static Scheduler INSTANCE; - private static final Logger logger = Logger.getLogger(Scheduler.class); + private static final Logger log = Logger.getLogger(Scheduler.class); @@ -62,7 +62,7 @@ public static Scheduler getInstance() { if (INSTANCE == null) { - logger.info("Create new WSPLGEN Scheduler..."); + log.info("Create new WSPLGEN Scheduler..."); INSTANCE = new Scheduler(); } @@ -78,7 +78,7 @@ jobs.put(job.getArtifact().identifier(), new FutureJob(f, job)); - logger.info("New WSPLGEN job successfully added."); + log.info("New WSPLGEN job successfully added."); } } @@ -89,13 +89,13 @@ * @param jobId The id of the job (which is the identifier of an Artifact). */ public void cancelJob(String jobId) { - logger.debug("Search job in queue: " + jobId); + log.debug("Search job in queue: " + jobId); synchronized (jobs) { FutureJob fj = jobs.get(jobId); if (fj != null) { - logger.info("Try to cancel job: " + jobId); + log.info("Try to cancel job: " + jobId); fj.future.cancel(true); @@ -104,7 +104,7 @@ fj.job.getCallContext().afterBackground( CallContext.STORE); - logger.info("Canceled job: " + jobId); + log.info("Canceled job: " + jobId); } } }
--- a/artifacts/src/main/java/org/dive4elements/river/wsplgen/WSPLGENCallable.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/wsplgen/WSPLGENCallable.java Fri Sep 05 12:58:17 2014 +0200 @@ -32,7 +32,7 @@ System.getProperty("wsplgen.bin.path"); - private Logger logger = Logger.getLogger(WSPLGENCallable.class); + private Logger log = Logger.getLogger(WSPLGENCallable.class); private Process process; @@ -69,7 +69,7 @@ protected void execute(String[] args, File dir) { - logger.info("Start JobExecutor for artifact: " + dir.getName()); + log.info("Start JobExecutor for artifact: " + dir.getName()); try { synchronized (this) { @@ -85,7 +85,7 @@ process.waitFor(); } catch (InterruptedException ie) { - logger.warn("WSPLGEN job interrupted: " + ie.getMessage()); + log.warn("WSPLGEN job interrupted: " + ie.getMessage()); } try { @@ -94,11 +94,11 @@ } catch (InterruptedException iee) { /* do nothing */ } - logger.info("WSPLGEN exit value: " + process.exitValue()); - logger.info( + log.info("WSPLGEN exit value: " + process.exitValue()); + log.info( "WSPLGEN throw " + errorObserver.numErrors() + " errors."); - logger.info( + log.info( "WSPLGEN throw " + errorObserver.numWarnings() + " warnings."); @@ -116,23 +116,23 @@ } } catch (SecurityException se) { - logger.error(se); + log.error(se); } catch (IOException ioe) { - logger.error(ioe); + log.error(ioe); } catch (NullPointerException npe) { - logger.error(npe, npe); + log.error(npe, npe); } catch (IndexOutOfBoundsException ioobe) { - logger.error(ioobe, ioobe); + log.error(ioobe, ioobe); } } public void cancelWSPLGEN() { if (process != null) { - logger.debug("Cancel running WSPLGEN process."); + log.debug("Cancel running WSPLGEN process."); process.destroy(); } }
--- a/artifacts/src/main/java/org/dive4elements/river/wsplgen/WSPLGENFuture.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/wsplgen/WSPLGENFuture.java Fri Sep 05 12:58:17 2014 +0200 @@ -22,7 +22,7 @@ */ public class WSPLGENFuture extends FutureTask { - private static final Logger logger = Logger.getLogger(WSPLGENFuture.class); + private static final Logger log = Logger.getLogger(WSPLGENFuture.class); protected WSPLGENCallable wsplgenCallable; @@ -40,7 +40,7 @@ @Override public boolean cancel(boolean mayInterruptIfRunning) { - logger.debug("WSPLGENFuture.cancel"); + log.debug("WSPLGENFuture.cancel"); wsplgenCallable.cancelWSPLGEN(); return super.cancel(mayInterruptIfRunning);