*/
public static Style rulesToStyle( List<Rule> rules, String name, boolean oneFeaturetypestylePerRule ) {
Style namedStyle = Utilities.sf.createStyle();
if (!oneFeaturetypestylePerRule) {
FeatureTypeStyle featureTypeStyle = Utilities.sf.createFeatureTypeStyle();
List<Rule> currentRules = featureTypeStyle.rules();
for( int i = 0; i < rules.size(); i++ ) {
Rule rule = rules.get(i);
currentRules.add(rule);
}
namedStyle.featureTypeStyles().add(featureTypeStyle);