Search in sources :

Example 6 with LabelCountMap

use of com.revolsys.util.count.LabelCountMap in project com.revolsys.open by revolsys.

the class LabelCountMapTableModel method getLabelCountMap.

public LabelCountMap getLabelCountMap(final CharSequence label, final CharSequence countName) {
    final LabelCountMap labelCountMap = getLabelCountMap(countName);
    newTypePathRow(label);
    return labelCountMap;
}
Also used : CategoryLabelCountMap(com.revolsys.util.count.CategoryLabelCountMap) LabelCountMap(com.revolsys.util.count.LabelCountMap)

Example 7 with LabelCountMap

use of com.revolsys.util.count.LabelCountMap in project com.revolsys.open by revolsys.

the class LabelCountMapTableModel method setStatistics.

public void setStatistics(final Map<String, LabelCountMap> statisticsMap) {
    try {
        this.categoryLabelCountMap = new CategoryLabelCountMap(statisticsMap);
        for (final Entry<String, LabelCountMap> entry : statisticsMap.entrySet()) {
            final String countName = entry.getKey();
            addCountNameColumn(countName);
            final LabelCountMap labelCountMap = entry.getValue();
            for (final String label : labelCountMap.getLabels()) {
                newStatistics(countName, label);
            }
        }
    } catch (final ConcurrentModificationException e) {
    }
    refresh();
}
Also used : ConcurrentModificationException(java.util.ConcurrentModificationException) CategoryLabelCountMap(com.revolsys.util.count.CategoryLabelCountMap) CategoryLabelCountMap(com.revolsys.util.count.CategoryLabelCountMap) LabelCountMap(com.revolsys.util.count.LabelCountMap)

Example 8 with LabelCountMap

use of com.revolsys.util.count.LabelCountMap in project com.revolsys.open by revolsys.

the class LabelCountMapTableModel method clearCounts.

public void clearCounts(final CharSequence countName) {
    final LabelCountMap labelCountMap = getLabelCountMap(countName);
    labelCountMap.clearCounts();
}
Also used : CategoryLabelCountMap(com.revolsys.util.count.CategoryLabelCountMap) LabelCountMap(com.revolsys.util.count.LabelCountMap)

Example 9 with LabelCountMap

use of com.revolsys.util.count.LabelCountMap in project com.revolsys.open by revolsys.

the class LabelCountMapTableModel method addCount.

public void addCount(final CharSequence label, final CharSequence countName, final long count) {
    if (label != null && countName != null) {
        final LabelCountMap labelCountMap = getLabelCountMap(label, countName);
        labelCountMap.addCount(label, count);
    }
}
Also used : CategoryLabelCountMap(com.revolsys.util.count.CategoryLabelCountMap) LabelCountMap(com.revolsys.util.count.LabelCountMap)

Example 10 with LabelCountMap

use of com.revolsys.util.count.LabelCountMap in project com.revolsys.open by revolsys.

the class ShapefileDirectoryWriter method setDirectory.

public void setDirectory(final File baseDirectory) {
    this.directory = baseDirectory;
    baseDirectory.mkdirs();
    this.labelCountMap = new LabelCountMap("Write Shape " + baseDirectory.getAbsolutePath());
    this.labelCountMap.connect();
}
Also used : LabelCountMap(com.revolsys.util.count.LabelCountMap)

Aggregations

LabelCountMap (com.revolsys.util.count.LabelCountMap)13 CategoryLabelCountMap (com.revolsys.util.count.CategoryLabelCountMap)4 PostConstruct (javax.annotation.PostConstruct)4 Identifier (com.revolsys.identifier.Identifier)1 BaseCloseable (com.revolsys.io.BaseCloseable)1 RecordReader (com.revolsys.record.io.RecordReader)1 RecordStore (com.revolsys.record.schema.RecordStore)1 Transaction (com.revolsys.transaction.Transaction)1 ConcurrentModificationException (java.util.ConcurrentModificationException)1