ATS-907: Adding tests for raw files that are already used by Alfresco (IPTC files work copied from https://github.com/Alfresco/media-management) (#398)

This commit is contained in:
Ayman Harake 2021-05-04 14:11:46 +01:00 committed by GitHub
parent af185a9fc3
commit d25e3c365a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 77 additions and 1 deletions

View File

@ -66,6 +66,7 @@ import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_VORBIS;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_WORD;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_XML;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_ZIP;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_IMAGE_RAW_RAF;
import java.util.stream.Stream;
@ -98,6 +99,13 @@ public class TikaMetadataExtractsIT extends AbstractMetadataExtractsIT
// either no quick file or the target extension has not been registered.
return Stream.of(
//IPTCMetadataExtractor
testFile(MIMETYPE_IMAGE_JPEG, "jpg", "quickIPTC-EXT.jpg"),
testFile(MIMETYPE_IMAGE_JPEG, "jpg", "quickIPTC-multi-creator.jpg"),
testFile(MIMETYPE_IMAGE_GIF, "gif", "quick.gif"),
testFile(MIMETYPE_IMAGE_PNG, "png", "quick.png"),
testFile(MIMETYPE_IMAGE_RAW_RAF, "raf", "quick.raf"),
// DWGMetadataExtractor
testFile(MIMETYPE_APP_DWG, "dwg", "quick2010CustomProps.dwg"),
@ -495,7 +503,6 @@ public class TikaMetadataExtractsIT extends AbstractMetadataExtractsIT
//testFile("application/gff", "", ""),
//testFile("video/x-oggyuv", "", ""),
//testFile("application/x-msdownload", "", ""),
testFile(MIMETYPE_IMAGE_JPEG, "jpg", "quick.jpg"),
//testFile("image/icns", "", ""),
//testFile("application/x-emf", "", ""),
//testFile("application/x-geo-pdf", "", ""),

View File

@ -0,0 +1,12 @@
{
"{http://iptc.org/std/Iptc4xmpExt/2008-02-29/}LocationShownCity" : "Maidenhead",
"{http://iptc.org/std/Iptc4xmpExt/2008-02-29/}LocationShownSublocation" : "The Gym",
"{http://purl.org/dc/elements/1.1/}description" : "Gym class featuring a brown fox and lazy dog",
"{http://ns.useplus.org/ldf/xmp/1.0/}ImageSupplierID" : "ALFRESCO",
"{http://purl.org/dc/elements/1.1/}title" : "The quick brown fox jumps over the lazy dog",
"{http://purl.org/dc/elements/1.1/}subject" : "fox -dog -lazy -jumping",
"{http://www.alfresco.org/model/content/1.0}author" : null,
"{http://iptc.org/std/Iptc4xmpExt/2008-02-29/}LocationShownCountryName" : "United Kingdom",
"{http://ns.useplus.org/ldf/xmp/1.0/}ImageCreatorName" : "Derek Hulley",
"{http://www.alfresco.org/model/content/1.0}title" : null
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -0,0 +1,29 @@
{
"{http://www.alfresco.org/model/exif/1.0}pixelYDimension" : "92",
"{http://www.alfresco.org/model/content/1.0}description" : "Gym class featuring a brown fox and lazy dog",
"{http://ns.useplus.org/ldf/xmp/1.0/}ImageSupplierID" : "ALFRESCO",
"{http://ns.useplus.org/ldf/xmp/1.0/}CopyrightOwnerName" : "Alfresco",
"{http://www.alfresco.org/model/content/1.0}created" : "2015-02-26T20:48:26",
"{http://ns.useplus.org/ldf/xmp/1.0/}LicensorID" : "RGAUSS",
"{http://iptc.org/std/Iptc4xmpExt/2008-02-29/}LocationShownCountryName" : "United Kingdom",
"{http://www.alfresco.org/model/content/1.0}title" : "The quick brown fox jumps over the lazy dog",
"{http://iptc.org/std/Iptc4xmpExt/2008-02-29/}AODateCreated" : "1885:03:14",
"{http://iptc.org/std/Iptc4xmpExt/2008-02-29/}LocationShownSublocation" : "The Gym",
"{http://purl.org/dc/elements/1.1/}description" : "Gym class featuring a brown fox and lazy dog",
"{http://purl.org/dc/elements/1.1/}creator" : "Nevin Nollop",
"{http://www.alfresco.org/model/exif/1.0}xResolution" : "1.0",
"{http://ns.useplus.org/ldf/xmp/1.0/}ImageCreatorName" : "Derek Hulley",
"{http://iptc.org/std/Iptc4xmpExt/2008-02-29/}LocationShownCity" : "Maidenhead",
"{http://purl.org/dc/elements/1.1/}title" : "The quick brown fox jumps over the lazy dog",
"{http://ns.useplus.org/ldf/xmp/1.0/}ImageSupplierName" : "Alfresco Software",
"{http://www.alfresco.org/model/exif/1.0}pixelXDimension" : "409",
"{http://www.alfresco.org/model/content/1.0}author" : "Nevin Nollop",
"{http://www.alfresco.org/model/exif/1.0}software" : "Adobe Photoshop CC (Macintosh)",
"{http://ns.useplus.org/ldf/xmp/1.0/}Version" : "1.2.0",
"{http://www.alfresco.org/model/exif/1.0}orientation" : "1",
"{http://purl.org/dc/elements/1.1/}subject" : "fox, dog, lazy, jumping",
"{http://www.alfresco.org/model/exif/1.0}resolutionUnit" : "Inch",
"{http://www.alfresco.org/model/exif/1.0}yResolution" : "1.0",
"{http://iptc.org/std/Iptc4xmpExt/2008-02-29/}AOTitle" : "The Dog",
"{http://ns.useplus.org/ldf/xmp/1.0/}LicensorName" : "Ray Gauss II"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -0,0 +1,28 @@
{
"{http://www.alfresco.org/model/exif/1.0}pixelYDimension" : "92",
"{http://www.alfresco.org/model/content/1.0}description" : "Gym class featuring a brown fox and lazy dog",
"{http://ns.useplus.org/ldf/xmp/1.0/}ImageSupplierID" : "ALFRESCO",
"{http://ns.useplus.org/ldf/xmp/1.0/}CopyrightOwnerName" : "Alfresco",
"{http://www.alfresco.org/model/content/1.0}created" : "2013-08-01T16:24:50",
"{http://ns.useplus.org/ldf/xmp/1.0/}LicensorID" : "RGAUSS",
"{http://iptc.org/std/Iptc4xmpExt/2008-02-29/}LocationShownCountryName" : "United Kingdom",
"{http://www.alfresco.org/model/content/1.0}title" : "The quick brown fox jumps over the lazy dog",
"{http://iptc.org/std/Iptc4xmpExt/2008-02-29/}LocationShownSublocation" : "The Gym",
"{http://purl.org/dc/elements/1.1/}description" : "Gym class featuring a brown fox and lazy dog",
"{http://purl.org/dc/elements/1.1/}creator" : "John Smith, Jane Doe",
"{http://www.alfresco.org/model/exif/1.0}xResolution" : "1.0",
"{http://ns.useplus.org/ldf/xmp/1.0/}ImageCreatorName" : "Derek Hulley",
"{http://iptc.org/std/Iptc4xmpExt/2008-02-29/}LocationShownCity" : "Maidenhead",
"{http://purl.org/dc/elements/1.1/}title" : "The quick brown fox jumps over the lazy dog",
"{http://ns.useplus.org/ldf/xmp/1.0/}ImageSupplierName" : "Alfresco Software",
"{http://www.alfresco.org/model/exif/1.0}pixelXDimension" : "409",
"{http://www.alfresco.org/model/content/1.0}author" : "John Smith, Jane Doe",
"{http://www.alfresco.org/model/exif/1.0}software" : "Adobe Photoshop CC (Macintosh)",
"{http://ns.useplus.org/ldf/xmp/1.0/}Version" : "1.2.0",
"{http://www.alfresco.org/model/exif/1.0}orientation" : "1",
"{http://purl.org/dc/elements/1.1/}subject" : "fox, dog, lazy, jumping",
"{http://www.alfresco.org/model/exif/1.0}resolutionUnit" : "Inch",
"{http://www.alfresco.org/model/exif/1.0}yResolution" : "1.0",
"{http://iptc.org/std/Iptc4xmpExt/2008-02-29/}AOTitle" : "The Dog",
"{http://ns.useplus.org/ldf/xmp/1.0/}LicensorName" : "Ray Gauss II"
}