org.geotools.process.feature
Class AbstractFeatureCollectionProcessFactory

Object
  extended by AbstractProcessFactory
      extended by AbstractFeatureCollectionProcessFactory
All Implemented Interfaces:
ProcessFactory
Direct Known Subclasses:
BufferFeatureCollectionFactory

public abstract class AbstractFeatureCollectionProcessFactory
extends AbstractProcessFactory

Base class for process factories which perform an operation on each feature in a feature collection.

Note: This base class is intended to be used for processes which operate on each feature in a feature collection, resulting in a new feature collection which has the same schema as the original.

Subclasses must implement:

Since:
2.6
Author:
Justin Deoliveira, OpenGEO

Constructor Summary
AbstractFeatureCollectionProcessFactory()
           
 
Method Summary
protected abstract  void addParameters(Map<String,Parameter<?>> parameters)
          Method for subclasses to add parameter descriptors for the process.
 Map<String,Parameter<?>> getParameterInfo()
          Adds the FEATURES parameter and then delegates to addParameters(Map).
 Map<String,Parameter<?>> getResultInfo(Map<String,Object> parameters)
           
 String getVersion()
          Return the version of the process
 boolean supportsProgress()
          It is up to the process implementors to implement progress on the task, this method is used to see if the process has progress monitoring implemented
 
Methods inherited from class AbstractProcessFactory
getName
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ProcessFactory
create, getDescription, getTitle
 

Constructor Detail

AbstractFeatureCollectionProcessFactory

public AbstractFeatureCollectionProcessFactory()
Method Detail

getParameterInfo

public final Map<String,Parameter<?>> getParameterInfo()
Adds the FEATURES parameter and then delegates to addParameters(Map).

Returns:
Description of required parameters

addParameters

protected abstract void addParameters(Map<String,Parameter<?>> parameters)
Method for subclasses to add parameter descriptors for the process.

Subclasses should not add a parameter for the input feature collection as this is done by the case class. Example implementation for a simple buffer example:

 protected void addParameters(Map> parameters) {
    parameters.put(BUFFER.key, BUFFER);
 }
 


getResultInfo

public final Map<String,Parameter<?>> getResultInfo(Map<String,Object> parameters)
                                             throws IllegalArgumentException
Throws:
IllegalArgumentException

supportsProgress

public final boolean supportsProgress()
Description copied from interface: ProcessFactory
It is up to the process implementors to implement progress on the task, this method is used to see if the process has progress monitoring implemented

Returns:
true if it supports progress monitoring

getVersion

public String getVersion()
Description copied from interface: ProcessFactory
Return the version of the process

Returns:
String version


Copyright © 1996-2009 Geotools. All Rights Reserved.