Java Doc for ShapefileDataStoreFactory.java in  » GIS » GeoTools-2.4.1 » org » geotools » data » shapefile » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.data.shapefile 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.data.shapefile.ShapefileDataStoreFactory

All known Subclasses:   org.geotools.data.shapefile.indexed.IndexedShapefileDataStoreFactory,
ShapefileDataStoreFactory
public class ShapefileDataStoreFactory implements FileDataStoreFactorySpi(Code)
Implementation of the DataStore service provider interface for Shapefiles.

The specific implementation of ShapefileDataStore created by this class is not specified. For more information on the connection parameters please review the following public Param constants.

  • URLP
  • NAMESPACEP
  • CREATE_SPATIAL_INDEX
  • MEMORY_MAPPED
  • DBFCHARSET

author:
   Chris Holmes, TOPP
version:
   $Id: ShapefileDataStoreFactory.java 29501 2008-02-28 02:36:47Z jgarnett $


Field Summary
final public static  ParamCREATE_SPATIAL_INDEX
    
final public static  ParamDBFCHARSET
    
final protected static  LoggerLOGGER
    
final public static  ParamMEMORY_MAPPED
    
final public static  ParamNAMESPACEP
    
final public static  ParamURLP
     url to the .shp file.


Method Summary
public  booleancanProcess(Map params)
     Takes a map of parameters which describes how to access a DataStore and determines if it can be read by the ShapefileDataStore or IndexedShapefileDataStore implementations.
Parameters:
  params - A map of parameters describing the location of a datastore.Files should be pointed to by a 'url' param.
public  booleancanProcess(URL f)
    
public  DataStorecreateDataStore(Map params)
     Returns an instance of DataStore iff the resource pointed to the Map of paramers can be handled as a shapefile.

The specific implementation of ShapefileDataStore returned is not specified, and depends on the parameters given.

public  DataStorecreateDataStore(URL url)
     We may need to create a new datastore if the provided file does not exist.
public  DataStorecreateDataStore(URL url, boolean memorymapped)
    
 DataStorecreateDataStoreInstance(Map params)
     Will create the correct implementation of ShapefileDataStore for the provided parameters.
public  DataStorecreateNewDataStore(Map params)
     Creates a new DataStore - for a file that does not exist yet.

This method has different logic than createDataStore.

 DataStorecreateNewShapefile(Map params)
     Will create a new shapefile baed on the provided parameters.
public  StringgetDescription()
     Describes the type of data the datastore returned by this factory works with.
public  StringgetDisplayName()
    
public  String[]getFileExtensions()
    
public  MapgetImplementationHints()
     Returns the implementation hints.
public  Param[]getParametersInfo()
     Describe parameters.
public  StringgetTypeName(URL url)
    
public  booleanisAvailable()
     Test to see if this datastore is available, if it has all the appropriate libraries to construct a datastore.
public static  URLtoDbfURL(URL url)
    
public static  StringtoFilename(URL url)
     Convert a URL to a String that is suitable for manipulation of its extension (generally the last three characters of the file). This uses URL.toExternalForm() in order to preserve valuable information about the URL's Authority.
Parameters:
  url - the url to convert to a String.
public static  URLtoFixURL(URL url)
    
public static  URLtoGrxURL(URL url)
    
public static  URLtoPrjURL(URL url)
    
public static  URLtoQixURL(URL url)
    
public static  URLtoShpURL(URL url)
    
public static  URLtoShxURL(URL url)
    
public static  URLtoXmlURL(URL url)
    

Field Detail
CREATE_SPATIAL_INDEX
final public static Param CREATE_SPATIAL_INDEX(Code)
Optional - Enable/disable the automatic creation of spatial index



DBFCHARSET
final public static Param DBFCHARSET(Code)
Optional - character used to decode strings from the DBF file



LOGGER
final protected static Logger LOGGER(Code)



MEMORY_MAPPED
final public static Param MEMORY_MAPPED(Code)
Optional - enable/disable the use of memory-mapped io



NAMESPACEP
final public static Param NAMESPACEP(Code)
Optional - uri of the FeatureType's namespace



URLP
final public static Param URLP(Code)
url to the .shp file.





Method Detail
canProcess
public boolean canProcess(Map params)(Code)
Takes a map of parameters which describes how to access a DataStore and determines if it can be read by the ShapefileDataStore or IndexedShapefileDataStore implementations.
Parameters:
  params - A map of parameters describing the location of a datastore.Files should be pointed to by a 'url' param. true iff params contains a url param which points to a fileending in shp



canProcess
public boolean canProcess(URL f)(Code)

See Also:   org.geotools.data.dir.FileDataStoreFactorySpi.canProcess(java.net.URL)



