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 static boolean isFeatureTypeStyleActive(SimpleFeatureType ftype, FeatureTypeStyle fts) { return ((ftype.getTypeName() != null) && (ftype.getTypeName().equalsIgnoreCase(fts.getFeatureTypeName()) || FeatureTypes.isDecendedFrom(ftype, null, fts.getFeatureTypeName()))); }
public static boolean isFeatureTypeStyleActive(SimpleFeatureType ftype, FeatureTypeStyle fts) { return ((ftype.getTypeName() != null) && (ftype.getTypeName().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()))); }
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 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()))); }
&& (ftype.isDescendedFrom(null, fts.getFeatureTypeName()) || typeName .equalsIgnoreCase(fts.getFeatureTypeName()))) {
FeatureTypeStyle fts = featureStyles[i]; if ( typeDescription == null || typeDescription.toString().indexOf( fts.getFeatureTypeName() ) == -1 ) continue;
@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); }
String featureTypeName = featureTypeStyle.getFeatureTypeName();
String featureTypeName = featureTypeStyle.getFeatureTypeName(); Rule[] rules=featureTypeStyle.getRules(); if(rules!=null)
private static List[] getLayerRules(SimpleFeatureType ftype, Style style) { List[] result = new List[] { new ArrayList(), new ArrayList() }; final String typeName = ftype.getTypeName(); FeatureTypeStyle[] featureStyles = style.getFeatureTypeStyles(); final int length = featureStyles.length; for (int i = 0; i < length; i++) { // getting feature styles FeatureTypeStyle fts = featureStyles[i]; // check if this FTS is compatible with this FT. if ((typeName != null) && FeatureTypes.isDecendedFrom(ftype, null, fts .getFeatureTypeName())) { // get applicable rules at the current scale Rule[] ftsRules = fts.getRules(); for (int j = 0; j < ftsRules.length; j++) { // getting rule Rule r = ftsRules[j]; if (KMLUtils.isWithInScale(r, 1)) { if (r.hasElseFilter()) { result[ELSE_RULES].add(r); } else { result[RULES].add(r); } } } } } return result; }
if (typeDescription == null || typeDescription.toString().indexOf( fts.getFeatureTypeName() ) == -1) continue;
public void visit(FeatureTypeStyle fts) { start("FeatureTypeStyle"); if ((fts.getName() != null) && (fts.getName().length() > 0)) { element("Name", fts.getName()); } if ((fts.getTitle() != null) && (fts.getTitle().length() > 0)) { element("Title", fts.getTitle()); } if ((fts.getAbstract() != null) && (fts.getAbstract().length() > 0)) { element("Abstract", fts.getAbstract()); } if ((fts.getFeatureTypeName() != null) && (fts.getFeatureTypeName().length() > 0)) { element("FeatureTypeName", fts.getFeatureTypeName()); } String[] sti = fts.getSemanticTypeIdentifiers(); 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); } end("FeatureTypeStyle"); }
.getName() .getLocalPart() .equalsIgnoreCase(fts.getFeatureTypeName()) || FeatureTypes.isDecendedFrom( featureType, null, fts.getFeatureTypeName()))) { Expression tx = fts.getTransformation(); if (tx != null) {
&& (datastore.getSchema().isDescendedFrom(null, fts.getFeatureTypeName()) || typeName .equalsIgnoreCase(fts.getFeatureTypeName()))) {
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); }
( FeatureTypes.isDecendedFrom(datastore.getSchema(), null, fts.getFeatureTypeName()) || typeName .equalsIgnoreCase(fts.getFeatureTypeName()))) {
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); }