org.datacleaner.beans.StringAnalyzerResultReducer Maven / Gradle / Ivy
/**
* DataCleaner (community edition)
* Copyright (C) 2014 Neopost - Customer Information Management
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.datacleaner.beans;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.datacleaner.api.InputColumn;
import org.datacleaner.result.AbstractCrosstabResultReducer;
import org.datacleaner.result.Crosstab;
import org.datacleaner.result.CrosstabNavigator;
import org.datacleaner.util.AverageBuilder;
/**
* Result reducer for {@link StringAnalyzerResult}s
*/
public class StringAnalyzerResultReducer extends AbstractCrosstabResultReducer {
private static final Set AVG_MEASURES = new HashSet(Arrays.asList(StringAnalyzer.MEASURE_AVG_CHARS,
StringAnalyzer.MEASURE_AVG_WHITE_SPACES));
private static final Set MIN_MEASURES = new HashSet(Arrays.asList(StringAnalyzer.MEASURE_MIN_CHARS,
StringAnalyzer.MEASURE_MIN_WHITE_SPACES, StringAnalyzer.MEASURE_MIN_WORDS));
private static final Set MAX_MEASURES = new HashSet(Arrays.asList(StringAnalyzer.MEASURE_MAX_CHARS,
StringAnalyzer.MEASURE_MAX_WHITE_SPACES, StringAnalyzer.MEASURE_MAX_WORDS));
@Override
protected Serializable reduceValues(List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy