/** * Returns the first style object which matches a given schema. * * @param styles Array of style objects. * @param schema Feature schema. * @return The first object to match the feature type, otherwise null if no match. */ public static Style matchingStyle(Style[] styles, SimpleFeatureType schema) { if ((styles == null) || (styles.length == 0)) { return null; } for (int i = 0; i < styles.length; i++) { Style style = styles[i]; if (featureTypeStyle(style, schema) != null) { return style; } } return null; }
featureTypeStyle = SLD.featureTypeStyle(style, schema);
/** * Returns the first style object which matches a given schema. * * @param styles Array of style objects. * @param schema Feature schema. * * @return The first object to match the feature type, otherwise null if no * match. */ public static Style matchingStyle(Style[] styles, SimpleFeatureType schema) { if ((styles == null) || (styles.length == 0)) { return null; } for (int i = 0; i < styles.length; i++) { Style style = styles[i]; if (featureTypeStyle(style, schema) != null) { return style; } } return null; }
/** * Returns the first style object which matches a given schema. * * @param styles Array of style objects. * @param schema Feature schema. * * @return The first object to match the feature type, otherwise null if no * match. */ public static Style matchingStyle(Style[] styles, FeatureType schema) { if ((styles == null) || (styles.length == 0)) { return null; } for (int i = 0; i < styles.length; i++) { Style style = styles[i]; if (featureTypeStyle(style, schema) != null) { return style; } } return null; }
featureTypeStyle = SLD.featureTypeStyle(style, schema);