@Override
  public Resource objectToJena(Model toAddTo, Investigation investigation)
      throws IllegalArgumentException {
    if (investigation.getResourceURL() == null) {
      throw new IllegalArgumentException(String.format(msg_ResourceWithoutURI, "investigations"));
    }
    Resource res = toAddTo.createResource(investigation.getResourceURL().toString());
    
    toAddTo.add(res, RDF.type, TOXBANK_ISA.INVESTIGATION);
    addString(res, TOXBANK_ISA.HAS_ACCESSION_ID, investigation.getAccessionId());
    addString(res, DCTerms.title, investigation.getTitle());
    addString(res, DCTerms.abstract_, investigation.getAbstract());
    addTimestamp(res, DCTerms.created, investigation.getSubmissionDate());
    addTimestamp(res, DCTerms.modified, investigation.getLastModifiedDate());
    addTimestamp(res, DCTerms.issued, investigation.getIssuedDate());

    if (investigation.isPublished() != null)
      res.addLiteral(TOXBANK.ISPUBLISHED, investigation.isPublished());

    if (investigation.isSearchable() != null)
      res.addLiteral(TOXBANK.ISSUMMARYSEARCHABLE, investigation.isSearchable());

    for (Project project : investigation.getProjects()) {
      Resource projectRes = toAddTo.createResource(
          project.getResourceURL().toString()
          );
      res.addProperty(TOXBANK.HASPROJECT, projectRes);
    }
    
    if (investigation.getOrganisation() != null) {
      if (investigation.getOrganisation().getResourceURL()==null)
        throw new IllegalArgumentException(String.format(msg_InvalidURI, "organisation",res.getURI()));       
      Resource org = organisationIO.objectToJena(toAddTo, investigation.getOrganisation());
      res.addProperty(TOXBANK.HASORGANISATION,org);
    }
    if (investigation.getOwner() != null) {
      if (investigation.getOwner().getResourceURL()==null)
        throw new IllegalArgumentException(String.format(msg_InvalidURI, "investigation owner",res.getURI()));      
      Resource ownerRes = userIO.objectToJena(toAddTo, investigation.getOwner());
      res.addProperty(TOXBANK.HASOWNER, ownerRes);
    }

    for (User author : investigation.getAuthors()) {
      Resource authorRes = toAddTo.createResource(
          author.getResourceURL().toString()
        );
        res.addProperty(TOXBANK_ISA.HAS_OWNER, authorRes);
    }

    return res;
  }