use of com.sldeditor.filter.v2.function.identifier.FidFilter in project sldeditor by robward-scisys.
the class FilterManager method getFilterConfigList.
/**
* Gets the filter config list.
*
* @return the filter config list
*/
@Override
public List<FilterConfigInterface> getFilterConfigList() {
List<FilterConfigInterface> filterConfigList = new ArrayList<>();
// Logic filters
filterConfigList.add(new And(CATEGORY_LOGIC));
filterConfigList.add(new Or(CATEGORY_LOGIC));
filterConfigList.add(new Not(CATEGORY_LOGIC));
filterConfigList.add(new IsEqualTo(CATEGORY_COMPARISON));
filterConfigList.add(new IsNotEqualTo(CATEGORY_COMPARISON));
filterConfigList.add(new IsLessThan(CATEGORY_COMPARISON));
filterConfigList.add(new IsLessThanEqualTo(CATEGORY_COMPARISON));
filterConfigList.add(new IsGreaterThan(CATEGORY_COMPARISON));
filterConfigList.add(new IsGreaterThanEqualTo(CATEGORY_COMPARISON));
filterConfigList.add(new IsBetween(CATEGORY_COMPARISON));
filterConfigList.add(new IsNull(CATEGORY_COMPARISON));
filterConfigList.add(new IsLike(CATEGORY_COMPARISON));
// Temporal
filterConfigList.add(new After(CATEGORY_TEMPORAL));
filterConfigList.add(new Before(CATEGORY_TEMPORAL));
filterConfigList.add(new BegunBy(CATEGORY_TEMPORAL));
filterConfigList.add(new During(CATEGORY_TEMPORAL));
filterConfigList.add(new Ends(CATEGORY_TEMPORAL));
filterConfigList.add(new Meets(CATEGORY_TEMPORAL));
filterConfigList.add(new MetBy(CATEGORY_TEMPORAL));
filterConfigList.add(new EndedBy(CATEGORY_TEMPORAL));
filterConfigList.add(new OverlappedBy(CATEGORY_TEMPORAL));
filterConfigList.add(new TEquals(CATEGORY_TEMPORAL));
filterConfigList.add(new TOverlaps(CATEGORY_TEMPORAL));
filterConfigList.add(new TContains(CATEGORY_TEMPORAL));
filterConfigList.add(new AnyInteracts(CATEGORY_TEMPORAL));
// Geometry
filterConfigList.add(new BBox(CATEGORY_SPATIAL));
filterConfigList.add(new Beyond(CATEGORY_SPATIAL));
filterConfigList.add(new Contains(CATEGORY_SPATIAL));
filterConfigList.add(new Crosses(CATEGORY_SPATIAL));
filterConfigList.add(new Disjoint(CATEGORY_SPATIAL));
filterConfigList.add(new DWithin(CATEGORY_SPATIAL));
filterConfigList.add(new Equals(CATEGORY_SPATIAL));
filterConfigList.add(new Intersects(CATEGORY_SPATIAL));
filterConfigList.add(new Overlaps(CATEGORY_SPATIAL));
filterConfigList.add(new Touches(CATEGORY_SPATIAL));
filterConfigList.add(new Within(CATEGORY_SPATIAL));
// Fid
filterConfigList.add(new FidFilter(CATEGORY_IDENTIFIER));
return filterConfigList;
}
use of com.sldeditor.filter.v2.function.identifier.FidFilter in project sldeditor by robward-scisys.
the class FidFilter method getFilterConfiguration.
/**
* Gets the filter configuration.
*
* @return the filter configuration
*/
@Override
public FilterName getFilterConfiguration() {
FilterName filterName = new FilterName("FidFilter", String.class);
filterName.addParameter(new FilterNameParameter("identifier", ExpressionTypeEnum.LITERAL, String.class));
return filterName;
}
use of com.sldeditor.filter.v2.function.identifier.FidFilter in project sldeditor by robward-scisys.
the class FilterNode method setFilter.
/**
* Sets the filter.
*
* @param filter the new expression
* @param filterConfig the filter config
*/
public void setFilter(Filter filter, FilterConfigInterface filterConfig) {
this.filter = filter;
this.filterConfig = filterConfig;
setDisplayString();
this.removeAllChildren();
TypeManager.getInstance().reset();
if (filterConfig != null) {
FilterName filterName = filterConfig.getFilterConfiguration();
if (filter instanceof Not) {
setNotFilter(filter, filterName);
} else if (filter instanceof LogicFilterImpl) {
setLogicFilter(filter, filterName);
} else if (filter instanceof BinaryTemporalOperator) {
setExpressionParameter(((BinaryTemporalOperator) filter).getExpression1(), filterName.getParameter(0));
setExpressionParameter(((BinaryTemporalOperator) filter).getExpression2(), filterName.getParameter(1));
} else if (filter instanceof PropertyIsNull) {
setExpressionParameter(((PropertyIsNull) filter).getExpression(), filterName.getParameter(0));
} else if (filter instanceof PropertyIsBetween) {
setExpressionParameter(((PropertyIsBetween) filter).getLowerBoundary(), filterName.getParameter(0));
setExpressionParameter(((PropertyIsBetween) filter).getExpression(), filterName.getParameter(1));
setExpressionParameter(((PropertyIsBetween) filter).getUpperBoundary(), filterName.getParameter(2));
} else if (filter instanceof PropertyIsLike) {
setExpressionParameter(((PropertyIsLike) filter).getExpression(), filterName.getParameter(0));
setExpressionParameter(ff.literal(((PropertyIsLike) filter).getLiteral()), filterName.getParameter(1));
setExpressionStringSizeParameter(ff.literal(((PropertyIsLike) filter).getWildCard()), filterName.getParameter(2), 1, true);
setExpressionStringSizeParameter(ff.literal(((PropertyIsLike) filter).getSingleChar()), filterName.getParameter(3), 1, true);
setExpressionStringSizeParameter(ff.literal(((PropertyIsLike) filter).getEscape()), filterName.getParameter(4), 1, true);
setExpressionParameter(ff.literal(((PropertyIsLike) filter).isMatchingCase()), filterName.getParameter(5));
} else if (filter instanceof BinarySpatialOperator) {
setBinarySpatialOperator(filter, filterName);
} else if (filter instanceof BinaryComparisonAbstract) {
setBinaryComparisonAbstract(filter, filterName);
} else if (filter instanceof FidFilterImpl) {
FidFilterImpl fidFilter = (FidFilterImpl) filter;
for (Identifier identifier : fidFilter.getIdentifiers()) {
setExpressionParameter(ff.literal(identifier), filterName.getParameter(0));
}
}
}
}
Aggregations