code: public static String convertToOwl(Model model)
  	{
  		if (model == null) throw new IllegalArgumentException();
  
  		ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
  
  		(new SimpleIOHandler(model.getLevel())).convertToOWL(model, outputStream);
  
  		try
  		{
  			return outputStream.toString("UTF-8");
  		}
  		catch (UnsupportedEncodingException e)
  		{
  			log.error("convertToOwl, outputStream.toString failed", e);
  			return outputStream.toString();
  		}
  	}
docs: Serializes a (not too large) BioPAX model to the RDF/XML (OWL) formatted string.
  
  @param model a BioPAX object model to convert to the RDF/XML format
  @return the BioPAX data in the RDF/XML format
  @throws IllegalArgumentException if model is null
  @throws OutOfMemoryError when it cannot be stored in a byte array (max 2Gb).