org.geotools.data
Class SampleDataAccess

Object
  extended by SampleDataAccess
All Implemented Interfaces:
DataAccess<FeatureType,Feature>

public class SampleDataAccess
extends Object
implements DataAccess<FeatureType,Feature>

Sample implementation of DataAccess for testing. Create with SampleDataAccessFactory.

Since:
2.6
Author:
Ben Caradoc-Davies (CSIRO Earth Science and Resource Engineering)

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

Constructor Detail

SampleDataAccess

public SampleDataAccess()
Method Detail

createSchema

public void createSchema(FeatureType featureType)
                  throws IOException
Unsupported operation.

Specified by:
createSchema in interface DataAccess<FeatureType,Feature>
Parameters:
featureType - FetureType to add to DataStore
Throws:
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<FeatureType,Feature>
See Also:
DataAccess.dispose()

getFeatureSource

public FeatureSource<FeatureType,Feature> getFeatureSource(Name typeName)
                                                    throws 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<FeatureType,Feature>
Returns:
SeviceInfo
See Also:
DataAccess.getInfo()

getNames

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

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

getSchema

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

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

updateSchema

public void updateSchema(Name typeName,
                         FeatureType featureType)
                  throws IOException
Unsupported operation.

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

removeSchema

public void removeSchema(Name typeName)
                  throws IOException
Unsupported operation.

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


Copyright © 1996-2014 Geotools. All Rights Reserved.