diff --git a/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/java/org/alfresco/transformer/TikaMetadataExtractsIT.java b/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/java/org/alfresco/transformer/TikaMetadataExtractsIT.java index 0f1b8e37..d730d97b 100644 --- a/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/java/org/alfresco/transformer/TikaMetadataExtractsIT.java +++ b/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/java/org/alfresco/transformer/TikaMetadataExtractsIT.java @@ -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", "", ""), diff --git a/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/resources/quick.raf b/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/resources/quick.raf new file mode 100644 index 00000000..3386bfc6 Binary files /dev/null and b/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/resources/quick.raf differ diff --git a/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/resources/quick.raf_metadata.json b/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/resources/quick.raf_metadata.json new file mode 100644 index 00000000..a6c2daa7 --- /dev/null +++ b/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/resources/quick.raf_metadata.json @@ -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 +} \ No newline at end of file diff --git a/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/resources/quickIPTC-EXT.jpg b/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/resources/quickIPTC-EXT.jpg new file mode 100644 index 00000000..937949a6 Binary files /dev/null and b/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/resources/quickIPTC-EXT.jpg differ diff --git a/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/resources/quickIPTC-EXT.jpg_metadata.json b/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/resources/quickIPTC-EXT.jpg_metadata.json new file mode 100644 index 00000000..e7f493b6 --- /dev/null +++ b/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/resources/quickIPTC-EXT.jpg_metadata.json @@ -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" +} \ No newline at end of file diff --git a/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/resources/quickIPTC-multi-creator.jpg b/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/resources/quickIPTC-multi-creator.jpg new file mode 100644 index 00000000..df480eb7 Binary files /dev/null and b/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/resources/quickIPTC-multi-creator.jpg differ diff --git a/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/resources/quickIPTC-multi-creator.jpg_metadata.json b/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/resources/quickIPTC-multi-creator.jpg_metadata.json new file mode 100644 index 00000000..c77d7ca5 --- /dev/null +++ b/alfresco-transform-tika/alfresco-transform-tika-boot/src/test/resources/quickIPTC-multi-creator.jpg_metadata.json @@ -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" +} \ No newline at end of file