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
9b177c3a
Commit
9b177c3a
authored
6 years ago
by
juanf
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-7235 : Continuous samples code, project samples support
parent
e92f5d48
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
openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/parser/SampleUploadSectionsParser.java
+15
-4
15 additions, 4 deletions
...bis/generic/shared/parser/SampleUploadSectionsParser.java
with
15 additions
and
4 deletions
openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/parser/SampleUploadSectionsParser.java
+
15
−
4
View file @
9b177c3a
...
...
@@ -25,8 +25,6 @@ import java.util.Map;
import
org.apache.commons.lang.StringUtils
;
import
ch.ethz.sis.openbis.generic.asapi.v3.dto.project.id.ProjectIdentifier
;
import
ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.id.SampleIdentifier
;
import
ch.systemsx.cisd.common.io.DelegatedReader
;
import
ch.systemsx.cisd.common.parser.ExcelFileLoader
;
import
ch.systemsx.cisd.common.parser.IParserObjectFactory
;
...
...
@@ -363,11 +361,24 @@ public class SampleUploadSectionsParser
String
[]
experimentIdentifierParts
=
newSamples
.
get
(
i
).
getExperimentIdentifier
().
split
(
"/"
);
projectCodeOrNull
=
experimentIdentifierParts
[
experimentIdentifierParts
.
length
-
2
];
}
SampleIdentifier
identifier
=
new
SampleIdentifier
(
spaceCodeOrNull
,
projectCodeOrNull
,
null
,
codes
.
get
(
i
));
newSamples
.
get
(
i
).
setIdentifier
(
identifier
.
getIdentifier
());
newSamples
.
get
(
i
).
setIdentifier
(
createIdentifier
(
spaceCodeOrNull
,
projectCodeOrNull
,
codes
.
get
(
i
)));
}
}
}
private
static
String
createIdentifier
(
String
spaceCodeOrNull
,
String
projectCodeOrNull
,
String
sampleCode
)
{
StringBuilder
builder
=
new
StringBuilder
(
"/"
);
if
(
spaceCodeOrNull
!=
null
)
{
builder
.
append
(
spaceCodeOrNull
).
append
(
"/"
);
}
if
(
projectCodeOrNull
!=
null
)
{
builder
.
append
(
projectCodeOrNull
).
append
(
"/"
);
}
return
builder
.
append
(
sampleCode
).
toString
();
}
private
static
void
fillIdentifiers
(
String
defaultGroupIdentifier
,
List
<
NewSamplesWithTypes
>
newSamplesWithTypes
)
...
...
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