public class GemetService extends Object implements edu.cornell.mannlib.semservices.service.ExternalConceptService
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger |
| Constructor and Description |
|---|
GemetService() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getAllTranslationsForConcept(String concept_uri,
String property) |
protected String |
getAvailableLangs(String concept_uri) |
protected String |
getConcept(String concept_uri) |
List<edu.cornell.mannlib.semservices.bo.Concept> |
getConcepts(String term) |
List<edu.cornell.mannlib.semservices.bo.Concept> |
getConceptsByURIWithSparql(String uri) |
protected String |
getConceptsMatchingKeyword(String keyword) |
protected String |
getGemetResults(String url) |
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
|
protected List<String> |
getPropertyFromJson(String json) |
protected String |
getRelatedConcepts(String concept_uri,
String relation) |
protected List<String> |
getRelatedUris(String json) |
List<edu.cornell.mannlib.semservices.bo.Concept> |
processResults(String term) |
protected String |
stripConceptId(String uri) |
public List<edu.cornell.mannlib.semservices.bo.Concept> getConcepts(String term) throws Exception
getConcepts in interface edu.cornell.mannlib.semservices.service.ExternalConceptServiceExceptionpublic List<edu.cornell.mannlib.semservices.bo.Concept> processResults(String term) throws Exception
processResults in interface edu.cornell.mannlib.semservices.service.ExternalConceptServiceExceptionpublic List<edu.cornell.mannlib.semservices.bo.Concept> getConceptsByURIWithSparql(String uri) throws Exception
getConceptsByURIWithSparql in interface edu.cornell.mannlib.semservices.service.ExternalConceptServiceExceptionprotected String getJsonValue(com.fasterxml.jackson.databind.node.ObjectNode obj, String key)
obj - JSON Objectkey - Key to retrieveprotected String getAvailableLangs(String concept_uri) throws Exception
concept_uri - Concept URIExceptionprotected String getConcept(String concept_uri) throws Exception
concept_uri - concept URIExceptionprotected String getAllTranslationsForConcept(String concept_uri, String property) throws Exception
concept_uri - Concept URIproperty - PropertyExceptionprotected String getRelatedConcepts(String concept_uri, String relation) throws Exception
concept_uri - Concept URIrelation - RelationsExceptionprotected String getConceptsMatchingKeyword(String keyword) throws Exception
keyword - KeywordExceptionprotected String getGemetResults(String url) throws Exception
url - URIExceptionCopyright © 2022. All rights reserved.