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
9ba7d94d
Commit
9ba7d94d
authored
13 years ago
by
tpylak
Browse files
Options
Downloads
Patches
Plain Diff
fix NPE
SVN: 22190
parent
7ea81cc9
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/WellContentLoader.java
+10
-14
10 additions, 14 deletions
...nbis/plugin/screening/server/logic/WellContentLoader.java
with
10 additions
and
14 deletions
screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/WellContentLoader.java
+
10
−
14
View file @
9ba7d94d
...
@@ -73,6 +73,7 @@ import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellFeatureVec
...
@@ -73,6 +73,7 @@ import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellFeatureVec
import
ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellLocation
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellLocation
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellReplicaImage
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellReplicaImage
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellSearchCriteria
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellSearchCriteria
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellSearchCriteria.AnalysisProcedureCriteria
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellSearchCriteria.ExperimentSearchCriteria
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellSearchCriteria.ExperimentSearchCriteria
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellSearchCriteria.MaterialSearchCodesCriteria
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellSearchCriteria.MaterialSearchCodesCriteria
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellSearchCriteria.MaterialSearchCriteria
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellSearchCriteria.MaterialSearchCriteria
;
...
@@ -357,7 +358,8 @@ public class WellContentLoader extends AbstractContentLoader
...
@@ -357,7 +358,8 @@ public class WellContentLoader extends AbstractContentLoader
{
{
Set
<
PlateIdentifier
>
plates
=
extractPlates
(
locations
);
Set
<
PlateIdentifier
>
plates
=
extractPlates
(
locations
);
// TODO KE: 2011-07-15 add analysis procedure support here
// TODO KE: 2011-07-15 add analysis procedure support here
return
createFeatureVectorDatasetsRetriever
(
plates
,
null
);
return
createFeatureVectorDatasetsRetriever
(
plates
,
AnalysisProcedureCriteria
.
createAllProcedures
());
}
}
private
static
Collection
<
ExternalData
>
selectChildlessImageDatasets
(
private
static
Collection
<
ExternalData
>
selectChildlessImageDatasets
(
...
@@ -743,7 +745,7 @@ public class WellContentLoader extends AbstractContentLoader
...
@@ -743,7 +745,7 @@ public class WellContentLoader extends AbstractContentLoader
SingleExperimentSearchCriteria
experimentOrNull
=
experimentCriteria
.
tryGetExperiment
();
SingleExperimentSearchCriteria
experimentOrNull
=
experimentCriteria
.
tryGetExperiment
();
BasicProjectIdentifier
projectOrNull
=
experimentCriteria
.
tryGetProjectIdentifier
();
BasicProjectIdentifier
projectOrNull
=
experimentCriteria
.
tryGetProjectIdentifier
();
IScreeningQuery
dao
=
create
DAO
();
IScreeningQuery
dao
=
getScreening
DAO
();
if
(
materialSearchCriteria
.
tryGetMaterialCodesOrProperties
()
!=
null
)
if
(
materialSearchCriteria
.
tryGetMaterialCodesOrProperties
()
!=
null
)
{
{
MaterialSearchCodesCriteria
codesCriteria
=
MaterialSearchCodesCriteria
codesCriteria
=
...
@@ -882,7 +884,7 @@ public class WellContentLoader extends AbstractContentLoader
...
@@ -882,7 +884,7 @@ public class WellContentLoader extends AbstractContentLoader
private
List
<
WellContent
>
loadLocations
(
TechId
geneMaterialId
,
TechId
experimentId
)
private
List
<
WellContent
>
loadLocations
(
TechId
geneMaterialId
,
TechId
experimentId
)
{
{
DataIterator
<
WellContentQueryResult
>
locations
=
DataIterator
<
WellContentQueryResult
>
locations
=
create
DAO
().
getPlateLocationsForMaterialId
(
geneMaterialId
.
getId
(),
getScreening
DAO
().
getPlateLocationsForMaterialId
(
geneMaterialId
.
getId
(),
experimentId
.
getId
());
experimentId
.
getId
());
return
convert
(
locations
);
return
convert
(
locations
);
...
@@ -891,23 +893,18 @@ public class WellContentLoader extends AbstractContentLoader
...
@@ -891,23 +893,18 @@ public class WellContentLoader extends AbstractContentLoader
private
List
<
WellContent
>
loadLocations
(
TechId
geneMaterialId
)
private
List
<
WellContent
>
loadLocations
(
TechId
geneMaterialId
)
{
{
DataIterator
<
WellContentQueryResult
>
locations
=
DataIterator
<
WellContentQueryResult
>
locations
=
create
DAO
().
getPlateLocationsForMaterialId
(
geneMaterialId
.
getId
());
getScreening
DAO
().
getPlateLocationsForMaterialId
(
geneMaterialId
.
getId
());
return
convert
(
locations
);
return
convert
(
locations
);
}
}
private
List
<
WellContent
>
loadLocationsForProject
(
TechId
geneMaterialId
,
TechId
projectId
)
private
List
<
WellContent
>
loadLocationsForProject
(
TechId
geneMaterialId
,
TechId
projectId
)
{
{
DataIterator
<
WellContentQueryResult
>
locations
=
DataIterator
<
WellContentQueryResult
>
locations
=
create
DAO
().
getPlateLocationsForMaterialAndProjectIds
(
geneMaterialId
.
getId
(),
getScreening
DAO
().
getPlateLocationsForMaterialAndProjectIds
(
geneMaterialId
.
getId
(),
projectId
.
getId
());
projectId
.
getId
());
return
convert
(
locations
);
return
convert
(
locations
);
}
}
private
IScreeningQuery
createDAO
()
{
return
createDAO
(
daoFactory
);
}
private
List
<
WellContent
>
convert
(
Iterable
<
WellContentQueryResult
>
queryResults
)
private
List
<
WellContent
>
convert
(
Iterable
<
WellContentQueryResult
>
queryResults
)
{
{
List
<
WellContent
>
wellContents
=
convertAndRemoveDuplicateWells
(
queryResults
);
List
<
WellContent
>
wellContents
=
convertAndRemoveDuplicateWells
(
queryResults
);
...
@@ -955,16 +952,15 @@ public class WellContentLoader extends AbstractContentLoader
...
@@ -955,16 +952,15 @@ public class WellContentLoader extends AbstractContentLoader
private
static
WellContent
convert
(
WellContentQueryResult
well
)
private
static
WellContent
convert
(
WellContentQueryResult
well
)
{
{
WellLocation
location
=
ScreeningUtils
.
tryCreateLocationFromMatrixCoordinate
(
well
.
well_code
);
EntityReference
wellReference
=
EntityReference
wellReference
=
new
EntityReference
(
well
.
well_id
,
well
.
well_code
,
well
.
well_type_code
,
new
EntityReference
(
well
.
well_id
,
well
.
well_code
,
well
.
well_type_code
,
EntityKind
.
SAMPLE
,
well
.
well_perm_id
);
EntityKind
.
SAMPLE
,
well
.
well_perm_id
);
EntityReference
plate
=
EntityReference
plate
=
new
EntityReference
(
well
.
plate_id
,
well
.
plate_code
,
well
.
plate_type_code
,
new
EntityReference
(
well
.
plate_id
,
well
.
plate_code
,
well
.
plate_type_code
,
EntityKind
.
SAMPLE
,
well
.
p
late
_p
erm
_id
);
EntityKind
.
SAMPLE
,
well
.
getP
late
P
erm
Id
()
);
return
new
WellContent
(
location
,
wellReference
,
plate
,
convertExperiment
(
well
));
WellLocation
wellLocation
=
well
.
getWellReference
().
getWellLocation
();
return
new
WellContent
(
wellLocation
,
wellReference
,
plate
,
convertExperiment
(
well
));
}
}
private
static
ExperimentReference
convertExperiment
(
WellContentQueryResult
loc
)
private
static
ExperimentReference
convertExperiment
(
WellContentQueryResult
loc
)
...
...
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