Class UMLSService

  • All Implemented Interfaces:
    edu.cornell.mannlib.semservices.service.ExternalConceptService

    public class UMLSService
    extends Object
    implements edu.cornell.mannlib.semservices.service.ExternalConceptService
    Author:
    jaf30
    • Field Detail

      • logger

        protected final org.apache.commons.logging.Log logger
    • Constructor Detail

      • UMLSService

        public UMLSService()
    • Method Detail

      • configurationFileExists

        public static boolean configurationFileExists()
      • isConfigured

        public boolean isConfigured()
      • getConcepts

        public List<edu.cornell.mannlib.semservices.bo.Concept> getConcepts​(String term)
                                                                     throws Exception
        Specified by:
        getConcepts in interface edu.cornell.mannlib.semservices.service.ExternalConceptService
        Throws:
        Exception
      • processResults

        public List<edu.cornell.mannlib.semservices.bo.Concept> processResults​(String term)
                                                                        throws Exception
        Specified by:
        processResults in interface edu.cornell.mannlib.semservices.service.ExternalConceptService
        Throws:
        Exception
      • getConceptsByURIWithSparql

        public List<edu.cornell.mannlib.semservices.bo.Concept> getConceptsByURIWithSparql​(String uri)
                                                                                    throws Exception
        Specified by:
        getConceptsByURIWithSparql in interface edu.cornell.mannlib.semservices.service.ExternalConceptService
        Parameters:
        uri - URI
        Throws:
        Exception
      • getJsonValue

        protected String getJsonValue​(com.fasterxml.jackson.databind.node.ObjectNode obj,
                                      String key)
        Get a string from a json object or an empty string if there is no value for the given key
        Parameters:
        obj - JSON Object
        key - Key to retrieve
      • stripConceptId

        protected String stripConceptId​(String uri)