Geometry geometry = reader.read(literal.toString()); if (geometry != null) { returnType = Geometry.class; Integer integer = Integer.valueOf(literal.toString()); returnType = integer.getClass(); } catch (NumberFormatException e) { Double doubleValue = Double.valueOf(literal.toString()); returnType = doubleValue.getClass(); } catch (NumberFormatException e) {
/** * Gets the font name. * * @param font the font * @return the font name */ private String getFontName(Font font) { String fontName = ""; if (font != null) { List<Expression> expressionList = font.getFamily(); if ((expressionList != null) && !expressionList.isEmpty()) { LiteralExpressionImpl expression = (LiteralExpressionImpl) expressionList.get(0); fontName = expression.toString(); } } return fontName; }
@Override public void setValue(Object aValue) { this.value = null; this.expression = null; if (aValue instanceof LiteralExpressionImpl) { LiteralExpressionImpl literal = (LiteralExpressionImpl) aValue; if (literal.getValue() != null) { value = literal.toString(); } } else if ((aValue instanceof AttributeExpressionImpl) || (aValue instanceof FunctionExpressionImpl) || (aValue instanceof MathExpressionImpl)) { this.expression = (Expression) aValue; } else { if (aValue instanceof String) { value = ((String) aValue); } } }
/** * Sets the colour. * * @param colourExpression the new colour */ public void setColour(Expression colourExpression) { this.colourExpression = colourExpression; if (colourExpression instanceof LiteralExpressionImpl) { colourString = ((LiteralExpressionImpl) colourExpression).toString(); if (ColourUtils.validColourString(colourString)) { this.colour = ColourUtils.toColour(colourString); } else { this.colour = Color.white; } } else if (colourExpression instanceof Expression) { colourString = colourExpression.toString(); this.colour = Color.white; } }
sValue = ((LiteralExpressionImpl) objValue).toString(); } else if (objValue instanceof String) { sValue = (String) objValue;
if (literal.toString().startsWith(GEOSERVER_MARKER_PREFIX)) { setGeoServerMarker( fieldConfigManager,