org.geotools.data.shapefile
Enum ShpFileType

java.lang.Object
  extended by java.lang.Enum<ShpFileType>
      extended by org.geotools.data.shapefile.ShpFileType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ShpFileType>

public enum ShpFileType
extends java.lang.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
GRX
          Deprecated.  
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
 java.lang.String extension
           
 java.lang.String extensionWithPeriod
           
 
Method Summary
 java.lang.String toBase(java.io.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.)
 java.lang.String toBase(java.lang.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.)
 java.lang.String toBase(java.net.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(java.lang.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 java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.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


GRX

public static final ShpFileType GRX
Deprecated. 
the .grx file, an RTree spatial index of the shapefile. This is not longer supported

Field Detail

extension

public final java.lang.String extension

extensionWithPeriod

public final java.lang.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(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

toBase

public java.lang.String toBase(java.io.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 java.lang.String toBase(java.lang.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 java.lang.String toBase(java.net.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-2010 Geotools. All Rights Reserved.