def get_processes(self): def hello(request): pass hello_string = WPSProcess( hello, 'hello_string', 'Process Hello', inputs=[LiteralInput('the_name', 'Input name')], metadata=[ Metadata('process metadata 1', 'http://example.org/1'), Metadata('process metadata 2', 'http://example.org/2') ]) def hello(request): pass hello_integer = WPSProcess(hello, 'hello_integer', 'Process Hello', inputs=[ LiteralInput( 'the_number', 'Input number', data_type='positiveInteger') ]) return [hello_string, hello_integer]
def get_processes(self): def hello(request): pass def ping(request): pass return [ WPSProcess(hello, 'hello', 'Process Hello'), WPSProcess(ping, 'ping', 'Process Ping') ]
def get_processes(self): def pr1(): pass def pr2(): pass return [ WPSProcess(pr1, 'pr1', 'Process 1', metadata=[Metadata('pr1 metadata')]), WPSProcess(pr2, 'pr2', 'Process 2', metadata=[Metadata('pr2 metadata')]) ]
def create_bbox_process(): return WPSProcess( handler=bbox_process, identifier='my_bbox_process', title='Bbox process', inputs=[BoundingBoxInput('mybbox', 'Input name', ["EPSG:4326"])], outputs=[ BoundingBoxOutput('outbbox', 'Output message', ["EPSG:4326"]) ])
def create_greeter(): return WPSProcess( handler=greeter, identifier='greeter', title='Greeter', inputs=[LiteralInput('name', 'Input name', data_type='string')], outputs=[ LiteralOutput('message', 'Output message', data_type='string') ])
def create_ultimate_question(): return WPSProcess(handler=ultimate_question, identifier='ultimate_question', title='Ultimate Question', outputs=[ LiteralOutput('outvalue', 'Output Value', data_type='string') ])
def create_complex_process(): frmt = Format(mime_type='application/gml') # this is unknown mimetype return WPSProcess(handler=complex_process, identifier='my_complex_process', title='Complex process', inputs=[ ComplexInput('complex', 'Complex input', supported_formats=[frmt]) ], outputs=[ ComplexOutput('complex', 'Complex output', supported_formats=[frmt]) ])