Class PmidLookup

java.lang.Object
org.eclipse.pass.loader.nihms.entrez.PmidLookup

@Component public class PmidLookup extends Object
Service to retrieve a PMID records from Entrez. If you prefer to avoid dealing with JSON, there is an option to retrieve a PubMedRecord object where you can use standard getters to retrieve article details.
Version:
$Id$
Author:
Karen Hanson
  • Constructor Details

    • PmidLookup

      public PmidLookup(@Value("${pmid.lookup.connect-timeout-ms}") Long pmidLookupConnectTimeoutMs, @Value("${pmid.lookup.read-timeout-ms}") Long pmidLookupReadTimeoutMs)
  • Method Details

    • retrievePubMedRecord

      public PubMedEntrezRecord retrievePubMedRecord(String pmid)
      Retrieve PubMedRecord object for PMID record from NIH's Entrez API service.
      Parameters:
      pmid - pub med id
      Returns:
      the record
    • retrievePubMedRecordAsJson

      public org.json.JSONObject retrievePubMedRecordAsJson(String pmid)
      Retrieve JSON for PMID record from NIH's Entrez API service. Returns JSON object containing the record or null if no match found. Note that "no match found" means there is no record for that pmid, whereas a RuntimeException means communication with the service failed, and the client app can decide what to do about those.
      Parameters:
      pmid - pub med id
      Returns:
      the record as a JSON object