use of eu.esdihumboldt.hale.common.filter.internal.EntityReplacementVisitor in project hale by halestudio.
the class AbstractGeotoolsFilter method migrateFilter.
@Override
public Optional<eu.esdihumboldt.hale.common.instance.model.Filter> migrateFilter(EntityDefinition context, AlignmentMigration migration, SimpleLog log) {
EntityReplacementVisitor visitor = new EntityReplacementVisitor(migration, name -> resolveProperty(name, context, log), log);
Object extraData = null;
Filter copy = (Filter) internFilter.accept(visitor, extraData);
try {
String filterString = toFilterTerm(copy);
return Optional.of(buildFilter(filterString));
} catch (CQLException e) {
log.error("Filter could not be automatically migrated", e);
return Optional.empty();
}
}
Aggregations