diff --git a/annotation/src/main/java/lcsb/mapviewer/annotation/services/MeSHParser.java b/annotation/src/main/java/lcsb/mapviewer/annotation/services/MeSHParser.java index 15342408b1b473567e5aed50b38aa5fcce21d6f8..51dd938cbf68221aa537876b6ec514bd66453480 100644 --- a/annotation/src/main/java/lcsb/mapviewer/annotation/services/MeSHParser.java +++ b/annotation/src/main/java/lcsb/mapviewer/annotation/services/MeSHParser.java @@ -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) { StringMap<?> descriptorTag = (StringMap<?>) gsonObject.get("DescriptorName"); if (descriptorTag == null) { @@ -187,6 +194,13 @@ public class MeSHParser extends CachableInterface implements IExternalService { 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) { StringMap<?> descriptorTag = (StringMap<?>) gsonObject.get("DescriptorUI"); if (descriptorTag == null) { @@ -195,11 +209,25 @@ public class MeSHParser extends CachableInterface implements IExternalService { 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) { StringMap<?> concepts = (StringMap<?>) gsonObject.get("_generated"); 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) { Set<String> synonyms = new HashSet<>(); StringMap<?> concepts = (StringMap<?>) gsonObject.get("ConceptList");