Codota Logo
StyleAttributeExtractor.getAttributeNameSet
Code IndexAdd Codota to your IDE (free)

How to use
getAttributeNameSet
method
in
org.geotools.styling.StyleAttributeExtractor

Best Java code snippets using org.geotools.styling.StyleAttributeExtractor.getAttributeNameSet (Showing top 5 results out of 315)

  • Common ways to obtain StyleAttributeExtractor
private void myMethod () {
StyleAttributeExtractor s =
  • Codota Iconnew StyleAttributeExtractor()
  • Smart code suggestions by Codota
}
origin: org.geotools/gt2-shapefile-renderer

/**
 * 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 featuresource schema
 * @return the minimun set of attribute names needed to render <code>layer</code>
 */
private String[] findStyleAttributes( final Query query, Style style, FeatureType schema ) {
  StyleAttributeExtractor sae = new StyleAttributeExtractor(){
    public void visit( Rule rule ) {
      DuplicatingStyleVisitor dupeStyleVisitor = new DuplicatingStyleVisitor();
      dupeStyleVisitor.visit(rule);
      Rule clone = (Rule) dupeStyleVisitor.getCopy();
      super.visit(clone);
    }
  };
  sae.visit(style);
  
  FilterAttributeExtractor qae = new FilterAttributeExtractor();
  query.getFilter().accept(qae,null);
  Set ftsAttributes=new HashSet(sae.getAttributeNameSet());
  ftsAttributes.addAll(qae.getAttributeNameSet());
  // the code following assumes we won't extract the default geometry, and that's
  // most of the time true, but fails if the filter or the style uses it.
  ftsAttributes.remove(schema.getDefaultGeometry().getLocalName());
  return (String[]) ftsAttributes.toArray(new String[0]);
}
origin: org.geotools/gt-shapefile-renderer

/**
 * 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]);
}
origin: org.geotools/gt-render

extractor.clear();
g.accept(extractor, null);
Set<String> attributes = extractor.getAttributeNameSet();
for (String attribute : attributes) {
  if(plainGeometries.contains(attribute))
origin: org.geotools/gt-render

Set<String> attributeNames = sae.getAttributeNameSet();
origin: org.geoserver.importer/gs-importer-core

style.accept(atts);
assertTrue(atts.getAttributeNameSet().contains("CAT_ID"));
org.geotools.stylingStyleAttributeExtractorgetAttributeNameSet

Popular methods of StyleAttributeExtractor

  • <init>
  • visit
  • getAttributeNames
  • getDefaultGeometryUsed
    reads the read-only-property. See GEOS-469
  • getAttributes
    Returns PropertyNames rather than strings (includes namespace info)
  • clear
  • isUsingDynamincProperties
  • visitCqlExpression
    Handles the special CQL expressions embedded in the style markers since the time

Popular in Java

  • Running tasks concurrently on multiple threads
  • compareTo (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • runOnUiThread (Activity)
  • Menu (java.awt)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • JFrame (javax.swing)
  • JTable (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now