es.unex.sextante.dataObjects
Class AbstractVectorLayer

java.lang.Object
  extended by es.unex.sextante.dataObjects.AbstractVectorLayer
All Implemented Interfaces:
IDataObject, ILayer, IVectorLayer

public abstract class AbstractVectorLayer
extends java.lang.Object
implements IVectorLayer

A convenience class which implements some of the methods of the IVectorLayer interface. Extending this class is recommended instead of implementing the interface directly

Author:
volaya

Field Summary
 
Fields inherited from interface es.unex.sextante.dataObjects.IVectorLayer
SHAPE_TYPE_LINE, SHAPE_TYPE_POINT, SHAPE_TYPE_POLYGON
 
Constructor Summary
AbstractVectorLayer()
           
 
Method Summary
 void addFeature(IFeature feature)
          Adds a new feature to the layer
 java.lang.Object getBaseDataObject()
          Returns the base data object (i.e. the object that this class wraps, which contains the data itself)
 int getFieldIndexByName(java.lang.String sFieldName)
          Returns the index of a field from its name.
 java.lang.String[] getFieldNames()
          Returns the names of the fields in the attributes table
 java.lang.Class[] getFieldTypes()
          Returns an array of classes representing the data types of the fields in the attributes table
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface es.unex.sextante.dataObjects.IVectorLayer
addFeature, getFieldCount, getFieldName, getFieldType, getShapesCount, getShapeType, iterator
 
Methods inherited from interface es.unex.sextante.dataObjects.ILayer
getCRS, getFullExtent
 
Methods inherited from interface es.unex.sextante.dataObjects.IDataObject
close, getFilename, getName, open, postProcess, setName
 

Constructor Detail

AbstractVectorLayer

public AbstractVectorLayer()
Method Detail

getBaseDataObject

public java.lang.Object getBaseDataObject()
Description copied from interface: IDataObject
Returns the base data object (i.e. the object that this class wraps, which contains the data itself)

Specified by:
getBaseDataObject in interface IDataObject
Returns:
the base data object

getFieldNames

public java.lang.String[] getFieldNames()
Description copied from interface: IVectorLayer
Returns the names of the fields in the attributes table

Specified by:
getFieldNames in interface IVectorLayer
Returns:
the names of the attribute fields

getFieldIndexByName

public int getFieldIndexByName(java.lang.String sFieldName)
Description copied from interface: IVectorLayer
Returns the index of a field from its name. Returns -1 if there is not a field with that name.

Specified by:
getFieldIndexByName in interface IVectorLayer
Parameters:
sFieldName - the name of the field
Returns:
the index of the given field

getFieldTypes

public java.lang.Class[] getFieldTypes()
Description copied from interface: IVectorLayer
Returns an array of classes representing the data types of the fields in the attributes table

Specified by:
getFieldTypes in interface IVectorLayer
Returns:
the data types of attribute fields

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addFeature

public void addFeature(IFeature feature)
Description copied from interface: IVectorLayer
Adds a new feature to the layer

Specified by:
addFeature in interface IVectorLayer
Parameters:
feature - the feature to add