public static Map < BioPAXElement , Set < PhysicalEntity > > getRelatedPhysicalEntityMap ( Collection < BioPAXElement > elements ) { replaceXrefsWithRelatedER ( elements ) ; Map < BioPAXElement , Set < PhysicalEntity > > map = new HashMap < BioPAXElement , Set < PhysicalEntity > > ( ) ; for ( BioPAXElement ele : elements ) { Set < PhysicalEntity > ents = getRelatedPhysicalEntities ( ele , null ) ; if ( ! ents . isEmpty ( ) ) { map . put ( ele , ents ) ; } } return map ; }
Maps each BioPAXElement to its related PhysicalEntity objects .