org.geotools.data
Class SampleDataAccess

java.lang.Object
  extended by org.geotools.data.SampleDataAccess
All Implemented Interfaces:
DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>

public class SampleDataAccess
extends java.lang.Object
implements DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>

Sample implementation of DataAccess for testing. Create with SampleDataAccessFactory.

Since:
2.6
Version:
$Id: SampleDataAccess.java 34511 2009-11-26 05:34:06Z bencaradocdavies $
Author:
Ben Caradoc-Davies, CSIRO Exploration and Mining

Constructor Summary
SampleDataAccess()
           
 
Method Summary
 void createSchema(org.opengis.feature.type.FeatureType featureType)
          Unsupported operation.
 void dispose()
          Nothing to dispose.
 FeatureSource<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature> getFeatureSource(org.opengis.feature.type.Name typeName)
          Access to the named resource.
 ServiceInfo getInfo()
          Unsupported operation.
 java.util.List<org.opengis.feature.type.Name> getNames()
          Get the feature type names provided by this DataAccess.
 org.opengis.feature.type.FeatureType getSchema(org.opengis.feature.type.Name name)
          Return the feature type for supported type name.
 void updateSchema(org.opengis.feature.type.Name typeName, org.opengis.feature.type.FeatureType featureType)
          Unsupported operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleDataAccess

public SampleDataAccess()
Method Detail

createSchema

public void createSchema(org.opengis.feature.type.FeatureType featureType)
                  throws java.io.IOException
Unsupported operation.

Specified by:
createSchema in interface DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
Parameters:
featureType - FetureType to add to DataStore
Throws:
java.io.IOException - If featureType cannot be created
See Also:
DataAccess.createSchema(org.opengis.feature.type.FeatureType)

dispose

public void dispose()
Nothing to dispose.

Specified by:
dispose in interface DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
See Also:
DataAccess.dispose()

getFeatureSource

public FeatureSource<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature> getFeatureSource(org.opengis.feature.type.Name typeName)
                                                                                                 throws java.io.IOException
Description copied from interface: DataAccess
Access to the named resource.

The level of access is represented by the instance of the FeatureSource being returned.

Formally:


getInfo

public ServiceInfo getInfo()
Unsupported operation.

Specified by:
getInfo in interface DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
Returns:
SeviceInfo
See Also:
DataAccess.getInfo()

getNames

public java.util.List<org.opengis.feature.type.Name> getNames()
                                                       throws java.io.IOException
Get the feature type names provided by this DataAccess. Only SampleDataAccessData.MAPPEDFEATURE_TYPE_NAME is supported.

Specified by:
getNames in interface DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
Returns:
Names of the available contents.
Throws:
java.io.IOException
See Also:
DataAccess.getNames()

getSchema

public org.opengis.feature.type.FeatureType getSchema(org.opengis.feature.type.Name name)
                                               throws java.io.IOException
Return the feature type for supported type name. Only SampleDataAccessData.MAPPEDFEATURE_TYPE_NAME is supported.

Specified by:
getSchema in interface DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
Parameters:
name - Type name a the resource from getNames()
Returns:
Description of the FeatureType being made avaialble
Throws:
java.io.IOException
See Also:
DataAccess.getSchema(org.opengis.feature.type.Name)

updateSchema

public void updateSchema(org.opengis.feature.type.Name typeName,
                         org.opengis.feature.type.FeatureType featureType)
                  throws java.io.IOException
Unsupported operation.

Specified by:
updateSchema in interface DataAccess<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
Throws:
java.io.IOException - if the operation failed
See Also:
DataAccess.updateSchema(org.opengis.feature.type.Name, org.opengis.feature.type.FeatureType)


Copyright © 1996-2010 Geotools. All Rights Reserved.