}
public void visit(FeatureTypeStyle fts) {
FeatureTypeStyle copy = new FeatureTypeStyleImpl( (FeatureTypeStyleImpl)fts);
// copy = new StyleFactoryImpl().createFeatureTypeStyle(
// fts.getRules(),
// fts.getSemanticTypeIdentifiers(),
// fts.featureInstanceIDs(),
// fts.getFeatureTypeName(),
// fts.getDescription(),
// fts.getName());
Rule[] rules = fts.getRules();
int length=rules.length;
Rule[] rulesCopy = new Rule[length];
for (int i = 0; i < length; i++) {
if (rules[i] != null) {
rules[i].accept(this);
rulesCopy[i] = (Rule) pages.pop();
}
}
//
// copy = sf.createFeatureTypeStyle();
// copy.setName(fts.getName());
// copy.setTitle(fts.getTitle());
// copy.setAbstract(fts.getAbstract());
// copy.setFeatureTypeName(fts.getFeatureTypeName());
copy.setRules(rulesCopy);
// copy.setSemanticTypeIdentifiers((String[]) fts.getSemanticTypeIdentifiers().clone());
if( STRICT && !copy.equals( fts )){
throw new IllegalStateException("Was unable to duplicate provided FeatureTypeStyle:"+fts );
}
pages.push(copy);
}