public class SpatialDataFolder extends Object
Constructor and Description |
---|
SpatialDataFolder(File baseFolder)
Will create the folder if it does not exist.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteLayer(String refSysName,
String layerGroup)
Deletes a layer.
|
void |
deleteReferenceSystem(String refSysName)
Deletes a reference system.
|
static SpatialDataFolder |
get(org.wikibrain.conf.Configuration conf)
Hack: Better to ask the configurator for this!
|
List<WikiBrainShapeFile> |
getFilesInLayerGroup(String refSysName,
String layerName) |
File |
getLayerGroupFolder(String refSys,
String layerGroup)
Returns the directory for the given reference system and layer
|
Set<String> |
getLayerGroups(String refSysName) |
File |
getRawFolder() |
File |
getReferenceSystemFolder(String refSysName)
Returns the file for the given reference system
|
Set<String> |
getReferenceSystems()
Gets reference system names
|
WikiBrainShapeFile |
getShapeFile(String refSys,
String layerGroup,
String name) |
WikiBrainShapeFile |
getShapeFile(String refSys,
String layerGroup,
String name,
String encoding) |
boolean |
hasLayerGroup(String refSysName,
String layerGroup)
Returns true of spatial data folder has a given layer
|
boolean |
hasReferenceSystem(String refSysName)
Returns true if the spatial data folder has a reference system
|
public SpatialDataFolder(File baseFolder)
baseFolder
- public boolean hasLayerGroup(String refSysName, String layerGroup)
layerGroup
- refSysName
- public File getRawFolder()
public WikiBrainShapeFile getShapeFile(String refSys, String layerGroup, String name)
public WikiBrainShapeFile getShapeFile(String refSys, String layerGroup, String name, String encoding)
public boolean hasReferenceSystem(String refSysName)
refSysName
- public File getReferenceSystemFolder(String refSysName)
refSysName
- public File getLayerGroupFolder(String refSys, String layerGroup)
refSys
- e.g. "earth"layerGroup
- e.g. "country"public void deleteReferenceSystem(String refSysName) throws FileNotFoundException
refSysName
- FileNotFoundException
public void deleteLayer(String refSysName, String layerGroup) throws WikiBrainException
refSysName
- Reference system of layer to deletelayerGroup
- Layer to deleteWikiBrainException
public List<WikiBrainShapeFile> getFilesInLayerGroup(String refSysName, String layerName)
public static SpatialDataFolder get(org.wikibrain.conf.Configuration conf)
conf
- Copyright © 2014. All rights reserved.