/** * Test if the given FeatureTypeStyle object matches a regular expression * * @param fts the feature type style * @param regex regular expression to match * @return true if a match is found; false otherwise */ public static boolean isSemanticTypeMatch(FeatureTypeStyle fts, String regex) { for (SemanticType id : fts.semanticTypeIdentifiers()) { if (id.matches(regex)) { return true; } } return false; }
assertTrue( "clone: semanticTypeIdentifiers must not be null", clone.semanticTypeIdentifiers() != null); assertTrue( "clone: three semanticTypeIdentifiers expected", clone.semanticTypeIdentifiers().size() == 3); assertTrue( "clone: semanticTypeIdentifiers collection should have been cloned", clone.semanticTypeIdentifiers() != original.semanticTypeIdentifiers());
/** * Test if the given FeatureTypeStyle object matches a regular expression * @param fts the feature type style * @param regex regular expression to match * @return true if a match is found; false otherwise */ public static boolean isSemanticTypeMatch( FeatureTypeStyle fts, String regex ) { for (SemanticType id : fts.semanticTypeIdentifiers()) { if (id.matches(regex)) { return true; } } return false; }
existingFTS.getFeatureInstanceIDs(), existingFTS.featureTypeNames(), existingFTS.semanticTypeIdentifiers(), newRuleList);