Codota Logo
org.deegree.style.persistence
Code IndexAdd Codota to your IDE (free)

How to use org.deegree.style.persistence

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • 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

String nameRef = s.getStyleNameRef();
String layerRef = s.getLayerNameRef();
Style st = store.getStyle( layerRef, nameRef );
if ( st == null ) {
  LOG.warn( "The combination of layer {} and style {} from store {} is not available.",
      File file = store.getMetadata().getLocation().resolveToFile( g.getValue() );
      if ( file.exists() ) {
        st.setLegendFile( file );
    st = store.getStyle( ls.getLayerNameRef(), ls.getStyleNameRef() );
    st = st.copy();
    st.setName( name );
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.persistence

Most used classes

  • StyleStore
    Describes what a style store resource can do.
  • SEStyleStore
    Style store resource implementation for SE style stores.
  • SeStyleStoreBuilder
    This class is responsible for building SE style stores.
  • SeStyleStoreMetadata
    Resource metadata for SE style stores.
  • SLDParser
    SLDParser
  • SldStyleStoreBuilder,
  • SldStyleStoreMetadata
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