ft.setSemanticTypeIdentifiers(sti.toArray(new String[0]));
featureTypeStyle.setSemanticTypeIdentifiers( (String[]) ids.toArray(new String[ids.size()]));
@Test public void testStyleDuplication() throws IllegalFilterException { // create a style Style oldStyle = sb.createStyle("FTSName", sf.createPolygonSymbolizer()); oldStyle.getFeatureTypeStyles()[0].setSemanticTypeIdentifiers( new String[] {"simple", "generic:geometry"}); // duplicate it oldStyle.accept(visitor); Style newStyle = (Style) visitor.getCopy(); // compare it assertNotNull(newStyle); }
public void testStyleDuplication() throws IllegalFilterException { // create a style Style oldStyle = sb.createStyle("FTSName", sf.createPolygonSymbolizer()); oldStyle.getFeatureTypeStyles()[0].setSemanticTypeIdentifiers( new String[] {"simple", "generic:geometry"}); // duplicate it oldStyle.accept(visitor); Style newStyle = (Style) visitor.getCopy(); // compare it assertNotNull(newStyle); assertEquals(2, newStyle.getFeatureTypeStyles()[0].getSemanticTypeIdentifiers().length); }
fts.setSemanticTypeIdentifiers(new String[] {"generic:geometry", "colorbrewer:" + typeId});
ft.setSemanticTypeIdentifiers((String[]) sti.toArray(new String[0]));
ft.setSemanticTypeIdentifiers((String[]) sti.toArray(new String[0]));
featureTypeStyle.setSemanticTypeIdentifiers((String[]) ids.toArray( new String[ids.size()]));
public void visit(FeatureTypeStyle fts) { FeatureTypeStyle copy = null; 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()); pages.push(copy); }
public void visit(FeatureTypeStyle fts) { FeatureTypeStyle copy = null; 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) getPages().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()); getPages().push(copy); }
featureTypeStyle.setSemanticTypeIdentifiers((String[]) ids.toArray( new String[ids.size()]));