Skip to content
Browse files

fixed bug with MODS getQueries

  • Loading branch information...
1 parent d184236 commit f24164625032f34d2f879fa4528a1f13d973a07a @davidmcclure davidmcclure committed Jul 4, 2011
View
2 Importers/DC.php
@@ -67,7 +67,7 @@ public function canImport($datastream)
public function getQueries($name)
{
- return array('//*[local-name() = "' . $name . '"]');
+ return array('//*[local-name() = "' . strtolower($name) . '"]');
}
View
2 Importers/MODS.php
@@ -227,6 +227,8 @@ public function getQueries($name)
}
+ return $queries;
+
}
}
View
2 controllers/DatastreamsController.php
@@ -252,6 +252,8 @@ public function importAction()
$datastream = $this->getTable('FedoraConnectorDatastream')->find($id);
$importer = new FedoraConnector_Import();
+ // $importer->import($datastream);
+ // $this->_forward('browse', 'datastreams', 'fedora-connector');
if ($importer->import($datastream)) {
$this->flashSuccess('Metadata imported successfully.');
View
4 libraries/FedoraConnector/AbstractImporter.php
@@ -85,12 +85,14 @@ public function import($datastream)
foreach ($dcNames as $name) {
- $queries = $this->getQueries(strtolower($name));
+ $queries = $this->getQueries($name);
$element = $item->getElementByNameAndSetName(
$name,
'Dublin Core'
);
+ print_r($queries);
+
foreach ($this->queryAll($xpath, $queries) as $node) {
$this->addMetadata(
$item,

0 comments on commit f241646

Please sign in to comment.
Something went wrong with that request. Please try again.