private String[] getDynamicProperties(List<Rule> dynamicRules) { StyleAttributeExtractor extractor = new StyleAttributeExtractor(); for (Rule rule : dynamicRules) { rule.accept(extractor); } return extractor.getAttributeNames(); }
final StyleAttributeExtractor sae = new StyleAttributeExtractor();
/** * Checks to make sure that the style passed in can process the FeatureType. * * @param style * The style to check * @param fType * The source requested. * * @throws WmsException * DOCUMENT ME! */ private void checkStyle(Style style, SimpleFeatureType fType) throws WmsException { StyleAttributeExtractor sae = new StyleAttributeExtractor(); sae.visit(style); String[] styleAttributes = sae.getAttributeNames(); String attName; final int length = styleAttributes.length; for (int i = 0; i < length; i++) { attName = styleAttributes[i]; if (fType.getDescriptor(attName) == null) { throw new WmsException( "The requested Style can not be used with " + "this featureType. The style specifies an attribute of " + attName + " and the featureType definition is: " + fType); } } }
/** * Inspects the <code>MapLayer</code>'s style and retrieves it's needed attribute names, * returning at least the default geometry attribute name. * * @param query DOCUMENT ME! * @param style the <code>Style</code> to determine the needed attributes from * @param schema the SimpleFeatureSource schema * @return the minimun set of attribute names needed to render <code>layer</code> */ private String[] findStyleAttributes( final Query query, Style style, SimpleFeatureType schema ) { StyleAttributeExtractor sae = new StyleAttributeExtractor(); sae.visit(style); FilterAttributeExtractor qae = new FilterAttributeExtractor(); query.getFilter().accept(qae,null); Set ftsAttributes = new LinkedHashSet(sae.getAttributeNameSet()); ftsAttributes.addAll(qae.getAttributeNameSet()); if (sae.getDefaultGeometryUsed() && (!ftsAttributes.contains(schema.getGeometryDescriptor().getLocalName()))) { ftsAttributes.add(schema.getGeometryDescriptor().getLocalName()); } else { // the code following assumes the geometry column is the last one // make sure it's the last for good ftsAttributes.remove(schema.getGeometryDescriptor().getLocalName()); ftsAttributes.add(schema.getGeometryDescriptor().getLocalName()); } return (String[]) ftsAttributes.toArray(new String[0]); }
StyleAttributeExtractor extractor = new StyleAttributeExtractor(); FeatureType featureType = layer.getFeatureSource().getSchema(); Set<String> plainGeometries = new java.util.HashSet<String>();
final StyleAttributeExtractor sae = new StyleAttributeExtractor();
StyleAttributeExtractor extractor = new StyleAttributeExtractor(); Filter filter = query.getFilter(); filter.accept(extractor, null);
StyleAttributeExtractor sae = new StyleAttributeExtractor(); sae.visit(style); String[] styleAttributes = sae.getAttributeNames();
StyleAttributeExtractor sae = new StyleAttributeExtractor(); sae.visit(style); Set<PropertyName> styleAttributes = sae.getAttributes();
return getAttributeCRS(null, schema); } else { StyleAttributeExtractor attExtractor = new StyleAttributeExtractor(); geometry.accept(attExtractor, null); for(PropertyName name : attExtractor.getAttributes()) {
Style style = info.getStyle(); StyleAttributeExtractor atts = new StyleAttributeExtractor(); style.accept(atts);