Package ucar.visad
Class ZebraMapForm
java.lang.Object
visad.data.FormNode
visad.data.Form
ucar.visad.ZebraMapForm
- All Implemented Interfaces:
FormFileInformer
ZebraMapForm is the shapefile data format adapter for
ESRI shapefile maps.
- Version:
- $Revision: 1.5 $ $Date: 2005/05/13 18:34:07 $
- Author:
- Don Murray
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add data to an existing data objectString[]
Get a list of default suffixes for shapfile map filesReturn the data forms that are compatible with a data objectboolean
isThisType
(byte[] block) Determines if this is a shapfile map file from the starting blockboolean
isThisType
(String name) Determines if this is a shapefile map file from the nameOpen the file specified by the stringOpen the file specified by the URLvoid
Save a VisAD data object in this formMethods inherited from class visad.data.Form
getMathType
-
Constructor Details
-
ZebraMapForm
public ZebraMapForm()Construct a Form for reading in ESRI shapefile map files
-
-
Method Details
-
isThisType
Determines if this is a shapefile map file from the name- Specified by:
isThisType
in interfaceFormFileInformer
- Parameters:
name
- name of the file- Returns:
- true if it matches the pattern for shapefile map files
-
isThisType
public boolean isThisType(byte[] block) Determines if this is a shapfile map file from the starting block- Specified by:
isThisType
in interfaceFormFileInformer
- Parameters:
block
- block of data to check- Returns:
- false - there is no identifying block in a Zebra map file
-
getDefaultSuffixes
Get a list of default suffixes for shapfile map files- Specified by:
getDefaultSuffixes
in interfaceFormFileInformer
- Returns:
- valid list of suffixes
-
save
public void save(String id, Data data, boolean replace) throws BadFormException, IOException, RemoteException, VisADException Save a VisAD data object in this form- Specified by:
save
in classFormNode
- Parameters:
id
- location of datadata
- data to addreplace
- true to replace old with new- Throws:
BadFormException
- bad formIOException
- file doesn't existRemoteException
- Java RMI problemVisADException
- Problem creating data
-
add
Add data to an existing data object- Specified by:
add
in classFormNode
- Parameters:
id
- location of datadata
- data to addreplace
- true to replace old with new- Throws:
BadFormException
- always for this form
-
open
Open the file specified by the string- Specified by:
open
in classFormNode
- Parameters:
id
- string representing the path to the file- Returns:
- a Data object representing the map lines.
- Throws:
BadFormException
IOException
VisADException
-
open
Open the file specified by the URL- Specified by:
open
in classFormNode
- Parameters:
url
- URL of the remote map- Returns:
- a Data object representing the map lines.
- Throws:
BadFormException
- bad formIOException
- file doesn't existVisADException
- Problem creating data
-
getForms
Return the data forms that are compatible with a data object
-