}
// create the rules
rules.addAll(createRules(layerType, styleFilter, featureInfo, featureStyle));
}
// create the style
FeatureTypeStyle normalStyle = styleBuilder.createFeatureTypeStyle(typeName,
rules.toArray(new Rule[rules.size()]));
style.featureTypeStyles().add(normalStyle);
// apply the selection style
rules.clear();
if (vectorLayerRasterizingInfo.getSelectedFeatureIds() != null) {
// create the filter
Filter fidFilter = filterService.createFidFilter(vectorLayerRasterizingInfo.getSelectedFeatureIds());
// create the rules
rules.addAll(createRules(layerType, fidFilter, featureInfo,
vectorLayerRasterizingInfo.getSelectionStyle()));
}
// create the style
FeatureTypeStyle selectionStyle = styleBuilder.createFeatureTypeStyle(typeName,
rules.toArray(new Rule[rules.size()]));
style.featureTypeStyles().add(selectionStyle);
}
// apply the label style
if (vectorLayerRasterizingInfo.isPaintLabels()) {
// create the rule
TextSymbolizer textSymbolizer = createTextSymbolizer(vectorLayerRasterizingInfo.getStyle().getLabelStyle(),
layerType);
Rule labelRule = styleBuilder.createRule(textSymbolizer);
// create the style
FeatureTypeStyle labelStyle = styleBuilder.createFeatureTypeStyle(typeName, labelRule);
style.featureTypeStyles().add(labelStyle);
}
return style;
}