Using The Standard Facility

The metadata extraction facility only works with content items that contain a link field referencing a binary object. That is, the content type definition in the content-type resource must contain a field in which the type attribute is set to link. In addition, the default facility currently only provides support for JPEG image files: other image file formats and other media objects such as audio and video files are not currently supported.

The metadata extraction facility does not support legacy image and media content types.

To make use of the default extraction facility, you must:

  • Add the following line to configuration-root/com/escenic/storage/metadata/ in one of your configuration layers:


    You might need to create the file and directories.

  • Add a field called COM.ESCENIC.DEFAULTMETADATA to the content type definition in the content-type resource. The new field must be a complex array composed of two sub fields called KEY and VALUE. Both KEY and VALUE must be basic fields.

    The following example shows a content type definition for image files to which a default metadata field has been added (highlighted in bold).

      <content-type name="image">
        <ui:description>An image</ui:description>
        <panel name="default">
          <ui:label>Image content</ui:label>
          <field mime-type="text/plain" type="basic" name="name">
            <ui:description>The name of the image</ui:description>
          <field mime-type="text/plain" type="basic" name="description">
          <field mime-type="text/plain" type="basic" name="alttext">
            <ui:label>Alternative text</ui:label>
          <field name="binary" type="link">
          <field name="COM.ESCENIC.DEFAULTMETADATA" type="complex">
            <array default="0"/>
              <field name="KEY" type="basic" mime-type="text/plain"/>
              <field name="VALUE" type="basic" mime-type="text/plain"/>
          <ui:label>Content Summary</ui:label>
          <field name="caption" type="basic" mime-type="text/plain"/>
          <field name="alttext" type="basic" mime-type="text/plain"/>

Whenever a content item is created based on such a content type definition, and the binary content referenced is a JPEG file, then any EXIF or IPTC metadata found in the file is automatically extracted and injected into the COM.ESCENIC.DEFAULTMETADATA field. An array element is created for each metadata item: the name of the item is injected into the KEY subfield and the content of the item is injected into the VALUE subfield.

If you want better control over this process (if, for example, you want to select what metadata items are injected and to inject them into specific fields), then you will need to create your own plug-in. For a description of how to this, see The Plug-in API.