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
38b8799a
Commit
38b8799a
authored
8 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-3679: Bug fixed: NPE if data set is not linked to an experiment.
SVN: 36792
parent
302397a7
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
datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/TemplateBasedLinkNamingStrategy.java
+5
-9
5 additions, 9 deletions
...sd/etlserver/plugins/TemplateBasedLinkNamingStrategy.java
with
5 additions
and
9 deletions
datastore_server/source/java/ch/systemsx/cisd/etlserver/plugins/TemplateBasedLinkNamingStrategy.java
+
5
−
9
View file @
38b8799a
...
@@ -23,15 +23,13 @@ import java.util.Properties;
...
@@ -23,15 +23,13 @@ import java.util.Properties;
import
java.util.Set
;
import
java.util.Set
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.log4j.Logger
;
import
ch.rinn.restrictions.Private
;
import
ch.rinn.restrictions.Private
;
import
ch.systemsx.cisd.common.filesystem.FileUtilities
;
import
ch.systemsx.cisd.common.filesystem.FileUtilities
;
import
ch.systemsx.cisd.common.logging.LogCategory
;
import
ch.systemsx.cisd.common.logging.LogFactory
;
import
ch.systemsx.cisd.common.properties.ExtendedProperties
;
import
ch.systemsx.cisd.common.properties.ExtendedProperties
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.AbstractExternalData
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.AbstractExternalData
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.ContainerDataSet
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.ContainerDataSet
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.Experiment
;
import
ch.systemsx.cisd.openbis.generic.shared.dto.SimpleDataSetInformationDTO
;
import
ch.systemsx.cisd.openbis.generic.shared.dto.SimpleDataSetInformationDTO
;
/**
/**
...
@@ -41,10 +39,6 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.SimpleDataSetInformationDTO;
...
@@ -41,10 +39,6 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.SimpleDataSetInformationDTO;
*/
*/
public
class
TemplateBasedLinkNamingStrategy
implements
IHierarchicalStorageLinkNamingStrategy
public
class
TemplateBasedLinkNamingStrategy
implements
IHierarchicalStorageLinkNamingStrategy
{
{
private
static
final
Logger
operationLog
=
LogFactory
.
getLogger
(
LogCategory
.
OPERATION
,
TemplateBasedLinkNamingStrategy
.
class
);
public
static
final
String
DEFAULT_LINK_TEMPLATE
=
public
static
final
String
DEFAULT_LINK_TEMPLATE
=
"${space}/${project}/${experiment}/${dataSetType}+${sample}+${dataSet}"
;
"${space}/${project}/${experiment}/${dataSetType}+${sample}+${dataSet}"
;
...
@@ -194,7 +188,8 @@ public class TemplateBasedLinkNamingStrategy implements IHierarchicalStorageLink
...
@@ -194,7 +188,8 @@ public class TemplateBasedLinkNamingStrategy implements IHierarchicalStorageLink
@Override
@Override
String
extractValueFromData
(
AbstractExternalData
data
,
ContainerDataSet
container
)
String
extractValueFromData
(
AbstractExternalData
data
,
ContainerDataSet
container
)
{
{
return
getPathElement
(
data
.
getExperiment
().
getCode
());
Experiment
experiment
=
data
.
getExperiment
();
return
getPathElement
(
experiment
==
null
?
null
:
experiment
.
getCode
());
}
}
},
},
...
@@ -203,7 +198,8 @@ public class TemplateBasedLinkNamingStrategy implements IHierarchicalStorageLink
...
@@ -203,7 +198,8 @@ public class TemplateBasedLinkNamingStrategy implements IHierarchicalStorageLink
@Override
@Override
String
extractValueFromData
(
AbstractExternalData
data
,
ContainerDataSet
container
)
String
extractValueFromData
(
AbstractExternalData
data
,
ContainerDataSet
container
)
{
{
return
getPathElement
(
data
.
getExperiment
().
getProject
().
getCode
());
Experiment
experiment
=
data
.
getExperiment
();
return
getPathElement
(
experiment
==
null
?
null
:
experiment
.
getProject
().
getCode
());
}
}
},
},
...
...
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