Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
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
sispub
openbis
Commits
8c8b5eb9
Commit
8c8b5eb9
authored
14 years ago
by
brinn
Browse files
Options
Downloads
Patches
Plain Diff
add: query IScreeningQuery.getPlateLocationsForMaterialId(materialId) independent of the experiment
SVN: 17316
parent
4fb6bd69
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/GenePlateLocationsLoader.java
+65
-1
65 additions, 1 deletion
...ugin/screening/server/logic/GenePlateLocationsLoader.java
with
65 additions
and
1 deletion
screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/GenePlateLocationsLoader.java
+
65
−
1
View file @
8c8b5eb9
...
...
@@ -39,6 +39,9 @@ import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDAOFactory;
import
ch.systemsx.cisd.openbis.generic.shared.basic.TechId
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityReference
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.Experiment
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.Project
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.Space
;
import
ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE
;
import
ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE
;
import
ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE
;
...
...
@@ -53,6 +56,7 @@ import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.PlateImagePara
import
ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.PlateMaterialsSearchCriteria
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.ScreeningConstants
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellContent
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellContentWithExperiment
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellLocation
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.imaging.IHCSDatasetLoader
;
...
...
@@ -79,6 +83,14 @@ public class GenePlateLocationsLoader
.
getPlateLocations
(
geneMaterialId
,
experimentPermId
,
enrichWithImages
);
}
public
static
List
<
WellContentWithExperiment
>
load
(
Session
session
,
IScreeningBusinessObjectFactory
businessObjectFactory
,
IDAOFactory
daoFactory
,
TechId
geneMaterialId
)
{
return
new
GenePlateLocationsLoader
(
session
,
businessObjectFactory
,
daoFactory
)
.
getPlateLocations
(
geneMaterialId
);
}
public
static
List
<
WellContent
>
load
(
Session
session
,
IScreeningBusinessObjectFactory
businessObjectFactory
,
IDAOFactory
daoFactory
,
PlateMaterialsSearchCriteria
materialCriteria
,
boolean
enrichWithImages
)
...
...
@@ -134,6 +146,12 @@ public class GenePlateLocationsLoader
}
}
private
List
<
WellContentWithExperiment
>
getPlateLocations
(
TechId
geneMaterialId
)
{
List
<
WellContentWithExperiment
>
locations
=
loadLocations
(
geneMaterialId
);
return
locations
;
}
private
List
<
WellContent
>
getPlateLocations
(
TechId
geneMaterialId
,
ExperimentIdentifier
experimentIdentifier
,
boolean
enrichWithImages
)
{
...
...
@@ -345,6 +363,14 @@ public class GenePlateLocationsLoader
return
convert
(
locations
);
}
private
List
<
WellContentWithExperiment
>
loadLocations
(
TechId
geneMaterialId
)
{
DataIterator
<
ch
.
systemsx
.
cisd
.
openbis
.
plugin
.
screening
.
server
.
dataaccess
.
WellContent
>
locations
=
createDAO
(
daoFactory
).
getPlateLocationsForMaterialId
(
geneMaterialId
.
getId
());
return
convertWithExp
(
locations
);
}
private
List
<
WellContent
>
loadLocations
(
TechId
geneMaterialId
,
ExperimentIdentifier
experimentIdentifier
)
{
...
...
@@ -369,7 +395,19 @@ public class GenePlateLocationsLoader
return
wellLocations
;
}
private
static
void
sortByMaterialName
(
List
<
WellContent
>
wellLocations
)
private
List
<
WellContentWithExperiment
>
convertWithExp
(
DataIterator
<
ch
.
systemsx
.
cisd
.
openbis
.
plugin
.
screening
.
server
.
dataaccess
.
WellContent
>
locations
)
{
List
<
WellContentWithExperiment
>
wellLocations
=
new
ArrayList
<
WellContentWithExperiment
>();
for
(
ch
.
systemsx
.
cisd
.
openbis
.
plugin
.
screening
.
server
.
dataaccess
.
WellContent
location
:
locations
)
{
wellLocations
.
add
(
convertWithExp
(
location
));
}
sortByMaterialName
(
wellLocations
);
return
wellLocations
;
}
private
static
void
sortByMaterialName
(
List
<?
extends
WellContent
>
wellLocations
)
{
Collections
.
sort
(
wellLocations
,
new
Comparator
<
WellContent
>()
{
...
...
@@ -398,6 +436,32 @@ public class GenePlateLocationsLoader
return
new
WellContent
(
location
,
well
,
plate
,
materialContent
);
}
private
static
WellContentWithExperiment
convertWithExp
(
ch
.
systemsx
.
cisd
.
openbis
.
plugin
.
screening
.
server
.
dataaccess
.
WellContent
loc
)
{
final
WellLocation
location
=
ScreeningUtils
.
tryCreateLocationFromMatrixCoordinate
(
loc
.
well_code
);
final
EntityReference
well
=
new
EntityReference
(
loc
.
well_id
,
loc
.
well_code
,
loc
.
well_type_code
,
EntityKind
.
SAMPLE
,
loc
.
well_perm_id
);
final
EntityReference
plate
=
new
EntityReference
(
loc
.
plate_id
,
loc
.
plate_code
,
loc
.
plate_type_code
,
EntityKind
.
SAMPLE
,
loc
.
plate_perm_id
);
final
EntityReference
materialContent
=
new
EntityReference
(
loc
.
material_content_id
,
loc
.
material_content_code
,
loc
.
material_content_type_code
,
EntityKind
.
MATERIAL
,
null
);
final
Space
space
=
new
Space
();
space
.
setCode
(
loc
.
space_code
);
final
Project
project
=
new
Project
();
project
.
setSpace
(
space
);
project
.
setCode
(
loc
.
proj_code
);
final
Experiment
experiment
=
new
Experiment
();
experiment
.
setId
(
loc
.
exp_id
);
experiment
.
setCode
(
loc
.
exp_code
);
experiment
.
setPermId
(
loc
.
exp_perm_id
);
experiment
.
setProject
(
project
);
return
new
WellContentWithExperiment
(
location
,
well
,
plate
,
materialContent
,
experiment
);
}
private
static
IScreeningQuery
createDAO
(
IDAOFactory
daoFactory
)
{
Connection
connection
=
DatabaseContextUtils
.
getConnection
(
daoFactory
);
...
...
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