Package org.openjump.core.ui.plugin.task
Class Utils
- java.lang.Object
-
- org.openjump.core.ui.plugin.task.Utils
-
public class Utils extends Object
-
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancheckModifiedLayers(PlugInContext context)Check modified layersstatic booleancheckTempAndModLayerables(PlugInContext context)static booleancheckTemporaryLayerables(PlugInContext context)Check temporary Layer or RasterImageLayerstatic StringgetLayerableName(Layerable layer)Return layerable name. (*) if vector is modified, (**) if raster or vector are temporarystatic StringgetLayerablePath(Layerable layer)static StringgetLayerableSRS(Layerable layer)Get Layerable Spatial reference systemstatic StringgetLayerableType(Layerable layer)Get layerable type (Shapefile, RasterImageLayer, WMSLayer, etc)static List<String>getNamesOfLayerableList(PlugInContext context)Get a list of all layerables namesstatic Map<QName,Object>getSavedProperties(PlugInContext context, File file)static booleanisTable(Layer layer)static String[]mapSRIDasString()static Map<String,String>mapSRIDS()static StringrasterProjection(RasterImageLayer layer)static voidremoveButton(Container container)static voidrestorePropertiesFromFile(Task task, File file, PlugInContext context)Restore Task properties from file
-
-
-
Method Detail
-
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
-
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 taskfile- file taskcontext- current workbench context- Throws:
Exception- if an Exception occurs
-
getSavedProperties
public static Map<QName,Object> getSavedProperties(PlugInContext context, File file)
-
-