uk.ac.ebi.intact.application.graph2MIF.conversion
Class FusionableGraph

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--java.util.HashMap
              |
              +--uk.ac.ebi.intact.simpleGraph.BasicGraph
                    |
                    +--uk.ac.ebi.intact.simpleGraph.Graph
                          |
                          +--uk.ac.ebi.intact.application.graph2MIF.conversion.FusionableGraph
All Implemented Interfaces:
BasicGraphI, java.lang.Cloneable, GraphI, java.util.Map, java.io.Serializable

public class FusionableGraph
extends Graph

Extention of a Graph allowing to fusion two Graph.

Version:
$Id: FusionableGraph.java,v 1.1 2003/10/30 15:46:05 skerrien Exp $
Author:
Samuel Kerrien (skerrien@ebi.ac.uk)
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Constructor Summary
FusionableGraph()
           
 
Method Summary
 void fusion(FusionableGraph graph)
          Fusion a graph to the current one.
For each edge of the new graph we check if it exists in the current one.
If the edge already exists : continue.
If not, we check if the two Nodes of the edge already exists in the current graph : if the node exists, update the edge with its reference
if not add it to the current graph finally we add the up-to-date edge to the current graph
 
Methods inherited from class uk.ac.ebi.intact.simpleGraph.Graph
addEdge, addNode, addNode, addVisited, getEdges, getNodes, isVisited, toString
 
Methods inherited from class uk.ac.ebi.intact.simpleGraph.BasicGraph
getId, getLabel, setId, setLabel
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface uk.ac.ebi.intact.simpleGraph.BasicGraphI
getId, getLabel, setId, setLabel
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

FusionableGraph

public FusionableGraph()
Method Detail

fusion

public void fusion(FusionableGraph graph)
Fusion a graph to the current one.
For each edge of the new graph we check if it exists in the current one.
If the edge already exists : continue.
If not, we check if the two Nodes of the edge already exists in the current graph :
if the node exists, update the edge with its reference
if not add it to the current graph
finally we add the up-to-date edge to the current graph

Parameters:
graph - the graph we want to fusioned to the current one.


IntAct Project - EMBL-EBI 2004 - intact-help@ebi.ac.uk