Oops. Here is the correct file this time.

On 07/07/2012 01:39 AM, Damjan Jovanovic wrote:
Hi Farrukh

Your patch is just an empty file.

Regards
Damjan

On Fri, Jul 6, 2012 at 9:23 PM, Farrukh Najmi
<farr...@wellfleetsoftware.com> wrote:
Hi Damjan,

Attached is the patch for implementing the proposed change outlined in
bullets below.
Please review and then commit if satisfied or discuss further. Thanks.


On 07/06/2012 02:29 PM, Farrukh Najmi wrote:

An example of a metadata property that has no IIM mapping defined is Name:
Scene Code, XMP property id: Scene (page 15 of 55 in spec)


On 07/06/2012 02:25 PM, Farrukh Najmi wrote:
Hi Damjan,

Thanks for the +1. As I started on this patch I made some observations in
the IPTC-PhotoMetadata-2008.pdfspec:

   * Not all metadata properties have an IIM mapping defined. For these
     we will have to invent a type code. I propose we assign codes
     starting at 10000 arbitrarily in such cases
   * Every field does have an XMP property id at present. I am not sure
     if there is any guarantee that future fields will have an XMP
     property id. I think we should continue with XMP property id for
     IptcTypes.name field but if in future versions there is no XMP
     property id then the backup would be to use the Name field from
     the spec

The only other alternative I can think of for IptcTypes.name field issue
is to use the Name field from the spec which is guaranteed to be present,
will never be translated but has the issue that it has white space in its
content. My preference is to do what is proposed in bullets above.

Comments? Thanks.




--
Regards,
Farrukh

Web: http://www.wellfleetsoftware.com

Index: src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcTypes.java
===================================================================
--- src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcTypes.java   
(revision 1358365)
+++ src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcTypes.java   
(working copy)
@@ -16,31 +16,46 @@
  */
 package org.apache.commons.imaging.formats.jpeg.iptc;
 
