Author: david
Date: Mon Nov 8 13:37:08 2010
New Revision: 8803
Log:
Re-implement setNote() method dropped in revision 6006. Rename to
importEadNote() to avoid conflict with 'note' mutator. Fixes issue #1894.
Modified:
trunk/apps/qubit/modules/object/config/import/ead.yml
trunk/lib/model/QubitInformationObject.php
Modified: trunk/apps/qubit/modules/object/config/import/ead.yml
==============================================================================
--- trunk/apps/qubit/modules/object/config/import/ead.yml Mon Nov 8
11:49:18 2010 (r8802)
+++ trunk/apps/qubit/modules/object/config/import/ead.yml Mon Nov 8
13:37:08 2010 (r8803)
@@ -128,7 +128,7 @@
#TODO: check for @type attribute and pass it as note type
note:
XPath: "(note | descgrp/note | did/note)"
- Method: setNote
+ Method: importEadNote
Parameters: ["$options = array('note' => $nodeValue, 'noteTypeId' =>
QubitTerm::GENERAL_NOTE_ID)"]
bioghist:
@@ -202,7 +202,7 @@
processinfo:
XPath: "(processinfo | descgrp/processinfo)"
- Method: setNote
+ Method: importEadNote
Parameters: ["$options = array('note' => $nodeValue, 'noteTypeId' =>
QubitTerm::ARCHIVIST_NOTE_ID)"]
userestrict:
@@ -224,10 +224,10 @@
bibliography:
XPath: "(bibliography | descgrp/bibliography)"
- Method: setNote
+ Method: importEadNote
Parameters: ["$options = array('note' => $nodeValue, 'noteTypeId' =>
QubitTerm::PUBLICATION_NOTE_ID)"]
odd:
XPath: "odd"
- Method: setNote
+ Method: importEadNote
Parameters: ["$options = array('note' => $nodeValue, 'noteTypeId' =>
QubitTerm::OTHER_DESCRIPTIVE_DATA_ID)"]
Modified: trunk/lib/model/QubitInformationObject.php
==============================================================================
--- trunk/lib/model/QubitInformationObject.php Mon Nov 8 11:49:18 2010
(r8802)
+++ trunk/lib/model/QubitInformationObject.php Mon Nov 8 13:37:08 2010
(r8803)
@@ -1433,6 +1433,17 @@
}
}
+ public function importEadNote(array $options = array())
+ {
+ $newNote = new QubitNote;
+ $newNote->setScope('QubitInformationObject');
+ $newNote->setUserId($options['userId']);
+ $newNote->setContent($options['note']);
+ $newNote->setTypeId($options['noteTypeId']);
+
+ $this->notes[] = $newNote;
+ }
+
/**************
OAI methods
***************/
--
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.