org.geotools.process.impl
Class SingleProcessFactory

Object
  extended by SingleProcessFactory
All Implemented Interfaces:
Factory, OptionalFactory, ProcessFactory
Direct Known Subclasses:
AbstractFeatureCollectionProcessFactory

public abstract class SingleProcessFactory
extends Object
implements ProcessFactory

Helper class for a process factory that will return just a single process

Author:
Andrea Aime - OpenGeo

Constructor Summary
protected SingleProcessFactory()
          Utility method for factories that will use the process factory name in order to define the process name by stripping the "Factory" at the end of the name.
protected SingleProcessFactory(Name processName)
           
 
Method Summary
protected abstract  Process create()
           
 Process create(Name name)
          Create a process for execution.
protected abstract  InternationalString getDescription()
           
 InternationalString getDescription(Name name)
          Human readable description of the specified process
 Map<RenderingHints.Key,?> getImplementationHints()
          The default implementation returns an empty map.
 Set<Name> getNames()
          The names (non human readable) that can be used to refer to the processes generated by this factory.
protected abstract  Map<String,Parameter<?>> getParameterInfo()
           
 Map<String,Parameter<?>> getParameterInfo(Name name)
          Description of the Map parameter to use when executing.
protected abstract  Map<String,Parameter<?>> getResultInfo(Map<String,Object> parameters)
           
 Map<String,Parameter<?>> getResultInfo(Name name, Map<String,Object> parameters)
          Description of the results returned
 InternationalString getTitle()
          Name suitable for display to end user.
 InternationalString getTitle(Name name)
          Human readable title suitable for display for the specified process Please note that this title is *not* stable across locale; if you want to remember a ProcessFactory between runs please use getName (which is dependent on the implementor to guarantee uniqueness) or use the classname
protected abstract  String getVersion()
           
 String getVersion(Name name)
          Return the version of the process
 boolean isAvailable()
          Default Implementation return true
protected abstract  boolean supportsProgress()
           
 boolean supportsProgress(Name name)
          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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleProcessFactory

protected SingleProcessFactory()
Utility method for factories that will use the process factory name in order to define the process name by stripping the "Factory" at the end of the name.


SingleProcessFactory

protected SingleProcessFactory(Name processName)
Parameters:
processName -
Method Detail

create

public Process create(Name name)
Description copied from interface: ProcessFactory
Create a process for execution.

Specified by:
create in interface ProcessFactory
Parameters:
name - the process identifier
Returns:
Process implementation

getNames

public Set<Name> getNames()
Description copied from interface: ProcessFactory
The names (non human readable) that can be used to refer to the processes generated by this factory.

This name is used to advertise the availability of a Process in a WPS; while the Title and Description will change depending on the users locale; this name will be consistent.

It is up to the implementor to ensure this name is unique

Specified by:
getNames in interface ProcessFactory
Returns:
a set of names handled by this process factory

getDescription

public InternationalString getDescription(Name name)
Description copied from interface: ProcessFactory
Human readable description of the specified process

Specified by:
getDescription in interface ProcessFactory
Parameters:
name - the process whose description is to be returned
Returns:

getParameterInfo

public Map<String,Parameter<?>> getParameterInfo(Name name)
Description copied from interface: ProcessFactory
Description of the Map parameter to use when executing.

Specified by:
getParameterInfo in interface ProcessFactory
Parameters:
name - the process identifier
Returns:
Description of required parameters

getResultInfo

public Map<String,Parameter<?>> getResultInfo(Name name,
                                              Map<String,Object> parameters)
                                       throws IllegalArgumentException
Description copied from interface: ProcessFactory
Description of the results returned

Specified by:
getResultInfo in interface ProcessFactory
Parameters:
name - the process identifier
parameters - the parameters to be used
Returns:
Throws:
IllegalArgumentException

getTitle

public InternationalString getTitle(Name name)
Description copied from interface: ProcessFactory
Human readable title suitable for display for the specified process

Please note that this title is *not* stable across locale; if you want to remember a ProcessFactory between runs please use getName (which is dependent on the implementor to guarantee uniqueness) or use the classname

Specified by:
getTitle in interface ProcessFactory
Parameters:
name - the process identifier

getVersion

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

Specified by:
getVersion in interface ProcessFactory
Parameters:
name - the process identifier
Returns:
String version

supportsProgress

public boolean supportsProgress(Name name)
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

Specified by:
supportsProgress in interface ProcessFactory
Parameters:
name - the process identifier
Returns:
true if it supports progress monitoring

isAvailable

public boolean isAvailable()
Default Implementation return true

Specified by:
isAvailable in interface OptionalFactory

getImplementationHints

public Map<RenderingHints.Key,?> getImplementationHints()
The default implementation returns an empty map.

Specified by:
getImplementationHints in interface Factory
Returns:
The map of hints, or an empty map if none.

create

protected abstract Process create()

getDescription

protected abstract InternationalString getDescription()

getParameterInfo

protected abstract Map<String,Parameter<?>> getParameterInfo()

getResultInfo

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

getTitle

public InternationalString getTitle()
Name suitable for display to end user.

Specified by:
getTitle in interface ProcessFactory
Returns:
A short name suitable for display in a user interface.

getVersion

protected abstract String getVersion()

supportsProgress

protected abstract boolean supportsProgress()


Copyright © 1996-2014 Geotools. All Rights Reserved.