public class GemetService extends Object implements 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<Concept> |
getConcepts(String term) |
List<Concept> |
getConceptsByURIWithSparql(String uri) |
protected String |
getConceptsMatchingKeyword(String keyword) |
protected String |
getGemetResults(String url) |
protected String |
getJsonValue(net.sf.json.JSONObject 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<Concept> |
processResults(String term) |
protected String |
stripConceptId(String uri) |
public List<Concept> getConcepts(String term) throws Exception
getConcepts in interface ExternalConceptServiceterm - TermExceptionpublic List<Concept> processResults(String term) throws Exception
processResults in interface ExternalConceptServiceterm - TermExceptionpublic List<Concept> getConceptsByURIWithSparql(String uri) throws Exception
getConceptsByURIWithSparql in interface ExternalConceptServiceuri - URIExceptionprotected String getJsonValue(net.sf.json.JSONObject 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 © 2016. All rights reserved.