es.unex.sextante.wps
Class WPSGeoAlgorithm

java.lang.Object
  extended by es.unex.sextante.core.GeoAlgorithm
      extended by es.unex.sextante.wps.WPSGeoAlgorithm

public class WPSGeoAlgorithm
extends GeoAlgorithm

This class wraps a WPS process, so it can be used as a SEXTANTE geoalgorithm.

Author:
volaya

Constructor Summary
WPSGeoAlgorithm()
           
 
Method Summary
 void defineCharacteristics()
          This method should be overridden and used to specify the parameters needed by the GeoAlgorithm, using the corresponding methods of the ParametersSet object.
 java.lang.String[] getAlgorithmAsCommandLineSentences()
          Returns the command line expression that would create this instance of the algorithm
 java.lang.String getCommandLineHelp()
          Returns a string containing the command line usage of the algorithm
 java.lang.String getIdentifier()
           
 GeoAlgorithm getNewInstance()
           
 java.lang.String getXML()
           
 void initialize(java.lang.String url, net.opengis.wps.x100.ProcessDescriptionType pdt)
          initializes the geoalgorithm from a WPS process
 boolean isDeterminatedProcess()
           
 boolean processAlgorithm()
          This method should implement the algorithm itself, using the values of the parameters and processing them.
 
Methods inherited from class es.unex.sextante.core.GeoAlgorithm
adjustRasterOutputExtent, execute, generatesLayers, generatesLayersOrTables, generatesUserDefinedRasterOutput, getCommandLineName, getGridExtent, getGroup, getName, getNumberOfLineVectorLayers, getNumberOfOutputObjects, getNumberOfParameters, getNumberOfPointVectorLayers, getNumberOfPolygonLayers, getNumberOfRasterLayers, getNumberOfTables, getNumberOfVectorLayers, getOutputObjects, getParameters, getProcessMetadata, hasCorrectParameterValues, isAutoExtent, isSuitableForModelling, meetsDataRequirements, meetsRasterRequirements, meetsTableRequirements, meetsVectorRequirements, preprocessForModeller, requiresIndividualRasterLayers, requiresIndividualVectorLayers, requiresLineVectorLayers, requiresMultipleRasterBands, requiresMultipleRasterLayers, requiresMultipleTables, requiresMultipleVectorLayers, requiresNonDataObjects, requiresPoints, requiresPointVectorLayers, requiresPolygonVectorLayers, requiresRasterLayers, requiresTableFields, requiresTables, requiresVectorLayers, setGeneratesUserDefinedRasterOutput, setGridExtent, setGroup, setIsDeterminatedProcess, setName, setOutputObjects, setParameters, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WPSGeoAlgorithm

public WPSGeoAlgorithm()
Method Detail

initialize

public void initialize(java.lang.String url,
                       net.opengis.wps.x100.ProcessDescriptionType pdt)
                throws UnwrappableWPSProcessException
initializes the geoalgorithm from a WPS process

Parameters:
url - the url of the WPS server
pdt - The description of the WPS process
Throws:
UnwrappableWPSProcessException

processAlgorithm

public boolean processAlgorithm()
                         throws GeoAlgorithmExecutionException
Description copied from class: GeoAlgorithm
This method should implement the algorithm itself, using the values of the parameters and processing them.

Specified by:
processAlgorithm in class GeoAlgorithm
Returns:
true if the algorithm was correctly executed. False if it was canceled.
Throws:
GeoAlgorithmExecutionException - if there were problems during algorithm execution

defineCharacteristics

public void defineCharacteristics()
Description copied from class: GeoAlgorithm
This method should be overridden and used to specify the parameters needed by the GeoAlgorithm, using the corresponding methods of the ParametersSet object. Also, output objects must be added, so SEXTANTE knows in advance which outputs will be generated by the algorithm. See the addOutputXXXX family of methods (GeoAlgorithm.addOutputRasterLayer(java.lang.String, java.lang.String, int, es.unex.sextante.outputs.IOutputChannel, es.unex.sextante.dataObjects.IRasterLayer), GeoAlgorithm.addOutputVectorLayer(java.lang.String, java.lang.String, int, es.unex.sextante.outputs.IOutputChannel, es.unex.sextante.dataObjects.IVectorLayer), etc.)

Specified by:
defineCharacteristics in class GeoAlgorithm

getNewInstance

public GeoAlgorithm getNewInstance()
                            throws java.lang.InstantiationException,
                                   java.lang.IllegalAccessException
Overrides:
getNewInstance in class GeoAlgorithm
Returns:
a new instance of the algorithm
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException

isDeterminatedProcess

public boolean isDeterminatedProcess()
Overrides:
isDeterminatedProcess in class GeoAlgorithm
Returns:
true if the algorithm is determinated (i.e. the number of steps to complete it is known)

getXML

public java.lang.String getXML()

getIdentifier

public java.lang.String getIdentifier()

getAlgorithmAsCommandLineSentences

public java.lang.String[] getAlgorithmAsCommandLineSentences()
Description copied from class: GeoAlgorithm
Returns the command line expression that would create this instance of the algorithm

Overrides:
getAlgorithmAsCommandLineSentences in class GeoAlgorithm
Returns:
A command line expression representing this algorithm

getCommandLineHelp

public java.lang.String getCommandLineHelp()
Description copied from class: GeoAlgorithm
Returns a string containing the command line usage of the algorithm

Overrides:
getCommandLineHelp in class GeoAlgorithm
Returns:
a string containing the command line usage of the algorithm