*
* @generated modifiable
*/
public Object parse(ElementInstance instance, Node node, Object value)
throws Exception {
PolygonSymbolizer ps = styleFactory.createPolygonSymbolizer();
//<xsd:element ref="sld:Geometry" minOccurs="0"/>
if(node.hasChild("Geometry")) {
Expression geometry = (Expression) node.getChildValue("Geometry");
if(geometry instanceof PropertyName) {
PropertyName propertyName = (PropertyName) geometry;
ps.setGeometryPropertyName(propertyName.getPropertyName());
} else {
ps.setGeometry(geometry);
}
}
//<xsd:element ref="sld:Fill" minOccurs="0"/>
if (node.hasChild(Fill.class)) {
ps.setFill((Fill) node.getChildValue(Fill.class));
}
//<xsd:element ref="sld:Stroke" minOccurs="0"/>
if (node.hasChild(Stroke.class)) {
ps.setStroke((Stroke) node.getChildValue(Stroke.class));
}
//<xsd:element ref="sld:VendorOption" minOccurs="0" maxOccurs="unbounded"/>
for (CssParameter param : (List<CssParameter>) node.getChildValues(CssParameter.class)) {
ps.getOptions().put(param.getName(), param.getExpression().evaluate(null, String.class));
}
return ps;
}