Skip to content

Commit

Permalink
Merge branch 'integration' into Update-PalleteBox.java-for-issue-#573
Browse files Browse the repository at this point in the history
  • Loading branch information
carlwilson authored Apr 6, 2022
2 parents dcf152b + 2d6c519 commit 383c0df
Show file tree
Hide file tree
Showing 60 changed files with 832 additions and 489 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ release.properties
Gemfile.lock

# Ignore Test Root
# /test-root/
/test-root/

# Ignore Eclipse artefacts
**/.settings
Expand All @@ -20,3 +20,7 @@ Gemfile.lock
**/bin
# Ignore VisualCode artefacts
**/.vscode

# Ignore IntelliJ
.idea
*.iml
30 changes: 22 additions & 8 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ Versions 1.12 onwards released by the Open Preservation Foundation.

JHOVE 1.24
-------------
2020-03-02
2020-03-12

### General

- Added a JSON output handler [[#515][]]
- Fixed compatability issues for JDK 9 and greater [[#514][]]
- Fixed compatibility issues for JDK 9 and greater [[#514][]]
- SHA-256 Checksumming [[#497][], [#386][]]
- Error ID node for GUI message display [[#546][]]
- Improved formatting of error IDs by text handler [[#547][]]
Expand All @@ -30,27 +30,33 @@ JHOVE 1.24
### Error Message Translations

- German error message translations [[#461][], [#462][], [#463][], [#464][], [#467][]]
- Portuguese error message translations [[#490][], [#491][], [#492][], [#493][], [#496][]]
- Portuguese error message translations [[#490][], [#491][], [#492][], [#493][], [#496][], [#557][]]
- Dutch error message translations [[#503][], [#550][]]
- Danish error message translations [[#551][]]
- French error message translations [[#552][]]

### AIFF Module

- Check that chunk IDs only consist of characters in the printable ASCII range [[#468][]]
- Check that spaces do not precede printable characters in chunk IDs [[#468][]]
- Clarified error messages and improved offset reporting accuracy [[#468][]]

### EPUB Module

- New EPUB validation module `EPUB-ptc` plus tests and examples [[#460][]]
- Module documentation [[#466][]]

### GIF Module

- Update gif Error.Message properties for Control Extensions [[#513][]]
- Update error message properties for Control Extensions [[#513][]]

### JPEG Module

- Enhanced to handle the APP14 marker segment [[#518][]]

### JPEG2000 Module
### JPEG 2000 Module

- Enhancements to MIX format medatata [[#445][]]
- Enhancements to MIX format metadata [[#445][]]

### PNG Module

Expand All @@ -68,8 +74,15 @@ JHOVE 1.24

### WAVE Module

- WAVE / IFF: Accurate file offsets and new validation checks [[#468][]]
- Documentation or missing chunks and additional references [[#501][]]
- Check that chunk IDs only consist of characters in the printable ASCII range [[#468][]]
- Check that spaces do not precede printable characters in chunk IDs [[#468][]]
- Clarified error messages and greatly improved offset reporting accuracy [[#468][]]
- Added reporting of unrecognized data in the top-level RIFF structure [[#468][]]
- Made the Table Length field of `ds64` chunks optional to better align with the specification [[#468][]]
- Reinstated WAVE-HUL-4 reporting which had been lost during refactoring [[#468][]]
- Corrected WAVE-HUL-15 from an Error to an Informational message [[#468][]]
- Retired WAVE-HUL-16, an unused duplicate of WAVE-HUL-19 [[#468][]]
- Documented undocumented chunks and specification references [[#501][]]

### WARC Module

Expand Down Expand Up @@ -134,6 +147,7 @@ JHOVE 1.24
[#550]: https://github.com/openpreserve/jhove/pull/550
[#551]: https://github.com/openpreserve/jhove/pull/551
[#552]: https://github.com/openpreserve/jhove/pull/552
[#557]: https://github.com/openpreserve/jhove/pull/557

JHOVE 1.22
-------------
Expand Down
18 changes: 11 additions & 7 deletions extramodules/it/eng/jhove/module/odf/OdfModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ public class OdfModule extends ModuleBase implements Module {
"Open Document Format Global Text Document",
"Open Document Format HTML Text Document Template"};

private static final String TEMP_ODF = "odfTemp";
private static final String INVALID_PACKAGE = "Invalid ODF Package, component ";
private static final String SAX_PARSER_NOT_FOUND = "SAX parser not found: ";

private static final Map mimeTypeMap = new HashMap();

static {
Expand Down Expand Up @@ -211,11 +215,11 @@ public final int parse(final InputStream inputStream,
String tempdir = _je.getTempDirectory();
File tempFile = null;
if (tempdir == null) {
tempFile = File.createTempFile("odfTemp", ".zip");
tempFile = File.createTempFile(TEMP_ODF, ".zip");

}
else {
tempFile = File.createTempFile("odfTemp", ".zip",
tempFile = File.createTempFile(TEMP_ODF, ".zip",
new File(tempdir));

}
Expand Down Expand Up @@ -386,7 +390,7 @@ else if (mimeTypeMap.get(mnfe.mediaType) != null &&

RepInfo subDoc = new RepInfo(subDocName);
subDoc.setModule(this);
subDoc.setFormat("ODF");
subDoc.setFormat(FORMAT[0]);
subDoc.setProfile((String)mimeTypeMap.get(mnfe.mediaType));
subDoc.setMimeType(mnfe.mediaType);
subDoc.setValid(true);
Expand Down Expand Up @@ -457,7 +461,7 @@ else if ( "".equals(mnfe.mediaType) ||
repInfo.setProfile((String)mimeTypeMap.get(repInfo.getMimeType()));
}
else {
StringBuffer buf = new StringBuffer("Invalid ODF Package, component ");
StringBuffer buf = new StringBuffer(INVALID_PACKAGE);
buf.append(mnfe.fullPath);
buf.append(" failed both Relaxed NG and normal XML validation therefore" );
buf.append(" is not well formed.");
Expand All @@ -468,7 +472,7 @@ else if ( "".equals(mnfe.mediaType) ||


} catch (Exception excptn) {
StringBuffer buf = new StringBuffer("Invalid ODF Package, component ");
StringBuffer buf = new StringBuffer(INVALID_PACKAGE);
buf.append(mnfe.fullPath);
buf.append(" failed both Relaxed NG and normal XML validation " );
buf.append(" due this error: ");
Expand Down Expand Up @@ -745,11 +749,11 @@ private XMLReader getXmlParser()
}
catch (ParserConfigurationException e) {
// If we can't get a SAX parser, we're stuck.
throw new IOException ("SAX parser not found: " +
throw new IOException (SAX_PARSER_NOT_FOUND +
saxClass +": "+ e.getMessage());
}
catch (SAXException excptn) {
throw new IOException ("SAX parser not found: " +
throw new IOException (SAX_PARSER_NOT_FOUND +
saxClass +": "+ excptn.getMessage());
}

Expand Down
Loading

0 comments on commit 383c0df

Please sign in to comment.