#NEWLINE# def describe( self , identifiers ) : #NEWLINE# #INDENT# if ( not identifiers ) : #NEWLINE# #INDENT# raise MissingParameterValue ( '' , 'identifier' ) #NEWLINE# #UNINDENT# identifier_elements = [ ] #NEWLINE# if ( 'all' in ( ident . lower ( ) for ident in identifiers ) ) : #NEWLINE# #INDENT# for process in self . processes : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# identifier_elements . append ( self . processes [ process ] . describe_xml ( ) ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# raise NoApplicableCode ( e ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# for identifier in identifiers : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# process = self . processes [ identifier ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise InvalidParameterValue ( ( 'Unknown process %r' % identifier ) , 'identifier' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# identifier_elements . append ( process . describe_xml ( ) ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# raise NoApplicableCode ( e ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# doc = WPS . ProcessDescriptions ( * identifier_elements ) #NEWLINE# doc . attrib [ '{http://www.w3.org/2001/XMLSchema-instance}schemaLocation' ] = 'http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsDescribeProcess_response.xsd' #NEWLINE# doc . attrib [ 'service' ] = 'WPS' #NEWLINE# doc . attrib [ 'version' ] = '1.0.0' #NEWLINE# doc . attrib [ '{http://www.w3.org/XML/1998/namespace}lang' ] = 'en-US' #NEWLINE# return xml_response ( doc )