Author: mcantelon
Date: Fri Jan 20 15:16:36 2012
New Revision: 10737
Log:
Minor refactor by using helper function.
Modified:
trunk/lib/task/import/csvImportTask.class.php
Modified: trunk/lib/task/import/csvImportTask.class.php
==============================================================================
--- trunk/lib/task/import/csvImportTask.class.php Fri Jan 20 15:13:43
2012 (r10736)
+++ trunk/lib/task/import/csvImportTask.class.php Fri Jan 20 15:16:36
2012 (r10737)
@@ -284,11 +284,7 @@
foreach($self->rowStatusVars['nameAccessPoints'] as $name)
{
$actor = $self->createOrFetchActor($name);
- $relation = new QubitRelation;
- $relation->subjectId = $self->object->id;
- $relation->objectId = $actor->id;
- $relation->typeId = QubitTerm::NAME_ACCESS_POINT_ID;
- $relation->save();
+ $self->createRelation($self->object->id, $actor->id,
QubitTerm::NAME_ACCESS_POINT_ID);
}
}
@@ -336,11 +332,7 @@
print "\nAssociating accession # ". $accessionNumber ." with ".
$self->object->title ."\n";
// add relationship between information object and accession
- $relation = new QubitRelation;
- $relation->subjectId = $self->object->id;
- $relation->objectId = $accessionId;
- $relation->typeId = QubitTerm::ACCESSION_ID;
- $relation->save();
+ $self->createRelation($self->object->id, $accessionId,
QubitTerm::ACCESSION_ID);
}
}
--
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.