InAndOutputs
index
/home/jachym/usr/src/pywps/trunk/pywps/Process/InAndOutputs.py

# Author:       Jachym Cepicky
#               http://les-ejk.cz
# Lince: 

# Web Processing Service implementation
# Copyright (C) 2006 Jachym Cepicky

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

 
Modules
       
re
types

 
Classes
       
Input
BoundingBoxInput
ComplexInput
LiteralInput
Output
BoundingBoxOutput
ComplexOutput
LiteralOutput

 
class BoundingBoxInput(Input)
     Methods defined here:
__init__(self, identifier, title, abstract=None, metadata=[], minOccurs=1, maxOccurs=1, dimensions=2, crss=[])
Add BoundingBox input
 
Mandatory parameters:
identifier {String} input identifier
title {String} input title
 
Optional parameters:
abstract {String} input description. 
        default: None
metadata List of {Dict} {key:value} pairs. 
        default: None
minOccurs {Integer} minimum number of occurencies. 
        default: 1
maxOccurs {Integer} maximum number of occurencies. 
        default: 1
crss List of {String} supported coordinate systems.
        default: ["EPSG:4326"]
Input.__init__(self,identifier,title,abstract=None,
        metadata=[],minOccurs=minOccurs,maxOccurs=maxOccurs,type="BoundingBoxValue")
setValue(self, value)
Set value of this input
 
Parameters:
value {Tuple} (minx,miny,maxx,maxy)

Data and other attributes defined here:
crs = None
crss = None
dimensions = None
maxx = None
maxy = None
minx = None

Data and other attributes inherited from Input:
abstract = None
identifier = None
maxOccurs = None
metadata = None
minOccurs = None
title = None
type = None
value = None

 
class BoundingBoxOutput(Output)
     Methods defined here:
__init__(self, identifier, title, abstract=None, metadata=[], crss=[], dimensions=2, asReference=False)
BoundingBox output
 
Mandatory parameters:
identifier {String} input identifier
title {String} input title
 
Optional parameters:
abstract {String} input description. 
        default: None
crss List of {String} supported coordinate systems.
        default: ["EPSG:4326"]
dimensions {Integer} number of dimensions
        default: 2
asReference {Boolean} wheather this output will be given back as
        reference or as file
        default: False
setValue(self, value)
Set value to bbox output
 
Parameters:
value {Tuple} (minx,miny,maxx,maxy)

Data and other attributes defined here:
crss = None
dimensions = None
maxx = None
maxy = None
minx = None
miny = None

Data and other attributes inherited from Output:
abstract = None
asReference = None
identifier = None
metadata = None
title = None
type = None
value = None

 
class ComplexInput(Input)
    ComplexInput type
 
  Methods defined here:
__init__(self, identifier, title, abstract=None, metadata=[], minOccurs=1, maxOccurs=1, maxmegabites=5, formats=[{'mimeType': 'text/xml'}])
Init complex input
 
Mandatory parameters:
identifier {String} input identifier
title {String} input title
 
Optional parameters:
abstract {String} input description. 
        default: None
metadata List of {Dict} {key:value} pairs. 
        default: None
minOccurs {Integer} minimum number of occurencies. 
        default: 1
maxOccurs {Integer} maximum number of occurencies. 
        default: 1
formats List of {Dict} according to table 23 (page 25). E.g.
            [
                {"mimeType": "image/tiff"},
                {
                    "mimeType": "text/xml",
                    "encoding": "utf-8",
                    "schema":"http://foo/bar"
                }
            ]
        default: [{"mimeType":"text/xml"}]
maxmegabites {Float} Maximum input file size. Can not be bigger, as
        defined in global configuration file. 
        default: 5
downloadData(self, url)
Download data from given url. Do not download more, then
self.maxmegabites
 
Parameters:
url {String} URL where the data are lying
onMaxFileSizeExceeded(self, why)
Empty method, called, when there was any problem with the input.
 
Parameters:
why {String} Error code
onNotFound(self, what)
Empty method, called, when there was any problem with the input.
 
Parameters:
what {String} Error code
onProblem(self, what, why)
Empty method, called, when there was any problem with the input.
 
Parameters:
what {String} Message with error description
why {String} Error code
setValue(self, input)
Set input value for this input
storeData(self, data)
To be redefined in each instance

Data and other attributes defined here:
format = None
formats = None
maxFileSize = None

Data and other attributes inherited from Input:
abstract = None
identifier = None
maxOccurs = None
metadata = None
minOccurs = None
title = None
type = None
value = None

 
class ComplexOutput(Output)
    Complex value output
 
  Methods defined here:
__init__(self, identifier, title, abstract=None, metadata=[], formats=[{'mimeType': 'text/xml'}], asReference=False)
Complex output
 
Mandatory parameters:
identifier {String} output identifier
title {String} output title
 
Optional parameters:
metadata List of {Dict} {key:value} pairs. 
        default: None
