Interface ILcdGXYLayerEncoder

All Known Implementing Classes:
TLcdFeaturedPointGXYLayerCodec, TLcdFeaturedPolygonGXYLayerCodec, TLcdFeaturedPolylineGXYLayerCodec, TLcdMultilevelRasterGXYLayerCodec, TLcdRasterGXYLayerCodec

public interface ILcdGXYLayerEncoder
This interface models an encoder for ILcdGXYLayer objects. This encoder is responsible for storing the state (e.g. the style) of an ILcdGXYLayer into some persistent storage.

It has a method canEncodeGXYLayer that can be used to check if a given ILcdGXYLayerEncoder can encode a given ILcdGXYLayer. The encoding itself can be performed using encodeGXYLayer.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canEncodeGXYLayer(ILcdGXYLayer aGXYLayer, String aDestinationName)
    Returns true if the given layer can be encoded to the given destination name.
    void
    encodeGXYLayer(ILcdGXYLayer aGXYLayer, String aDestinationName)
    Encodes the given layer to the given destination name.
    Returns the display name of this encoder.
  • Method Details

    • getDisplayName

      String getDisplayName()
      Returns the display name of this encoder.
      Returns:
      the display name of this encoder.
    • canEncodeGXYLayer

      boolean canEncodeGXYLayer(ILcdGXYLayer aGXYLayer, String aDestinationName)
      Returns true if the given layer can be encoded to the given destination name. Note that implementations using files should verify if the given aDestinationName has the correct extension.
      Parameters:
      aGXYLayer - The layer to be encoded.
      aDestinationName - The destination name to encode the layer to, e.g. a file name, a database name, ...
      Returns:
      true if the given layer can be encoded to the given destination name, false otherwise.
      See Also:
    • encodeGXYLayer

      void encodeGXYLayer(ILcdGXYLayer aGXYLayer, String aDestinationName) throws IOException
      Encodes the given layer to the given destination name.

      The method canEncodeGXYLayer should return true (for the same arguments) before this method is used.

      Parameters:
      aGXYLayer - The layer to encode.
      aDestinationName - The destination name to encode the layer to, e.g. a file name, a database name, ...
      Throws:
      IOException - In case of io failure.
      See Also: