/** * Gets the pubmed ID for an Experiment - whitout hitting the database * * @param experiment the experiment to get the pubmed id from * @return the pubmed id */ public static String getPubmedId(Experiment experiment) { String pubmedId = null; Publication publication = experiment.getPublication(); if (publication != null) { PublicationXref xref = PublicationUtils.getPubmedPrimaryReferenceXref(publication); if (xref != null){ pubmedId = xref.getPrimaryId(); } } if (pubmedId == null) { ExperimentXref xref = getPubmedPrimaryReferenceXref(experiment); if (xref != null) { pubmedId = xref.getPrimaryId(); } } return pubmedId; }
/** * Gets the pubmed ID for an Experiment - whitout hitting the database * * @param experiment the experiment to get the pubmed id from * @return the pubmed id */ public static String getPubmedId(Experiment experiment) { String pubmedId = null; Publication publication = experiment.getPublication(); if (publication != null) { PublicationXref xref = PublicationUtils.getPubmedPrimaryReferenceXref(publication); if (xref != null){ pubmedId = xref.getPrimaryId(); } } if (pubmedId == null) { ExperimentXref xref = getPubmedPrimaryReferenceXref(experiment); if (xref != null) { pubmedId = xref.getPrimaryId(); } } return pubmedId; }