From 6def198e178665a3e575d833472e90fea559a9b2 Mon Sep 17 00:00:00 2001 From: Silvio Date: Fri, 23 Apr 2010 17:27:00 -0300 Subject: Adding getWMPFields() --- exif.class.php | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/exif.class.php b/exif.class.php index 86185af..0b30a99 100644 --- a/exif.class.php +++ b/exif.class.php @@ -182,4 +182,84 @@ Class Exif { "2#000" => "record_version" ); } + + /** + * WMP fields mapper. As we're dealing with a mapper between RDF + * elements and CCK fields, we have to define custom keys that + * both on the field name and the namespace used. + * + * And, as the WMP specs also defines some datatypes like properties, + * arrays and structures, we have to deal with those as well. + * + * @return array + */ + public function getWMPFields() { + return array( + 'headline' => array( + 'name' => 'Headline', + 'ns' => 'photoshop', + 'type' => 'property', + ), + 'authorsposition' => array( + 'name' => 'AuthorsPosition', + 'ns' => 'photoshop', + 'type' => 'property', + ), + 'instructions' => array( + 'name' => 'Instructions', + 'ns' => 'photoshop', + 'type' => 'property', + ), + 'subject' => array( + 'name' => 'subject', + 'ns' => 'dc', + 'type' => 'array', + ), + 'description' => array( + 'name' => 'description', + 'ns' => 'dc', + 'type' => 'array', + ), + 'creator' => array( + 'name' => 'creator', + 'ns' => 'dc', + 'type' => 'array', + ), + 'rights' => array( + 'name' => 'rights', + 'ns' => 'dc', + 'type' => 'array', + ), + 'ciadrextadr' => array( + 'name' => 'CiAdrExtadr', + 'ns' => 'Iptc4XmpCore', + 'type' => 'struct', + ), + 'ciemailwork' => array( + 'name' => 'CiEmailWork', + 'ns' => 'Iptc4XmpCore', + 'type' => 'struct', + ), + 'ciurlwork' => array( + 'name' => 'CiUrlWork', + 'ns' => 'Iptc4XmpCore', + 'type' => 'struct', + ), + 'scene' => array( + 'name' => 'Scene', + 'ns' => 'Iptc4XmpCore', + 'type' => 'array', + ), + 'hierarchicalsubject' => array( + 'name' => 'hierarchicalSubject', + 'ns' => 'lr', + 'type' => 'array', + ), + 'location' => array( + 'name' => 'Location', + 'ns' => 'Iptc4XmpCore', + 'type' => 'property', + ), + ); + } } -- cgit v1.2.3