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
8f755e5d
Commit
8f755e5d
authored
8 years ago
by
Mirco Nasuti
Browse files
Options
Downloads
Patches
Plain Diff
bugfix dupplications in models datasets
parent
9bfeeee3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/hbp/mip/controllers/ModelsApi.java
+21
-9
21 additions, 9 deletions
src/main/java/org/hbp/mip/controllers/ModelsApi.java
with
21 additions
and
9 deletions
src/main/java/org/hbp/mip/controllers/ModelsApi.java
+
21
−
9
View file @
8f755e5d
...
...
@@ -183,21 +183,33 @@ public class ModelsApi {
Collection
<
String
>
yAxisVarsColl
=
new
LinkedHashSet
<>(
yAxisVars
);
model
.
getConfig
().
setyAxisVariables
(
new
LinkedList
<>(
yAxisVarsColl
));
List
<
Variable
>
vars
=
queryRepository
.
findOne
(
model
.
getQuery
().
getId
()).
getVariables
();
Collection
<
Variable
>
varsColl
=
new
LinkedHashSet
<>(
vars
);
model
.
getQuery
().
setVariables
(
new
LinkedList
<>(
varsColl
));
List
<
Variable
>
vars
Query
=
queryRepository
.
findOne
(
model
.
getQuery
().
getId
()).
getVariables
();
Collection
<
Variable
>
vars
Query
Coll
=
new
LinkedHashSet
<>(
vars
Query
);
model
.
getQuery
().
setVariables
(
new
LinkedList
<>(
vars
Query
Coll
));
List
<
Variable
>
grpgs
=
queryRepository
.
findOne
(
model
.
getQuery
().
getId
()).
getGrouping
();
Collection
<
Variable
>
grpgsColl
=
new
LinkedHashSet
<>(
grpgs
);
model
.
getQuery
().
setGrouping
(
new
LinkedList
<>(
grpgsColl
));
List
<
Variable
>
grpgs
Query
=
queryRepository
.
findOne
(
model
.
getQuery
().
getId
()).
getGrouping
();
Collection
<
Variable
>
grpgs
Query
Coll
=
new
LinkedHashSet
<>(
grpgs
Query
);
model
.
getQuery
().
setGrouping
(
new
LinkedList
<>(
grpgs
Query
Coll
));
List
<
Variable
>
covars
=
queryRepository
.
findOne
(
model
.
getQuery
().
getId
()).
getCovariables
();
Collection
<
Variable
>
covarsColl
=
new
LinkedHashSet
<>(
covars
);
model
.
getQuery
().
setCovariables
(
new
LinkedList
<>(
covarsColl
));
List
<
Variable
>
covars
Query
=
queryRepository
.
findOne
(
model
.
getQuery
().
getId
()).
getCovariables
();
Collection
<
Variable
>
covars
Query
Coll
=
new
LinkedHashSet
<>(
covars
Query
);
model
.
getQuery
().
setCovariables
(
new
LinkedList
<>(
covars
Query
Coll
));
List
<
Filter
>
fltrs
=
queryRepository
.
findOne
(
model
.
getQuery
().
getId
()).
getFilters
();
Collection
<
Filter
>
fltrsColl
=
new
LinkedHashSet
<>(
fltrs
);
model
.
getQuery
().
setFilters
(
new
LinkedList
<>(
fltrsColl
));
List
<
String
>
varsDS
=
datasetRepository
.
findOne
(
model
.
getDataset
().
getCode
()).
getVariable
();
Collection
<
String
>
varsDSColl
=
new
LinkedHashSet
<>(
varsDS
);
model
.
getDataset
().
setVariable
(
new
LinkedList
<>(
varsDSColl
));
List
<
String
>
grpgsDS
=
datasetRepository
.
findOne
(
model
.
getDataset
().
getCode
()).
getGrouping
();
Collection
<
String
>
grpgsDSColl
=
new
LinkedHashSet
<>(
grpgsDS
);
model
.
getDataset
().
setGrouping
(
new
LinkedList
<>(
grpgsDSColl
));
List
<
String
>
headersDS
=
datasetRepository
.
findOne
(
model
.
getDataset
().
getCode
()).
getHeader
();
Collection
<
String
>
headersDSColl
=
new
LinkedHashSet
<>(
headersDS
);
model
.
getDataset
().
setHeader
(
new
LinkedList
<>(
headersDSColl
));
}
return
new
ResponseEntity
<>(
HttpStatus
.
OK
).
ok
(
model
);
...
...
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