use of org.geotools.filter.LiteralExpressionImpl in project sldeditor by robward-scisys.
the class IsGreaterThanEqualTo method createFilter.
/**
* Creates the filter.
*
* @param parameterList the parameter list
* @return the filter
*/
@Override
public Filter createFilter(List<Expression> parameterList) {
IsGreaterThanOrEqualToImpl filter = null;
if ((parameterList == null) || (parameterList.size() < 2) || (parameterList.size() > 3)) {
filter = new IsGreaterThanOrEqualToExtended();
} else {
LiteralExpressionImpl matchCase = (LiteralExpressionImpl) parameterList.get(2);
filter = new IsGreaterThanOrEqualToExtended(parameterList.get(0), parameterList.get(1), (Boolean) matchCase.getValue());
}
return filter;
}
use of org.geotools.filter.LiteralExpressionImpl in project sldeditor by robward-scisys.
the class IsNotEqualTo method createFilter.
/**
* Creates the filter.
*
* @param parameterList the parameter list
* @return the filter
*/
@Override
public Filter createFilter(List<Expression> parameterList) {
IsNotEqualToImpl filter = null;
if ((parameterList == null) || (parameterList.size() != 3)) {
filter = new IsNotEqualToExtended();
} else {
LiteralExpressionImpl matchCase = (LiteralExpressionImpl) parameterList.get(2);
filter = new IsNotEqualToExtended(parameterList.get(0), parameterList.get(1), (Boolean) matchCase.getValue());
}
return filter;
}
use of org.geotools.filter.LiteralExpressionImpl in project sldeditor by robward-scisys.
the class IsLessThanEqualTo method createFilter.
/**
* Creates the filter.
*
* @param parameterList the parameter list
* @return the filter
*/
@Override
public Filter createFilter(List<Expression> parameterList) {
IsLessThenOrEqualToImpl filter = null;
if ((parameterList == null) || (parameterList.size() < 2) || (parameterList.size() > 3)) {
filter = new IsLessThanOrEqualToExtended();
} else {
LiteralExpressionImpl matchCase = (LiteralExpressionImpl) parameterList.get(2);
filter = new IsLessThanOrEqualToExtended(parameterList.get(0), parameterList.get(1), (Boolean) matchCase.getValue());
}
return filter;
}
use of org.geotools.filter.LiteralExpressionImpl in project sldeditor by robward-scisys.
the class IsEqualTo method createFilter.
/**
* Creates the filter.
*
* @param parameterList the parameter list
* @return the filter
*/
@Override
public Filter createFilter(List<Expression> parameterList) {
IsEqualsToImpl filter = null;
if ((parameterList == null) || (parameterList.size() != 3)) {
filter = new IsEqualToExtended();
} else {
LiteralExpressionImpl matchCase = (LiteralExpressionImpl) parameterList.get(2);
filter = new IsEqualToExtended(parameterList.get(0), parameterList.get(1), (Boolean) matchCase.getValue());
}
return filter;
}
use of org.geotools.filter.LiteralExpressionImpl in project sldeditor by robward-scisys.
the class StrokeDetails method getStrokeDashArray.
/**
* Gets the stroke dash array.
*
* @param stroke the stroke
* @return the stroke dash array
*/
private List<Float> getStrokeDashArray(Stroke stroke) {
List<Expression> expressionList = stroke.dashArray();
List<Float> valueList = new ArrayList<>();
if (expressionList != null) {
for (Expression expression : expressionList) {
if (expression instanceof LiteralExpressionImpl) {
LiteralExpressionImpl lExpression = (LiteralExpressionImpl) expression;
Float objValue = null;
if (lExpression.getValue() instanceof Float) {
objValue = (Float) lExpression.getValue();
} else if (lExpression.getValue() instanceof Double) {
objValue = ((Double) lExpression.getValue()).floatValue();
}
valueList.add(objValue);
} else if (expression instanceof ConstantExpression) {
ConstantExpression cExpression = (ConstantExpression) expression;
Float objValue = (Float) cExpression.getValue();
valueList.add(objValue);
}
}
}
return valueList;
}
Aggregations