Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
15f49ce5
Commit
15f49ce5
authored
7 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
javadocs
parent
76d6bcf1
No related branches found
No related tags found
1 merge request
!44
Resolve "semantic zoom"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
annotation/src/main/java/lcsb/mapviewer/annotation/services/MeSHParser.java
+28
-0
28 additions, 0 deletions
...n/java/lcsb/mapviewer/annotation/services/MeSHParser.java
with
28 additions
and
0 deletions
annotation/src/main/java/lcsb/mapviewer/annotation/services/MeSHParser.java
+
28
−
0
View file @
15f49ce5
...
@@ -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"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment