Author: mcantelon
Date: Tue Apr 24 10:12:37 2012
New Revision: 11508
Log:
Some work on generalizing accession import.
Modified:
trunk/lib/task/import/csvAccessionImportTask.class.php
Modified: trunk/lib/task/import/csvAccessionImportTask.class.php
==============================================================================
--- trunk/lib/task/import/csvAccessionImportTask.class.php Tue Apr 24
09:05:07 2012 (r11507)
+++ trunk/lib/task/import/csvAccessionImportTask.class.php Tue Apr 24
10:12:37 2012 (r11508)
@@ -92,7 +92,11 @@
),
'standardColumns' => array(
- 'title'
+ 'title',
+ 'locationInformation',
+ 'scopeAndContent',
+ 'archivalHistory',
+ 'receivedExtentUnits'
),
/* import columns that should be redirected to QubitInformationObject
@@ -117,10 +121,8 @@
'TITLE' => 'title',
'LOCATION' => 'locationInformation',
'SCOPE AND CONTENT' => 'scopeAndContent',
- 'scopeAndContent' => 'scopeAndContent',
'physicalCondition' => 'physicalCharacteristics',
'CONSERVATION NOTE' => 'physicalCharacteristics',
- 'extent' => 'receivedExtentUnits',
'primaryNotes' => 'notes',
'notes' => 'notes'
),
@@ -183,11 +185,6 @@
);
}
- if (isset($self->rowStatusVars['receivedExtentUnits']))
- {
- $self->object->receivedExtentUnits =
$self->rowStatusVars['receivedExtentUnits'];
- }
-
if (isset($self->rowStatusVars['processingNotes']))
{
$self->object->processingNotes =
$self->rowStatusVars['processingNotes'];
@@ -419,51 +416,6 @@
}
}
- protected function setUpExtentColumnHandling(&$import)
- {
- // map of extent-related column names to their corresponding prefixes
- $extentColumnsAndPrefixes = array(
- 'INARCHITECTURALPLAN' => "Plans (count): ",
- 'INAUDIOCASSETTE' => "Audio Cassettes (count): ",
- 'INAUDIOREEL' => "Audio Reels (count): ",
- 'INCOMPACTDISC' => "CDs (count): ",
- 'INDIGITALPHOTO' => "Digital Photos (count): ",
- 'INDOCUMENTARYART' => "Doc Art (count): ",
- 'INDVD' => "DVDs (count): ",
- 'INFILMREEL' => "Film Reels (count): ",
- 'INMAP' => "Maps (count): ",
- 'INMICROFICHE' => "Microfiche (count): ",
- 'INMICROFILM' => "Microfilm Reels (count): ",
- 'INNEGATIVE' => "Photo Negs (count): ",
- 'INOTHER MATERIALS' => "Other Materials (count): ",
- 'INPHOTOGRAPHICPRINT' => "Photo Prints (count): ",
- 'INSLIDE' => "Slides (count): ",
- 'INTEXTUALRECORDS' => "Textual (m): ",
- 'INVIDEOCASSETTE' => "Video Cassettes (count): "
- );
-
- // store column/prefix data as we need to access it from inside a handler
- $import->setStatus('extentColumnsAndPrefixes', $extentColumnsAndPrefixes);
-
- // handling logic for extent columns
- $extentColumnHandler = function(&$self, $data)
- {
- csvAccessionImportTask::appendColumnDataToRowVarWithColumnSpecificPrefix(
- $self,
- $self->status['currentColumn'],
- $data,
- 'receivedExtentUnits',
- $self->getStatus('extentColumnsAndPrefixes')
- );
- };
-
- // add handler for each extent-related column
- $import->addColumnHandlers(
- array_keys($extentColumnsAndPrefixes),
- $extentColumnHandler
- );
- }
-
protected function setUpProcessingNoteColumnHandling(&$import)
{
// map of processing-note-related column names to their corresponding
prefixes
@@ -485,7 +437,7 @@
// store column/prefix data as we need to access it from inside a handler
$import->setStatus('processingNoteColumnsAndPrefixes',
$processingNoteColumnsAndPrefixes);
- // handling logic for extent columns
+ // handling logic for processing note columns
$processingNoteColumnHandler = function(&$self, $data)
{
csvAccessionImportTask::appendColumnDataToRowVarWithColumnSpecificPrefix(
@@ -497,7 +449,7 @@
);
};
- // add handler for each extent-related column
+ // add handler for each processing-note-related column
$import->addColumnHandlers(
array_keys($processingNoteColumnsAndPrefixes),
$processingNoteColumnHandler
--
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.