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
0d9a06bf
There was a problem fetching the pipeline metadata.
Commit
0d9a06bf
authored
6 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
exception passing improved
parent
7d11e44b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!366
broken chebi annotator doesn't stop data uploading
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
annotation/src/main/java/lcsb/mapviewer/annotation/services/annotators/ChebiAnnotator.java
+5
-7
5 additions, 7 deletions
...viewer/annotation/services/annotators/ChebiAnnotator.java
with
5 additions
and
7 deletions
annotation/src/main/java/lcsb/mapviewer/annotation/services/annotators/ChebiAnnotator.java
+
5
−
7
View file @
0d9a06bf
...
@@ -27,7 +27,6 @@ import lcsb.mapviewer.model.map.MiriamType;
...
@@ -27,7 +27,6 @@ import lcsb.mapviewer.model.map.MiriamType;
import
lcsb.mapviewer.model.map.species.Chemical
;
import
lcsb.mapviewer.model.map.species.Chemical
;
import
lcsb.mapviewer.modelutils.map.ElementUtils
;
import
lcsb.mapviewer.modelutils.map.ElementUtils
;
import
uk.ac.ebi.chebi.webapps.chebiWS.client.ChebiWebServiceClient
;
import
uk.ac.ebi.chebi.webapps.chebiWS.client.ChebiWebServiceClient
;
import
uk.ac.ebi.chebi.webapps.chebiWS.model.ChebiWebServiceFault_Exception
;
import
uk.ac.ebi.chebi.webapps.chebiWS.model.DataItem
;
import
uk.ac.ebi.chebi.webapps.chebiWS.model.DataItem
;
import
uk.ac.ebi.chebi.webapps.chebiWS.model.Entity
;
import
uk.ac.ebi.chebi.webapps.chebiWS.model.Entity
;
import
uk.ac.ebi.chebi.webapps.chebiWS.model.LiteEntity
;
import
uk.ac.ebi.chebi.webapps.chebiWS.model.LiteEntity
;
...
@@ -205,7 +204,7 @@ public class ChebiAnnotator extends ElementAnnotator implements IExternalService
...
@@ -205,7 +204,7 @@ public class ChebiAnnotator extends ElementAnnotator implements IExternalService
}
}
}
}
}
}
}
catch
(
ChebiWebServiceFault_
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
ChebiSearchException
(
"Problem with chebi connection"
,
e
);
throw
new
ChebiSearchException
(
"Problem with chebi connection"
,
e
);
}
}
return
null
;
return
null
;
...
@@ -290,7 +289,7 @@ public class ChebiAnnotator extends ElementAnnotator implements IExternalService
...
@@ -290,7 +289,7 @@ public class ChebiAnnotator extends ElementAnnotator implements IExternalService
String
value
=
miriamListToStringList
(
result
);
String
value
=
miriamListToStringList
(
result
);
setCacheValue
(
query
,
value
);
setCacheValue
(
query
,
value
);
}
catch
(
ChebiWebServiceFault_
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
ChebiSearchException
(
"Problem with chebi"
,
e
);
throw
new
ChebiSearchException
(
"Problem with chebi"
,
e
);
}
}
return
result
;
return
result
;
...
@@ -300,7 +299,7 @@ public class ChebiAnnotator extends ElementAnnotator implements IExternalService
...
@@ -300,7 +299,7 @@ public class ChebiAnnotator extends ElementAnnotator implements IExternalService
* Serialize list of chebi identifiers.
* Serialize list of chebi identifiers.
*
*
* @param list
* @param list
* list of chebi identfiers
* list of chebi ident
i
fiers
* @return string with identifiers
* @return string with identifiers
*/
*/
private
String
miriamListToStringList
(
List
<
MiriamData
>
list
)
{
private
String
miriamListToStringList
(
List
<
MiriamData
>
list
)
{
...
@@ -357,7 +356,6 @@ public class ChebiAnnotator extends ElementAnnotator implements IExternalService
...
@@ -357,7 +356,6 @@ public class ChebiAnnotator extends ElementAnnotator implements IExternalService
}
}
try
{
try
{
ChebiWebServiceClient
client
=
getClient
();
ChebiWebServiceClient
client
=
getClient
();
LiteEntityList
entities
=
client
.
getLiteEntity
(
id
,
SearchCategory
.
CHEBI_ID
,
MAX_SEARCH_RESULTS_FROM_CHEBI_API
,
LiteEntityList
entities
=
client
.
getLiteEntity
(
id
,
SearchCategory
.
CHEBI_ID
,
MAX_SEARCH_RESULTS_FROM_CHEBI_API
,
StarsCategory
.
ALL
);
StarsCategory
.
ALL
);
List
<
LiteEntity
>
resultList
=
entities
.
getListElement
();
List
<
LiteEntity
>
resultList
=
entities
.
getListElement
();
...
@@ -374,7 +372,7 @@ public class ChebiAnnotator extends ElementAnnotator implements IExternalService
...
@@ -374,7 +372,7 @@ public class ChebiAnnotator extends ElementAnnotator implements IExternalService
setCacheValue
(
"id: "
+
id
,
chebiSerializer
.
objectToString
(
result
));
setCacheValue
(
"id: "
+
id
,
chebiSerializer
.
objectToString
(
result
));
}
}
return
result
;
return
result
;
}
catch
(
ChebiWebServiceFault_
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
ChebiSearchException
(
"Problem with chebi"
,
e
);
throw
new
ChebiSearchException
(
"Problem with chebi"
,
e
);
}
}
}
}
...
@@ -387,7 +385,7 @@ public class ChebiAnnotator extends ElementAnnotator implements IExternalService
...
@@ -387,7 +385,7 @@ public class ChebiAnnotator extends ElementAnnotator implements IExternalService
* identifier): "CHEBI:XXXXX" or "XXXXX"
* identifier): "CHEBI:XXXXX" or "XXXXX"
* @return common name of chemical
* @return common name of chemical
* @throws ChebiSearchException
* @throws ChebiSearchException
* thrown when there is a problem
w
ith accessing information from
* thrown when there is a problem
w
ith accessing information from
* external chebi database
* external chebi database
*/
*/
protected
String
getChebiNameForChebiId
(
MiriamData
id
)
throws
ChebiSearchException
{
protected
String
getChebiNameForChebiId
(
MiriamData
id
)
throws
ChebiSearchException
{
...
...
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