aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <s1lv10@uol.com.br>2010-04-23 17:27:00 -0300
committerSilvio <s1lv10@uol.com.br>2010-04-23 17:27:00 -0300
commit6def198e178665a3e575d833472e90fea559a9b2 (patch)
treebe063c9feedb7750cf84e1ff2f938374c2155f86
parentf29a55152a4365fb4eb591879a11b0d85edb7e81 (diff)
downloadexif-6def198e178665a3e575d833472e90fea559a9b2.tar.gz
exif-6def198e178665a3e575d833472e90fea559a9b2.tar.bz2
Adding getWMPFields()
-rw-r--r--exif.class.php80
1 files changed, 80 insertions, 0 deletions
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',
+ ),
+ );
+ }
}