Author: sevein
Date: Tue Oct 11 23:37:41 2011
New Revision: 10025
Log:
Parsing METS.xml
Modified:
trunk/plugins/qtSwordPlugin/lib/qtPackageExtractor.class.php
Modified: trunk/plugins/qtSwordPlugin/lib/qtPackageExtractor.class.php
==============================================================================
--- trunk/plugins/qtSwordPlugin/lib/qtPackageExtractor.class.php Tue Oct
11 17:55:18 2011 (r10024)
+++ trunk/plugins/qtSwordPlugin/lib/qtPackageExtractor.class.php Tue Oct
11 23:37:41 2011 (r10025)
@@ -43,6 +43,77 @@
$this->extract();
$this->document = new SimpleXMLElement($this->document);
+
+ $this->getMainDmdSec();
+ }
+
+ protected function processDmdSec($item)
+ {
+ foreach ($item->xpath('mdWrap/xmlData/dublincore/dcterms:*') as $item)
+ {
+ switch($item->getName())
+ {
+ case 'title'
+
+ break;
+
+ case 'creator'
+
+ break;
+
+ case 'subject'
+
+ break;
+
+ case 'description'
+
+ break;
+
+ case 'publisher'
+
+ break;
+
+ case 'contributor'
+
+ break;
+
+ case 'date'
+
+ break;
+
+ case 'type'
+
+ break;
+
+ case 'format':
+
+ break;
+
+ case 'identifier':
+
+ break;
+
+ case 'source':
+
+ break;
+
+ case 'language':
+
+ break;
+
+ case 'isPartOf':
+
+ break;
+
+ case 'coverage':
+
+ break;
+
+ case 'rights':
+
+ break;
+ }
+ }
}
protected function extract()
@@ -62,7 +133,14 @@
}
}
- protected function getObjectContainer()
+ protected function getMainDmdSec()
{
+ $items = $this->document->xpath('/mets/structMap/div/div');
+
+ $id = $items[0]['DMID']; $id = 'SIP-description';
+
+ $dmdSec = $this->document->xpath("/mets/dmdSec[@ID='$id']");
+
+ return $dmdSec['0'];
}
}
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.