code: public void convert(EntrySet entrySet, OutputStream outputStream, 
  			boolean forceInteractionToComplex) {
  
  		// check args
  		if (entrySet == null || outputStream == null) {
  			throw new IllegalArgumentException("convert: one or more null arguments.");
  		}
  		if (entrySet.getLevel() != 2) {
  			throw new IllegalArgumentException("convert: only PSI-MI Level 2.5 is supported.");
  		}
  
  		//create a new empty BioPAX Model
  		final Model model = BioPAXLevel.L3.getDefaultFactory().createModel();
  		model.setXmlBase(xmlBase);
  		
  		// convert all psimi entries
  		EntryMapper entryMapper = new EntryMapper(model, forceInteractionToComplex);
  		for (Entry entry : entrySet.getEntries()) {
  			entryMapper.run(entry);
  		}
  		
  		//try to release some RAM earlier
  		entrySet.getEntries().clear();
  		entrySet = null;
  		
  		// write BioPAX RDF/XML
  		(new SimpleIOHandler()).convertToOWL(model, outputStream);
  	}
docs: Converts the PSI interactions from the EntrySet and places into BioPAX output stream.
  Stream will be closed by the converter.
  
  @param entrySet PSI-MI entry set
  @param outputStream output stream for writing the BioPAX RDF/XML result
  @param forceInteractionToComplex true/false - whether to always generate Complex instead of MolecularInteraction