Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-19825

Fix multivalued iptc fields not correctly updated in blob

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0, 7.10, 8.2
    • Fix Version/s: 7.10-HF12, 8.3
    • Component/s: Binary Metadata
    • Tags:
    • Backlog priority:
      400
    • Sprint:
      nxGang Sprint 8.3.6
    • Story Points:
      3

      Description

      Use picture attached here

      1. create new document type IPTCPicture inherited from Picture
      2. add custom shema field named keywords with schema prefix as momimg
      3. make this field a multivalued String
      4. in the layouts, add this field, it should be shown as List widget
      5. add the following for the mapping in an XML extension:
        <extension target="org.nuxeo.binary.metadata"
                     point="metadataProcessors">
            <processor id="exifTool"
                       class="org.nuxeo.binary.metadata.internals.ExifToolProcessor"/>
          </extension>
        
        <extension target="org.nuxeo.binary.metadata" point="metadataMappings">
          <metadataMapping id="EXIF" processor="exifTool" blobXPath="file:content" ignorePrefix="false">
            <metadata name="EXIF:ImageDescription" xpath="imd:image_description"/>
            <metadata name="EXIF:UserComment" xpath="imd:user_comment"/>
            <metadata name="EXIF:Equipment" xpath="imd:equipment"/>
            <metadata name="EXIF:DateTimeOriginal" xpath="imd:date_time_original"/>
            <metadata name="EXIF:XResolution" xpath="imd:xresolution"/>
            <metadata name="EXIF:YResolution" xpath="imd:yresolution"/>
            <metadata name="EXIF:ExifImageWidth" xpath="imd:pixel_xdimension"/>
            <metadata name="EXIF:ExifImageHeight" xpath="imd:pixel_ydimension"/>
            <metadata name="EXIF:Copyright" xpath="imd:copyright"/>
            <metadata name="EXIF:ExposureTime" xpath="imd:exposure_time"/>
            <metadata name="EXIF:ISO" xpath="imd:iso_speed_ratings"/>
            <metadata name="EXIF:FocalLength" xpath="imd:focalLength"/>
            <metadata name="EXIF:ColorSpace" xpath="imd:color_space"/>
            <metadata name="EXIF:WhiteBalance" xpath="imd:white_balance"/>
            <metadata name="EXIF:IccProfile" xpath="imd:icc_profile"/>
            <metadata name="EXIF:Orientation" xpath="imd:orientation"/>
            <metadata name="EXIF:FNumber" xpath="imd:fnumber"/>
          </metadataMapping>
          
          <metadataMapping id="IPTC" processor="exifTool" blobXPath="file:content" ignorePrefix="false">
            <metadata name="IPTC:Source" xpath="dc:source"/>
            <metadata name="IPTC:CopyrightNotice" xpath="dc:rights"/>
            <metadata name="IPTC:Keywords" xpath="momimg:keywords"/>
            <metadata name="IPTC:Description" xpath="dc:description"/>
          </metadataMapping>
        </extension>
        
        <extension target="org.nuxeo.binary.metadata" point="metadataRules">
          <rule id="iptc" order="0" enabled="true"  async="false">
            <metadataMappings>
              <metadataMapping-id>EXIF</metadataMapping-id>
              <metadataMapping-id>IPTC</metadataMapping-id>
            </metadataMappings>
            <filters>
              <filter-id>hasPictureType</filter-id>
            </filters>
          </rule>
        </extension>
        
        <extension target="org.nuxeo.ecm.platform.actions.ActionService" point="filters">
          <filter id="hasPictureType">
            <rule grant="true">
              <type>Picture</type>
              <type>IPTCPicture</type>
            </rule>
          </filter>
        </extension>
        
      6. on the server side synch the studio project
      7. create a document of type IPTCPicture with the picture described at the beginning
      8. edit the document and check the values of the keyword field are visible
      9. modify the values and save
      10. click on the blob link and download the updated picture
      11. check the picture file metadatas and see the field is now similar to [Ljava.lang.String;@7a9c748 instead of displaying of the original text format.

      The values are not converted correctly.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 minute
                1m