final FeatureTypeStyle[] featureStylers, final MapLayer layer)
throws IOException, IllegalAttributeException {
final int ftsLength = featureStylers.length;
for (int i = 0; i < ftsLength; i++) {
FeatureTypeStyle fts = featureStylers[i];
final String typeName = features.getSchema().getTypeName();
if ((typeName != null)
&& (FeatureTypes.isDecendedFrom(features.getSchema(), null,
fts.getFeatureTypeName()) || typeName
.equalsIgnoreCase(fts.getFeatureTypeName()))) {
// get applicable rules at the current scale
Rule[] rules = fts.getRules();
List ruleList = new ArrayList();
List elseRuleList = new ArrayList();
populateRuleLists(rules, ruleList, elseRuleList, false);
if ((ruleList.size() == 0) && (elseRuleList.size() == 0)) {