use of org.geotools.filter.NotImpl in project sldeditor by robward-scisys.
the class ExtractAttributes method copy.
/**
* (non-Javadoc)
*
* @see org.geotools.styling.visitor.DuplicatingStyleVisitor#copy(org.opengis.filter.Filter)
*/
protected Filter copy(Filter filter) {
if (filter instanceof NotImpl) {
copy(((NotImpl) filter).getFilter());
} else if (filter instanceof LogicFilterImpl) {
LogicFilterImpl logicFilter = (LogicFilterImpl) filter;
for (Filter childFilter : logicFilter.getChildren()) {
copy(childFilter);
}
} else if (filter instanceof MultiCompareFilterImpl) {
MultiCompareFilterImpl multiCompareFilter = (MultiCompareFilterImpl) filter;
List<String> foundList1 = new ArrayList<String>();
Class<?> returnType1 = extractAttribute(String.class, multiCompareFilter.getExpression1(), foundList1);
List<String> foundList2 = new ArrayList<String>();
Class<?> returnType2 = extractAttribute(String.class, multiCompareFilter.getExpression2(), foundList2);
determineTypeFromExpressions(foundList1, returnType1, foundList2, returnType2);
} else if (filter instanceof BinaryTemporalOperator) {
BinaryTemporalOperator binaryTemporalOperator = (BinaryTemporalOperator) filter;
List<String> foundList1 = new ArrayList<String>();
Class<?> returnType1 = extractAttribute(String.class, binaryTemporalOperator.getExpression1(), foundList1);
List<String> foundList2 = new ArrayList<String>();
Class<?> returnType2 = extractAttribute(String.class, binaryTemporalOperator.getExpression2(), foundList2);
determineTypeFromExpressions(foundList1, returnType1, foundList2, returnType2);
} else if (filter instanceof BinarySpatialOperator) {
BinarySpatialOperator binarySpatialOperator = (BinarySpatialOperator) filter;
List<String> foundList1 = new ArrayList<String>();
Class<?> returnType1 = extractAttribute(String.class, binarySpatialOperator.getExpression1(), foundList1);
List<String> foundList2 = new ArrayList<String>();
Class<?> returnType2 = extractAttribute(String.class, binarySpatialOperator.getExpression2(), foundList2);
determineTypeFromExpressions(foundList1, returnType1, foundList2, returnType2);
} else if (filter instanceof PropertyIsBetween) {
PropertyIsBetween isBetween = (PropertyIsBetween) filter;
List<String> foundList1 = new ArrayList<String>();
Class<?> returnType1 = extractAttribute(String.class, isBetween.getLowerBoundary(), foundList1);
List<String> foundList2 = new ArrayList<String>();
Class<?> returnType2 = extractAttribute(String.class, isBetween.getExpression(), foundList2);
List<String> foundList3 = new ArrayList<String>();
Class<?> returnType3 = extractAttribute(String.class, isBetween.getUpperBoundary(), foundList3);
determineTypeFromExpressions(foundList1, returnType1, foundList2, returnType2, foundList3, returnType3);
} else if (filter instanceof PropertyIsNull) {
PropertyIsNull isNull = (PropertyIsNull) filter;
List<String> foundList1 = new ArrayList<String>();
extractAttribute(String.class, isNull.getExpression(), foundList1);
} else if (filter instanceof PropertyIsLike) {
PropertyIsLike isLike = (PropertyIsLike) filter;
List<String> foundList1 = new ArrayList<String>();
extractAttribute(String.class, isLike.getExpression(), foundList1);
}
return super.copy(filter);
}
Aggregations