org.n52.wps.server
Class AbstractAlgorithm

java.lang.Object
  extended by org.n52.wps.server.AbstractAlgorithm
All Implemented Interfaces:
IAlgorithm
Direct Known Subclasses:
AbstractSelfDescribingAlgorithm, ContainsAlgorithm, CrossesAlgorithm, DisjointAlgorithm, DistanceAlgorithm, EqualsAlgorithm, GenericGrassAlgorithm, IntersectsAlgorithm, OverlapsAlgorithm, TouchesAlgorithm, WithinAlgorithm

public abstract class AbstractAlgorithm
extends java.lang.Object
implements IAlgorithm

This class has to be extended in order to be served through the WPS. The class file should also include a description file of the algorithm. This file has to be valid against the describeProcess.xsd. The file has to be placed in the folder of the class file and has to be named the same as the Algorithm.

If you want to apply a different initialization method, just override the initializeDescription() method. NOTE: This class is an adapter and it is recommended to extend this.

Author:
foerster

Field Summary
protected  net.opengis.wps.x100.ProcessDescriptionType description
           
 
Constructor Summary
AbstractAlgorithm()
          default constructor, calls the initializeDescription() Method
AbstractAlgorithm(java.lang.String wellKnownName)
          default constructor, calls the initializeDescription() Method
 
Method Summary
 net.opengis.wps.x100.ProcessDescriptionType getDescription()
           
 java.lang.String getWellKnownName()
          Returns some well-known name for the process.
protected  net.opengis.wps.x100.ProcessDescriptionType initializeDescription()
          This method should be overwritten, in case you want to have a way of initializing.
 boolean processDescriptionIsValid()
          Checks if the processDescription complies to the process itself and fits any schema or other dependencies.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.n52.wps.server.IAlgorithm
getErrors, getInputDataType, getOutputDataType, run
 

Field Detail

description

protected net.opengis.wps.x100.ProcessDescriptionType description
Constructor Detail

AbstractAlgorithm

public AbstractAlgorithm()
default constructor, calls the initializeDescription() Method


AbstractAlgorithm

public AbstractAlgorithm(java.lang.String wellKnownName)
default constructor, calls the initializeDescription() Method

Method Detail

initializeDescription

protected net.opengis.wps.x100.ProcessDescriptionType initializeDescription()
This method should be overwritten, in case you want to have a way of initializing. In detail it looks for a xml descfile, which is located in the same directory as the implementing class and has the same name as the class, but with the extension XML.

Returns:

getDescription

public net.opengis.wps.x100.ProcessDescriptionType getDescription()
Specified by:
getDescription in interface IAlgorithm

processDescriptionIsValid

public boolean processDescriptionIsValid()
Description copied from interface: IAlgorithm
Checks if the processDescription complies to the process itself and fits any schema or other dependencies.

Specified by:
processDescriptionIsValid in interface IAlgorithm

getWellKnownName

public java.lang.String getWellKnownName()
Description copied from interface: IAlgorithm
Returns some well-known name for the process.

Specified by:
getWellKnownName in interface IAlgorithm
Returns:
Returns some well-known name for the process or algorithm if that exists, else returns an empty String, never null.


Copyright © 2007-2011 52north.org. All Rights Reserved.