Author: mcantelon
Date: Mon Feb 13 15:48:15 2012
New Revision: 10875

Log:
Added logic to associate information object with container.

Modified:
   trunk/lib/task/import/csvImportTask.class.php

Modified: trunk/lib/task/import/csvImportTask.class.php
==============================================================================
--- trunk/lib/task/import/csvImportTask.class.php       Mon Feb 13 15:06:43 
2012        (r10874)
+++ trunk/lib/task/import/csvImportTask.class.php       Mon Feb 13 15:48:15 
2012        (r10875)
@@ -277,10 +277,18 @@
               && $self->rowStatusVars['physicalObjectLocation']
             )
             {
-              createOrFetchPhysicalObject(
+              // create/fetch container
+              $container = createOrFetchPhysicalObject(
                 $name,
                 $location
               );
+
+              // associate container with information object
+              createRelation(
+                $self->object->id,
+                $container->id,
+                QubitTerm::HAS_PHYSICAL_OBJECT_ID
+              );
             } else {
               $error = 'Both physicalObjectName and physicalObjectLocation '
                      + 'required to create a physical object.';

-- 
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.

Reply via email to