public static boolean isDecendedFrom(FeatureType featureType, FeatureType isParentType) { try { return isDecendedFrom( featureType, new URI(isParentType.getName().getNamespaceURI()), isParentType.getName().getLocalPart()); } catch (URISyntaxException e) { throw new RuntimeException(e); } }
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()))); }
FeatureTypes.isDecendedFrom(abstractType2, abstractType)); assertFalse( "abstractType2 !--|> abstractType", FeatureTypes.isDecendedFrom(abstractType, abstractType2));
public static boolean isDecendedFrom(FeatureType featureType, FeatureType isParentType) { try { return isDecendedFrom(featureType, new URI(isParentType.getName().getNamespaceURI()), isParentType.getName().getLocalPart()); } catch (URISyntaxException e) { throw new RuntimeException(e); } }
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()))); }
@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()))); } }
|| FeatureTypes.isDecendedFrom(featureType, null, featureTypeName)) { filtered.add(featureTypeStyle);
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()))); }
|| FeatureTypes.isDecendedFrom(featureType,null,featureTypeName)) { filtered.add(featureTypeStyle);
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; }
matches = FeatureTypes.isDecendedFrom(featureType, null, ftc_name) || featureType.getTypeName().equalsIgnoreCase(ftc_name); } catch (Exception e) {
final SimpleFeatureType currSchema = currLayer.getFeature().getFeatureType(); matches = currSchema.getTypeName().equalsIgnoreCase(ftc_name) || FeatureTypes.isDecendedFrom(currSchema, null, ftc_name); } catch (Exception e) { matches = false; // bad news
( FeatureTypes.isDecendedFrom(datastore.getSchema(), null, fts.getFeatureTypeName()) || typeName .equalsIgnoreCase(fts.getFeatureTypeName()))) {
.getLocalPart() .equalsIgnoreCase(fts.getFeatureTypeName()) || FeatureTypes.isDecendedFrom( featureType, null, fts.getFeatureTypeName()))) { Expression tx = fts.getTransformation();
matches = currSchema.getName().getLocalPart().equalsIgnoreCase(ftc_name) || FeatureTypes.isDecendedFrom(currSchema, null, ftc_name); } catch (Exception e) { matches = false; // bad news