+/**
+ * Enum to represent a IPTC metadata property as defined by
+ * "IPTC Standard Photo Metadata 2008 IPTC Core Specification Version 1.1
+ * IPTC Extension Specification Version 1.0" Document Revision 2,
+ * 
http://www.iptc.org/std/photometadata/2008/specification/IPTC-PhotoMetadata-2008.pdf
+ * 
+ * The name corresponds to the XMP property id.
+ * The type corresponds to the the second component of tuple in IIM mapping 
(e.g. 2:04 for IntellectualGenre) 
+ * where it is available. Otherwise it is assigned an integer >= 10000
+ * 
+ * TODO: Not sure what to assign for type when the spec has no IIM Mapping 
specified. Assigning integer >= 10000 for now.
+ * TODO: Not sure what to do with structs
+ * TODO: What to do about properties not seen in IPTC-PhotoMetadata-2008 (e.g. 
"Record Version")
+ * 
+ */
 public enum IptcTypes implements IptcType {
     RECORD_VERSION(
             0, "Record Version"),
     OBJECT_TYPE_REFERENCE(
             3, "Object Type Reference"),
-    OBJECT_ATTRIBUTE_REFERENCE(
-            4, "Object Attribute Reference"),
-    OBJECT_NAME(
-            5, "Object Name"),
+    INTELLECTUAL_GENRE(
+            4, "IntellectualGenre"),
+    TITLE(
+            5, "title"),
     EDIT_STATUS(
             7, "Edit Status"),
     EDITORIAL_UPDATE(
             8, "Editorial Update"),
     URGENCY(
             10, "Urgency"),
-    SUBJECT_REFERENCE(
-            12, "Subject Reference"),
+    SUBJECT_CODE(
+            12, "SubjectCode"),
     CATEGORY(
             15, "Category"),
     SUPPLEMENTAL_CATEGORY(
             20, "Supplemental Category"),
     FIXTURE_IDENTIFIER(
             22, "Fixture Identifier"),
-    KEYWORDS(
-            25, "Keywords"),
+    SUBJECT(
+            25, "subject"),
     CONTENT_LOCATION_CODE(
             26, "Content Location Code"),
     CONTENT_LOCATION_NAME(
@@ -53,8 +68,8 @@
             37, "Expiration Date"),
     EXPIRATION_TIME(
             38, "Expiration Time"),
-    SPECIAL_INSTRUCTIONS(
-            40, "Special Instructions"),
+    INSTRUCTIONS(
+            40, "Instructions"),
     ACTION_ADVISED(
             42, "Action Advised"),
     REFERENCE_SERVICE(
@@ -64,7 +79,7 @@
     REFERENCE_NUMBER(
             50, "Reference Number"),
     DATE_CREATED(
-            55, "Date Created"),
+            55, "DateCreated"),
     TIME_CREATED(
             60, "Time Created"),
     DIGITAL_CREATION_DATE(
@@ -77,36 +92,36 @@
             70, "Program Version"),
     OBJECT_CYCLE(
             75, "Object Cycle"),
-    BYLINE(
-            80, "By-line"),
-    BYLINE_TITLE(
-            85, "By-line Title"),
+    CREATOR(
+            80, "creator"),
+    AUTHORS_POSITION(
+            85, "AuthorsPosition"),
     CITY(
             90, "City"),
-    SUBLOCATION(
-            92, "Sublocation"),
-    PROVINCE_STATE(
-            95, "Province/State"),
-    COUNTRY_PRIMARY_LOCATION_CODE(
-            100, "Country/Primary Location Code"),
-    COUNTRY_PRIMARY_LOCATION_NAME(
-            101, "Country/Primary Location Name"),
-    ORIGINAL_TRANSMISSION_REFERENCE(
-            103, "Original Transmission, Reference"),
+    LOCATION(
+            92, "Location"),
+    STATE(
+            95, "State"),
+    COUNTRY_CODE(
+            100, "CountryCode"),
+    COUNTRY(
+            101, "Country"),
+    TRANSMISSION_REFERENCE(
+            103, "TransmissionReference"),
     HEADLINE(
             105, "Headline"),
     CREDIT(
             110, "Credit"),
     SOURCE(
             115, "Source"),
-    COPYRIGHT_NOTICE(
-            116, "Copyright Notice"),
-    CONTACT(
-            118, "Contact"),
-    CAPTION_ABSTRACT(
-            120, "Caption/Abstract"),
-    WRITER_EDITOR(
-            122, "Writer/Editor"),
+    RIGHTS(
+            116, "rights"),
+    CONTACT_INFO_DETAILS(
+            118, "ContactInfoDetails"),
+    DESCRIPTION(
+            120, "description"),
+    CAPTION_WRITER(
+            122, "CaptionWriter"),
     RASTERIZED_CAPTION(
             125, "Rasterized Caption"),
     IMAGE_TYPE(
@@ -130,8 +145,31 @@
     OBJECT_DATA_PREVIEW_FILE_FORMAT_VERSION(
             201, "Object Data Preview, File Format Version"),
     OBJECT_DATA_PREVIEW_DATA(
-            202, "Object Data Preview Data");
+            202, "Object Data Preview Data"),
 
+    SCENE(
+            10000, "Scene"),
+    CREATOR_CONTACT_INFO(
+            10001, "CreatorContactInfo"),
+    USAGE_TERMS(
+            10002, "UsageTerms"),
+    CiAdrExtadr(
+            10003, "CiAdrExtadr"),
+    CiAdrCity(
+            10004, "CiAdrCity"),
+    CiAdrCountry(
+            10005, "CiAdrCountry"),
+    CiEmailWork(
+            10006, "CiEmailWork"),
+    CiTelWork(
+            10007, "CiTelWork"),
+    CiAdrPcode(
+            10008, "CiAdrPcode"),
+    CiAdrRegion(
+            10009, "CiAdrRegion"),
+    CiUrlWork(
+            10010, "CiUrlWork");
+
     public final int type;
     public final String name;
     

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to