com.iver.cit.gvsig.fmap.layers
Class VectorialAdapter

java.lang.Object
  extended bycom.iver.cit.gvsig.fmap.layers.VectorialAdapter
All Implemented Interfaces:
Index, Indexable, ReadableVectorial
Direct Known Subclasses:
FLyrMemory, MemoryLabelAdapter, VectorialDBAdapter, VectorialFileAdapter, WFSAdapter

public abstract class VectorialAdapter
extends java.lang.Object
implements ReadableVectorial, Indexable

Clase padre de los adaptadores de los drivers. De momento mantiene solo el índice creado sobre la capa


Constructor Summary
VectorialAdapter()
           
 
Method Summary
abstract  void changeRecordsetName(java.lang.String newName)
          Método abstracto que se ejecutará cuando se cambie el nombre del DataSource.
 void closeIndexFile()
          Cierra el fichero de índices
 void createIndex(java.awt.geom.Rectangle2D boundingBox)
          Crea un índice para la capa.
 VectorialDriver getDriver()
          Obtiene una referencia al objeto que implementa la interfaz vectorial con el fin de que las Strategy puedan optimizar en función del driver.
 DriverAttributes getDriverAttributes()
           
 java.awt.Image getImageIcon()
          Por defecto devuelve null, y se le pone el icono por defecto.
 java.lang.String getIndexFile()
          Si el driver es indexable devuelve el valor de la invocación a getIndexFile del driver, si no, devuelve la ruta del fichero de índices interno de gvSIG
abstract  DataSource getRecordset(java.lang.String name)
          Devuelve el DataSource a pasrtir del nombre.
 ShapeInfo getShapeInfo()
          Devuelve el ShapeInfo.
 boolean hasIndex()
          Mira si la capa tiene un índice, bien propio del tipo de capa, bien interno de gvSIG
 void openIndexFile(java.lang.String file)
          Abre el fichero de índices
 void setDriver(VectorialDriver driver)
          Establece el driver sobre el que actúa el adaptador
 void setShapeInfo(ShapeInfo shapeInfo)
          Inserta el ShapeInfo.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.iver.cit.gvsig.fmap.layers.ReadableVectorial
getFullExtent, getShape, getShapeCount, getShapeType, start, stop
 
Methods inherited from interface com.iver.cit.gvsig.fmap.rendering.indexes.Index
getRecordIndexes
 

Constructor Detail

VectorialAdapter

public VectorialAdapter()
Method Detail

setDriver

public void setDriver(VectorialDriver driver)
Establece el driver sobre el que actúa el adaptador

Parameters:
driver -

getDriver

public VectorialDriver getDriver()
Obtiene una referencia al objeto que implementa la interfaz vectorial con el fin de que las Strategy puedan optimizar en función del driver.

Returns:
VectorialDriver

createIndex

public void createIndex(java.awt.geom.Rectangle2D boundingBox)
                 throws DriverIOException
Crea un índice para la capa. Se comprueba si el driver implementa Indexable. Si lo es, se delega la creación en el driver, si no se crea un índice interno con IndexFactory

Specified by:
createIndex in interface Indexable
Parameters:
boundingBox - Rectángulo.
Throws:
DriverIOException

hasIndex

public boolean hasIndex()
Mira si la capa tiene un índice, bien propio del tipo de capa, bien interno de gvSIG

Specified by:
hasIndex in interface Indexable
Returns:
True si la capa contiene índice.

getIndexFile

public java.lang.String getIndexFile()
Si el driver es indexable devuelve el valor de la invocación a getIndexFile del driver, si no, devuelve la ruta del fichero de índices interno de gvSIG

Specified by:
getIndexFile in interface Indexable
Returns:
String.

openIndexFile

public void openIndexFile(java.lang.String file)
Description copied from interface: Index
Abre el fichero de índices

Specified by:
openIndexFile in interface Index
Parameters:
file - Fichero.
See Also:
Index.openIndexFile(java.lang.String)

closeIndexFile

public void closeIndexFile()
Description copied from interface: Index
Cierra el fichero de índices

Specified by:
closeIndexFile in interface Index
See Also:
Index.closeIndexFile()

getRecordset

public abstract DataSource getRecordset(java.lang.String name)
                                 throws DriverLoadException
Devuelve el DataSource a pasrtir del nombre.

Parameters:
name - Nombre.
Returns:
DataSource.
Throws:
DriverLoadException

getShapeInfo

public ShapeInfo getShapeInfo()
Devuelve el ShapeInfo.

Returns:
Returns the shapeInfo.

setShapeInfo

public void setShapeInfo(ShapeInfo shapeInfo)
Inserta el ShapeInfo.

Parameters:
shapeInfo - The shapeInfo to set.

changeRecordsetName

public abstract void changeRecordsetName(java.lang.String newName)
                                  throws DriverException
Método abstracto que se ejecutará cuando se cambie el nombre del DataSource.

Parameters:
newName - Nuevo nombre.
Throws:
DriverException

getImageIcon

public java.awt.Image getImageIcon()
Por defecto devuelve null, y se le pone el icono por defecto. Si el driver reescribe este método, se usará este icono en el TOC.

Returns:

getDriverAttributes

public DriverAttributes getDriverAttributes()