Skip to content
Snippets Groups Projects
Commit 15f49ce5 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

javadocs

parent 76d6bcf1
No related branches found
No related tags found
1 merge request!44Resolve "semantic zoom"
...@@ -179,6 +179,13 @@ public class MeSHParser extends CachableInterface implements IExternalService { ...@@ -179,6 +179,13 @@ public class MeSHParser extends CachableInterface implements IExternalService {
} }
} }
/**
* Extracts name from gson object.
*
* @param gsonObject
* gson to process
* @return name of {@link MeSH} entry
*/
private String getName(Map<?, ?> gsonObject) { private String getName(Map<?, ?> gsonObject) {
StringMap<?> descriptorTag = (StringMap<?>) gsonObject.get("DescriptorName"); StringMap<?> descriptorTag = (StringMap<?>) gsonObject.get("DescriptorName");
if (descriptorTag == null) { if (descriptorTag == null) {
...@@ -187,6 +194,13 @@ public class MeSHParser extends CachableInterface implements IExternalService { ...@@ -187,6 +194,13 @@ public class MeSHParser extends CachableInterface implements IExternalService {
return (String) (((StringMap<?>) descriptorTag.get("String")).get("t")); return (String) (((StringMap<?>) descriptorTag.get("String")).get("t"));
} }
/**
* Extracts Mesh id name from gson object.
*
* @param gsonObject
* gson to process
* @return id of {@link MeSH} entry
*/
private String getId(Map<?, ?> gsonObject) { private String getId(Map<?, ?> gsonObject) {
StringMap<?> descriptorTag = (StringMap<?>) gsonObject.get("DescriptorUI"); StringMap<?> descriptorTag = (StringMap<?>) gsonObject.get("DescriptorUI");
if (descriptorTag == null) { if (descriptorTag == null) {
...@@ -195,11 +209,25 @@ public class MeSHParser extends CachableInterface implements IExternalService { ...@@ -195,11 +209,25 @@ public class MeSHParser extends CachableInterface implements IExternalService {
return (String) descriptorTag.get("t"); return (String) descriptorTag.get("t");
} }
/**
* Extracts Mesh term description from gson object.
*
* @param gsonObject
* gson to process
* @return descriptionof {@link MeSH} entry
*/
private String getDescription(Map<?, ?> gsonObject) { private String getDescription(Map<?, ?> gsonObject) {
StringMap<?> concepts = (StringMap<?>) gsonObject.get("_generated"); StringMap<?> concepts = (StringMap<?>) gsonObject.get("_generated");
return (String) concepts.get("PreferredConceptScopeNote"); return (String) concepts.get("PreferredConceptScopeNote");
} }
/**
* Extracts list of synonyms from gson object.
*
* @param gsonObject
* gson to process
* @return synonyms of {@link MeSH} entry
*/
private Set<String> getSynonyms(Map<?, ?> gsonObject) { private Set<String> getSynonyms(Map<?, ?> gsonObject) {
Set<String> synonyms = new HashSet<>(); Set<String> synonyms = new HashSet<>();
StringMap<?> concepts = (StringMap<?>) gsonObject.get("ConceptList"); StringMap<?> concepts = (StringMap<?>) gsonObject.get("ConceptList");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment