}
private void createGeometrySLD( Color colour, Color colour2, String geomXPath, Style style,
int size ) throws IllegalFilterException {
// create Point rule
Rule rule = getDefaultRule(style);
PropertyIsEqualTo filter = createGeometryFunctionFilter(geomXPath, Point.class
.getSimpleName());
rule.setFilter(filter);
Symbolizer[] pointSymbolizers = new Symbolizer[]{createPointSymbolizer(colour, size)};
rule.setSymbolizers(pointSymbolizers);
getDefaultFeatureTypeStyle(style).addRule(rule);
// create MultiPoint rule
rule = styleBuilder.createRule(new Symbolizer[]{});
filter = createGeometryFunctionFilter(geomXPath, MultiPoint.class.getSimpleName());
rule.setFilter(filter);
rule.setSymbolizers(pointSymbolizers);
getDefaultFeatureTypeStyle(style).addRule(rule);
// create LineString rule
rule = styleBuilder.createRule(new Symbolizer[]{});
filter = createGeometryFunctionFilter(geomXPath, LineString.class.getSimpleName());
rule.setFilter(filter);
Symbolizer[] lineSymbolizers = createLineSymbolizers(this);
rule.setSymbolizers(lineSymbolizers);
getDefaultFeatureTypeStyle(style).addRule(rule);
// create LinearRing rule
rule = styleBuilder.createRule(new Symbolizer[]{});
filter = createGeometryFunctionFilter(geomXPath, LinearRing.class.getSimpleName());
rule.setFilter(filter);
rule.setSymbolizers(lineSymbolizers);
getDefaultFeatureTypeStyle(style).addRule(rule);
// create MultiLineString rule
rule = styleBuilder.createRule(new Symbolizer[]{});
filter = createGeometryFunctionFilter(geomXPath, MultiLineString.class.getSimpleName());
rule.setFilter(filter);
rule.setSymbolizers(lineSymbolizers);
getDefaultFeatureTypeStyle(style).addRule(rule);
// create Polygon rule
rule = styleBuilder.createRule(new Symbolizer[]{});
filter = createGeometryFunctionFilter(geomXPath, Polygon.class.getSimpleName());
rule.setFilter(filter);
Symbolizer[] polygonSymbolizers = createPolygonSymbolizarts(this);
rule.setSymbolizers(polygonSymbolizers);
getDefaultFeatureTypeStyle(style).addRule(rule);
// create MultiPolygon rule
rule = styleBuilder.createRule(new Symbolizer[]{});
filter = createGeometryFunctionFilter(geomXPath, MultiPolygon.class.getSimpleName());
rule.setFilter(filter);
rule.setSymbolizers(polygonSymbolizers);
getDefaultFeatureTypeStyle(style).addRule(rule);
}