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
66792c9a
Commit
66792c9a
authored
12 years ago
by
gpawel
Browse files
Options
Downloads
Patches
Plain Diff
add a log message helping to trace broken images
SVN: 24979
parent
dfc943d6
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
screening/source/java/ch/systemsx/cisd/openbis/dss/etl/Utils.java
+17
-4
17 additions, 4 deletions
...g/source/java/ch/systemsx/cisd/openbis/dss/etl/Utils.java
with
17 additions
and
4 deletions
screening/source/java/ch/systemsx/cisd/openbis/dss/etl/Utils.java
+
17
−
4
View file @
66792c9a
...
...
@@ -19,18 +19,23 @@ package ch.systemsx.cisd.openbis.dss.etl;
import
java.awt.Dimension
;
import
java.awt.image.BufferedImage
;
import
org.apache.log4j.Logger
;
import
ch.systemsx.cisd.common.io.hierarchical_content.api.IHierarchicalContentNode
;
import
ch.systemsx.cisd.common.logging.LogCategory
;
import
ch.systemsx.cisd.common.logging.LogFactory
;
import
ch.systemsx.cisd.openbis.dss.etl.dto.ImageLibraryInfo
;
import
ch.systemsx.cisd.openbis.dss.generic.shared.dto.Size
;
import
ch.systemsx.cisd.openbis.dss.generic.shared.utils.ImageUtil
;
/**
* Collection of helper functions.
*
*
* @author Franz-Josef Elmer
*/
public
class
Utils
{
final
static
Logger
operationLog
=
LogFactory
.
getLogger
(
LogCategory
.
OPERATION
,
ImageUtil
.
class
);
public
static
BufferedImage
loadUnchangedImage
(
IHierarchicalContentNode
contentNode
,
String
imageIdOrNull
,
ImageLibraryInfo
imageLibraryOrNull
)
...
...
@@ -49,6 +54,14 @@ public class Utils
public
static
Size
loadUnchangedImageSize
(
IHierarchicalContentNode
contentNode
,
String
imageIdOrNull
,
ImageLibraryInfo
imageLibraryOrNull
)
{
try
{
operationLog
.
debug
(
"Trying to process file: "
+
contentNode
.
getRelativePath
());
}
catch
(
Exception
e
)
{
// do nothing
}
String
imageLibraryNameOrNull
=
null
;
String
imageLibraryReaderNameOrNull
=
null
;
if
(
imageLibraryOrNull
!=
null
)
...
...
@@ -56,9 +69,9 @@ public class Utils
imageLibraryNameOrNull
=
imageLibraryOrNull
.
getName
();
imageLibraryReaderNameOrNull
=
imageLibraryOrNull
.
getReaderName
();
}
Dimension
dimension
=
ImageUtil
.
loadUnchangedImageDimension
(
contentNode
,
imageIdOrNull
,
imageLibraryNameOrNull
,
imageLibraryReaderNameOrNull
);
Dimension
dimension
=
ImageUtil
.
loadUnchangedImageDimension
(
contentNode
,
imageIdOrNull
,
imageLibraryNameOrNull
,
imageLibraryReaderNameOrNull
);
return
new
Size
(
dimension
.
width
,
dimension
.
height
);
}
}
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