@Override public String toString() { return "AbstractDataStatistics [adapterId=" + adapterId + ", statisticsType=" + statisticsType.getString() + "]"; } }
@Override public String toString() { final StringBuffer buffer = new StringBuffer(statisticsType.getString()).append(" (").append(extendedId).append( ")").append("="); if (!partitions.isEmpty()) { for (final ByteArray p : partitions) { if ((p == null) || (p.getBytes() == null)) { buffer.append("null,"); } else { buffer.append(p.getHexString()).append(","); } } buffer.deleteCharAt(buffer.length() - 1); } else { buffer.append("none"); } return buffer.toString(); }
@Override public JSONObject toJSONObject(final InternalAdapterStore store) throws JSONException { final JSONObject jo = new JSONObject(); jo.put("dataType", store.getTypeName(adapterId)); jo.put("statsType", statisticsType.getString()); if ((extendedId != null) && !extendedId.isEmpty()) { jo.put("extendedId", extendedId); } jo.put(resultsName(), resultsValue()); return jo; }
builder.append(String.format("%1$-20s", stats.getType().getString())); builder.append("] "); builder.append(stats.toString());
+ statisticsId.getType().getString() + "' with field name '" + statisticsId.getExtendedId()
@Override public InternalDataStatistics<GridCoverage, ?, ?> createDataStatistics( final StatisticsId statisticsId) { InternalDataStatistics<GridCoverage, ?, ?> retVal = null; if (OverviewStatistics.STATS_TYPE.equals(statisticsId.getType())) { retVal = new OverviewStatistics(); } else if (BoundingBoxDataStatistics.STATS_TYPE.equals(statisticsId.getType())) { retVal = new RasterBoundingBoxStatistics(); } else if (RasterFootprintStatistics.STATS_TYPE.equals(statisticsId.getType())) { retVal = new RasterFootprintStatistics(); } else if (HistogramStatistics.STATS_TYPE.equals(statisticsId.getType()) && (histogramConfig != null)) { retVal = new HistogramStatistics(histogramConfig); } else { // HP Fortify "Log Forging" false positive // What Fortify considers "user input" comes only // from users with OS-level access anyway LOGGER.warn( "Unrecognized statistics type " + statisticsId.getType().getString() + " using count statistic"); retVal = new CountDataStatistics<>(); } return retVal; }