Class TLcySLDLayerStyle

java.lang.Object
com.luciad.lucy.map.sld.TLcySLDLayerStyle
All Implemented Interfaces:
ILcyLayerStyle, ILcdChangeSource, ILcdCloneable, Cloneable

public class TLcySLDLayerStyle extends Object implements ILcyLayerStyle
Represents a layer style that supports styling as described in the OGC Styled Layer Descriptor and Symbology Encoding specifications.

Formats that support layers with this style can do this by either using the feature type name of the style to associate specific styles to specific types of elements that are painted, or they can ignore the feature type name and use the same style for all types of elements that are painted.

If the feature type name is used, it can be assumed that there is only one style for each type name. If it is not used, the feature type name is null, and there is only one style.

To retrieve and apply the style, use an ILcyLayerStyleProvider.

Since:
10.1
  • Constructor Details

    • TLcySLDLayerStyle

      public TLcySLDLayerStyle()
      Default constructor. Add styles using getStyles().
  • Method Details

    • getStyles

      public Set<TLcdSLDFeatureTypeStyle> getStyles()
      Returns the set of feature type styles that are used by this layer style. Each style in the set should have a unique feature type name. It is also possible for a style to have no type name. In this case the style is considered to be applicable for all types of elements.

      For data formats that use the ILcdDataObject interface, the feature type name is the same as the name of the data type of the elements in the model.

      It is allowed to add and/or remove styles from the returned set. It is not allowed to modify a TLcdSLDFeatureTypeStyle instance of this set. If you want to modify such a TLcdSLDFeatureTypeStyle instance, you should use the clone method of the TLcdSLDFeatureTypeStyle and modify the clone. Then you remove the original style from the set, and add the modified clone.

      Returns:
      The set of feature type styles.
    • clone

      public Object clone()
      Description copied from interface: ILcyLayerStyle

      Creates a copy of the style. When a layer style is cloned, its listeners should not be cloned as well.

      A clone of an ILcyLayerStyle is not linked to any layer.

      Specified by:
      clone in interface ILcdCloneable
      Specified by:
      clone in interface ILcyLayerStyle
      Overrides:
      clone in class Object
      See Also:
    • getStyle

      public TLcdSLDFeatureTypeStyle getStyle(String aFeatureTypeName)
      Convenience method that returns the style with the given feature type name from all styles.
      Parameters:
      aFeatureTypeName - The feature type name of the style to retrieve
      Returns:
      The style that is associated with the given feature type name, or null.
    • addChangeListener

      public void addChangeListener(ILcdChangeListener aListener)
      Description copied from interface: ILcdChangeSource

      Registers the given listener so it will receive change events from this source.

      In case you need to register a listener which keeps a reference to an object with a shorter life-time than this change source, you can use a ALcdWeakChangeListener instance as change listener.

      Specified by:
      addChangeListener in interface ILcdChangeSource
      Parameters:
      aListener - The listener to be notified when a change has happened.
      See Also:
    • removeChangeListener

      public void removeChangeListener(ILcdChangeListener aListener)
      Description copied from interface: ILcdChangeSource
      Removes the specified listener so it is no longer notified.
      Specified by:
      removeChangeListener in interface ILcdChangeSource
      Parameters:
      aListener - The listener to remove.