Skip to content
Snippets Groups Projects
Commit 16252e59 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- fixed warnings

parent 41d96a4b
No related branches found
No related tags found
No related merge requests found
......@@ -69,10 +69,10 @@ public class SLUBTechnicalMetadataExtractorMediaConchPlugin implements MDExtract
private final static String MEDIAINFO_XSD = "/transformer.xsl";
private List<String> extractionErrors = new ArrayList<>();
private List<String> validationLog = new ArrayList<>();
private final List<String> validationLog = new ArrayList<>();
private boolean isvalid = false;
private boolean iswellformed = false;
private Map<String,String> attributes = new HashMap<>();
private final Map<String,String> attributes = new HashMap<>();
//static final ExLogger log = ExLogger.getExLogger(SLUBTechnicalMetadataExtractorMediaConchPlugin.class, ExLogger.VALIDATIONSTACK);
/** constructor */
......@@ -150,7 +150,7 @@ public class SLUBTechnicalMetadataExtractorMediaConchPlugin implements MDExtract
//mediainfo_output.append(line);
line = reader.readLine();
}
reader.close();
File temp_media_outputfile = File.createTempFile("mediainfo_outp", ".xml");
temp_media_outputfile.deleteOnExit();
File temp_media_transformed_outputfile = File.createTempFile("mediainfo_transf_", ".xml");
......@@ -235,6 +235,7 @@ public class SLUBTechnicalMetadataExtractorMediaConchPlugin implements MDExtract
validationLog.add(line);
line = reader.readLine();
}
reader.close();
extractionErrors = validationLog;
}
......@@ -272,18 +273,19 @@ public class SLUBTechnicalMetadataExtractorMediaConchPlugin implements MDExtract
String line = null;
try {
line = reader.readLine();
while (line != null) {
System.out.println(line);
response.append(line);
try {
line = reader.readLine();
} catch (IOException e) {
e.printStackTrace();
}
}
reader.close();
} catch (IOException e) {
e.printStackTrace();
}
while (line != null) {
System.out.println(line);
response.append(line);
try {
line = reader.readLine();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
return response.toString().trim();
......@@ -491,8 +493,9 @@ public class SLUBTechnicalMetadataExtractorMediaConchPlugin implements MDExtract
System.out.println( plugin.getProfile());
System.out.println("----------------------------------");
System.out.println("getAttributeByName (summarized):");
for (Map.Entry m: plugin.attributes.entrySet()) {
System.out.println( m.getKey() + " -> " + m.getValue());
for (Map.Entry<String, String> m : plugin.attributes.entrySet()) {
String s = m.getKey() + " -> " + m.getValue();
System.out.println(s);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment