original_docstring: Add an DFD edge to the tree.
docstring: Add an DFD edge to the tree.
docstring_tokens: Add an DFD edge to the tree .
code: def add_edge(self, edge):
          """Add an DFD edge to the tree."""
  
          if not edge.source:
              raise ValueError("metadata has not been set")
          elif not isinstance(edge.source, PTSSource):
              raise ValueError("metadata is of incorrect type")
  
          # TODO - consider a better representation of the data, e.g. something recursive
          if edge.source_boundary_id not in self.tree:
              self.tree[edge.source_boundary_id] = {}
          if edge.source_component_id not in self.tree[edge.source_boundary_id]:
              self.tree[edge.source_boundary_id][edge.source_component_id] = {}
          if edge.dest_boundary_id not in self.tree[edge.source_boundary_id][edge.source_component_id]:
              self.tree[edge.source_boundary_id][edge.source_component_id][edge.dest_boundary_id] = {}
          if edge.dest_component_id not in self.tree[edge.source_boundary_id][edge.source_component_id][edge.dest_boundary_id]:
              self.tree[edge.source_boundary_id][edge.source_component_id][edge.dest_boundary_id][edge.dest_component_id] = {
                  'name': edge.name,
                  'type': edge.connection_type,
                  'source': edge.source
              }
code_tokens: def add_edge ( self , edge ) : if not edge . source : raise ValueError ( "metadata has not been set" ) elif not isinstance ( edge . source , PTSSource ) : raise ValueError ( "metadata is of incorrect type" ) if edge . source_boundary_id not in self . tree : self . tree [ edge . source_boundary_id ] = { } if edge . source_component_id not in self . tree [ edge . source_boundary_id ] : self . tree [ edge . source_boundary_id ] [ edge . source_component_id ] = { } if edge . dest_boundary_id not in self . tree [ edge . source_boundary_id ] [ edge . source_component_id ] : self . tree [ edge . source_boundary_id ] [ edge . source_component_id ] [ edge . dest_boundary_id ] = { } if edge . dest_component_id not in self . tree [ edge . source_boundary_id ] [ edge . source_component_id ] [ edge . dest_boundary_id ] : self . tree [ edge . source_boundary_id ] [ edge . source_component_id ] [ edge . dest_boundary_id ] [ edge . dest_component_id ] = { 'name' : edge . name , 'type' : edge . connection_type , 'source' : edge . source }
short_docstring: Add an DFD edge to the tree.
short_docstring_tokens: Add an DFD edge to the tree .
comment: """Add an DFD edge to the tree."""$SEP$# TODO - consider a better representation of the data, e.g. something recursive