org.geotools.data.shapefile.files
Enum ShpFileType

Object
  extended by Enum<ShpFileType>
      extended by ShpFileType
All Implemented Interfaces:
Serializable, Comparable<ShpFileType>

public enum ShpFileType
extends Enum<ShpFileType>

Enumerates the known types of files associated with a shapefile.

Author:
jesse

Enum Constant Summary
DBF
          the .dbf file, it contains the attribute information of the shapefile
FIX
          the .fix file, it contains all the Feature IDs for constant time lookup by fid also so that the fids stay consistent across deletes and adds
PRJ
          the .prj file, it contains the projection information of the shapefile
QIX
          the .qix file, A quad tree spatial index of the shapefile.
SHP
          The .shp file.
SHP_XML
          the .shp.xml file, it contains the metadata about the shapefile
SHX
          the .shx file, it contains index information of the existing features
 
Field Summary
 String extension
           
 String extensionWithPeriod
           
 
Method Summary
 String toBase(File file)
          Returns the base of the file or null if the file passed in is not of the correct type (has the correct extension.)
 String toBase(String path)
          Returns the base of the file or null if the file passed in is not of the correct type (has the correct extension.)
 String toBase(URL url)
          Returns the base of the file or null if the file passed in is not of the correct type (has the correct extension.)
static ShpFileType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ShpFileType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SHP

public static final ShpFileType SHP
The .shp file. It contains the geometries of the shapefile


DBF

public static final ShpFileType DBF
the .dbf file, it contains the attribute information of the shapefile


SHX

public static final ShpFileType SHX
the .shx file, it contains index information of the existing features


PRJ

public static final ShpFileType PRJ
the .prj file, it contains the projection information of the shapefile


QIX

public static final ShpFileType QIX
the .qix file, A quad tree spatial index of the shapefile. It is the same format the mapservers shptree tool generates


FIX

public static final ShpFileType FIX
the .fix file, it contains all the Feature IDs for constant time lookup by fid also so that the fids stay consistent across deletes and adds


SHP_XML

public static final ShpFileType SHP_XML
the .shp.xml file, it contains the metadata about the shapefile

Field Detail

extension

public final String extension

extensionWithPeriod

public final String extensionWithPeriod
Method Detail

values

public static ShpFileType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ShpFileType c : ShpFileType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ShpFileType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

toBase

public String toBase(File file)
Returns the base of the file or null if the file passed in is not of the correct type (has the correct extension.)

For example if the file is c:\shapefiles\file1.dbf. The DBF type will return c:\shapefiles\file1 but all other will return null.


toBase

public String toBase(String path)
Returns the base of the file or null if the file passed in is not of the correct type (has the correct extension.)

For example if the file is c:\shapefiles\file1.dbf. The DBF type will return c:\shapefiles\file1 but all other will return null.


toBase

public String toBase(URL url)
Returns the base of the file or null if the file passed in is not of the correct type (has the correct extension.)

For example if the file is c:\shapefiles\file1.dbf. The DBF type will return c:\shapefiles\file1 but all other will return null.



Copyright © 1996-2014 Geotools. All Rights Reserved.