Class Utils

java.lang.Object
org.openjump.core.ui.plugin.task.Utils

public class Utils extends Object
  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • getNamesOfLayerableList

      public static List<String> getNamesOfLayerableList(PlugInContext context)
      Get a list of all layerables names
      Parameters:
      context - the PlugInContext
      Returns:
      a list of Layerable names
    • getLayerableType

      public static String getLayerableType(Layerable layer)
      Get layerable type (Shapefile, RasterImageLayer, WMSLayer, etc)
      Parameters:
      layer - a Layerable
      Returns:
      the simple name of this Layerable Class
    • getLayerableSRS

      public static String getLayerableSRS(Layerable layer)
      Get Layerable Spatial reference system
      Parameters:
      layer - a Layerable
      Returns:
      a String representation of the SRS of this Layerable
    • rasterProjection

      public static String rasterProjection(RasterImageLayer layer) throws Exception
      Throws:
      Exception
    • isTable

      public static boolean isTable(Layer layer)
    • checkTemporaryLayerables

      public static boolean checkTemporaryLayerables(PlugInContext context)
      Check temporary Layer or RasterImageLayer
      Parameters:
      context - the PlugInContext
      Returns:
      true if a Layerable has a temporary Layer associated
    • checkModifiedLayers

      public static boolean checkModifiedLayers(PlugInContext context)
      Check modified layers
      Parameters:
      context - the PlugInContext
      Returns:
      true if a Modified Layer exists
    • checkTempAndModLayerables

      public static boolean checkTempAndModLayerables(PlugInContext context)
    • getLayerableName

      public static String getLayerableName(Layerable layer)
      Return layerable name. (*) if vector is modified, (**) if raster or vector are temporary
      Parameters:
      layer - a Layerable
      Returns:
      the enriched name of the Layerable
    • getLayerablePath

      public static String getLayerablePath(Layerable layer)
    • mapSRIDS

      public static Map<String,String> mapSRIDS() throws IOException
      Throws:
      IOException
    • mapSRIDasString

      public static String[] mapSRIDasString() throws IOException
      Throws:
      IOException
    • removeButton

      public static void removeButton(Container container)
    • restorePropertiesFromFile

      public static void restorePropertiesFromFile(Task task, File file, PlugInContext context) throws Exception
      Restore Task properties from file
      Parameters:
      task - current task
      file - file task
      context - current workbench context
      Throws:
      Exception - if an Exception occurs
    • getSavedProperties

      public static Map<QName,Object> getSavedProperties(PlugInContext context, File file)