Codota Logo
StyleStore.getAll
Code IndexAdd Codota to your IDE (free)

How to use
getAll
method
in
org.deegree.style.persistence.StyleStore

Best Java code snippets using org.deegree.style.persistence.StyleStore.getAll (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: deegree/deegree3

private void addLayer( FeatureStore store, FeatureType ft, StyleStore sstore, Map<String, Layer> map ) {
  String name = ft.getName().getLocalPart();
  LOG.debug( "Adding layer {}.", name );
  LayerMetadata md = LayerMetadataBuilder.buildMetadataForAutoMode( store, ft, name );
  Map<String, Style> styles = new LinkedHashMap<String, Style>();
  if ( sstore != null && sstore.getAll( name ) != null ) {
    for ( Style s : sstore.getAll( name ) ) {
      LOG.debug( "Adding style with name {}.", s.getName() );
      styles.put( s.getName(), s );
      if ( !styles.containsKey( "default" ) ) {
        styles.put( "default", s );
      }
    }
  }
  if ( !styles.containsKey( "default" ) ) {
    LOG.debug( "No styles found, using gray default style." );
    styles.put( "default", new Style() );
  }
  md.setStyles( styles );
  Layer l = new FeatureLayer( md, store, ft.getName(), null, null, null );
  map.put( name, l );
}
origin: deegree/deegree3

public static Pair<Map<String, Style>, Map<String, Style>> parseStyles( Workspace workspace, String layerName,
                                    List<StyleRefType> styles ) {
  // hail java 7 to finally be able to do some really complicated type inference
  Map<String, Style> styleMap = new LinkedHashMap<String, Style>();
  Map<String, Style> legendStyleMap = new LinkedHashMap<String, Style>();
  Style defaultStyle = null, defaultLegendStyle = null;
  for ( StyleRefType srt : styles ) {
    String id = srt.getStyleStoreId();
    StyleStore store = workspace.getResource( StyleStoreProvider.class, id );
    if ( srt.getStyle() == null || srt.getStyle().isEmpty() ) {
      if ( store.getAll( layerName ) != null ) {
        for ( Style s : store.getAll( layerName ) ) {
          if ( defaultStyle == null ) {
            defaultStyle = s;
            defaultLegendStyle = s;
          }
          styleMap.put( s.getName(), s );
          legendStyleMap.put( s.getName(), s );
        }
      }
      continue;
    }
    Pair<Style, Style> p = useSelectedStyles( workspace, store, srt, id, styleMap, legendStyleMap,
                         defaultStyle, defaultLegendStyle );
    defaultStyle = p.first;
    defaultLegendStyle = p.second;
  }
  checkDefaultStyle( defaultStyle, styleMap, defaultLegendStyle, legendStyleMap );
  return new Pair<Map<String, Style>, Map<String, Style>>( styleMap, legendStyleMap );
}
origin: deegree/deegree3

LayerStore createFromAutoLayers( AutoLayers cfg ) {
  String cid = cfg.getCoverageStoreId();
  String sid = cfg.getStyleStoreId();
  Coverage cov = workspace.getResource( CoverageProvider.class, cid );
  StyleStore sstore = null;
  if ( sid != null ) {
    sstore = workspace.getResource( StyleStoreProvider.class, sid );
  }
  SpatialMetadata smd = new SpatialMetadata( cov.getEnvelope(),
                        Collections.singletonList( cov.getCoordinateSystem() ) );
  Description desc = new Description( cid, Collections.singletonList( new LanguageString( cid, null ) ), null,
                    null );
  LayerMetadata md = new LayerMetadata( cid, desc, smd );
  md.getFeatureTypes().add( buildFeatureType() );
  if ( sstore != null ) {
    for ( Style s : sstore.getAll( cid ) ) {
      md.getStyles().put( s.getName(), s );
    }
  }
  Layer l = new CoverageLayer( md, cov instanceof AbstractRaster ? (AbstractRaster) cov : null,
                 cov instanceof MultiResolutionRaster ? (MultiResolutionRaster) cov : null );
  return new SingleLayerStore( l, metadata );
}
org.deegree.style.persistenceStyleStoregetAll

Popular methods of StyleStore

  • getMetadata
  • getStyle

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (Timer)
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
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