Author: mcantelon
Date: Mon Sep 3 01:59:27 2012
New Revision: 12251
Log:
Changing some accession CSV import column names to match camelcase naming
scheme.
Modified:
trunk/lib/task/import/csvAccessionImportTask.class.php
Modified: trunk/lib/task/import/csvAccessionImportTask.class.php
==============================================================================
--- trunk/lib/task/import/csvAccessionImportTask.class.php Mon Sep 3
00:02:57 2012 (r12250)
+++ trunk/lib/task/import/csvAccessionImportTask.class.php Mon Sep 3
01:59:27 2012 (r12251)
@@ -136,16 +136,14 @@
'accessionNumber',
'acquisitionType',
'resourceType',
- 'DONOR',
- 'EMAIL',
- 'POSTAL CODE',
- 'TELEPHONE',
- 'ADDRESS_Street',
- 'ADDRESS_City',
- 'ADDRESS_Province',
- 'APPRAISAL NOTES',
- 'DISPOSITION NOTE',
- 'DATE OF CREATION',
+ 'donorName',
+ 'donorStreetAddress',
+ 'donorCity',
+ 'donorRegion',
+ 'donorCountry',
+ 'donorPostalCode',
+ 'donorTelephone',
+ 'donorEmail',
'creators'
),
@@ -188,41 +186,38 @@
{
if(isset($self->object) && is_object($self->object))
{
- if ($self->object)
+ if (
+ isset($self->rowStatusVars['creators'])
+ && $self->rowStatusVars['creators']
+ )
{
- if (
- isset($self->rowStatusVars['creators'])
- && $self->rowStatusVars['creators']
- )
+ $creators = explode('|', $self->rowStatusVars['creators']);
+ foreach($creators as $creator)
{
- $creators = explode('|', $self->rowStatusVars['creators']);
- foreach($creators as $creator)
- {
- // fetch/create actor
- $actor = $self->createOrFetchActor($creator);
+ // fetch/create actor
+ $actor = $self->createOrFetchActor($creator);
- // create relation between accession and creator
- $self->createRelation($actor->id, $self->object->id,
QubitTerm::CREATION_ID);
- }
+ // create relation between accession and creator
+ $self->createRelation($actor->id, $self->object->id,
QubitTerm::CREATION_ID);
}
}
if (
- isset($self->rowStatusVars['DONOR'])
- && $self->rowStatusVars['DONOR']
+ isset($self->rowStatusVars['donorName'])
+ && $self->rowStatusVars['donorName']
)
{
// fetch/create actor
- $actor = $self->createOrFetchActor($self->rowStatusVars['DONOR']);
+ $actor =
$self->createOrFetchActor($self->rowStatusVars['donorName']);
// map column names to QubitContactInformation properties
$columnToProperty = array(
- 'EMAIL' => 'email',
- 'TELEPHONE' => 'telephone',
- 'ADDRESS_Street' => 'streetAddress',
- 'ADDRESS_City' => 'city',
- 'ADDRESS_Province' => 'region',
- 'POSTAL CODE' => 'postalCode'
+ 'donorEmail' => 'email',
+ 'donorTelephone' => 'telephone',
+ 'donorStreetAddress' => 'streetAddress',
+ 'donorCity' => 'city',
+ 'donorRegion' => 'region',
+ 'donorPostalCode' => 'postalCode'
);
// set up creation of contact infomation
--
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.