private static Map < String , Set < BioPAXElement > > collectEntityRefs ( Collection < SIFInteraction > inters ) { Map < String , Set < BioPAXElement > > map = new HashMap < String , Set < BioPAXElement > > ( ) ; for ( SIFInteraction inter : inters ) { if ( ! map . containsKey ( inter . sourceID ) ) map . put ( inter . sourceID , new HashSet < BioPAXElement > ( ) ) ; if ( ! map . containsKey ( inter . targetID ) ) map . put ( inter . targetID , new HashSet < BioPAXElement > ( ) ) ; map . get ( inter . sourceID ) . addAll ( inter . sourceERs ) ; map . get ( inter . targetID ) . addAll ( inter . targetERs ) ; } return map ; }
Collects the sources and targets in given interactions .