public Publication GetPublication(Publication publication) { if (publication == null) { return(null); } if (publication.DOI != null && PubsByDOI.ContainsKey(publication.DOI)) { return(PubsByDOI[publication.DOI]); } if (publication.PubMedID != null && PubsByPMID.ContainsKey(publication.PubMedID)) { return(PubsByPMID[publication.PubMedID]); } if (publication.Title != null && PubsByTitle.ContainsKey(publication.Title)) { return(PubsByTitle[publication.Title]); } return(null); }
public bool PublicationExists(Publication publication) { if (publication == null) { return(false); } if (publication.DOI != null && PubsByDOI.ContainsKey(publication.DOI)) { return(true); } if (publication.PubMedID != null && PubsByPMID.ContainsKey(publication.PubMedID)) { return(true); } if (publication.Title != null && PubsByTitle.ContainsKey(publication.Title)) { return(true); } return(false); }