es.prodevelop.gvsig.mobile.fmap.layer
Class VectorialFileAdapter

java.lang.Object
  extended byes.prodevelop.gvsig.mobile.fmap.layer.VectorialAdapter
      extended byes.prodevelop.gvsig.mobile.fmap.layer.VectorialFileAdapter
All Implemented Interfaces:
ReadableVectorial

public class VectorialFileAdapter
extends VectorialAdapter

Adapta un driver de fichero vectorial a la interfaz vectorial, manteniendo además el estado necesario por una capa vectorial de fichero (el nombre del fichero)


Field Summary
static java.lang.String DBF_FILE_DATASOURCE
           
static java.lang.String XML_FILE_DATASOURCE
           
 
Constructor Summary
VectorialFileAdapter(java.io.File f)
          Crea un nuevo VectorialFileAdapter.
 
Method Summary
 IFeature getFeature(int numReg)
          Returns the feature whose index is numReg
Is synchronized to do thread safe accessing to features stored in files.
 java.io.File getFile()
          Devuelve el fichero.
 SelectableDataSource getRecordset()
          Devuelve el DataSource a pasrtir del nombre.
 IGeometry getShape(int index)
          Is synchronized to allow thread safe access to features stored in files.
 int getShapeType()
          Obtiene el tipo de las geometrías almacenadas en esta fuente de datos
 void setReferenceCount(int c)
           
 void start()
          incrementa el contador de las veces que se ha abierto el fichero.
 void stop()
          decrementa el contador de número de aperturas y cuando llega a cero pide al driver que cierre el fichero
 
Methods inherited from class es.prodevelop.gvsig.mobile.fmap.layer.VectorialAdapter
getDriver, getFullExtent, getImageIcon, getShapeBounds, getShapeCount, setDriver
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DBF_FILE_DATASOURCE

public static final java.lang.String DBF_FILE_DATASOURCE
See Also:
Constant Field Values

XML_FILE_DATASOURCE

public static final java.lang.String XML_FILE_DATASOURCE
See Also:
Constant Field Values
Constructor Detail

VectorialFileAdapter

public VectorialFileAdapter(java.io.File f)
Crea un nuevo VectorialFileAdapter.

Parameters:
f - Fichero.
Method Detail

start

public void start()
           throws com.hardcode.gdbms.engine.data.driver.DriverException
incrementa el contador de las veces que se ha abierto el fichero. Solamente cuando el contador está a cero pide al driver que abra el fichero

Throws:
DriverIOException
com.hardcode.gdbms.engine.data.driver.DriverException

stop

public void stop()
          throws com.hardcode.gdbms.engine.data.driver.DriverException
decrementa el contador de número de aperturas y cuando llega a cero pide al driver que cierre el fichero

Throws:
DriverIOException
com.hardcode.gdbms.engine.data.driver.DriverException

getShape

public IGeometry getShape(int index)
                   throws FMapDriverException
Is synchronized to allow thread safe access to features stored in files.

Parameters:
index - índice.
Returns:
Geometría.
Throws:
FMapDriverException
See Also:
com.iver.cit.gvsig.fmap.layers.ReadableVectorial#getShape(int)

getShapeType

public int getShapeType()
                 throws FMapDriverException
Description copied from interface: ReadableVectorial
Obtiene el tipo de las geometrías almacenadas en esta fuente de datos

Returns:
Obtiene el tipo de la capa. Es un bit-oring de los tipos definidos en FShape POINT, LINE, POLYGON o TEXT;
Throws:
FMapDriverException
See Also:
com.iver.cit.gvsig.fmap.layers.ReadableVectorial#getShapeType()

getRecordset

public SelectableDataSource getRecordset()
                                  throws com.hardcode.driverManager.DriverLoadException
Description copied from class: VectorialAdapter
Devuelve el DataSource a pasrtir del nombre.

Specified by:
getRecordset in interface ReadableVectorial
Specified by:
getRecordset in class VectorialAdapter
Returns:
DataSource.
Throws:
com.hardcode.driverManager.DriverLoadException
See Also:
com.iver.cit.gvsig.fmap.layers.VectorialAdapter#getRecordset()

getFile

public java.io.File getFile()
Devuelve el fichero.

Returns:
Fichero.

getFeature

public IFeature getFeature(int numReg)
                    throws FMapDriverException
Returns the feature whose index is numReg
Is synchronized to do thread safe accessing to features stored in files.

Specified by:
getFeature in interface ReadableVectorial
Overrides:
getFeature in class VectorialAdapter
Parameters:
numReg - index of feature
Returns:
feature
Throws:
FMapDriverException

setReferenceCount

public void setReferenceCount(int c)