示例#1
0
 def as_raw(self):
     string_with_tokens = self.string_with_tokens
     if hasattr(string_with_tokens, 'as_raw'):
         string_with_tokens = as_raw(string_with_tokens)
     string_of_token_chars = self.string_with_tokens
     if hasattr(string_of_token_chars, 'as_raw'):
         string_of_token_chars = as_raw(string_of_token_chars)
     return {
         'token':
         [string_with_tokens, string_of_token_chars, self.substring_index]
     }
示例#2
0
 def as_raw(self):
     artifact_name = self.artifact_name
     if hasattr(artifact_name, 'as_raw'):
         artifact_name = as_raw(artifact_name)
     location = self.location
     if hasattr(location, 'as_raw'):
         location = as_raw(location)
     return {
         'get_artifacts':
         [self.modelable_entity_name, artifact_name, location, self.remove]
     }
示例#3
0
 def as_raw(self):
     string_expressions = []
     for string_expression in self.string_expressions:
         if hasattr(string_expression, 'as_raw'):
             string_expression = as_raw(string_expression)
         string_expressions.append(string_expression)
     return {'concat': string_expressions}
示例#4
0
 def as_raw(self):
     interface_name = self.interface_name
     if hasattr(interface_name, 'as_raw'):
         interface_name = as_raw(interface_name)
     operation_name = self.operation_name
     if hasattr(operation_name, 'as_raw'):
         operation_name = as_raw(operation_name)
     output_variable_name = self.output_variable_name
     if hasattr(output_variable_name, 'as_raw'):
         output_variable_name = as_raw(output_variable_name)
     return {
         'get_operation_output': [
             self.modelable_entity_name, interface_name, operation_name,
             output_variable_name
         ]
     }
示例#5
0
def convert_parameter_default(context, parameter):
    # prune removes any None (but not NULL), and then as_raw converts any NULL to None
    return as_raw(
        prune(
            OrderedDict(
                (('type', parameter.type_name), ('default', parameter.value),
                 ('description', parameter.description)))))
示例#6
0
 def as_raw(self):
     node_type_name = self.node_type_name
     if hasattr(node_type_name, 'as_raw'):
         node_type_name = as_raw(node_type_name)
     return {'get_nodes_of_type': node_type_name}
示例#7
0
 def as_raw(self):
     return {'get_input': as_raw(self.input_property_name)}
示例#8
0
 def _dump(self, context):
     value = as_raw(self.value)
     puts(context.style.meta(value))
示例#9
0
def convert_inputs(context, inputs):
    return OrderedDict(((k, as_raw(v.value)) for k, v in inputs.iteritems()))
示例#10
0
def convert_properties(context, properties):
    return OrderedDict(
        ((k, as_raw(v.value)) for k, v in properties.iteritems()))