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
1a544235
Commit
1a544235
authored
15 years ago
by
tpylak
Browse files
Options
Downloads
Patches
Plain Diff
LMS-1192 BatchDataSetHandler needs to support data sets without sample
SVN: 13318
parent
0c0c04bc
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
rtd_yeastx/source/java/ch/systemsx/cisd/yeastx/etl/DatasetMappingResolver.java
+17
-9
17 additions, 9 deletions
...a/ch/systemsx/cisd/yeastx/etl/DatasetMappingResolver.java
with
17 additions
and
9 deletions
rtd_yeastx/source/java/ch/systemsx/cisd/yeastx/etl/DatasetMappingResolver.java
+
17
−
9
View file @
1a544235
...
@@ -21,6 +21,7 @@ import java.util.Properties;
...
@@ -21,6 +21,7 @@ import java.util.Properties;
import
org.apache.commons.io.FilenameUtils
;
import
org.apache.commons.io.FilenameUtils
;
import
ch.systemsx.cisd.bds.StringUtils
;
import
ch.systemsx.cisd.common.collections.CollectionUtils
;
import
ch.systemsx.cisd.common.collections.CollectionUtils
;
import
ch.systemsx.cisd.common.exceptions.EnvironmentFailureException
;
import
ch.systemsx.cisd.common.exceptions.EnvironmentFailureException
;
import
ch.systemsx.cisd.common.exceptions.UserFailureException
;
import
ch.systemsx.cisd.common.exceptions.UserFailureException
;
...
@@ -214,22 +215,29 @@ class DatasetMappingResolver
...
@@ -214,22 +215,29 @@ class DatasetMappingResolver
{
{
return
false
;
return
false
;
}
}
String
sampleCode
=
tryFigureSampleCode
(
mapping
,
log
);
ExperimentIdentifier
experimentIdentifier
=
tryFigureExperimentIdentifier
(
mapping
);
ExperimentIdentifier
experimentIdentifier
=
tryFigureExperimentIdentifier
(
mapping
);
if
(
mapping
.
getSampleCodeOrLabel
()
==
null
&&
experimentIdentifier
==
null
)
{
log
.
datasetMappingError
(
mapping
,
"neither sample nor experiment has been specified."
);
return
false
;
}
String
sampleCode
=
tryFigureSampleCode
(
mapping
,
log
);
if
(
sampleCode
==
null
)
if
(
sampleCode
==
null
)
{
{
// sample can be skipped only if experiment identifier is supplied
if
(
mapping
.
getSampleCodeOrLabel
()
!=
null
)
if
(
experimentIdentifier
==
null
)
{
{
log
.
datasetMappingError
(
mapping
,
return
false
;
// error has been already reported
"neither sample nor experiment has been specified."
);
return
false
;
}
else
{
return
experimentExists
(
mapping
,
log
,
experimentIdentifier
);
}
}
assert
experimentIdentifier
!=
null
:
"experimentIdentifier should be not null here"
;
return
experimentExists
(
mapping
,
log
,
experimentIdentifier
);
}
else
}
else
{
{
if
(
StringUtils
.
isBlank
(
mapping
.
getParentDataSetCodes
())
==
false
)
{
log
.
datasetMappingError
(
mapping
,
"when dataset is connected to a sample it cannot have parent datasets."
);
return
false
;
}
return
sampleExistsAndBelongsToExperiment
(
mapping
,
log
,
sampleCode
);
return
sampleExistsAndBelongsToExperiment
(
mapping
,
log
,
sampleCode
);
}
}
}
}
...
...
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