Class LayerStyle2SLDPlugIn

java.lang.Object
com.vividsolutions.jump.workbench.plugin.AbstractPlugIn
de.latlon.deejump.plugin.style.LayerStyle2SLDPlugIn
All Implemented Interfaces:
EnableChecked, Iconified, PlugIn, Recordable, ShortcutEnabled

public class LayerStyle2SLDPlugIn extends AbstractPlugIn
...
Author:
Ugo Taddei
  • Field Details

    • ICON

      public static final ImageIcon ICON
    • transformer

      protected static Transformer transformer
      The Transformer object used in the transformation of a task/project/layer xml to sld.
  • Constructor Details

    • LayerStyle2SLDPlugIn

      public LayerStyle2SLDPlugIn()
  • Method Details

    • getName

      public String getName()
      Description copied from interface: PlugIn
      Returns a very brief description of this PlugIn e.g. for display as a menu item
      Specified by:
      getName in interface PlugIn
      Overrides:
      getName in class AbstractPlugIn
      Returns:
      the class name, minus "PlugIn", with spaces inserted at the appropriate point before each uppercase+lowercase and lowercase+uppercase combination.
    • install

      public void install(PlugInContext context) throws Exception
      Use this method to install the LayerStyle2SLD plugin in the toolbar
      Parameters:
      context - PlugInContext
      Throws:
      Exception - if an Exception occurs
    • initialize

      public void initialize(PlugInContext context) throws Exception
      Description copied from interface: PlugIn
      Called when Workbench starts up to allow plugins to initialize themselves.
      Specified by:
      initialize in interface PlugIn
      Overrides:
      initialize in class AbstractPlugIn
      Parameters:
      context - context of the PlugIn
      Throws:
      Exception - if an exception occur during initialization
    • execute

      public boolean execute(PlugInContext context) throws Exception
      Description copied from class: AbstractPlugIn
      Execute the PlugIn.
      Specified by:
      execute in interface PlugIn
      Overrides:
      execute in class AbstractPlugIn
      Parameters:
      context - context of this PlugIn
      Returns:
      true if the PlugIn has been executed
      Throws:
      Exception - if an Exception occurs during execution
      See Also:
    • getIcon

      public Icon getIcon()
      Description copied from class: AbstractPlugIn
      Plugin icon assumed to be 16x16 by default
      Specified by:
      getIcon in interface Iconified
      Overrides:
      getIcon in class AbstractPlugIn
      Returns:
      the icon
    • transformContext

      public static String transformContext(InputStream layerXML, Map<String,String> parameters) throws TransformerException
      Parameters:
      layerXML - xml InputStream defining the symbolization
      parameters - Map of parameters for XML transformation
      Returns:
      the transformed XML (?)
      Throws:
      TransformerException - if an Exception occurs during XML transformation
    • transformContext

      public static String transformContext(Reader layerXML, Map<String,String> parameters) throws TransformerException
      Parameters:
      layerXML - Reader reading symbology definition in XML
      parameters - a Map of parameters
      Returns:
      the transformed XML (?)
      Throws:
      TransformerException - if an Exception occurs during XML transformation
    • createEnableCheck

      public EnableCheck createEnableCheck(WorkbenchContext workbenchContext)
      Parameters:
      workbenchContext - the WorkbenchContext
      Returns:
      the EnableCheck object to enable/disable the PlugIn
    • toRealWorldScale

      public static double toRealWorldScale(double scaleFactor, double jumpScale)
      Parameters:
      scaleFactor - scale factor between internalScale (screen pixels to model units) and realScale (image and model in homogeneous coordinates)
      jumpScale - map scale as defined in the min/max scale style interface
      Returns:
      the scale TODO seems that we do a lot of redundant work to compute this scale