Java Doc for ArcSDEDataStore.java in  » GIS » GeoTools-2.4.1 » org » geotools » arcsde » data » 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.arcsde.data 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.data.AbstractDataStore
      org.geotools.arcsde.data.ArcSDEDataStore

ArcSDEDataStore
public class ArcSDEDataStore extends AbstractDataStore (Code)
Implements a DataStore to work upon an ArcSDE spatial database gateway. String[] getTypeNames() FeatureType getSchema(String typeName) FeatureReader getFeatureReader( typeName ) FeatureWriter getFeatureWriter( typeName ) Filter getUnsupportedFilter(String typeName, Filter filter) FeatureReader getFeatureReader(String typeName, Query query)

All remaining functionality is implemented against these methods, including Transaction and Locking Support. These implementations will not be optimal but they will work.


author:
   Gabriel Roldan, Axios Engineering
version:
   $Id: ArcSDEDataStore.java 27863 2007-11-12 20:34:34Z desruisseaux $



Constructor Summary
public  ArcSDEDataStore(ArcSDEConnectionPool connectionPool)
     Creates a new ArcSDEDataStore object.
public  ArcSDEDataStore(ArcSDEConnectionPool connectionPool, String nsUri)
    
Parameters:
  connectionPool - datastore's connection pool.

Method Summary
public  voidcreateSchema(FeatureType schema)
     Pass-through to the createSchema method with a config keyword.
public  voidcreateSchema(FeatureType featureType, Map hints)
     Creates the given featuretype in the underlying ArcSDE database.

The common use case to create an ArcSDE layer is to setup the SeTable object with all the non-geometry attributes first, then create the SeLayer and set the geometry column name and its properties.

protected  EnvelopegetBounds(Query query)
     Computes the bounds of the features for the specified feature type that satisfy the query provided that there is a fast way to get that result.

Will return null if there is not fast way to compute the bounds.

public  ArcSDEConnectionPoolgetConnectionPool()
    
protected  intgetCount(Query query)
     Gets the number of the features that would be returned by this query for the specified feature type.

If getBounds(Query) returns -1 due to expense consider using getFeatures(Query).getCount() as a an alternative.


Parameters:
  query - Contains the Filter and MaxFeatures to find the bounds for.
protected  FeatureReadergetFeatureReader(String typeName)
    
protected  FeatureReadergetFeatureReader(String typeName, Query query)
     GR: this method is called from inside getFeatureReader(Query ,Transaction ) to allow subclasses return an optimized FeatureReader wich supports the filter and attributes truncation specified in query

A subclass that supports the creation of such an optimized FeatureReader shold override this method.

protected  FeatureWritergetFeatureWriter(String typeName)
    
public  FeatureWritergetFeatureWriter(String typeName, Transaction transaction)
     Provides a writer that iterates over all of the features.
public  FeatureWritergetFeatureWriter(String typeName, Filter filter, Transaction transaction)
    
public  FeatureWritergetFeatureWriterAppend(String typeName, Transaction transaction)
     Provides a FeatureWriter in an appropriate state for immediately adding new Feature instances to the specified layer.
public  StringgetNamespace()
    
public synchronized  FeatureTypegetSchema(String typeName)
     Obtains the schema for the given featuretype name.

Just for convenience, if the type name is not full qualified, it will be prepended by the "<DATABASE_NAME>.<USER_NAME>." string. Anyway, it is strongly recommended that you use only full qualified type names.

public  String[]getTypeNames()
     DOCUMENT ME! the list of full qualified feature class names on the ArcSDEdatabase this DataStore works on.
protected  org.opengis.filter.FiltergetUnsupportedFilter(String typeName, Filter filter)
     GR: if a subclass supports filtering, it should override this method to return the unsupported part of the passed filter, so a FilteringFeatureReader will be constructed upon it.
public  SeQueryInfogetViewQueryInfo(String typeName)
    
public  PlainSelectgetViewSelectStatement(String typeName)
    
public  booleanisView(String typeName)
     Returns wether typeName refers to a FeatureType registered as an in-process view through ArcSDEDataStore.registerView(String,PlainSelect) .
public  voidregisterView(String typeName, PlainSelect select)
    


Constructor Detail
ArcSDEDataStore
public ArcSDEDataStore(ArcSDEConnectionPool connectionPool)(Code)
Creates a new ArcSDEDataStore object.
Parameters:
  connectionPool - DOCUMENT ME!



ArcSDEDataStore
public ArcSDEDataStore(ArcSDEConnectionPool connectionPool, String nsUri)(Code)

Parameters:
  connectionPool - datastore's connection pool. Not null.
Parameters:
  nsUri - datastore's namespace. May be null.




Method Detail
createSchema
public void createSchema(FeatureType schema) throws IOException, IllegalArgumentException(Code)
Pass-through to the createSchema method with a config keyword. This method calls createSchema(schema, null);



createSchema
public void createSchema(FeatureType featureType, Map hints) throws IOException, IllegalArgumentException(Code)
Creates the given featuretype in the underlying ArcSDE database.

