use of org.geotools.filter.Expression in project ddf by codice.
the class OpenSearchFilterVisitor method visit.
/**
* PropertyIsEqualTo filter maps to a type/version criteria.
*/
@Override
public Object visit(PropertyIsEqualTo filter, Object data) {
LOGGER.trace("ENTERING: PropertyIsEqualTo filter");
if (currentNest != NestedTypes.NOT) {
if (filter instanceof IsEqualsToImpl) {
IsEqualsToImpl isEqualsTo = (IsEqualsToImpl) filter;
Expression leftValue = isEqualsTo.getLeftValue();
if (Metacard.ID.equals(leftValue.toString())) {
id = isEqualsTo.getExpression2().toString();
}
} else if (filter instanceof PropertyIsEqualToLiteral) {
PropertyIsEqualToLiteral isEqualsTo = (PropertyIsEqualToLiteral) filter;
if (Metacard.ID.equals(isEqualsTo.getExpression1().toString())) {
id = isEqualsTo.getExpression2().toString();
}
}
}
filters.add(filter);
LOGGER.trace("EXITING: PropertyIsEqualTo filter");
return super.visit(filter, data);
}
Aggregations