nl.javel.gisbeans.io
Interface DataSourceInterface

All Superinterfaces:
Serializable
All Known Implementing Classes:
ShapeFile

public interface DataSourceInterface
extends Serializable

Since:
JDK 1.2
Version:
1.0
Author:
Peter Jacobs
Paul Jacobs

Method Summary
 String[][] getAttributes()
          returns the attribute data
 String[] getColumnNames()
          returns the columnNames of the attribute data
 URL getDataSource()
          returns the URL of the datasource
 int getNumShapes()
          returns the number of shapes of the particular datasource
 GisObject getShape(int index)
          returns a GisObject
 List getShapes()
          returns all the shapes of the particular datasource
 List getShapes(Rectangle2D rectangle)
          returns the shapes of the particular datasource in a particular extent
 List getShapes(String attribute, String columnName)
          returns the shapes based on a particular value of the attributes
 int getType()
           
 

Method Detail

getColumnNames

String[] getColumnNames()
returns the columnNames of the attribute data

Returns:
String[]

getAttributes

String[][] getAttributes()
                         throws IOException
returns the attribute data

Returns:
the attributes
Throws:
IOException - on IOException

getDataSource

URL getDataSource()
returns the URL of the datasource

Returns:
URL the URL of the file

getNumShapes

int getNumShapes()
                 throws IOException
returns the number of shapes of the particular datasource

Returns:
int the number of shapes
Throws:
IOException - possible file IO or database connection failures.

getShape

GisObject getShape(int index)
                   throws IOException,
                          IndexOutOfBoundsException
returns a GisObject

Parameters:
index - the number of the shape to be returned
Returns:
GisObject returns a nl.javel.gisbeans.geom.GisObject
Throws:
IndexOutOfBoundsException - whenever index>numShapes
IOException - on IOFailure

getShapes

List getShapes()
               throws IOException
returns all the shapes of the particular datasource

Returns:
List the resulting ArrayList of nl.javel.gisbeans.geom.GisObject
Throws:
IOException - on IOFailure

getShapes

List getShapes(Rectangle2D rectangle)
               throws IOException
returns the shapes of the particular datasource in a particular extent

Parameters:
rectangle - the extent of the box (in geo-coordinates)
Returns:
List the resulting ArrayList of nl.javel.gisbeans.geom.GisObject
Throws:
IOException - on IOFailure

getShapes

List getShapes(String attribute,
               String columnName)
               throws IOException
returns the shapes based on a particular value of the attributes

Parameters:
attribute - the value of the attribute
columnName - the columnName
Returns:
List the resulting ArrayList of nl.javel.gisbeans.geom.GisObject
Throws:
IOException - on IOFailure

getType

int getType()
            throws IOException
Returns:
returns the type of this dataSouce
Throws:
IOException - on IOFailure