es.unex.sextante.gui.core
Interface IInputFactory

All Known Implementing Classes:
AbstractInputFactory

public interface IInputFactory

Interface to be implemented by all input factories An input factory is used by SEXTANTE to retrieve data objects from an application. If you want to integrate SEXTANTE graphical elements into your GIS app, it will need to prompt the user to select elements such as layers or tables, so it needs to know which elements are available (ie. already opened in your application) The input factory will create objects that implement the needed SEXTANTE interfaces from objects currently available in your application Apart from wrapping data objects from the application, an input factory must also be able to open files and create data objects from them. This will be used when calling the batch processing interface Instead of implementing this interface, it is more convenient to extend @see AbstractInputFactory

Author:
volaya

Method Summary
 void addDataObject(IDataObject obj)
          Adds a new data object to the ones already existing.
 void clearDataObjects()
          Clears the set of SEXTANTE data objects
 void createDataObjects()
          Creates the SEXTANTE data objects
 RasterLayerAndBand[] getBands()
          Returns al the individual bands of the raster layers in the set
 IDataObject[] getDataObjects()
          Returns all objects in the set(layers and tables)
 IDataObject getInputFromName(java.lang.String value)
          Returns an input object based on its name
 ILayer[] getLayers()
          Returns the raster and vectorlayers in the set
 NamedExtent[] getPredefinedExtents()
          Returns the predefined extents available
 java.lang.String[] getRasterLayerInputExtensions()
          Returns an array of extensions that this InputFactory supports for opening raster layers
 IRasterLayer[] getRasterLayers()
          Returns the raster layers in the set
 java.lang.String[] getTableInputExtensions()
          Returns an array of extensions that this InputFactory supports for opening tables
 ITable[] getTables()
          Returns the tables in the set
 java.lang.String[] getVectorLayerInputExtensions()
          Returns an array of extensions that this InputFactory supports for opening vector layers
 IVectorLayer[] getVectorLayers(int shapeType)
          Returns all the vector layers of a particular type currently in the set
 IDataObject openDataObjectFromFile(java.lang.String filename)
          Returns a data object created from the specified filename
 

Method Detail

createDataObjects

void createDataObjects()
Creates the SEXTANTE data objects


clearDataObjects

void clearDataObjects()
Clears the set of SEXTANTE data objects


getDataObjects

IDataObject[] getDataObjects()
Returns all objects in the set(layers and tables)

Returns:
all objects in the set(layers and tables)

addDataObject

void addDataObject(IDataObject obj)
Adds a new data object to the ones already existing. This method should be called from post-process tasks, to incorporate output object to the inputs list without having to create all the already existing objects again

Parameters:
obj - the data object to add

getRasterLayers

IRasterLayer[] getRasterLayers()
Returns the raster layers in the set

Returns:
an array of raster layers

getVectorLayers

IVectorLayer[] getVectorLayers(int shapeType)
Returns all the vector layers of a particular type currently in the set

Parameters:
shapeType - The type of vector layer. Use the constants defined in @see IVectorLayer
Returns:
an array of vector layers

getTables

ITable[] getTables()
Returns the tables in the set

Returns:
an array of tables

getBands

RasterLayerAndBand[] getBands()
Returns al the individual bands of the raster layers in the set

Returns:
an array of bands

getLayers

ILayer[] getLayers()
Returns the raster and vectorlayers in the set

Returns:
an array of layers

getPredefinedExtents

NamedExtent[] getPredefinedExtents()
Returns the predefined extents available

Returns:
an array of named extents

getInputFromName

IDataObject getInputFromName(java.lang.String value)
Returns an input object based on its name

Returns:
the input object corresponding to the specified name. Returns null if no object with that name was found

getRasterLayerInputExtensions

java.lang.String[] getRasterLayerInputExtensions()
Returns an array of extensions that this InputFactory supports for opening raster layers

Returns:
the supported extensions for raster layers

getVectorLayerInputExtensions

java.lang.String[] getVectorLayerInputExtensions()
Returns an array of extensions that this InputFactory supports for opening vector layers

Returns:
the supported extensions for vector layers

getTableInputExtensions

java.lang.String[] getTableInputExtensions()
Returns an array of extensions that this InputFactory supports for opening tables

Returns:
the supported extensions for tables

openDataObjectFromFile

IDataObject openDataObjectFromFile(java.lang.String filename)
Returns a data object created from the specified filename

Parameters:
filename - the filename
Returns:
a data object. null if could not create it from the specified file