3 * This class is just a container for a big array
4 * used by XMPReader to determine which XMP items to
9 /** get the items array
10 * @return Array XMP item configuration array.
12 public static function getItems ( ) {
13 if( !self
::$ranHooks ) {
14 // This is for if someone makes a custom metadata extension.
15 // For example, a medical wiki might want to decode DICOM xmp properties.
16 wfRunHooks('XMPGetInfo', Array(&self
::$items));
17 self
::$ranHooks = true; // Only want to do this once.
22 static private $ranHooks = false;
25 * XMPInfo::$items keeps a list of all the items
26 * we are interested to extract, as well as
27 * information about the item like what type
30 * Format is an array of namespaces,
31 * each containing an array of tags
32 * each tag is an array of information about the
34 * * map_group - what group (used for precedence during conflicts)
35 * * mode - What type of item (self::MODE_SIMPLE usually, see above for all values)
36 * * 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' ).
37 * * choices - array of potential values (format of 'value' => true ). Only used with validateClosed
38 * * rangeLow and rangeHigh - alternative to choices for numeric ranges. Again for validateClosed only.
39 * * children - for MODE_STRUCT items, allowed children.
40 * * structPart - Indicates that this element can only appear as a member of a structure.
42 * currently this just has a bunch of exif values as this class is only half-done
45 static private $items = array(
46 'http://ns.adobe.com/exif/1.0/' => array(
47 'ApertureValue' => array(
48 'map_group' => 'exif',
49 'mode' => XMPReader
::MODE_SIMPLE
,
50 'validate' => 'validateRational'
52 'BrightnessValue' => array(
53 'map_group' => 'exif',
54 'mode' => XMPReader
::MODE_SIMPLE
,
55 'validate' => 'validateRational'
57 'CompressedBitsPerPixel' => array(
58 'map_group' => 'exif',
59 'mode' => XMPReader
::MODE_SIMPLE
,
60 'validate' => 'validateRational'
62 'DigitalZoomRatio' => array(
63 'map_group' => 'exif',
64 'mode' => XMPReader
::MODE_SIMPLE
,
65 'validate' => 'validateRational'
67 'ExposureBiasValue' => array(
68 'map_group' => 'exif',
69 'mode' => XMPReader
::MODE_SIMPLE
,
70 'validate' => 'validateRational'
72 'ExposureIndex' => array(
73 'map_group' => 'exif',
74 'mode' => XMPReader
::MODE_SIMPLE
,
75 'validate' => 'validateRational'
77 'ExposureTime' => array(
78 'map_group' => 'exif',
79 'mode' => XMPReader
::MODE_SIMPLE
,
80 'validate' => 'validateRational'
82 'FlashEnergy' => array(
83 'map_group' => 'exif',
84 'mode' => XMPReader
::MODE_SIMPLE
,
85 'validate' => 'validateRational',
88 'map_group' => 'exif',
89 'mode' => XMPReader
::MODE_SIMPLE
,
90 'validate' => 'validateRational'
92 'FocalLength' => array(
93 'map_group' => 'exif',
94 'mode' => XMPReader
::MODE_SIMPLE
,
95 'validate' => 'validateRational'
97 'FocalPlaneXResolution' => array(
98 'map_group' => 'exif',
99 'mode' => XMPReader
::MODE_SIMPLE
,
100 'validate' => 'validateRational'
102 'FocalPlaneYResolution' => array(
103 'map_group' => 'exif',
104 'mode' => XMPReader
::MODE_SIMPLE
,
105 'validate' => 'validateRational'
107 'GPSAltitude' => array(
108 'map_group' => 'exif',
109 'mode' => XMPReader
::MODE_SIMPLE
,
110 'validate' => 'validateRational',
112 'GPSDestBearing' => array(
113 'map_group' => 'exif',
114 'mode' => XMPReader
::MODE_SIMPLE
,
115 'validate' => 'validateRational'
117 'GPSDestDistance' => array(
118 'map_group' => 'exif',
119 'mode' => XMPReader
::MODE_SIMPLE
,
120 'validate' => 'validateRational'
123 'map_group' => 'exif',
124 'mode' => XMPReader
::MODE_SIMPLE
,
125 'validate' => 'validateRational'
127 'GPSImgDirection' => array(
128 'map_group' => 'exif',
129 'mode' => XMPReader
::MODE_SIMPLE
,
130 'validate' => 'validateRational'
133 'map_group' => 'exif',
134 'mode' => XMPReader
::MODE_SIMPLE
,
135 'validate' => 'validateRational'
138 'map_group' => 'exif',
139 'mode' => XMPReader
::MODE_SIMPLE
,
140 'validate' => 'validateRational'
142 'MaxApertureValue' => array(
143 'map_group' => 'exif',
144 'mode' => XMPReader
::MODE_SIMPLE
,
145 'validate' => 'validateRational'
147 'ShutterSpeedValue' => array(
148 'map_group' => 'exif',
149 'mode' => XMPReader
::MODE_SIMPLE
,
150 'validate' => 'validateRational'
152 'SubjectDistance' => array(
153 'map_group' => 'exif',
154 'mode' => XMPReader
::MODE_SIMPLE
,
155 'validate' => 'validateRational'
159 'mode' => XMPReader
::MODE_STRUCT
,
164 'RedEyeMode' => true,
167 'validate' => 'validateFlash',
168 'map_group' => 'exif',
171 'map_group' => 'exif',
172 'validate' => 'validateBoolean',
173 'mode' => XMPReader
::MODE_SIMPLE
,
177 'map_group' => 'exif',
178 'validate' => 'validateBoolean',
179 'mode' => XMPReader
::MODE_SIMPLE
,
183 'map_group' => 'exif',
184 'validate' => 'validateClosed',
185 'mode' => XMPReader
::MODE_SIMPLE
,
186 'choices' => array( '0' => true, '1' => true,
187 '2' => true, '3' => true ),
191 'map_group' => 'exif',
192 'validate' => 'validateClosed',
193 'mode' => XMPReader
::MODE_SIMPLE
,
194 'choices' => array( '0' => true,
195 '2' => true, '3' => true ),
198 'RedEyeMode' => array(
199 'map_group' => 'exif',
200 'validate' => 'validateBoolean',
201 'mode' => XMPReader
::MODE_SIMPLE
,
205 'ISOSpeedRatings' => array(
206 'map_group' => 'exif',
207 'mode' => XMPReader
::MODE_SEQ
,
208 'validate' => 'validateInteger'
210 /* end rational things */
211 'ColorSpace' => array(
212 'map_group' => 'exif',
213 'mode' => XMPReader
::MODE_SIMPLE
,
214 'validate' => 'validateClosed',
215 'choices' => array( '1' => true, '65535' => true ),
217 'ComponentsConfiguration' => array(
218 'map_group' => 'exif',
219 'mode' => XMPReader
::MODE_SEQ
,
220 'validate' => 'validateClosed',
221 'choices' => array( '1' => true, '2' => true, '3' => true, '4' => true,
222 '5' => true, '6' => true )
225 'map_group' => 'exif',
226 'mode' => XMPReader
::MODE_SIMPLE
,
227 'validate' => 'validateClosed',
228 'choices' => array( '0' => true, '1' => true, '2' => true )
230 'CustomRendered' => array(
231 'map_group' => 'exif',
232 'mode' => XMPReader
::MODE_SIMPLE
,
233 'validate' => 'validateClosed',
234 'choices' => array( '0' => true, '1' => true )
236 'DateTimeOriginal' => array(
237 'map_group' => 'exif',
238 'mode' => XMPReader
::MODE_SIMPLE
,
239 'validate' => 'validateDate',
241 'DateTimeDigitized' => array( /* xmp:CreateDate */
242 'map_group' => 'exif',
243 'mode' => XMPReader
::MODE_SIMPLE
,
244 'validate' => 'validateDate',
246 /* todo: there might be interesting information in
247 * exif:DeviceSettingDescription, but need to find an
250 'ExifVersion' => array(
251 'map_group' => 'exif',
252 'mode' => XMPReader
::MODE_SIMPLE
,
254 'ExposureMode' => array(
255 'map_group' => 'exif',
256 'mode' => XMPReader
::MODE_SIMPLE
,
257 'validate' => 'validateClosed',
261 'ExposureProgram' => array(
262 'map_group' => 'exif',
263 'mode' => XMPReader
::MODE_SIMPLE
,
264 'validate' => 'validateClosed',
268 'FileSource' => array(
269 'map_group' => 'exif',
270 'mode' => XMPReader
::MODE_SIMPLE
,
271 'validate' => 'validateClosed',
272 'choices' => array( '3' => true )
274 'FlashpixVersion' => array(
275 'map_group' => 'exif',
276 'mode' => XMPReader
::MODE_SIMPLE
,
278 'FocalLengthIn35mmFilm' => array(
279 'map_group' => 'exif',
280 'mode' => XMPReader
::MODE_SIMPLE
,
281 'validate' => 'validateInteger',
283 'FocalPlaneResolutionUnit' => array(
284 'map_group' => 'exif',
285 'mode' => XMPReader
::MODE_SIMPLE
,
286 'validate' => 'validateClosed',
287 'choices' => array( '2' => true, '3' => true ),
289 'GainControl' => array(
290 'map_group' => 'exif',
291 'mode' => XMPReader
::MODE_SIMPLE
,
292 'validate' => 'validateClosed',
296 /* this value is post-processed out later */
297 'GPSAltitudeRef' => array(
298 'map_group' => 'exif',
299 'mode' => XMPReader
::MODE_SIMPLE
,
300 'validate' => 'validateClosed',
301 'choices' => array( '0' => true, '1' => true ),
303 'GPSAreaInformation' => array(
304 'map_group' => 'exif',
305 'mode' => XMPReader
::MODE_SIMPLE
,
307 'GPSDestBearingRef' => array(
308 'map_group' => 'exif',
309 'mode' => XMPReader
::MODE_SIMPLE
,
310 'validate' => 'validateClosed',
311 'choices' => array( 'T' => true, 'M' => true ),
313 'GPSDestDistanceRef' => array(
314 'map_group' => 'exif',
315 'mode' => XMPReader
::MODE_SIMPLE
,
316 'validate' => 'validateClosed',
317 'choices' => array( 'K' => true, 'M' => true,
320 'GPSDestLatitude' => array(
321 'map_group' => 'exif',
322 'mode' => XMPReader
::MODE_SIMPLE
,
323 'validate' => 'validateGPS',
325 'GPSDestLongitude' => array(
326 'map_group' => 'exif',
327 'mode' => XMPReader
::MODE_SIMPLE
,
328 'validate' => 'validateGPS',
330 'GPSDifferential' => array(
331 'map_group' => 'exif',
332 'mode' => XMPReader
::MODE_SIMPLE
,
333 'validate' => 'validateClosed',
334 'choices' => array( '0' => true, '1' => true ),
336 'GPSImgDirectionRef' => array(
337 'map_group' => 'exif',
338 'mode' => XMPReader
::MODE_SIMPLE
,
339 'validate' => 'validateClosed',
340 'choices' => array( 'T' => true, 'M' => true ),
342 'GPSLatitude' => array(
343 'map_group' => 'exif',
344 'mode' => XMPReader
::MODE_SIMPLE
,
345 'validate' => 'validateGPS',
347 'GPSLongitude' => array(
348 'map_group' => 'exif',
349 'mode' => XMPReader
::MODE_SIMPLE
,
350 'validate' => 'validateGPS',
352 'GPSMapDatum' => array(
353 'map_group' => 'exif',
354 'mode' => XMPReader
::MODE_SIMPLE
,
356 'GPSMeasureMode' => array(
357 'map_group' => 'exif',
358 'mode' => XMPReader
::MODE_SIMPLE
,
359 'validate' => 'validateClosed',
360 'choices' => array( '2' => true, '3' => true )
362 'GPSProcessingMethod' => array(
363 'map_group' => 'exif',
364 'mode' => XMPReader
::MODE_SIMPLE
,
366 'GPSSatellites' => array(
367 'map_group' => 'exif',
368 'mode' => XMPReader
::MODE_SIMPLE
,
370 'GPSSpeedRef' => array(
371 'map_group' => 'exif',
372 'mode' => XMPReader
::MODE_SIMPLE
,
373 'validate' => 'validateClosed',
374 'choices' => array( 'K' => true, 'M' => true,
377 'GPSStatus' => array(
378 'map_group' => 'exif',
379 'mode' => XMPReader
::MODE_SIMPLE
,
380 'validate' => 'validateClosed',
381 'choices' => array( 'A' => true, 'V' => true )
383 'GPSTimeStamp' => array(
384 'map_group' => 'exif',
385 // Note: in exif, GPSDateStamp does not include
386 // the time, where here it does.
387 'map_name' => 'GPSDateStamp',
388 'mode' => XMPReader
::MODE_SIMPLE
,
389 'validate' => 'validateDate',
391 'GPSTrackRef' => array(
392 'map_group' => 'exif',
393 'mode' => XMPReader
::MODE_SIMPLE
,
394 'validate' => 'validateClosed',
395 'choices' => array( 'T' => true, 'M' => true )
397 'GPSVersionID' => array(
398 'map_group' => 'exif',
399 'mode' => XMPReader
::MODE_SIMPLE
,
401 'ImageUniqueID' => array(
402 'map_group' => 'exif',
403 'mode' => XMPReader
::MODE_SIMPLE
,
405 'LightSource' => array(
406 'map_group' => 'exif',
407 'mode' => XMPReader
::MODE_SIMPLE
,
408 'validate' => 'validateClosed',
409 /* can't use a range, as it skips... */
410 'choices' => array( '0' => true, '1' => true,
411 '2' => true, '3' => true, '4' => true,
412 '9' => true, '10' => true, '11' => true,
413 '12' => true, '13' => true,
414 '14' => true, '15' => true,
415 '17' => true, '18' => true,
416 '19' => true, '20' => true,
417 '21' => true, '22' => true,
418 '23' => true, '24' => true,
422 'MeteringMode' => array(
423 'map_group' => 'exif',
424 'mode' => XMPReader
::MODE_SIMPLE
,
425 'validate' => 'validateClosed',
428 'choices' => array( '255' => true ),
430 /* Pixel(X|Y)Dimension are rather useless, but for
431 * completeness since we do it with exif.
433 'PixelXDimension' => array(
434 'map_group' => 'exif',
435 'mode' => XMPReader
::MODE_SIMPLE
,
436 'validate' => 'validateInteger',
438 'PixelYDimension' => array(
439 'map_group' => 'exif',
440 'mode' => XMPReader
::MODE_SIMPLE
,
441 'validate' => 'validateInteger',
443 'Saturation' => array(
444 'map_group' => 'exif',
445 'mode' => XMPReader
::MODE_SIMPLE
,
446 'validate' => 'validateClosed',
450 'SceneCaptureType' => array(
451 'map_group' => 'exif',
452 'mode' => XMPReader
::MODE_SIMPLE
,
453 'validate' => 'validateClosed',
457 'SceneType' => array(
458 'map_group' => 'exif',
459 'mode' => XMPReader
::MODE_SIMPLE
,
460 'validate' => 'validateClosed',
461 'choices' => array( '1' => true ),
463 // Note, 6 is not valid SensingMethod.
464 'SensingMethod' => array(
465 'map_group' => 'exif',
466 'mode' => XMPReader
::MODE_SIMPLE
,
467 'validate' => 'validateClosed',
470 'choices' => array( '7' => true, 8 => true ),
472 'Sharpness' => array(
473 'map_group' => 'exif',
474 'mode' => XMPReader
::MODE_SIMPLE
,
475 'validate' => 'validateClosed',
479 'SpectralSensitivity' => array(
480 'map_group' => 'exif',
481 'mode' => XMPReader
::MODE_SIMPLE
,
483 // This tag should perhaps be displayed to user better.
484 'SubjectArea' => array(
485 'map_group' => 'exif',
486 'mode' => XMPReader
::MODE_SEQ
,
487 'validate' => 'validateInteger',
489 'SubjectDistanceRange' => array(
490 'map_group' => 'exif',
491 'mode' => XMPReader
::MODE_SIMPLE
,
492 'validate' => 'validateClosed',
496 'SubjectLocation' => array(
497 'map_group' => 'exif',
498 'mode' => XMPReader
::MODE_SEQ
,
499 'validate' => 'validateInteger',
501 'UserComment' => array(
502 'map_group' => 'exif',
503 'mode' => XMPReader
::MODE_LANG
,
505 'WhiteBalance' => array(
506 'map_group' => 'exif',
507 'mode' => XMPReader
::MODE_SIMPLE
,
508 'validate' => 'validateClosed',
509 'choices' => array( '0' => true, '1' => true )
512 'http://ns.adobe.com/tiff/1.0/' => array(
514 'map_group' => 'exif',
515 'mode' => XMPReader
::MODE_SIMPLE
,
517 'BitsPerSample' => array(
518 'map_group' => 'exif',
519 'mode' => XMPReader
::MODE_SEQ
,
520 'validate' => 'validateInteger',
522 'Compression' => array(
523 'map_group' => 'exif',
524 'mode' => XMPReader
::MODE_SIMPLE
,
525 'validate' => 'validateClosed',
526 'choices' => array( '1' => true, '6' => true ),
528 /* this prop should not be used in XMP. dc:rights is the correct prop */
529 'Copyright' => array(
530 'map_group' => 'exif',
531 'mode' => XMPReader
::MODE_LANG
,
533 'DateTime' => array( /* proper prop is xmp:ModifyDate */
534 'map_group' => 'exif',
535 'mode' => XMPReader
::MODE_SIMPLE
,
536 'validate' => 'validateDate',
538 'ImageDescription' => array( /* proper one is dc:description */
539 'map_group' => 'exif',
540 'mode' => XMPReader
::MODE_LANG
,
542 'ImageLength' => array(
543 'map_group' => 'exif',
544 'mode' => XMPReader
::MODE_SIMPLE
,
545 'validate' => 'validateInteger',
547 'ImageWidth' => array(
548 'map_group' => 'exif',
549 'mode' => XMPReader
::MODE_SIMPLE
,
550 'validate' => 'validateInteger',
553 'map_group' => 'exif',
554 'mode' => XMPReader
::MODE_SIMPLE
,
557 'map_group' => 'exif',
558 'mode' => XMPReader
::MODE_SIMPLE
,
560 /**** Do not extract this property
561 * It interferes with auto exif rotation.
562 * 'Orientation' => array(
563 * 'map_group' => 'exif',
564 * 'mode' => XMPReader::MODE_SIMPLE,
565 * 'validate' => 'validateClosed',
566 * 'choices' => array( '1' => true, '2' => true, '3' => true, '4' => true, 5 => true,
567 * '6' => true, '7' => true, '8' => true ),
570 'PhotometricInterpretation' => array(
571 'map_group' => 'exif',
572 'mode' => XMPReader
::MODE_SIMPLE
,
573 'validate' => 'validateClosed',
574 'choices' => array( '2' => true, '6' => true ),
576 'PlanerConfiguration' => array(
577 'map_group' => 'exif',
578 'mode' => XMPReader
::MODE_SIMPLE
,
579 'validate' => 'validateClosed',
580 'choices' => array( '1' => true, '2' => true ),
582 'PrimaryChromaticities' => array(
583 'map_group' => 'exif',
584 'mode' => XMPReader
::MODE_SEQ
,
585 'validate' => 'validateRational',
587 'ReferenceBlackWhite' => array(
588 'map_group' => 'exif',
589 'mode' => XMPReader
::MODE_SEQ
,
590 'validate' => 'validateRational',
592 'ResolutionUnit' => array(
593 'map_group' => 'exif',
594 'mode' => XMPReader
::MODE_SIMPLE
,
595 'validate' => 'validateClosed',
596 'choices' => array( '2' => true, '3' => true ),
598 'SamplesPerPixel' => array(
599 'map_group' => 'exif',
600 'mode' => XMPReader
::MODE_SIMPLE
,
601 'validate' => 'validateInteger',
603 'Software' => array( /* see xmp:CreatorTool */
604 'map_group' => 'exif',
605 'mode' => XMPReader
::MODE_SIMPLE
,
607 /* ignore TransferFunction */
608 'WhitePoint' => array(
609 'map_group' => 'exif',
610 'mode' => XMPReader
::MODE_SEQ
,
611 'validate' => 'validateRational',
613 'XResolution' => array(
614 'map_group' => 'exif',
615 'mode' => XMPReader
::MODE_SIMPLE
,
616 'validate' => 'validateRational',
618 'YResolution' => array(
619 'map_group' => 'exif',
620 'mode' => XMPReader
::MODE_SIMPLE
,
621 'validate' => 'validateRational',
623 'YCbCrCoefficients' => array(
624 'map_group' => 'exif',
625 'mode' => XMPReader
::MODE_SEQ
,
626 'validate' => 'validateRational',
628 'YCbCrPositioning' => array(
629 'map_group' => 'exif',
630 'mode' => XMPReader
::MODE_SIMPLE
,
631 'validate' => 'validateClosed',
632 'choices' => array( '1' => true, '2' => true ),
635 * Disable extracting this property (bug 31944)
636 * Several files have a string instead of a Seq
637 * for this property. XMPReader doesn't handle
638 * mismatched types very gracefully (it marks
639 * the entire file as invalid, instead of just
640 * the relavent prop). Since this prop
641 * doesn't communicate all that useful information
642 * just disable this prop for now, until such
643 * XMPReader is more graceful (bug 32172)
644 * 'YCbCrSubSampling' => array(
645 * 'map_group' => 'exif',
646 * 'mode' => XMPReader::MODE_SEQ,
647 * 'validate' => 'validateClosed',
648 * 'choices' => array( '1' => true, '2' => true ),
652 'http://ns.adobe.com/exif/1.0/aux/' => array(
654 'map_group' => 'exif',
655 'mode' => XMPReader
::MODE_SIMPLE
,
657 'SerialNumber' => array(
658 'map_group' => 'exif',
659 'mode' => XMPReader
::MODE_SIMPLE
,
661 'OwnerName' => array(
662 'map_group' => 'exif',
663 'map_name' => 'CameraOwnerName',
664 'mode' => XMPReader
::MODE_SIMPLE
,
667 'http://purl.org/dc/elements/1.1/' => array(
669 'map_group' => 'general',
670 'map_name' => 'ObjectName',
671 'mode' => XMPReader
::MODE_LANG
673 'description' => array(
674 'map_group' => 'general',
675 'map_name' => 'ImageDescription',
676 'mode' => XMPReader
::MODE_LANG
678 'contributor' => array(
679 'map_group' => 'general',
680 'map_name' => 'dc-contributor',
681 'mode' => XMPReader
::MODE_BAG
684 'map_group' => 'general',
685 'map_name' => 'dc-coverage',
686 'mode' => XMPReader
::MODE_SIMPLE
,
689 'map_group' => 'general',
690 'map_name' => 'Artist', //map with exif Artist, iptc byline (2:80)
691 'mode' => XMPReader
::MODE_SEQ
,
694 'map_group' => 'general',
695 // Note, not mapped with other date properties, as this type of date is
696 // non-specific: "A point or period of time associated with an event in
697 // the lifecycle of the resource"
698 'map_name' => 'dc-date',
699 'mode' => XMPReader
::MODE_SEQ
,
700 'validate' => 'validateDate',
702 /* Do not extract dc:format, as we've got better ways to determine mimetype */
703 'identifier' => array(
704 'map_group' => 'deprecated',
705 'map_name' => 'Identifier',
706 'mode' => XMPReader
::MODE_SIMPLE
,
709 'map_group' => 'general',
710 'map_name' => 'LanguageCode', /* mapped with iptc 2:135 */
711 'mode' => XMPReader
::MODE_BAG
,
712 'validate' => 'validateLangCode',
714 'publisher' => array(
715 'map_group' => 'general',
716 'map_name' => 'dc-publisher',
717 'mode' => XMPReader
::MODE_BAG
,
719 // for related images/resources
721 'map_group' => 'general',
722 'map_name' => 'dc-relation',
723 'mode' => XMPReader
::MODE_BAG
,
726 'map_group' => 'general',
727 'map_name' => 'Copyright',
728 'mode' => XMPReader
::MODE_LANG
,
730 // Note: source is not mapped with iptc source, since iptc
731 // source describes the source of the image in terms of a person
732 // who provided the image, where this is to describe an image that the
733 // current one is based on.
735 'map_group' => 'general',
736 'map_name' => 'dc-source',
737 'mode' => XMPReader
::MODE_SIMPLE
,
740 'map_group' => 'general',
741 'map_name' => 'Keywords', /* maps to iptc 2:25 */
742 'mode' => XMPReader
::MODE_BAG
,
745 'map_group' => 'general',
746 'map_name' => 'dc-type',
747 'mode' => XMPReader
::MODE_BAG
,
750 'http://ns.adobe.com/xap/1.0/' => array(
751 'CreateDate' => array(
752 'map_group' => 'general',
753 'map_name' => 'DateTimeDigitized',
754 'mode' => XMPReader
::MODE_SIMPLE
,
755 'validate' => 'validateDate',
757 'CreatorTool' => array(
758 'map_group' => 'general',
759 'map_name' => 'Software',
760 'mode' => XMPReader
::MODE_SIMPLE
762 'Identifier' => array(
763 'map_group' => 'general',
764 'mode' => XMPReader
::MODE_BAG
,
767 'map_group' => 'general',
768 'mode' => XMPReader
::MODE_SIMPLE
,
770 'ModifyDate' => array(
771 'map_group' => 'general',
772 'mode' => XMPReader
::MODE_SIMPLE
,
773 'map_name' => 'DateTime',
774 'validate' => 'validateDate',
776 'MetadataDate' => array(
777 'map_group' => 'general',
778 'mode' => XMPReader
::MODE_SIMPLE
,
779 // map_name to be consistent with other date names.
780 'map_name' => 'DateTimeMetadata',
781 'validate' => 'validateDate',
784 'map_group' => 'general',
785 'mode' => XMPReader
::MODE_SIMPLE
,
788 'map_group' => 'general',
789 'mode' => XMPReader
::MODE_SIMPLE
,
790 'validate' => 'validateRating',
793 'http://ns.adobe.com/xap/1.0/rights/' => array(
794 'Certificate' => array(
795 'map_group' => 'general',
796 'map_name' => 'RightsCertificate',
797 'mode' => XMPReader
::MODE_SIMPLE
,
800 'map_group' => 'general',
801 'map_name' => 'Copyrighted',
802 'mode' => XMPReader
::MODE_SIMPLE
,
803 'validate' => 'validateBoolean',
806 'map_group' => 'general',
807 'map_name' => 'CopyrightOwner',
808 'mode' => XMPReader
::MODE_BAG
,
810 // this seems similar to dc:rights.
811 'UsageTerms' => array(
812 'map_group' => 'general',
813 'mode' => XMPReader
::MODE_LANG
,
815 'WebStatement' => array(
816 'map_group' => 'general',
817 'mode' => XMPReader
::MODE_SIMPLE
,
820 // XMP media management.
821 'http://ns.adobe.com/xap/1.0/mm/' => array(
822 // if we extract the exif UniqueImageID, might
823 // as well do this too.
824 'OriginalDocumentID' => array(
825 'map_group' => 'general',
826 'mode' => XMPReader
::MODE_SIMPLE
,
828 // It might also be useful to do xmpMM:LastURL
829 // and xmpMM:DerivedFrom as you can potentially,
830 // get the url of this document/source for this
831 // document. However whats more likely is you'd
832 // get a file:// url for the path of the doc,
833 // which is somewhat of a privacy issue.
835 'http://creativecommons.org/ns#' => array(
837 'map_name' => 'LicenseUrl',
838 'map_group' => 'general',
839 'mode' => XMPReader
::MODE_SIMPLE
,
841 'morePermissions' => array(
842 'map_name' => 'MorePermissionsUrl',
843 'map_group' => 'general',
844 'mode' => XMPReader
::MODE_SIMPLE
,
846 'attributionURL' => array(
847 'map_group' => 'general',
848 'map_name' => 'AttributionUrl',
849 'mode' => XMPReader
::MODE_SIMPLE
,
851 'attributionName' => array(
852 'map_group' => 'general',
853 'map_name' => 'PreferredAttributionName',
854 'mode' => XMPReader
::MODE_SIMPLE
,
857 //Note, this property affects how jpeg metadata is extracted.
858 'http://ns.adobe.com/xmp/note/' => array(
859 'HasExtendedXMP' => array(
860 'map_group' => 'special',
861 'mode' => XMPReader
::MODE_SIMPLE
,
864 /* Note, in iptc schemas, the legacy properties are denoted
865 * as deprecated, since other properties should used instead,
866 * and properties marked as deprecated in the standard are
867 * are marked as general here as they don't have replacements
869 'http://ns.adobe.com/photoshop/1.0/' => array(
871 'map_group' => 'deprecated',
872 'mode' => XMPReader
::MODE_SIMPLE
,
873 'map_name' => 'CityDest',
876 'map_group' => 'deprecated',
877 'mode' => XMPReader
::MODE_SIMPLE
,
878 'map_name' => 'CountryDest',
881 'map_group' => 'deprecated',
882 'mode' => XMPReader
::MODE_SIMPLE
,
883 'map_name' => 'ProvinceOrStateDest',
885 'DateCreated' => array(
886 'map_group' => 'deprecated',
887 // marking as deprecated as the xmp prop preferred
888 'mode' => XMPReader
::MODE_SIMPLE
,
889 'map_name' => 'DateTimeOriginal',
890 'validate' => 'validateDate',
891 // note this prop is an XMP, not IPTC date
893 'CaptionWriter' => array(
894 'map_group' => 'general',
895 'mode' => XMPReader
::MODE_SIMPLE
,
896 'map_name' => 'Writer',
898 'Instructions' => array(
899 'map_group' => 'general',
900 'mode' => XMPReader
::MODE_SIMPLE
,
901 'map_name' => 'SpecialInstructions',
903 'TransmissionReference' => array(
904 'map_group' => 'general',
905 'mode' => XMPReader
::MODE_SIMPLE
,
906 'map_name' => 'OriginalTransmissionRef',
908 'AuthorsPosition' => array(
909 /* This corresponds with 2:85
910 * By-line Title, which needs to be
911 * handled weirdly to correspond
913 'map_group' => 'special',
914 'mode' => XMPReader
::MODE_SIMPLE
917 'map_group' => 'general',
918 'mode' => XMPReader
::MODE_SIMPLE
,
921 'map_group' => 'general',
922 'mode' => XMPReader
::MODE_SIMPLE
,
925 'map_group' => 'general',
926 'mode' => XMPReader
::MODE_SIMPLE
,
929 // Note, this prop is deprecated, but in general
930 // group since it doesn't have a replacement.
931 'map_group' => 'general',
932 'mode' => XMPReader
::MODE_SIMPLE
,
933 'map_name' => 'iimCategory',
935 'SupplementalCategories' => array(
936 'map_group' => 'general',
937 'mode' => XMPReader
::MODE_BAG
,
938 'map_name' => 'iimSupplementalCategory',
941 'map_group' => 'general',
942 'mode' => XMPReader
::MODE_SIMPLE
945 'http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/' => array(
946 'CountryCode' => array(
947 'map_group' => 'deprecated',
948 'mode' => XMPReader
::MODE_SIMPLE
,
949 'map_name' => 'CountryCodeDest',
951 'IntellectualGenre' => array(
952 'map_group' => 'general',
953 'mode' => XMPReader
::MODE_SIMPLE
,
955 // Note, this is a six digit code.
956 // See: http://cv.iptc.org/newscodes/scene/
957 // Since these aren't really all that common,
958 // we just show the number.
960 'map_group' => 'general',
961 'mode' => XMPReader
::MODE_BAG
,
962 'validate' => 'validateInteger',
963 'map_name' => 'SceneCode',
965 /* Note: SubjectCode should be an 8 ascii digits.
966 * it is not really an integer (has leading 0's,
967 * cannot have a +/- sign), but validateInteger
968 * will let it through.
970 'SubjectCode' => array(
971 'map_group' => 'general',
972 'mode' => XMPReader
::MODE_BAG
,
973 'map_name' => 'SubjectNewsCode',
974 'validate' => 'validateInteger'
977 'map_group' => 'deprecated',
978 'mode' => XMPReader
::MODE_SIMPLE
,
979 'map_name' => 'SublocationDest',
981 'CreatorContactInfo' => array(
982 /* Note this maps to 2:118 in iim
983 * (Contact) field. However those field
984 * types are slightly different - 2:118
985 * is free form text field, where this
986 * is more structured.
988 'map_group' => 'general',
989 'mode' => XMPReader
::MODE_STRUCT
,
990 'map_name' => 'Contact',
992 'CiAdrExtadr' => true,
995 'CiEmailWork' => true,
997 'CiAdrPcode' => true,
998 'CiAdrRegion' => true,
1002 'CiAdrExtadr' => array( /* address */
1003 'map_group' => 'general',
1004 'mode' => XMPReader
::MODE_SIMPLE
,
1005 'structPart'=> true,
1007 'CiAdrCity' => array( /* city */
1008 'map_group' => 'general',
1009 'mode' => XMPReader
::MODE_SIMPLE
,
1010 'structPart'=> true,
1012 'CiAdrCtry' => array( /* country */
1013 'map_group' => 'general',
1014 'mode' => XMPReader
::MODE_SIMPLE
,
1015 'structPart'=> true,
1017 'CiEmailWork' => array( /* email (possibly separated by ',') */
1018 'map_group' => 'general',
1019 'mode' => XMPReader
::MODE_SIMPLE
,
1020 'structPart'=> true,
1022 'CiTelWork' => array( /* telephone */
1023 'map_group' => 'general',
1024 'mode' => XMPReader
::MODE_SIMPLE
,
1025 'structPart'=> true,
1027 'CiAdrPcode' => array( /* postal code */
1028 'map_group' => 'general',
1029 'mode' => XMPReader
::MODE_SIMPLE
,
1030 'structPart'=> true,
1032 'CiAdrRegion' => array( /* province/state */
1033 'map_group' => 'general',
1034 'mode' => XMPReader
::MODE_SIMPLE
,
1035 'structPart'=> true,
1037 'CiUrlWork' => array( /* url. Multiple may be separated by comma. */
1038 'map_group' => 'general',
1039 'mode' => XMPReader
::MODE_SIMPLE
,
1040 'structPart'=> true,
1042 /* End contact info struct properties */
1044 'http://iptc.org/std/Iptc4xmpExt/2008-02-29/' => array(
1046 'map_group' => 'general',
1047 'mode' => XMPReader
::MODE_SIMPLE
,
1049 'OrganisationInImageName' => array(
1050 'map_group' => 'general',
1051 'mode' => XMPReader
::MODE_BAG
,
1052 'map_name' => 'OrganisationInImage'
1054 'PersonInImage' => array(
1055 'map_group' => 'general',
1056 'mode' => XMPReader
::MODE_BAG
,
1058 'MaxAvailHeight' => array(
1059 'map_group' => 'general',
1060 'mode' => XMPReader
::MODE_SIMPLE
,
1061 'validate' => 'validateInteger',
1062 'map_name' => 'OriginalImageHeight',
1064 'MaxAvailWidth' => array(
1065 'map_group' => 'general',
1066 'mode' => XMPReader
::MODE_SIMPLE
,
1067 'validate' => 'validateInteger',
1068 'map_name' => 'OriginalImageWidth',
1070 // LocationShown and LocationCreated are handled
1071 // specially because they are hierarchical, but we
1072 // also want to merge with the old non-hierarchical.
1073 'LocationShown' => array(
1074 'map_group' => 'special',
1075 'mode' => XMPReader
::MODE_BAGSTRUCT
,
1076 'children' => array(
1077 'WorldRegion' => true,
1078 'CountryCode' => true, /* iso code */
1079 'CountryName' => true,
1080 'ProvinceState' => true,
1082 'Sublocation' => true,
1085 'LocationCreated' => array(
1086 'map_group' => 'special',
1087 'mode' => XMPReader
::MODE_BAGSTRUCT
,
1088 'children' => array(
1089 'WorldRegion' => true,
1090 'CountryCode' => true, /* iso code */
1091 'CountryName' => true,
1092 'ProvinceState' => true,
1094 'Sublocation' => true,
1097 'WorldRegion' => array(
1098 'map_group' => 'special',
1099 'mode' => XMPReader
::MODE_SIMPLE
,
1100 'structPart'=> true,
1102 'CountryCode' => array(
1103 'map_group' => 'special',
1104 'mode' => XMPReader
::MODE_SIMPLE
,
1105 'structPart'=> true,
1107 'CountryName' => array(
1108 'map_group' => 'special',
1109 'mode' => XMPReader
::MODE_SIMPLE
,
1110 'structPart'=> true,
1111 'map_name' => 'Country',
1113 'ProvinceState' => array(
1114 'map_group' => 'special',
1115 'mode' => XMPReader
::MODE_SIMPLE
,
1116 'structPart'=> true,
1117 'map_name' => 'ProvinceOrState',
1120 'map_group' => 'special',
1121 'mode' => XMPReader
::MODE_SIMPLE
,
1122 'structPart'=> true,
1124 'Sublocation' => array(
1125 'map_group' => 'special',
1126 'mode' => XMPReader
::MODE_SIMPLE
,
1127 'structPart'=> true,
1130 /* Other props that might be interesting but
1131 * Not currently extracted:
1132 * ArtworkOrObject, (info about objects in picture)
1138 /* Plus props we might want to consider:
1139 * (Note: some of these have unclear/incomplete definitions
1140 * from the iptc4xmp standard).
1141 * ImageSupplier (kind of like iptc source field)
1142 * ImageSupplierId (id code for image from supplier)
1146 * Various model release fields
1147 * Property release fields.