Class UMLSService
- java.lang.Object
-
- edu.cornell.mannlib.semservices.service.impl.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 Summary
Fields Modifier and Type Field Description protected org.apache.commons.logging.Loglogger
-
Constructor Summary
Constructors Constructor Description UMLSService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanconfigurationFileExists()List<edu.cornell.mannlib.semservices.bo.Concept>getConcepts(String term)List<edu.cornell.mannlib.semservices.bo.Concept>getConceptsByURIWithSparql(String uri)protected StringgetJsonValue(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 keybooleanisConfigured()List<edu.cornell.mannlib.semservices.bo.Concept>processResults(String term)protected StringstripConceptId(String uri)
-
-
-
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:
getConceptsin interfaceedu.cornell.mannlib.semservices.service.ExternalConceptService- Throws:
Exception
-
processResults
public List<edu.cornell.mannlib.semservices.bo.Concept> processResults(String term) throws Exception
- Specified by:
processResultsin interfaceedu.cornell.mannlib.semservices.service.ExternalConceptService- Throws:
Exception
-
getConceptsByURIWithSparql
public List<edu.cornell.mannlib.semservices.bo.Concept> getConceptsByURIWithSparql(String uri) throws Exception
- Specified by:
getConceptsByURIWithSparqlin interfaceedu.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 Objectkey- Key to retrieve
-
-