Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
portal-backend
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HBP Medical Informatics Platform
portal-backend
Commits
8e15c041
Commit
8e15c041
authored
6 years ago
by
Manuel Spuhler
Browse files
Options
Downloads
Patches
Plain Diff
Parsing for exareme algorithm
parent
b4d4c302
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/eu/hbp/mip/controllers/ExperimentApi.java
+0
-4
0 additions, 4 deletions
src/main/java/eu/hbp/mip/controllers/ExperimentApi.java
src/main/java/eu/hbp/mip/model/Experiment.java
+14
-5
14 additions, 5 deletions
src/main/java/eu/hbp/mip/model/Experiment.java
with
14 additions
and
9 deletions
src/main/java/eu/hbp/mip/controllers/ExperimentApi.java
+
0
−
4
View file @
8e15c041
...
...
@@ -308,10 +308,6 @@ public class ExperimentApi extends WokenClientController {
experiment
.
setHasServerError
(
true
);
experiment
.
setResult
(
e
.
getMessage
());
}
if
(!
JSONUtil
.
isJSONValid
(
experiment
.
getResult
()))
{
experiment
.
setResult
(
"Unsupported variables !"
);
}
finishExperiment
(
experiment
);
}).
start
();
// << Temporary
...
...
This diff is collapsed.
Click to expand it.
src/main/java/eu/hbp/mip/model/Experiment.java
+
14
−
5
View file @
8e15c041
...
...
@@ -270,6 +270,7 @@ public class Experiment {
ExaremeQueryElement
datasetsEl
=
new
ExaremeQueryElement
();
datasetsEl
.
setName
(
"dataset"
);
datasetsEl
.
setDesc
(
""
);
//datasetsEl.setValue("adni,ppmi,edsd,fbf,clm");
datasetsEl
.
setValue
(
datasets
.
toString
());
queryElements
.
add
(
datasetsEl
);
...
...
@@ -304,15 +305,23 @@ public class Experiment {
}
else
{
JsonArray
jsonArrayResult
=
new
JsonArray
();
JsonObject
jsonObjectResult
=
new
JsonObject
();
exp
.
remove
(
"result"
);
JsonObject
jsonData
=
parser
.
parse
(
this
.
result
).
getAsJsonArray
().
get
(
0
).
getAsJsonObject
();
jsonObjectResult
.
add
(
"data"
,
jsonData
);
JsonObject
algoObject
=
parser
.
parse
(
this
.
algorithms
).
getAsJsonArray
().
get
(
0
).
getAsJsonObject
();
jsonObjectResult
.
add
(
"algorithm"
,
algoObject
.
get
(
"name"
));
jsonObjectResult
.
add
(
"code"
,
algoObject
.
get
(
"code"
));
exp
.
remove
(
"result"
);
JsonObject
tryJson
;
try
{
tryJson
=
parser
.
parse
(
this
.
result
).
getAsJsonArray
().
get
(
0
).
getAsJsonObject
();
}
catch
(
JsonParseException
e
)
{
tryJson
=
new
JsonObject
();
tryJson
.
add
(
"result"
,
new
JsonPrimitive
(
this
.
result
));
}
JsonObject
jsonData
=
tryJson
;
jsonObjectResult
.
add
(
"data"
,
jsonData
);
// add mime-type
String
algo
=
isExaremeAlgorithm
.
_2
;
if
(
jsonData
.
get
(
"Error"
)
!=
null
)
{
...
...
@@ -461,6 +470,6 @@ public class Experiment {
algorithm
=
WP_MODEL_TREE
;
}
return
new
Tuple2
(
isExareme
,
algorithm
);
return
new
Tuple2
<
Boolean
,
String
>
(
isExareme
,
algorithm
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
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