diff options
Diffstat (limited to 'includes/media/XMPInfo.php')
-rw-r--r-- | includes/media/XMPInfo.php | 992 |
1 files changed, 499 insertions, 493 deletions
diff --git a/includes/media/XMPInfo.php b/includes/media/XMPInfo.php index f0b2cb5e..7e47ec14 100644 --- a/includes/media/XMPInfo.php +++ b/includes/media/XMPInfo.php @@ -27,17 +27,17 @@ * extract. */ class XMPInfo { - - /** get the items array - * @return Array XMP item configuration array. + /** Get the items array + * @return array XMP item configuration array. */ public static function getItems() { if ( !self::$ranHooks ) { // This is for if someone makes a custom metadata extension. // For example, a medical wiki might want to decode DICOM xmp properties. - wfRunHooks( 'XMPGetInfo', Array( &self::$items ) ); + wfRunHooks( 'XMPGetInfo', array( &self::$items ) ); self::$ranHooks = true; // Only want to do this once. } + return self::$items; } @@ -53,382 +53,388 @@ class XMPInfo { * each containing an array of tags * each tag is an array of information about the * tag, including: - * * map_group - what group (used for precedence during conflicts) - * * mode - What type of item (self::MODE_SIMPLE usually, see above for all values) - * * validate - method to validate input. Could also post-process the input. A string value is assumed to be a static method of XMPValidate. Can also take a array( 'className', 'methodName' ). - * * choices - array of potential values (format of 'value' => true ). Only used with validateClosed - * * rangeLow and rangeHigh - alternative to choices for numeric ranges. Again for validateClosed only. - * * children - for MODE_STRUCT items, allowed children. - * * structPart - Indicates that this element can only appear as a member of a structure. + * * map_group - What group (used for precedence during conflicts). + * * mode - What type of item (self::MODE_SIMPLE usually, see above for + * all values). + * * validate - Method to validate input. Could also post-process the + * input. A string value is assumed to be a static method of + * XMPValidate. Can also take a array( 'className', 'methodName' ). + * * choices - Array of potential values (format of 'value' => true ). + * Only used with validateClosed. + * * rangeLow and rangeHigh - Alternative to choices for numeric ranges. + * Again for validateClosed only. + * * children - For MODE_STRUCT items, allowed children. + * * structPart - Indicates that this element can only appear as a member + * of a structure. * - * currently this just has a bunch of exif values as this class is only half-done + * Currently this just has a bunch of EXIF values as this class is only half-done. */ static private $items = array( 'http://ns.adobe.com/exif/1.0/' => array( 'ApertureValue' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), 'BrightnessValue' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), 'CompressedBitsPerPixel' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), 'DigitalZoomRatio' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), 'ExposureBiasValue' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), 'ExposureIndex' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), 'ExposureTime' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), 'FlashEnergy' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational', ), 'FNumber' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), 'FocalLength' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), 'FocalPlaneXResolution' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), 'FocalPlaneYResolution' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), 'GPSAltitude' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational', ), 'GPSDestBearing' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), 'GPSDestDistance' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), 'GPSDOP' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), 'GPSImgDirection' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), 'GPSSpeed' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), 'GPSTrack' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), - 'MaxApertureValue' => array( + 'MaxApertureValue' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), 'ShutterSpeedValue' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), - 'SubjectDistance' => array( + 'SubjectDistance' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational' + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational' ), /* Flash */ - 'Flash' => array( - 'mode' => XMPReader::MODE_STRUCT, - 'children' => array( - 'Fired' => true, - 'Function' => true, - 'Mode' => true, + 'Flash' => array( + 'mode' => XMPReader::MODE_STRUCT, + 'children' => array( + 'Fired' => true, + 'Function' => true, + 'Mode' => true, 'RedEyeMode' => true, - 'Return' => true, + 'Return' => true, ), - 'validate' => 'validateFlash', + 'validate' => 'validateFlash', 'map_group' => 'exif', ), - 'Fired' => array( + 'Fired' => array( 'map_group' => 'exif', - 'validate' => 'validateBoolean', - 'mode' => XMPReader::MODE_SIMPLE, - 'structPart'=> true, + 'validate' => 'validateBoolean', + 'mode' => XMPReader::MODE_SIMPLE, + 'structPart' => true, ), - 'Function' => array( + 'Function' => array( 'map_group' => 'exif', - 'validate' => 'validateBoolean', - 'mode' => XMPReader::MODE_SIMPLE, - 'structPart'=> true, + 'validate' => 'validateBoolean', + 'mode' => XMPReader::MODE_SIMPLE, + 'structPart' => true, ), - 'Mode' => array( + 'Mode' => array( 'map_group' => 'exif', - 'validate' => 'validateClosed', - 'mode' => XMPReader::MODE_SIMPLE, - 'choices' => array( '0' => true, '1' => true, - '2' => true, '3' => true ), - 'structPart'=> true, + 'validate' => 'validateClosed', + 'mode' => XMPReader::MODE_SIMPLE, + 'choices' => array( '0' => true, '1' => true, + '2' => true, '3' => true ), + 'structPart' => true, ), - 'Return' => array( + 'Return' => array( 'map_group' => 'exif', - 'validate' => 'validateClosed', - 'mode' => XMPReader::MODE_SIMPLE, - 'choices' => array( '0' => true, - '2' => true, '3' => true ), - 'structPart'=> true, + 'validate' => 'validateClosed', + 'mode' => XMPReader::MODE_SIMPLE, + 'choices' => array( '0' => true, + '2' => true, '3' => true ), + 'structPart' => true, ), - 'RedEyeMode' => array( + 'RedEyeMode' => array( 'map_group' => 'exif', - 'validate' => 'validateBoolean', - 'mode' => XMPReader::MODE_SIMPLE, - 'structPart'=> true, + 'validate' => 'validateBoolean', + 'mode' => XMPReader::MODE_SIMPLE, + 'structPart' => true, ), /* End Flash */ - 'ISOSpeedRatings' => array( + 'ISOSpeedRatings' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SEQ, - 'validate' => 'validateInteger' + 'mode' => XMPReader::MODE_SEQ, + 'validate' => 'validateInteger' ), /* end rational things */ - 'ColorSpace' => array( + 'ColorSpace' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( '1' => true, '65535' => true ), + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( '1' => true, '65535' => true ), ), - 'ComponentsConfiguration' => array( + 'ComponentsConfiguration' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SEQ, - 'validate' => 'validateClosed', - 'choices' => array( '1' => true, '2' => true, '3' => true, '4' => true, - '5' => true, '6' => true ) + 'mode' => XMPReader::MODE_SEQ, + 'validate' => 'validateClosed', + 'choices' => array( '1' => true, '2' => true, '3' => true, '4' => true, + '5' => true, '6' => true ) ), - 'Contrast' => array( + 'Contrast' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( '0' => true, '1' => true, '2' => true ) + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( '0' => true, '1' => true, '2' => true ) ), - 'CustomRendered' => array( + 'CustomRendered' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( '0' => true, '1' => true ) + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( '0' => true, '1' => true ) ), - 'DateTimeOriginal' => array( + 'DateTimeOriginal' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateDate', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateDate', ), 'DateTimeDigitized' => array( /* xmp:CreateDate */ 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateDate', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateDate', ), /* todo: there might be interesting information in * exif:DeviceSettingDescription, but need to find an * example */ - 'ExifVersion' => array( + 'ExifVersion' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), - 'ExposureMode' => array( + 'ExposureMode' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'rangeLow' => 0, + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'rangeLow' => 0, 'rangeHigh' => 2, ), - 'ExposureProgram' => array( + 'ExposureProgram' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'rangeLow' => 0, + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'rangeLow' => 0, 'rangeHigh' => 8, ), - 'FileSource' => array( + 'FileSource' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( '3' => true ) + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( '3' => true ) ), - 'FlashpixVersion' => array( + 'FlashpixVersion' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), 'FocalLengthIn35mmFilm' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateInteger', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateInteger', ), 'FocalPlaneResolutionUnit' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( '2' => true, '3' => true ), + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( '2' => true, '3' => true ), ), - 'GainControl' => array( + 'GainControl' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'rangeLow' => 0, + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'rangeLow' => 0, 'rangeHigh' => 4, ), /* this value is post-processed out later */ - 'GPSAltitudeRef' => array( + 'GPSAltitudeRef' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( '0' => true, '1' => true ), + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( '0' => true, '1' => true ), ), 'GPSAreaInformation' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), 'GPSDestBearingRef' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( 'T' => true, 'M' => true ), + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( 'T' => true, 'M' => true ), ), 'GPSDestDistanceRef' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( 'K' => true, 'M' => true, - 'N' => true ), + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( 'K' => true, 'M' => true, + 'N' => true ), ), - 'GPSDestLatitude' => array( + 'GPSDestLatitude' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateGPS', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateGPS', ), - 'GPSDestLongitude' => array( + 'GPSDestLongitude' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateGPS', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateGPS', ), - 'GPSDifferential' => array( + 'GPSDifferential' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( '0' => true, '1' => true ), + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( '0' => true, '1' => true ), ), 'GPSImgDirectionRef' => array( - 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( 'T' => true, 'M' => true ), + 'map_group' => 'exif', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( 'T' => true, 'M' => true ), ), - 'GPSLatitude' => array( + 'GPSLatitude' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateGPS', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateGPS', ), - 'GPSLongitude' => array( + 'GPSLongitude' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateGPS', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateGPS', ), - 'GPSMapDatum' => array( + 'GPSMapDatum' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), - 'GPSMeasureMode' => array( + 'GPSMeasureMode' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( '2' => true, '3' => true ) + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( '2' => true, '3' => true ) ), 'GPSProcessingMethod' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), - 'GPSSatellites' => array( + 'GPSSatellites' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), - 'GPSSpeedRef' => array( + 'GPSSpeedRef' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( 'K' => true, 'M' => true, - 'N' => true ), + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( 'K' => true, 'M' => true, + 'N' => true ), ), - 'GPSStatus' => array( + 'GPSStatus' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( 'A' => true, 'V' => true ) + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( 'A' => true, 'V' => true ) ), - 'GPSTimeStamp' => array( + 'GPSTimeStamp' => array( 'map_group' => 'exif', // Note: in exif, GPSDateStamp does not include // the time, where here it does. - 'map_name' => 'GPSDateStamp', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateDate', + 'map_name' => 'GPSDateStamp', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateDate', ), - 'GPSTrackRef' => array( + 'GPSTrackRef' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( 'T' => true, 'M' => true ) + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( 'T' => true, 'M' => true ) ), - 'GPSVersionID' => array( + 'GPSVersionID' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), - 'ImageUniqueID' => array( + 'ImageUniqueID' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), - 'LightSource' => array( + 'LightSource' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', /* can't use a range, as it skips... */ - 'choices' => array( '0' => true, '1' => true, + 'choices' => array( '0' => true, '1' => true, '2' => true, '3' => true, '4' => true, '9' => true, '10' => true, '11' => true, '12' => true, '13' => true, @@ -440,217 +446,217 @@ class XMPInfo { '255' => true, ), ), - 'MeteringMode' => array( + 'MeteringMode' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'rangeLow' => 0, + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'rangeLow' => 0, 'rangeHigh' => 6, - 'choices' => array( '255' => true ), + 'choices' => array( '255' => true ), ), /* Pixel(X|Y)Dimension are rather useless, but for * completeness since we do it with exif. */ - 'PixelXDimension' => array( + 'PixelXDimension' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateInteger', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateInteger', ), - 'PixelYDimension' => array( + 'PixelYDimension' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateInteger', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateInteger', ), - 'Saturation' => array( + 'Saturation' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'rangeLow' => 0, + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'rangeLow' => 0, 'rangeHigh' => 2, ), - 'SceneCaptureType' => array( + 'SceneCaptureType' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'rangeLow' => 0, + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'rangeLow' => 0, 'rangeHigh' => 3, ), - 'SceneType' => array( + 'SceneType' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( '1' => true ), + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( '1' => true ), ), // Note, 6 is not valid SensingMethod. - 'SensingMethod' => array( + 'SensingMethod' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'rangeLow' => 1, + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'rangeLow' => 1, 'rangeHigh' => 5, - 'choices' => array( '7' => true, 8 => true ), + 'choices' => array( '7' => true, 8 => true ), ), - 'Sharpness' => array( + 'Sharpness' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'rangeLow' => 0, + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'rangeLow' => 0, 'rangeHigh' => 2, ), 'SpectralSensitivity' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), // This tag should perhaps be displayed to user better. - 'SubjectArea' => array( + 'SubjectArea' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SEQ, - 'validate' => 'validateInteger', + 'mode' => XMPReader::MODE_SEQ, + 'validate' => 'validateInteger', ), 'SubjectDistanceRange' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'rangeLow' => 0, + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'rangeLow' => 0, 'rangeHigh' => 3, ), - 'SubjectLocation' => array( + 'SubjectLocation' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SEQ, - 'validate' => 'validateInteger', + 'mode' => XMPReader::MODE_SEQ, + 'validate' => 'validateInteger', ), - 'UserComment' => array( + 'UserComment' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_LANG, + 'mode' => XMPReader::MODE_LANG, ), - 'WhiteBalance' => array( + 'WhiteBalance' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( '0' => true, '1' => true ) + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( '0' => true, '1' => true ) ), ), 'http://ns.adobe.com/tiff/1.0/' => array( - 'Artist' => array( + 'Artist' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), - 'BitsPerSample' => array( + 'BitsPerSample' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SEQ, - 'validate' => 'validateInteger', + 'mode' => XMPReader::MODE_SEQ, + 'validate' => 'validateInteger', ), - 'Compression' => array( + 'Compression' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( '1' => true, '6' => true ), + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( '1' => true, '6' => true ), ), /* this prop should not be used in XMP. dc:rights is the correct prop */ - 'Copyright' => array( + 'Copyright' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_LANG, + 'mode' => XMPReader::MODE_LANG, ), - 'DateTime' => array( /* proper prop is xmp:ModifyDate */ + 'DateTime' => array( /* proper prop is xmp:ModifyDate */ 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateDate', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateDate', ), - 'ImageDescription' => array( /* proper one is dc:description */ + 'ImageDescription' => array( /* proper one is dc:description */ 'map_group' => 'exif', - 'mode' => XMPReader::MODE_LANG, + 'mode' => XMPReader::MODE_LANG, ), - 'ImageLength' => array( + 'ImageLength' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateInteger', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateInteger', ), - 'ImageWidth' => array( + 'ImageWidth' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateInteger', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateInteger', ), - 'Make' => array( + 'Make' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), - 'Model' => array( + 'Model' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), /**** Do not extract this property * It interferes with auto exif rotation. * 'Orientation' => array( - * 'map_group' => 'exif', - * 'mode' => XMPReader::MODE_SIMPLE, - * 'validate' => 'validateClosed', - * 'choices' => array( '1' => true, '2' => true, '3' => true, '4' => true, 5 => true, - * '6' => true, '7' => true, '8' => true ), + * 'map_group' => 'exif', + * 'mode' => XMPReader::MODE_SIMPLE, + * 'validate' => 'validateClosed', + * 'choices' => array( '1' => true, '2' => true, '3' => true, '4' => true, 5 => true, + * '6' => true, '7' => true, '8' => true ), *), ******/ 'PhotometricInterpretation' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( '2' => true, '6' => true ), + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( '2' => true, '6' => true ), ), 'PlanerConfiguration' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( '1' => true, '2' => true ), + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( '1' => true, '2' => true ), ), 'PrimaryChromaticities' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SEQ, - 'validate' => 'validateRational', + 'mode' => XMPReader::MODE_SEQ, + 'validate' => 'validateRational', ), 'ReferenceBlackWhite' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SEQ, - 'validate' => 'validateRational', + 'mode' => XMPReader::MODE_SEQ, + 'validate' => 'validateRational', ), - 'ResolutionUnit' => array( + 'ResolutionUnit' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( '2' => true, '3' => true ), + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( '2' => true, '3' => true ), ), - 'SamplesPerPixel' => array( + 'SamplesPerPixel' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateInteger', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateInteger', ), - 'Software' => array( /* see xmp:CreatorTool */ + 'Software' => array( /* see xmp:CreatorTool */ 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), /* ignore TransferFunction */ - 'WhitePoint' => array( + 'WhitePoint' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SEQ, - 'validate' => 'validateRational', + 'mode' => XMPReader::MODE_SEQ, + 'validate' => 'validateRational', ), - 'XResolution' => array( + 'XResolution' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational', ), - 'YResolution' => array( + 'YResolution' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRational', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRational', ), 'YCbCrCoefficients' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SEQ, - 'validate' => 'validateRational', + 'mode' => XMPReader::MODE_SEQ, + 'validate' => 'validateRational', ), - 'YCbCrPositioning' => array( + 'YCbCrPositioning' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateClosed', - 'choices' => array( '1' => true, '2' => true ), + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateClosed', + 'choices' => array( '1' => true, '2' => true ), ), /******** * Disable extracting this property (bug 31944) @@ -663,170 +669,170 @@ class XMPInfo { * just disable this prop for now, until such * XMPReader is more graceful (bug 32172) * 'YCbCrSubSampling' => array( - * 'map_group' => 'exif', - * 'mode' => XMPReader::MODE_SEQ, - * 'validate' => 'validateClosed', - * 'choices' => array( '1' => true, '2' => true ), + * 'map_group' => 'exif', + * 'mode' => XMPReader::MODE_SEQ, + * 'validate' => 'validateClosed', + * 'choices' => array( '1' => true, '2' => true ), * ), */ ), 'http://ns.adobe.com/exif/1.0/aux/' => array( - 'Lens' => array( + 'Lens' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), - 'SerialNumber' => array( + 'SerialNumber' => array( 'map_group' => 'exif', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), - 'OwnerName' => array( + 'OwnerName' => array( 'map_group' => 'exif', - 'map_name' => 'CameraOwnerName', - 'mode' => XMPReader::MODE_SIMPLE, + 'map_name' => 'CameraOwnerName', + 'mode' => XMPReader::MODE_SIMPLE, ), ), 'http://purl.org/dc/elements/1.1/' => array( - 'title' => array( + 'title' => array( 'map_group' => 'general', - 'map_name' => 'ObjectName', - 'mode' => XMPReader::MODE_LANG + 'map_name' => 'ObjectName', + 'mode' => XMPReader::MODE_LANG ), - 'description' => array( + 'description' => array( 'map_group' => 'general', - 'map_name' => 'ImageDescription', - 'mode' => XMPReader::MODE_LANG + 'map_name' => 'ImageDescription', + 'mode' => XMPReader::MODE_LANG ), - 'contributor' => array( + 'contributor' => array( 'map_group' => 'general', - 'map_name' => 'dc-contributor', - 'mode' => XMPReader::MODE_BAG + 'map_name' => 'dc-contributor', + 'mode' => XMPReader::MODE_BAG ), - 'coverage' => array( + 'coverage' => array( 'map_group' => 'general', - 'map_name' => 'dc-coverage', - 'mode' => XMPReader::MODE_SIMPLE, + 'map_name' => 'dc-coverage', + 'mode' => XMPReader::MODE_SIMPLE, ), - 'creator' => array( + 'creator' => array( 'map_group' => 'general', - 'map_name' => 'Artist', //map with exif Artist, iptc byline (2:80) - 'mode' => XMPReader::MODE_SEQ, + 'map_name' => 'Artist', //map with exif Artist, iptc byline (2:80) + 'mode' => XMPReader::MODE_SEQ, ), - 'date' => array( + 'date' => array( 'map_group' => 'general', // Note, not mapped with other date properties, as this type of date is // non-specific: "A point or period of time associated with an event in // the lifecycle of the resource" - 'map_name' => 'dc-date', - 'mode' => XMPReader::MODE_SEQ, - 'validate' => 'validateDate', + 'map_name' => 'dc-date', + 'mode' => XMPReader::MODE_SEQ, + 'validate' => 'validateDate', ), - /* Do not extract dc:format, as we've got better ways to determine mimetype */ - 'identifier' => array( + /* Do not extract dc:format, as we've got better ways to determine MIME type */ + 'identifier' => array( 'map_group' => 'deprecated', - 'map_name' => 'Identifier', - 'mode' => XMPReader::MODE_SIMPLE, + 'map_name' => 'Identifier', + 'mode' => XMPReader::MODE_SIMPLE, ), - 'language' => array( + 'language' => array( 'map_group' => 'general', - 'map_name' => 'LanguageCode', /* mapped with iptc 2:135 */ - 'mode' => XMPReader::MODE_BAG, - 'validate' => 'validateLangCode', + 'map_name' => 'LanguageCode', /* mapped with iptc 2:135 */ + 'mode' => XMPReader::MODE_BAG, + 'validate' => 'validateLangCode', ), - 'publisher' => array( + 'publisher' => array( 'map_group' => 'general', - 'map_name' => 'dc-publisher', - 'mode' => XMPReader::MODE_BAG, + 'map_name' => 'dc-publisher', + 'mode' => XMPReader::MODE_BAG, ), // for related images/resources - 'relation' => array( + 'relation' => array( 'map_group' => 'general', - 'map_name' => 'dc-relation', - 'mode' => XMPReader::MODE_BAG, + 'map_name' => 'dc-relation', + 'mode' => XMPReader::MODE_BAG, ), - 'rights' => array( + 'rights' => array( 'map_group' => 'general', - 'map_name' => 'Copyright', - 'mode' => XMPReader::MODE_LANG, + 'map_name' => 'Copyright', + 'mode' => XMPReader::MODE_LANG, ), // Note: source is not mapped with iptc source, since iptc // source describes the source of the image in terms of a person // who provided the image, where this is to describe an image that the // current one is based on. - 'source' => array( + 'source' => array( 'map_group' => 'general', - 'map_name' => 'dc-source', - 'mode' => XMPReader::MODE_SIMPLE, + 'map_name' => 'dc-source', + 'mode' => XMPReader::MODE_SIMPLE, ), - 'subject' => array( + 'subject' => array( 'map_group' => 'general', - 'map_name' => 'Keywords', /* maps to iptc 2:25 */ - 'mode' => XMPReader::MODE_BAG, + 'map_name' => 'Keywords', /* maps to iptc 2:25 */ + 'mode' => XMPReader::MODE_BAG, ), - 'type' => array( + 'type' => array( 'map_group' => 'general', - 'map_name' => 'dc-type', - 'mode' => XMPReader::MODE_BAG, + 'map_name' => 'dc-type', + 'mode' => XMPReader::MODE_BAG, ), ), 'http://ns.adobe.com/xap/1.0/' => array( 'CreateDate' => array( 'map_group' => 'general', 'map_name' => 'DateTimeDigitized', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, 'validate' => 'validateDate', ), 'CreatorTool' => array( 'map_group' => 'general', - 'map_name' => 'Software', - 'mode' => XMPReader::MODE_SIMPLE + 'map_name' => 'Software', + 'mode' => XMPReader::MODE_SIMPLE ), 'Identifier' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_BAG, + 'mode' => XMPReader::MODE_BAG, ), 'Label' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), 'ModifyDate' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, - 'map_name' => 'DateTime', - 'validate' => 'validateDate', + 'mode' => XMPReader::MODE_SIMPLE, + 'map_name' => 'DateTime', + 'validate' => 'validateDate', ), 'MetadataDate' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, // map_name to be consistent with other date names. - 'map_name' => 'DateTimeMetadata', - 'validate' => 'validateDate', + 'map_name' => 'DateTimeMetadata', + 'validate' => 'validateDate', ), 'Nickname' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), 'Rating' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateRating', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateRating', ), ), 'http://ns.adobe.com/xap/1.0/rights/' => array( 'Certificate' => array( 'map_group' => 'general', - 'map_name' => 'RightsCertificate', - 'mode' => XMPReader::MODE_SIMPLE, + 'map_name' => 'RightsCertificate', + 'mode' => XMPReader::MODE_SIMPLE, ), 'Marked' => array( 'map_group' => 'general', - 'map_name' => 'Copyrighted', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateBoolean', + 'map_name' => 'Copyrighted', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateBoolean', ), 'Owner' => array( 'map_group' => 'general', - 'map_name' => 'CopyrightOwner', - 'mode' => XMPReader::MODE_BAG, + 'map_name' => 'CopyrightOwner', + 'mode' => XMPReader::MODE_BAG, ), // this seems similar to dc:rights. 'UsageTerms' => array( @@ -844,7 +850,7 @@ class XMPInfo { // as well do this too. 'OriginalDocumentID' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), // It might also be useful to do xmpMM:LastURL // and xmpMM:DerivedFrom as you can potentially, @@ -855,31 +861,31 @@ class XMPInfo { ), 'http://creativecommons.org/ns#' => array( 'license' => array( - 'map_name' => 'LicenseUrl', + 'map_name' => 'LicenseUrl', 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), 'morePermissions' => array( - 'map_name' => 'MorePermissionsUrl', + 'map_name' => 'MorePermissionsUrl', 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), 'attributionURL' => array( 'map_group' => 'general', - 'map_name' => 'AttributionUrl', - 'mode' => XMPReader::MODE_SIMPLE, + 'map_name' => 'AttributionUrl', + 'mode' => XMPReader::MODE_SIMPLE, ), 'attributionName' => array( 'map_group' => 'general', - 'map_name' => 'PreferredAttributionName', - 'mode' => XMPReader::MODE_SIMPLE, + 'map_name' => 'PreferredAttributionName', + 'mode' => XMPReader::MODE_SIMPLE, ), ), //Note, this property affects how jpeg metadata is extracted. 'http://ns.adobe.com/xmp/note/' => array( 'HasExtendedXMP' => array( 'map_group' => 'special', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), ), /* Note, in iptc schemas, the legacy properties are denoted @@ -890,41 +896,41 @@ class XMPInfo { 'http://ns.adobe.com/photoshop/1.0/' => array( 'City' => array( 'map_group' => 'deprecated', - 'mode' => XMPReader::MODE_SIMPLE, - 'map_name' => 'CityDest', + 'mode' => XMPReader::MODE_SIMPLE, + 'map_name' => 'CityDest', ), 'Country' => array( 'map_group' => 'deprecated', - 'mode' => XMPReader::MODE_SIMPLE, - 'map_name' => 'CountryDest', + 'mode' => XMPReader::MODE_SIMPLE, + 'map_name' => 'CountryDest', ), 'State' => array( 'map_group' => 'deprecated', - 'mode' => XMPReader::MODE_SIMPLE, - 'map_name' => 'ProvinceOrStateDest', + 'mode' => XMPReader::MODE_SIMPLE, + 'map_name' => 'ProvinceOrStateDest', ), 'DateCreated' => array( 'map_group' => 'deprecated', // marking as deprecated as the xmp prop preferred - 'mode' => XMPReader::MODE_SIMPLE, - 'map_name' => 'DateTimeOriginal', - 'validate' => 'validateDate', + 'mode' => XMPReader::MODE_SIMPLE, + 'map_name' => 'DateTimeOriginal', + 'validate' => 'validateDate', // note this prop is an XMP, not IPTC date ), 'CaptionWriter' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, - 'map_name' => 'Writer', + 'mode' => XMPReader::MODE_SIMPLE, + 'map_name' => 'Writer', ), 'Instructions' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, - 'map_name' => 'SpecialInstructions', + 'mode' => XMPReader::MODE_SIMPLE, + 'map_name' => 'SpecialInstructions', ), 'TransmissionReference' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, - 'map_name' => 'OriginalTransmissionRef', + 'mode' => XMPReader::MODE_SIMPLE, + 'map_name' => 'OriginalTransmissionRef', ), 'AuthorsPosition' => array( /* This corresponds with 2:85 @@ -932,46 +938,46 @@ class XMPInfo { * handled weirdly to correspond * with iptc/exif. */ 'map_group' => 'special', - 'mode' => XMPReader::MODE_SIMPLE + 'mode' => XMPReader::MODE_SIMPLE ), 'Credit' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), 'Source' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), 'Urgency' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), 'Category' => array( // Note, this prop is deprecated, but in general // group since it doesn't have a replacement. 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, - 'map_name' => 'iimCategory', + 'mode' => XMPReader::MODE_SIMPLE, + 'map_name' => 'iimCategory', ), 'SupplementalCategories' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_BAG, - 'map_name' => 'iimSupplementalCategory', + 'mode' => XMPReader::MODE_BAG, + 'map_name' => 'iimSupplementalCategory', ), 'Headline' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE + 'mode' => XMPReader::MODE_SIMPLE ), ), 'http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/' => array( 'CountryCode' => array( 'map_group' => 'deprecated', - 'mode' => XMPReader::MODE_SIMPLE, - 'map_name' => 'CountryCodeDest', + 'mode' => XMPReader::MODE_SIMPLE, + 'map_name' => 'CountryCodeDest', ), 'IntellectualGenre' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), // Note, this is a six digit code. // See: http://cv.iptc.org/newscodes/scene/ @@ -979,9 +985,9 @@ class XMPInfo { // we just show the number. 'Scene' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_BAG, - 'validate' => 'validateInteger', - 'map_name' => 'SceneCode', + 'mode' => XMPReader::MODE_BAG, + 'validate' => 'validateInteger', + 'map_name' => 'SceneCode', ), /* Note: SubjectCode should be an 8 ascii digits. * it is not really an integer (has leading 0's, @@ -990,14 +996,14 @@ class XMPInfo { */ 'SubjectCode' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_BAG, - 'map_name' => 'SubjectNewsCode', - 'validate' => 'validateInteger' + 'mode' => XMPReader::MODE_BAG, + 'map_name' => 'SubjectNewsCode', + 'validate' => 'validateInteger' ), 'Location' => array( 'map_group' => 'deprecated', - 'mode' => XMPReader::MODE_SIMPLE, - 'map_name' => 'SublocationDest', + 'mode' => XMPReader::MODE_SIMPLE, + 'map_name' => 'SublocationDest', ), 'CreatorContactInfo' => array( /* Note this maps to 2:118 in iim @@ -1007,94 +1013,94 @@ class XMPInfo { * is more structured. */ 'map_group' => 'general', - 'mode' => XMPReader::MODE_STRUCT, - 'map_name' => 'Contact', - 'children' => array( + 'mode' => XMPReader::MODE_STRUCT, + 'map_name' => 'Contact', + 'children' => array( 'CiAdrExtadr' => true, - 'CiAdrCity' => true, - 'CiAdrCtry' => true, + 'CiAdrCity' => true, + 'CiAdrCtry' => true, 'CiEmailWork' => true, - 'CiTelWork' => true, - 'CiAdrPcode' => true, + 'CiTelWork' => true, + 'CiAdrPcode' => true, 'CiAdrRegion' => true, - 'CiUrlWork' => true, + 'CiUrlWork' => true, ), ), 'CiAdrExtadr' => array( /* address */ 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, - 'structPart'=> true, + 'mode' => XMPReader::MODE_SIMPLE, + 'structPart' => true, ), 'CiAdrCity' => array( /* city */ 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, - 'structPart'=> true, + 'mode' => XMPReader::MODE_SIMPLE, + 'structPart' => true, ), 'CiAdrCtry' => array( /* country */ 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, - 'structPart'=> true, + 'mode' => XMPReader::MODE_SIMPLE, + 'structPart' => true, ), 'CiEmailWork' => array( /* email (possibly separated by ',') */ 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, - 'structPart'=> true, + 'mode' => XMPReader::MODE_SIMPLE, + 'structPart' => true, ), 'CiTelWork' => array( /* telephone */ 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, - 'structPart'=> true, + 'mode' => XMPReader::MODE_SIMPLE, + 'structPart' => true, ), 'CiAdrPcode' => array( /* postal code */ 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, - 'structPart'=> true, + 'mode' => XMPReader::MODE_SIMPLE, + 'structPart' => true, ), 'CiAdrRegion' => array( /* province/state */ 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, - 'structPart'=> true, + 'mode' => XMPReader::MODE_SIMPLE, + 'structPart' => true, ), 'CiUrlWork' => array( /* url. Multiple may be separated by comma. */ 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, - 'structPart'=> true, + 'mode' => XMPReader::MODE_SIMPLE, + 'structPart' => true, ), /* End contact info struct properties */ ), 'http://iptc.org/std/Iptc4xmpExt/2008-02-29/' => array( 'Event' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, + 'mode' => XMPReader::MODE_SIMPLE, ), 'OrganisationInImageName' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_BAG, - 'map_name' => 'OrganisationInImage' + 'mode' => XMPReader::MODE_BAG, + 'map_name' => 'OrganisationInImage' ), 'PersonInImage' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_BAG, + 'mode' => XMPReader::MODE_BAG, ), 'MaxAvailHeight' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateInteger', - 'map_name' => 'OriginalImageHeight', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateInteger', + 'map_name' => 'OriginalImageHeight', ), 'MaxAvailWidth' => array( 'map_group' => 'general', - 'mode' => XMPReader::MODE_SIMPLE, - 'validate' => 'validateInteger', - 'map_name' => 'OriginalImageWidth', + 'mode' => XMPReader::MODE_SIMPLE, + 'validate' => 'validateInteger', + 'map_name' => 'OriginalImageWidth', ), // LocationShown and LocationCreated are handled // specially because they are hierarchical, but we // also want to merge with the old non-hierarchical. 'LocationShown' => array( 'map_group' => 'special', - 'mode' => XMPReader::MODE_BAGSTRUCT, - 'children' => array( + 'mode' => XMPReader::MODE_BAGSTRUCT, + 'children' => array( 'WorldRegion' => true, 'CountryCode' => true, /* iso code */ 'CountryName' => true, @@ -1105,8 +1111,8 @@ class XMPInfo { ), 'LocationCreated' => array( 'map_group' => 'special', - 'mode' => XMPReader::MODE_BAGSTRUCT, - 'children' => array( + 'mode' => XMPReader::MODE_BAGSTRUCT, + 'children' => array( 'WorldRegion' => true, 'CountryCode' => true, /* iso code */ 'CountryName' => true, @@ -1117,35 +1123,35 @@ class XMPInfo { ), 'WorldRegion' => array( 'map_group' => 'special', - 'mode' => XMPReader::MODE_SIMPLE, - 'structPart'=> true, + 'mode' => XMPReader::MODE_SIMPLE, + 'structPart' => true, ), 'CountryCode' => array( 'map_group' => 'special', - 'mode' => XMPReader::MODE_SIMPLE, - 'structPart'=> true, + 'mode' => XMPReader::MODE_SIMPLE, + 'structPart' => true, ), 'CountryName' => array( 'map_group' => 'special', - 'mode' => XMPReader::MODE_SIMPLE, - 'structPart'=> true, - 'map_name' => 'Country', + 'mode' => XMPReader::MODE_SIMPLE, + 'structPart' => true, + 'map_name' => 'Country', ), 'ProvinceState' => array( 'map_group' => 'special', - 'mode' => XMPReader::MODE_SIMPLE, - 'structPart'=> true, - 'map_name' => 'ProvinceOrState', + 'mode' => XMPReader::MODE_SIMPLE, + 'structPart' => true, + 'map_name' => 'ProvinceOrState', ), 'City' => array( 'map_group' => 'special', - 'mode' => XMPReader::MODE_SIMPLE, - 'structPart'=> true, + 'mode' => XMPReader::MODE_SIMPLE, + 'structPart' => true, ), 'Sublocation' => array( 'map_group' => 'special', - 'mode' => XMPReader::MODE_SIMPLE, - 'structPart'=> true, + 'mode' => XMPReader::MODE_SIMPLE, + 'structPart' => true, ), /* Other props that might be interesting but |