public Set < SIFInteraction > createSIFInteraction ( Match m , IDFetcher fetcher ) { BioPAXElement sourceBpe = m . get ( ( ( SIFMiner ) this ) . getSourceLabel ( ) , getPattern ( ) ) ; BioPAXElement targetBpe = m . get ( ( ( SIFMiner ) this ) . getTargetLabel ( ) , getPattern ( ) ) ; Set < String > sources = fetchIDs ( sourceBpe , fetcher ) ; Set < String > targets = fetchIDs ( targetBpe , fetcher ) ; SIFType sifType = ( ( SIFMiner ) this ) . getSIFType ( ) ; Set < SIFInteraction > set = new HashSet < SIFInteraction > ( ) ; for ( String source : sources ) { for ( String target : targets ) { if ( source . equals ( target ) ) continue ; else if ( sifType . isDirected ( ) || source . compareTo ( target ) < 0 ) { set . add ( new SIFInteraction ( source , target , sourceBpe , targetBpe , sifType , new HashSet < BioPAXElement > ( m . get ( getMediatorLabels ( ) , getPattern ( ) ) ) , new HashSet < BioPAXElement > ( m . get ( getSourcePELabels ( ) , getPattern ( ) ) ) , new HashSet < BioPAXElement > ( m . get ( getTargetPELabels ( ) , getPattern ( ) ) ) ) ) ; } else { set . add ( new SIFInteraction ( target , source , targetBpe , sourceBpe , sifType , new HashSet < BioPAXElement > ( m . get ( getMediatorLabels ( ) , getPattern ( ) ) ) , new HashSet < BioPAXElement > ( m . get ( getTargetPELabels ( ) , getPattern ( ) ) ) , new HashSet < BioPAXElement > ( m . get ( getSourcePELabels ( ) , getPattern ( ) ) ) ) ) ; } } } return set ; }
Creates a SIF interaction for the given match .