# HG changeset patch # User Felix Wolfsteller # Date 1377523977 -7200 # Node ID 254a3f3556eedd356ca32b77e54c954ede6082a3 # Parent 6fb355b87f504022069ed0cb14ceca4df8cb11d6 WstValueTable: Add method to find out wether the Qs are 'fake' This happens in import process when no Q values are found (they are set to zero). As consequence, these datasets can only be drawn as markers to an axis. diff -r 6fb355b87f50 -r 254a3f3556ee artifacts/src/main/java/org/dive4elements/river/artifacts/model/WstValueTable.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WstValueTable.java Mon Aug 26 15:28:46 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WstValueTable.java Mon Aug 26 15:32:57 2013 +0200 @@ -1275,6 +1275,27 @@ } + /** True if no QRange is given or Q equals zero. */ + public boolean hasEmptyQ() { + for (Column column: columns) { + if (column.getQRangeTree() == null) { + return true; + } + else { + if (Math.abs(column.getQRangeTree().maxQ()) <= 0.01d) { + return true; + } + } + } + + if (columns.length == 0) { + log.warn("No columns in WstValueTable."); + } + + return false; + } + + /** Find ranges that are between km1 and km2 (inclusive?) */ public List findSegments(double km1, double km2) { return columns.length != 0