Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mediaconch_plugin4rosetta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
mediaconch_plugin4rosetta
Commits
9669284c
Commit
9669284c
authored
2 years ago
by
Andreas Romeyke
Browse files
Options
Downloads
Patches
Plain Diff
- reenabled logging
parent
7d802028
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
java/org/slub/rosetta/dps/repository/plugin/SLUBMatroskaFFV1FormatValidationPlugin.java
+11
-6
11 additions, 6 deletions
...sitory/plugin/SLUBMatroskaFFV1FormatValidationPlugin.java
with
11 additions
and
6 deletions
java/org/slub/rosetta/dps/repository/plugin/SLUBMatroskaFFV1FormatValidationPlugin.java
+
11
−
6
View file @
9669284c
...
...
@@ -79,7 +79,11 @@ public class SLUBMatroskaFFV1FormatValidationPlugin implements FormatValidationP
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
// TODO: log.info();
log
.
info
(
"SLUBMatroskaFFV1FormatValidationPlgin instantiated with"
+
" meduaconch binary="
+
mediaconch_binary_path
+
"cfg (current)="
+
mediaconch_current_profile_path
+
"cfg (upcoming)="
+
mediaconch_upcoming_profile_path
);
}
@Override
...
...
@@ -102,7 +106,7 @@ public class SLUBMatroskaFFV1FormatValidationPlugin implements FormatValidationP
private
void
callMediaconch
(
String
filePath
,
String
profilePath
)
{
String
execstring
=
this
.
mediaconch_binary_path
+
" "
+
filePath
+
" -p "
+
profilePath
;
System
.
out
.
println
(
"executing: "
+
execstring
);
log
.
info
(
"executing: "
+
execstring
);
InputStreamReader
process_out
;
try
{
Process
p
=
Runtime
.
getRuntime
().
exec
(
execstring
);
...
...
@@ -124,13 +128,14 @@ public class SLUBMatroskaFFV1FormatValidationPlugin implements FormatValidationP
System
.
out
.
println
(
"MEDIACONCH line: "
+
line
);
validationLog
.
add
(
line
);
line
=
reader
.
readLine
();
log
.
info
(
line
);
}
reader
.
close
();
}
catch
(
IOException
e
)
{
//
log.error("exception creation socket, clamd not available at host=" + host + "port=" + port, e);
log
.
error
(
"exception creation socket, clamd not available at host="
+
host
+
"port="
+
port
,
e
);
System
.
out
.
println
(
"ERROR: (actual) mediaconch not available, path="
+
this
.
mediaconch_binary_path
+
", "
+
e
.
getMessage
());
}
catch
(
InterruptedException
e
)
{
System
.
out
.
println
(
"ERROR: call of mediaconch interrupted, path="
+
this
.
mediaconch_binary_path
+
", "
+
e
.
getMessage
());
log
.
error
(
"ERROR: call of mediaconch interrupted, path="
+
this
.
mediaconch_binary_path
+
", "
+
e
.
getMessage
());
}
}
...
...
@@ -199,14 +204,14 @@ public class SLUBMatroskaFFV1FormatValidationPlugin implements FormatValidationP
@Override
public
final
boolean
isValid
()
{
//System.out.println("DEBUG:
is valid=" + this.isvalid);
log
.
debug
(
"
is valid="
+
this
.
isvalid
);
return
this
.
isvalid
;
}
private
void
checkFileExists
(
String
filename
)
throws
Exception
{
File
f
=
new
File
(
filename
);
if
(!
f
.
exists
()
)
{
System
.
out
.
println
(
"ERROR:
path="
+
filename
+
" not available"
);
log
.
error
(
"
path="
+
filename
+
" not available"
);
throw
new
Exception
(
"ERROR: path="
+
filename
+
" not available"
);
}
}
...
...
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