Search in sources :

Example 1 with ColumnGuesser

use of org.activityinfo.geoadmin.ColumnGuesser in project activityinfo by bedatadriven.

the class LocationImportForm method guessLevelColumns.

public void guessLevelColumns(GeoAdminClient client) {
    for (AdminLevel level : levelCombos.keySet()) {
        List<AdminEntity> entities = client.getAdminEntities(level);
        setLevelAttribute(level, new ColumnGuesser().forEntities(entities).findBest(source));
    }
}
Also used : AdminEntity(org.activityinfo.geoadmin.model.AdminEntity) AdminLevel(org.activityinfo.geoadmin.model.AdminLevel) ColumnGuesser(org.activityinfo.geoadmin.ColumnGuesser)

Aggregations

ColumnGuesser (org.activityinfo.geoadmin.ColumnGuesser)1 AdminEntity (org.activityinfo.geoadmin.model.AdminEntity)1 AdminLevel (org.activityinfo.geoadmin.model.AdminLevel)1