The common use case to create an ArcSDE layer is to setup the SeTable object with all the non-geometry attributes first, then create the SeLayer and set the geometry column name and its properties. This approach brings a nice problem, since we need to create the attributes in exactly the same order as specified in the passed FeatureType, which means that the geometry attribute needs not to be the last one.

To avoid this, the following workaround is performed: instead of creating the schema as described above, we will first create the SeTable with a single, temporary column, since it is not possible to create a table without columns. The, we will iterate over the AttributeTypes and add them as they appear using SeTable.addColumn(SeColumnDefinition). But if we found that the current AttributeType is geometric, instead of adding the column we just create the SeLayer object. This way, the geometric attribute is inserted at the end, and then we keep iterating and adding the rest of the columns. Finally, the first column is removed, since it was temporary (note that I advertise it, it is a _workaround_).

Sometimes some 'extra' information is required to correctly create the underlying ArcSDE SeLayer. For instance, a specific configuration keyword might be required to be used (instead of "DEFAULTS"), or a particular column might need to be marked as the rowid column for the featuretype. A non-null hints parameter contains a mapping from a list of well-known java.lang.String keys to values. The possible keys are listed in the table below. keys with any other values are ignored.


Parameters:
  featureType - the feature type containing the name, attributes andcoordinate reference system of the new ArcSDE layer.
Parameters:
  hints - A map containing extra ArcSDE-specific hints about how tocreate the underlying ArcSDE SeLayer and SeTable objects fromthis FeatureType.
throws:
  IOException - see throws DataSourceException bellow
throws:
  IllegalArgumentException - if the passed feature type does not contains at least onegeometric attribute, or if the type name contains '.' (dots).
throws:
  NullPointerException - if featureType is null
throws:
  DataSourceException - if there is not an available (free) connection to theArcSDE instance(in that case maybe you need to increase themaximun number of connections for the connection pool), or anSeException exception is catched while creating the featuretype at the ArcSDE instance (e.g. a table with that namealready exists).
key name key value type default value (if applicable)
configuration.keyword java.lang.String "DEFAULTS"
rowid.column.type java.lang.String - "NONE", "USER" and "SDE" are the only valid values "NONE"
rowid.column.name java.lang.String null



getBounds
protected Envelope getBounds(Query query) throws IOException(Code)
Computes the bounds of the features for the specified feature type that satisfy the query provided that there is a fast way to get that result.

Will return null if there is not fast way to compute the bounds. Since it's based on some kind of header/cached information, it's not guaranteed to be real bound of the features


Parameters:
  query - the bounds, or null if too expensive
throws:
  IOException -



getConnectionPool
public ArcSDEConnectionPool getConnectionPool()(Code)
DOCUMENT ME! DOCUMENT ME!



getCount
protected int getCount(Query query) throws IOException(Code)
Gets the number of the features that would be returned by this query for the specified feature type.

If getBounds(Query) returns -1 due to expense consider using getFeatures(Query).getCount() as a an alternative.


Parameters:
  query - Contains the Filter and MaxFeatures to find the bounds for. The number of Features provided by the Query or -1if count is too expensive to calculate or any errors or occur.
throws:
  IOException - if there are errors getting the count



getFeatureReader
protected FeatureReader getFeatureReader(String typeName) throws java.io.IOException(Code)
DOCUMENT ME!
Parameters:
  typeName - DOCUMENT ME! DOCUMENT ME!
throws:
  java.io.IOException - DOCUMENT ME!



getFeatureReader
protected FeatureReader getFeatureReader(String typeName, Query query) throws IOException(Code)
GR: this method is called from inside getFeatureReader(Query ,Transaction ) to allow subclasses return an optimized FeatureReader wich supports the filter and attributes truncation specified in query

A subclass that supports the creation of such an optimized FeatureReader shold override this method. Otherwise, it just returns getFeatureReader(typeName)


Parameters:
  typeName - DOCUMENT ME!
Parameters:
  query - DOCUMENT ME! DOCUMENT ME!
throws:
  IOException - DOCUMENT ME!
throws:
  DataSourceException - DOCUMENT ME!



getFeatureWriter
protected FeatureWriter getFeatureWriter(String typeName) throws IOException(Code)
DOCUMENT ME!
Parameters:
  typeName - FeatureWriter over contents of typeName
throws:
  IOException - Subclass may throw IOException



getFeatureWriter
public FeatureWriter getFeatureWriter(String typeName, Transaction transaction) throws IOException(Code)
Provides a writer that iterates over all of the features.
Parameters:
  typeName -
Parameters:
  transaction - DOCUMENT ME!
throws:
  IOException - DOCUMENT ME!



getFeatureWriter
public FeatureWriter getFeatureWriter(String typeName, Filter filter, Transaction transaction) throws IOException(Code)
DOCUMENT ME!
Parameters:
  typeName -
Parameters:
  filter -
Parameters:
  transaction - DOCUMENT ME!
throws:
  IOException - DOCUMENT ME!



getFeatureWriterAppend
public FeatureWriter getFeatureWriterAppend(String typeName, Transaction transaction) throws IOException(Code)
Provides a FeatureWriter in an appropriate state for immediately adding new Feature instances to the specified layer.
Parameters:
  typeName -