formats List of {Dict} according to table 23 (page 25). E.g.
            [
                {"mimeType": "image/tiff"},
                {
                    "mimeType": "text/xml",
                    "encoding": "utf-8",
                    "schema":"http://foo/bar"
                }
            ]
        default: [{"mimeType":"text/xml"}]
asReference {Boolean} wheather this output will be given back as
        reference or as file
        default: False

Data and other attributes defined here:
format = None
formats = None

Methods inherited from Output:
setValue(self, value)
Set this output value

Data and other attributes inherited from Output:
abstract = None
asReference = None
identifier = None
metadata = None
title = None
type = None
value = None

 
class Input
    Class WPS Input
 
  Methods defined here:
__init__(self, identifier, title, abstract=None, metadata=[], minOccurs=1, maxOccurs=1, type=None)
Input initialization
 
Mandatory parameters:
identifier {String} input identifier
title {String} input title
 
Optional parameters:
abstract {String} input description. 
        default: None
metadata List of {Dict} {key:value} pairs. 
        default: None
minOccurs {Integer} minimum number of occurencies. 
        default: 1
maxOccurs {Integer} maximum number of occurencies. 
        default: 1
type {String} one of "LiteralValue", "ComplexValue"  or
        "BoundingBoxValue"
        default: None
setValue(self, input)
Control in some way the input value
 
Parameters:
input {pywps.Process.Input}

Data and other attributes defined here:
abstract = None
identifier = None
maxOccurs = None
metadata = None
minOccurs = None
title = None
type = None
value = None

 
class LiteralInput(Input)
    Literal input type of input. 
 
NOTE: The spacing parameter was not used yet
 
  Methods defined here:
__init__(self, identifier, title, abstract=None, metadata=[], minOccurs=1, maxOccurs=1, dataType=<type 'str'>, uoms=(), values='*', spacing=None, default=None)
Init the literal value type of input
 
Mandatory parameters:
identifier {String} input identifier
title {String} input title
 
Optional parameters:
abstract {String} input description. Default: None
            default: None
uoms List of {String} value units
            default: ()
minOccurs {Integer} minimum number of occurencies. 
            default: 1
maxOccurs {Integer} maximum number of occurencies. 
            default: 1
allowedValues  List of {String} or {List} list of allowed values,
            which can be used with this input. You can set interval
            using list with two items, like:
 
            (1,2,3,(5,9),10,"a",("d","g"))
 
            This will produce allowed values 1,2,3,10, "a" and
            any value between 5 and 9 or "d" and "g".
 
            If "*" is used, it means "any value"
            default: ("*")
type {types.TypeType} value type, e.g. Integer, String, etc. you
            can uses the "types" module of python.
            default: types.StringType
default {Any} default value.
            default: None
spacing {Float} 
            default: None
getValue(self)
Get the input.value
setValue(self, input)
Set input value value to this input

Data and other attributes defined here:
dataType = None
default = None
restrictedCharacters = [r'\', '#', ';', '&', '!']
spacing = None
uom = None
uoms = None
values = None

Data and other attributes inherited from Input:
abstract = None
identifier = None
maxOccurs = None
metadata = None
minOccurs = None
title = None
type = None
value = None

 
class LiteralOutput(Output)
    Literal output class
 
  Methods defined here:
__init__(self, identifier, title, abstract=None, metadata=[], uoms=(), dataType=<type 'str'>, default=None, asReference=False)
Output of type LiteralValue
 
Mandatory parameters:
identifier {String} input identifier
title {String} input title
 
Optional parameters:
abstract {String} input description. Default: None
            default: None
metadata List of {Dict} additional metadata
            default: ()
uoms List of {String} value units
            default: ()
dataType {types.TypeType} value type, e.g. Integer, String, etc. you
            can uses the "types" module of python.
            default: types.StringType
default {Any} default value.
            default: None
asReference {Boolean} wheather this output will be given back as
        reference or as file
        default: False

Methods inherited from Output:
setValue(self, value)
Set this output value

Data and other attributes inherited from Output:
abstract = None
asReference = None
identifier = None
metadata = None
title = None
type = None
value = None

 
class Output
    Class WPS Input
 
  Methods defined here:
__init__(self, identifier, title, abstract=None, metadata=[], type=None, asReference=False)
Output initialization
 
Mandatory parameters:
identifier {String} input identifier
title {String} input title
 
Optional parameters:
abstract {String} input description. 
        default: None
metadata List of {Dict} {key:value} pairs. 
        default: None
type {String} one of "LiteralValue", "ComplexValue"  or
        "BoundingBoxValue"
        default: None
asReference {Boolean} wheather this output will be given back as
        reference or as file
        default: False
setValue(self, value)
Set this output value

Data and other attributes defined here:
abstract = None
asReference = None
identifier = None
metadata = None
title = None
type = None
value = None