Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
StoragePlugin4Rosetta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
StoragePlugin4Rosetta
Commits
290a6426
Commit
290a6426
authored
10 years ago
by
Andreas Romeyke
Browse files
Options
Downloads
Patches
Plain Diff
- added more debugging info to track a nullpointer error in code copied from
NFSStorage Plugin
parent
06517d6d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
PLUGIN-INF/metadata_SLUBStoragepPlugin.xml
+2
-2
2 additions, 2 deletions
PLUGIN-INF/metadata_SLUBStoragepPlugin.xml
java/org/slub/rosetta/dps/repository/plugin/storage/nfs/SLUBStoragePlugin.java
+16
-0
16 additions, 0 deletions
.../dps/repository/plugin/storage/nfs/SLUBStoragePlugin.java
with
18 additions
and
2 deletions
PLUGIN-INF/metadata_SLUBStoragepPlugin.xml
+
2
−
2
View file @
290a6426
...
...
@@ -6,7 +6,7 @@
<fr:x_form
xmlns:fr=
"http://com/exlibris/digitool/common/forms/xmlbeans"
>
<form_name>
SLUBStoragePlugin_Params
</form_name>
<description>
SLUBTreeStoragePlugin_parameters_form
</description>
<version>
0.2
</version>
<version>
1.0
</version>
<grid_x>
1
</grid_x>
<md_format>
1
</md_format>
<x_fields>
...
...
@@ -70,7 +70,7 @@
</fr:x_form>
</pl:initParameters>
<pl:description>
SLUB Storage Plugin
</pl:description>
<pl:version>
2.
5
</pl:version>
<pl:version>
2.
801
</pl:version>
<pl:materialType>
DIGITAL
</pl:materialType>
<pl:module>
Repository
</pl:module>
<pl:generalType>
TASK
</pl:generalType>
...
...
This diff is collapsed.
Click to expand it.
java/org/slub/rosetta/dps/repository/plugin/storage/nfs/SLUBStoragePlugin.java
+
16
−
0
View file @
290a6426
...
...
@@ -91,26 +91,35 @@ public class SLUBStoragePlugin extends AbstractStorageHandler {
fixity
.
setResult
(
null
);
if
(
Fixity
.
FixityAlgorithm
.
MD5
.
toString
().
equals
(
fixity
.
getAlgorithm
()))
{
log
.
info
(
"SLUBStoragePlugin.checkFixity() calcMD5=true"
);
calcMD5
=
true
;
}
else
if
(
Fixity
.
FixityAlgorithm
.
SHA1
.
toString
().
equals
(
fixity
.
getAlgorithm
()))
{
log
.
info
(
"SLUBStoragePlugin.checkFixity() calcSHA1=true"
);
calcSHA1
=
true
;
}
else
if
(
Fixity
.
FixityAlgorithm
.
CRC32
.
toString
().
equals
(
fixity
.
getAlgorithm
()))
{
log
.
info
(
"SLUBStoragePlugin.checkFixity() calcCRC32=true"
);
calcCRC32
=
true
;
}
else
{
log
.
info
(
"SLUBStoragePlugin.checkFixity() another fixity"
);
log
.
info
(
"SLUBStoragePlugin.checkFixity() pluginname="
+
fixity
.
getPluginName
());
String
oldValue
=
fixity
.
getValue
();
log
.
info
(
"SLUBStoragePlugin.checkFixity() oldvalue="
+
oldValue
);
fixity
.
setValue
(
getChecksumUsingPlugin
(
isRelativePath
?
getLocalFilePath
(
storedEntityIdentifier
)
:
storedEntityIdentifier
,
fixity
.
getPluginName
(),
oldValue
));
fixity
.
setResult
(
Boolean
.
valueOf
((
oldValue
==
null
)
||
(
oldValue
.
equals
(
fixity
.
getValue
()))));
log
.
info
(
"SLUBStoragePlugin.checkFixity() newvalue="
+
fixity
.
getValue
());
result
&=
fixity
.
getResult
().
booleanValue
();
log
.
info
(
"SLUBStoragePlugin.checkFixity() result="
+
result
);
}
}
if
((
calcMD5
)
||
(
calcSHA1
)
||
(
calcCRC32
))
{
log
.
info
(
"SLUBStoragePlugin.checkFixity() calcMD5|calcSHA1|calcCRC32=true"
);
InputStream
is
=
null
;
try
{
...
...
@@ -121,16 +130,23 @@ public class SLUBStoragePlugin extends AbstractStorageHandler {
int
checksummerAlgorithmIndex
=
getChecksummerAlgorithmIndex
(
fixity
.
getAlgorithm
());
if
(
checksummerAlgorithmIndex
!=
-
1
)
{
log
.
info
(
"SLUBStoragePlugin.checkFixity() checksummerAlgorithmIndex="
+
checksummerAlgorithmIndex
);
String
oldValue
=
fixity
.
getValue
();
log
.
info
(
"SLUBStoragePlugin.checkFixity() getAlgorithm="
+
fixity
.
getAlgorithm
());
log
.
info
(
"SLUBStoragePlugin.checkFixity() oldvalue="
+
oldValue
);
fixity
.
setValue
(
checksummer
.
getChecksum
(
fixity
.
getAlgorithm
()));
log
.
info
(
"SLUBStoragePlugin.checkFixity() newvalue="
+
fixity
.
getValue
());
fixity
.
setResult
(
Boolean
.
valueOf
((
oldValue
==
null
)
||
(
oldValue
.
equalsIgnoreCase
(
fixity
.
getValue
()))));
result
&=
fixity
.
getResult
().
booleanValue
();
log
.
info
(
"SLUBStoragePlugin.checkFixity() result="
+
result
);
}
}
}
finally
{
log
.
info
(
"SLUBStoragePlugin.checkFixity() finally called"
);
if
(
is
!=
null
)
{
log
.
info
(
"SLUBStoragePlugin.checkFixity()is closed"
);
is
.
close
();
}
}
...
...
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