Parameters:
  transaction - FeatureWriter whose hasNext() call will return false.
throws:
  IOException - DOCUMENT ME!



getNamespace
public String getNamespace()(Code)



getSchema
public synchronized FeatureType getSchema(String typeName) throws java.io.IOException(Code)
Obtains the schema for the given featuretype name.

Just for convenience, if the type name is not full qualified, it will be prepended by the "<DATABASE_NAME>.<USER_NAME>." string. Anyway, it is strongly recommended that you use only full qualified type names. The rational for this is that the actual ArcSDE name of a featuretype is full qualified, and more than a single type can exist with the same non qualified name, if they pertein to different database users. So, if a non qualified name is passed, the user name which will be prepended to it is the user used to create the connections (i.e., the one you specified with the "user" parameter to create the datastore.


Parameters:
  typeName - DOCUMENT ME! DOCUMENT ME!
throws:
  java.io.IOException - DOCUMENT ME!
throws:
  NullPointerException - DOCUMENT ME!
throws:
  DataSourceException - DOCUMENT ME!



getTypeNames
public String[] getTypeNames() throws IOException(Code)
DOCUMENT ME! the list of full qualified feature class names on the ArcSDEdatabase this DataStore works on. An ArcSDE full qualified classname is composed of three dot separated strings:"DATABASE.USER.CLASSNAME", wich is usefull enough to use it asnamespace
throws:
  RuntimeException - if an exception occurs while retrieving the list ofregisteres feature classes on the backend, or while obtainingthe full qualified name of one of them



getUnsupportedFilter
protected org.opengis.filter.Filter getUnsupportedFilter(String typeName, Filter filter)(Code)
GR: if a subclass supports filtering, it should override this method to return the unsupported part of the passed filter, so a FilteringFeatureReader will be constructed upon it. Otherwise it will just return the same filter.

If the complete filter is supported, the subclass must return Filter.INCLUDE


Parameters:
  typeName - DOCUMENT ME!
Parameters:
  filter - DOCUMENT ME! DOCUMENT ME!



getViewQueryInfo
public SeQueryInfo getViewQueryInfo(String typeName)(Code)



getViewSelectStatement
public PlainSelect getViewSelectStatement(String typeName)(Code)



isView
public boolean isView(String typeName)(Code)
Returns wether typeName refers to a FeatureType registered as an in-process view through ArcSDEDataStore.registerView(String,PlainSelect) .
Parameters:
  typeName - true if typeName is registered as aview given a SQL SELECT query, false otherwise.



registerView
public void registerView(String typeName, PlainSelect select) throws IOException(Code)
Supported constructs:
  • FromItems
  • SelectItems
  • Top (as in SELECT TOP 10 * FROM...)
  • Where

Parameters:
  typeName -
Parameters:
  select -
throws:
  IOException -



Fields inherited from org.geotools.data.AbstractDataStore
final protected static Logger LOGGER(Code)(Java Doc)
final protected boolean isWriteable(Code)(Java Doc)
public FeatureListenerManager listenerManager(Code)(Java Doc)

Methods inherited from org.geotools.data.AbstractDataStore
protected FeatureWriter createFeatureWriter(String typeName, Transaction transaction) throws IOException(Code)(Java Doc)
protected InProcessLockingManager createLockingManager()(Code)(Java Doc)
protected Map createMetadata(String typeName)(Code)(Java Doc)
public void createSchema(FeatureType featureType) throws IOException(Code)(Java Doc)
public void dispose()(Code)(Java Doc)
protected Envelope getBounds(Query query) throws IOException(Code)(Java Doc)
protected int getCount(Query query) throws IOException(Code)(Java Doc)
abstract protected FeatureReader getFeatureReader(String typeName) throws IOException(Code)(Java Doc)
public FeatureReader getFeatureReader(Query query, Transaction transaction) throws IOException(Code)(Java Doc)
protected FeatureReader getFeatureReader(String typeName, Query query) throws IOException(Code)(Java Doc)
public FeatureSource getFeatureSource(String typeName) throws IOException(Code)(Java Doc)
protected FeatureWriter getFeatureWriter(String typeName) throws IOException(Code)(Java Doc)
public FeatureWriter getFeatureWriter(String typeName, Filter filter, Transaction transaction) throws IOException(Code)(Java Doc)
public FeatureWriter getFeatureWriter(String typeName, Transaction transaction) throws IOException(Code)(Java Doc)
public FeatureWriter getFeatureWriterAppend(String typeName, Transaction transaction) throws IOException(Code)(Java Doc)
public LockingManager getLockingManager()(Code)(Java Doc)
abstract public FeatureType getSchema(String typeName) throws IOException(Code)(Java Doc)
protected Set getSupportedHints()(Code)(Java Doc)
abstract public String[] getTypeNames() throws IOException(Code)(Java Doc)
protected Filter getUnsupportedFilter(String typeName, Filter filter)(Code)(Java Doc)
public FeatureSource getView(Query query) throws IOException, SchemaException(Code)(Java Doc)
public void updateSchema(String typeName, FeatureType featureType)(Code)(Java Doc)

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.