createDataStore
public DataStore createDataStore(Map params) throws IOException(Code)
Returns an instance of DataStore iff the resource pointed to the Map of paramers can be handled as a shapefile.

The specific implementation of ShapefileDataStore returned is not specified, and depends on the parameters given. For more information please review the public static Param instances available for this class.

  • URLP
  • NAMESPACEP
  • CREATE_SPATIAL_INDEX
  • MEMORY_MAPPED
  • DBFCHARSET

Parameters:
  params - A param list with information on the location of arestore. For shapefiles this should contain a 'url' param whichpoints to a file which ends in shp. DataStore A ShapefileDatastore
throws:
  IOException - If a connection error (such as the file not existing occurs)
throws:
  DataSourceException - Thrown if the datastore which is createdcannot be attached to the restore specified in params.



createDataStore
public DataStore createDataStore(URL url) throws IOException(Code)
We may need to create a new datastore if the provided file does not exist.
See Also:   org.geotools.data.dir.FileDataStoreFactorySpi.createDataStore(java.net.URL)



createDataStore
public DataStore createDataStore(URL url, boolean memorymapped) throws IOException(Code)

See Also:   org.geotools.data.dir.FileDataStoreFactorySpi.createDataStore(java.net.URL)



createDataStoreInstance
DataStore createDataStoreInstance(Map params) throws IOException(Code)
Will create the correct implementation of ShapefileDataStore for the provided parameters.
Parameters:
  params - Map of parameters
throws:
  IOException - If the specified shapefle could not be accessed
throws:
  UnsupportedOperationException -



createNewDataStore
public DataStore createNewDataStore(Map params) throws IOException(Code)
Creates a new DataStore - for a file that does not exist yet.

This method has different logic than createDataStore. It is willing to be memory mapped, and generate an index for a local file that does not exist yet.




createNewShapefile
DataStore createNewShapefile(Map params) throws IOException(Code)
Will create a new shapefile baed on the provided parameters.
Parameters:
  params - Map of parameters
throws:
  IOException - If the filename is not valid.
throws:
  UnsupportedOperationException -



getDescription
public String getDescription()(Code)
Describes the type of data the datastore returned by this factory works with. String a human readable description of the type of restoresupported by this datastore.



getDisplayName
public String getDisplayName()(Code)



getFileExtensions
public String[] getFileExtensions()(Code)

See Also:   org.geotools.data.dir.FileDataStoreFactorySpi.getFileExtensions



getImplementationHints
public Map getImplementationHints()(Code)
Returns the implementation hints. The default implementation returns an empty map.

When we have FeatureFactory, GeometryFactory and so on hooked up this map will return Hints we paid attention too when we were constructed. An empty map.




getParametersInfo
public Param[] getParametersInfo()(Code)
Describe parameters.
See Also:   org.geotools.data.DataStoreFactorySpi.getParametersInfo



getTypeName
public String getTypeName(URL url) throws IOException(Code)

See Also:   org.geotools.data.dir.FileDataStoreFactorySpi.getTypeName(java.net.URL)



isAvailable
public boolean isAvailable()(Code)
Test to see if this datastore is available, if it has all the appropriate libraries to construct a datastore. This datastore just checks for the ShapefileDataStore, IndexedShapefileDataStore and Geometry implementations. true if and only if this factory is available to createDataStores.



toDbfURL
public static URL toDbfURL(URL url) throws java.net.MalformedURLException(Code)
Figure out the URL for the "dbf" file



toFilename
public static String toFilename(URL url) throws MalformedURLException(Code)
Convert a URL to a String that is suitable for manipulation of its extension (generally the last three characters of the file). This uses URL.toExternalForm() in order to preserve valuable information about the URL's Authority.
Parameters:
  url - the url to convert to a String. Must not be null. a String representation of the URL
throws:
  MalformedURLException - if the url is invalid



toFixURL
public static URL toFixURL(URL url) throws java.net.MalformedURLException(Code)
Figure out the URL for the "fix" file



toGrxURL
public static URL toGrxURL(URL url) throws java.net.MalformedURLException(Code)
Figure out the URL for the "grx" file



toPrjURL
public static URL toPrjURL(URL url) throws java.net.MalformedURLException(Code)
Figure out the URL for the "prj" file



toQixURL
public static URL toQixURL(URL url) throws java.net.MalformedURLException(Code)
Figure out the URL for the "qix" file



toShpURL
public static URL toShpURL(URL url) throws java.net.MalformedURLException(Code)
Figure out the URL for the "shp" file



toShxURL
public static URL toShxURL(URL url) throws java.net.MalformedURLException(Code)
Figure out the URL for the "shx" file



toXmlURL
public static URL toXmlURL(URL url) throws java.net.MalformedURLException(Code)
Figure out the URL for the "prj" file



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.