private boolean isFeatureTypeStyleActive(FeatureType ftype, FeatureTypeStyle fts) { // TODO: find a complex feature equivalent for this check return fts.featureTypeNames().isEmpty() || ((ftype.getName().getLocalPart() != null) && (ftype.getName() .getLocalPart() .equalsIgnoreCase(fts.getFeatureTypeName()) || FeatureTypes.isDecendedFrom( ftype, null, fts.getFeatureTypeName()))); }
public FeatureTypeStyleBuilder reset(FeatureTypeStyle fts) { if (fts == null) { return unset(); } this.name = fts.getName(); this.description.reset(fts.getDescription()); this.definedFor.reset(fts.getFeatureInstanceIDs()); this.featureTypeNames.clear(); if (fts.featureTypeNames() != null) { this.featureTypeNames.addAll(fts.featureTypeNames()); } this.rules.clear(); if (fts.rules() != null) { for (Rule rule : fts.rules()) { this.rules.add(new RuleBuilder(this).reset(rule)); } } this.options.clear(); this.options.putAll(fts.getOptions()); this.transformation = fts.getTransformation(); this.unset = false; return this; }
public void visit(FeatureTypeStyle fts) { start("FeatureTypeStyle"); if ((fts.getName() != null) && (fts.getName().length() > 0)) { element("Name", fts.getName()); } if (fts.getDescription() != null && fts.getDescription().getTitle() != null) element("Title", fts.getDescription().getTitle()); if (fts.getDescription() != null && fts.getDescription().getAbstract() != null) element("Abstract", fts.getDescription().getAbstract()); if ((fts.featureTypeNames() != null) && (fts.featureTypeNames().size() > 0)) { element("FeatureTypeName", fts.featureTypeNames().iterator().next().toString()); } if (fts.getTransformation() != null) { element("Transformation", fts.getTransformation()); } String[] sti = fts.getSemanticTypeIdentifiers(); if (sti.length != 1 || !sti[0].equals(SemanticType.ANY.toString())) { for (int i = 0; i < sti.length; i++) { element("SemanticTypeIdentifier", sti[i]); } } Rule[] rules = fts.getRules(); for (int i = 0; i < rules.length; i++) { rules[i].accept(this); } encodeVendorOptions(fts.getOptions()); end("FeatureTypeStyle"); }
"clone: rules collection should have been cloned", clone.rules() != original.rules()); assertTrue("clone: featureTypeNames must not be null", clone.featureTypeNames() != null); assertTrue("clone: two featureTypeNames expected", clone.featureTypeNames().size() == 2); assertTrue( "clone: semanticTypeIdentifiers collection should have been cloned", clone.featureTypeNames() != original.featureTypeNames()); assertTrue( "clone: semanticTypeIdentifiers must not be null",
private boolean isFeatureTypeStyleActive(FeatureType ftype, FeatureTypeStyle fts) { // TODO: find a complex feature equivalent for this check return fts.featureTypeNames().isEmpty() || ((ftype.getName().getLocalPart() != null) && (ftype.getName().getLocalPart().equalsIgnoreCase(fts.getFeatureTypeName()) || FeatureTypes.isDecendedFrom(ftype, null, fts.getFeatureTypeName()))); }
@Override public void visit(Style style) { super.visit(style); Style copy = (Style) pages.peek(); List<FeatureTypeStyle> filtered = new ArrayList<FeatureTypeStyle>(); for (FeatureTypeStyle fts : copy.featureTypeStyles()) { // do the same filtering as streaming renderer String ftName = fts.getFeatureTypeName(); if (fts.featureTypeNames().isEmpty() || ((schema.getName().getLocalPart() != null) && (schema.getName() .getLocalPart().equalsIgnoreCase(ftName) || FeatureTypes .isDecendedFrom(schema, null, ftName)))) { filtered.add(fts); } } copy.featureTypeStyles().clear(); copy.featureTypeStyles().addAll(filtered); }
private static boolean isFeatureTypeStyleActive(FeatureType ftype, FeatureTypeStyle fts) { // TODO: find a complex feature equivalent for this check return fts.featureTypeNames().isEmpty() || ((ftype.getName().getLocalPart() != null) && (ftype.getName() .getLocalPart() .equalsIgnoreCase(fts.getFeatureTypeName()) || FeatureTypes.isDecendedFrom( ftype, null, fts.getFeatureTypeName()))); } }
private static boolean isFeatureTypeStyleActive(FeatureType ftype, FeatureTypeStyle fts) { // TODO: find a complex feature equivalent for this check return fts.featureTypeNames().isEmpty() || ((ftype.getName().getLocalPart() != null) && (ftype.getName().getLocalPart() .equalsIgnoreCase(fts.getFeatureTypeName()) || FeatureTypes.isDecendedFrom( ftype, null, fts.getFeatureTypeName()))); }
if ((fts.featureTypeNames() != null) && (fts.featureTypeNames().size() > 0)) { element("FeatureTypeName", fts.featureTypeNames().iterator().next().toString());
standardData.getDescription(), existingFTS.getFeatureInstanceIDs(), existingFTS.featureTypeNames(), existingFTS.semanticTypeIdentifiers(), newRuleList);