Author: david
Date: 2008-12-12 17:07:46 -0800 (Fri, 12 Dec 2008)
New Revision: 1679
Modified:
trunk/qubit/lib/task/migrate/QubitMigrate103to104.class.php
trunk/qubit/lib/task/migrate/QubitMigrateData.class.php
Log:
More work on 1.0.3 -> 1.0.4 migration task.
Modified: trunk/qubit/lib/task/migrate/QubitMigrate103to104.class.php
===================================================================
--- trunk/qubit/lib/task/migrate/QubitMigrate103to104.class.php 2008-12-12
23:29:21 UTC (rev 1678)
+++ trunk/qubit/lib/task/migrate/QubitMigrate103to104.class.php 2008-12-13
01:07:46 UTC (rev 1679)
@@ -66,10 +66,10 @@
* @param string $searchKey
* @return string key for matched row
*/
- protected function getRowKey($className, $searchColumn, $searchKey)
+ private function getRowKey($className, $searchColumn, $searchKey)
{
return QubitMigrateData::findRowKeyForColumnValue(
- $this->data[$className], $searchColumn, $searchKey);
+ $this->data[$className], $searchColumn, $searchKey);
}
/**
@@ -77,7 +77,7 @@
*
* @return QubitMigrate103to104 this object
*/
- protected function alterData()
+ private function alterData()
{
// Move QubitTaxonomy to front of the line
if (key($this->data) != 'QubitTaxonomy')
@@ -87,7 +87,8 @@
$this->data = array_merge_recursive($taxonomy, $this->data);
}
- // Alter qubit objects
+ // Alter qubit classes (methods ordered alphabetically)
+ $this->alterQubitActors();
$this->alterQubitEvents();
$this->alterQubitNotes();
$this->alterQubitProperties();
@@ -96,6 +97,12 @@
$this->alterQubitTaxonomy();
$this->alterQubitTerms();
+ // Sort objects within classes
+ $this->sortQubitTerms();
+
+ // Sort classes
+ $this->sortClasses();
+
ob_start();
var_dump($this->data);
$dataString = ob_get_contents();
@@ -112,11 +119,22 @@
}
/**
+ * Alter QubitActor data
+ *
+ * @return QubitMigrate103to104 $this object
+ */
+ private function alterQubitActors()
+ {
+ // NOTE: 'dates_of_existence' data is added to QubitActor objects in
+ // The alterQubitEvents() method.
+ }
+
+ /**
* Alter QubitEvent data
*
* @return QubitMigrate103to104 this object
*/
- protected function alterQubitEvents()
+ private function alterQubitEvents()
{
// re-map data QubitEvent::description -> QubitEvent::date_display
foreach ($this->data['QubitEvent'] as $key => $event)
@@ -128,7 +146,7 @@
}
}
- // Add actor to TeleLearning Network creation even
+ // Add actor to TeleLearning Network creation event
$teleLearningFondsKey = $this->getRowKey('QubitInformationObject',
'title', array('en' => 'TeleLearning Network fonds'));
$teleLearningActorKey = $this->getRowKey('QubitActor',
'authorized_form_of_name', array('en' => 'TeleLearning Network Inc'));
$creationEventTermKey = $this->getRowKey('QubitTerm', 'id', '<?php echo
QubitTerm::CREATION_ID."\n" ?>');
@@ -138,8 +156,8 @@
foreach ($this->data['QubitEvent'] as $key => $columns)
{
if (isset($columns['information_object_id']) &&
isset($columns['type_id'])
- && $columns['information_object_id'] == $teleLearningFondsKey
- && $columns['type_id'] == $creationEventTermKey)
+ && $columns['information_object_id'] == $teleLearningFondsKey
+ && $columns['type_id'] == $creationEventTermKey)
{
$this->data['QubitEvent'][$key]['actor_id'] = $teleLearningActorKey;
break;
@@ -147,6 +165,37 @@
}
}
+ // Remove "existence" events and move existence info into actor table
+ // dates_of_existence column
+ $existenceTermKey = $this->getTermExistenceKey();
+ foreach ($this->data['QubitEvent'] as $key => $columns)
+ {
+ if ($columns['type_id'] == $existenceTermKey)
+ {
+ $this->data['QubitActor'][$columns['actor_id']]['dates_of_existence']
= $columns['date_display'];
+ unset($this->data['QubitEvent'][$key]);
+ }
+ }
+
+ // Switch from assigning actor_role_id to event to determining actor role
+ // based on event type (eg. event type = creation then actor role =
creator)
+ foreach ($this->data['QubitEvent'] as $key => $columns)
+ {
+ // Remove actor_role_id column from existing events (deprecated)
+ if (isset($columns['actor_role_id']))
+ {
+ unset($this->data['QubitEvent'][$key]['actor_role_id']);
+ }
+
+ // Add event type_id of "creation" to events that don't already have an
+ // assigned type_id
+ if (!isset($columns['type_id']))
+ {
+ $this->data['QubitEvent'][$key] = array_merge(
+ array('type_id' => $creationEventTermKey),
$this->data['QubitEvent'][$key]);
+ }
+ }
+
return $this;
}
@@ -155,116 +204,121 @@
*
* @return QubitMigrate103to104 this object
*/
- protected function alterQubitNotes()
+ private function alterQubitNotes()
{
- // Add new Qubit Notes
+ // Add new Qubit Display Notes
$this->data['QubitNote']['QubitNote_accumulator'] = array(
- 'object_id' => 'QubitTerm_Accumulation',
+ 'object_id' => 'QubitTerm_accumulation',
'type_id' => 'QubitTerm_display_note',
- 'user_id' => 'QubitUser_113',
'scope' => 'QubitTerm',
'source_culture' => 'en',
'content' => array('en' => 'Accumulator')
);
- $this->data['QubitNote']['QubitNote_creator'] = array(
- 'object_id' => 'QubitTerm_11',
- 'type_id' => 'QubitTerm_display_note',
- 'user_id' => 'QubitUser_113',
- 'scope' => 'QubitTerm',
- 'source_culture' => 'en',
- 'content' => array('en' => 'Creator', 'es' => 'Produtor', 'fr' =>
'Producteur', 'nl' => 'Vervaardiger', 'pt' => 'Produtor')
- );
- $this->data['QubitNote']['QubitNote_subject'] = array(
- 'object_id' => 'QubitTerm_12',
- 'type_id' => 'QubitTerm_display_note',
- 'user_id' => 'QubitUser_113',
- 'scope' => 'QubitTerm',
- 'source_culture' => 'en',
- 'content' => array('en' => 'Subject', 'fr' => 'Sujet', 'nl' =>
'Onderwerp', 'pt' => 'Assunto')
- );
- $this->data['QubitNote']['QubitNote_custodian'] = array(
- 'object_id' => 'QubitTerm_13',
- 'type_id' => 'QubitTerm_display_note',
- 'user_id' => 'QubitUser_113',
- 'scope' => 'QubitTerm',
- 'source_culture' => 'en',
- 'content' => array('en' => 'Custodian', 'es' => 'Custodiador', 'fr' =>
'Détenteur', 'nl' => 'Beheerder', 'pt' => 'Custodiador')
- );
- $this->data['QubitNote']['QubitNote_publisher'] = array(
- 'type_id' => 'QubitTerm_display_note',
- 'user_id' => 'QubitUser_113',
- 'scope' => 'QubitTerm',
- 'source_culture' => 'en',
- 'content' => array('en' => 'Publisher', 'es' => 'Publicador', 'fr' =>
'Éditeur', 'nl' => 'Uitgever', 'pt' => 'Publicador')
- );
- $this->data['QubitNote']['QubitNote_contributor'] = array(
- 'object_id' => 'QubitTerm_15',
- 'type_id' => 'QubitTerm_display_note',
- 'user_id' => 'QubitUser_113',
- 'scope' => 'QubitTerm',
- 'source_culture' => 'en',
- 'content' => array('en' => 'Contributor', 'es' => 'Colaborador', 'fr' =>
'Collaborateur', 'nl' => 'Contribuant', 'pt' => 'Colaborador')
- );
- $this->data['QubitNote']['QubitNote_collector'] = array(
- 'object_id' => 'QubitTerm_17',
- 'type_id' => 'QubitTerm_display_note',
- 'user_id' => 'QubitUser_113',
- 'scope' => 'QubitTerm',
- 'source_culture' => 'en',
- 'content' => array('en' => 'Collector', 'fr' => 'Collectionneur', 'nl'
=> 'Verzamelaar', 'pt' => 'Coletor')
- );
+ if ($termKey = $this->getRowKey('QubitTerm', 'name', '<?php echo
QubitTerm::CREATION_ID."\n" ?>'))
+ {
+ $this->data['QubitNote']['QubitNote_creator'] = array(
+ 'object_id' => $termKey,
+ 'type_id' => 'QubitTerm_display_note',
+ 'scope' => 'QubitTerm',
+ 'source_culture' => 'en',
+ 'content' => array('en' => 'Creator', 'es' => 'Produtor', 'fr' =>
'Producteur', 'nl' => 'Vervaardiger', 'pt' => 'Produtor')
+ );
+ }
+ if ($termKey = $this->getRowKey('QubitTerm', 'name', '<?php echo
QubitTerm::SUBJECT_ID."\n" ?>'))
+ {
+ $this->data['QubitNote']['QubitNote_subject'] = array(
+ 'object_id' => $termKey,
+ 'type_id' => 'QubitTerm_display_note',
+ 'scope' => 'QubitTerm',
+ 'source_culture' => 'en',
+ 'content' => array('en' => 'Subject', 'fr' => 'Sujet', 'nl' =>
'Onderwerp', 'pt' => 'Assunto')
+ );
+ }
+ if ($termKey = $this->getRowKey('QubitTerm', 'name', '<?php echo
QubitTerm::CUSTODY_ID."\n" ?>'))
+ {
+ $this->data['QubitNote']['QubitNote_custodian'] = array(
+ 'object_id' => $termKey,
+ 'type_id' => 'QubitTerm_display_note',
+ 'scope' => 'QubitTerm',
+ 'source_culture' => 'en',
+ 'content' => array('en' => 'Custodian', 'es' => 'Custodiador', 'fr' =>
'Détenteur', 'nl' => 'Beheerder', 'pt' => 'Custodiador')
+ );
+ }
+ if ($termKey = $this->getRowKey('QubitTerm', 'name', '<?php echo
QubitTerm::PUBLICATION_ID."\n" ?>'))
+ {
+ $this->data['QubitNote']['QubitNote_publisher'] = array(
+ 'object_id' => $termKey,
+ 'type_id' => 'QubitTerm_display_note',
+ 'scope' => 'QubitTerm',
+ 'source_culture' => 'en',
+ 'content' => array('en' => 'Publisher', 'es' => 'Publicador', 'fr' =>
'Éditeur', 'nl' => 'Uitgever', 'pt' => 'Publicador')
+ );
+ }
+ if ($termKey = $this->getRowKey('QubitTerm', 'name', '<?php echo
QubitTerm::CONTRIBUTION_ID."\n" ?>'))
+ {
+ $this->data['QubitNote']['QubitNote_contributor'] = array(
+ 'object_id' => $termKey,
+ 'type_id' => 'QubitTerm_display_note',
+ 'scope' => 'QubitTerm',
+ 'source_culture' => 'en',
+ 'content' => array('en' => 'Contributor', 'es' => 'Colaborador', 'fr'
=> 'Collaborateur', 'nl' => 'Contribuant', 'pt' => 'Colaborador')
+ );
+ }
+ if ($termKey = $this->getRowKey('QubitTerm', 'name', '<?php echo
QubitTerm::COLLECTION_ID."\n" ?>'))
+ {
+ $this->data['QubitNote']['QubitNote_collector'] = array(
+ 'object_id' => 'QubitTerm_17',
+ 'type_id' => 'QubitTerm_display_note',
+ 'scope' => 'QubitTerm',
+ 'source_culture' => 'en',
+ 'content' => array('en' => 'Collector', 'fr' => 'Collectionneur', 'nl'
=> 'Verzamelaar', 'pt' => 'Coletor')
+ );
+ }
$this->data['QubitNote']['QubitNote_author'] = array(
- 'object_id' => 'QubitTerm_17a',
+ 'object_id' => 'QubitTerm_writing',
'type_id' => 'QubitTerm_display_note',
- 'user_id' => 'QubitUser_113',
'scope' => 'QubitTerm',
'source_culture' => 'en',
'content' => array('en' => 'Author')
);
$this->data['QubitNote']['QubitNote_editor'] = array(
- 'object_id' => 'QubitTerm_17b',
+ 'object_id' => 'QubitTerm_editing',
'type_id' => 'QubitTerm_display_note',
- 'user_id' => 'QubitUser_113',
'scope' => 'QubitTerm',
'source_culture' => 'en',
'content' => array('en' => 'Editor')
);
$this->data['QubitNote']['QubitNote_translator'] = array(
- 'object_id' => 'QubitTerm_17c',
+ 'object_id' => 'QubitTerm_translation',
'type_id' => 'QubitTerm_display_note',
- 'user_id' => 'QubitUser_113',
'scope' => 'QubitTerm',
'source_culture' => 'en',
'content' => array('en' => 'Translator')
);
$this->data['QubitNote']['QubitNote_compiler'] = array(
- 'object_id' => 'QubitTerm_17d',
+ 'object_id' => 'QubitTerm_compilation',
'type_id' => 'QubitTerm_display_note',
- 'user_id' => 'QubitUser_113',
'scope' => 'QubitTerm',
'source_culture' => 'en',
'content' => array('en' => 'Compiler')
);
$this->data['QubitNote']['QubitNote_distributor'] = array(
- 'object_id' => 'QubitTerm_17e',
+ 'object_id' => 'QubitTerm_distribution',
'type_id' => 'QubitTerm_display_note',
- 'user_id' => 'QubitUser_113',
'scope' => 'QubitTerm',
'source_culture' => 'en',
'content' => array('en' => 'Distributor')
);
$this->data['QubitNote']['QubitNote_broadcaster'] = array(
- 'object_id' => 'QubitTerm_17f',
+ 'object_id' => 'QubitTerm_broadcasting',
'type_id' => 'QubitTerm_display_note',
- 'user_id' => 'QubitUser_113',
'scope' => 'QubitTerm',
'source_culture' => 'en',
'content' => array('en' => 'Broadcaster')
);
$this->data['QubitNote']['QubitNote_manufacturer'] = array(
- 'object_id' => 'QubitTerm_17g',
+ 'object_id' => 'QubitTerm_manufacturing',
'type_id' => 'QubitTerm_display_note',
- 'user_id' => 'QubitUser_113',
'scope' => 'QubitTerm',
'source_culture' => 'en',
'content' => array('en' => 'Manufacturer')
@@ -274,11 +328,11 @@
}
/**
- * Alter QubitProperty d
+ * Alter QubitProperty data
*
- * @return QubitMigrate103to104 this objec
+ * @return QubitMigrate103to104 this object
*/
- protected function alterQubitProperties()
+ private function alterQubitProperties()
{
// re-map QubitProperty 'value' column to i18n table
foreach ($this->data['QubitProperty'] as $key => $property)
@@ -298,7 +352,7 @@
*
* @return QubitMigrate103to104 this object
*/
- protected function alterQubitStaticPages()
+ private function alterQubitStaticPages()
{
// Update version number
foreach ($this->data['QubitStaticPage'] as $key => $page)
@@ -317,7 +371,7 @@
*
* @return QubitMigrate103to104 this object
*/
- protected function alterQubitSettings()
+ private function alterQubitSettings()
{
// Remove old QubitSettings for default templates
$i = 0;
@@ -423,7 +477,7 @@
*
* @return QubitMigrate103to104 this object
*/
- protected function alterQubitTaxonomy()
+ private function alterQubitTaxonomy()
{
// Add new QubitTaxonomy objects
$this->data['QubitTaxonomy']['QubitTaxonomy_MaterialType'] = array(
@@ -458,31 +512,33 @@
*
* @return QubitMigrate103to104 this object
*/
- protected function alterQubitTerms()
+ private function alterQubitTerms()
{
- // Swap Event Type: Existence -> Subject
- if ($existenceKey = $this->getRowKey('QubitTerm', 'id', '<?php echo
QubitTerm::EXISTENCE_ID."\n" ?>'))
+ // Swap Term EXISTENCE_ID for SUBJECT_ID in the Event type taxonomy
+ if ($existenceKey = $this->getTermExistenceKey())
{
$this->data['QubitTerm'][$existenceKey]['id'] = '<?php echo
QubitTerm::SUBJECT_ID."\n" ?>';
$this->data['QubitTerm'][$existenceKey]['name'] = array(
'en'=>'Subject', 'fr' => 'Sujet', 'nl' => 'Onderwerp', 'pt' =>
'Assunto');
}
- // Get taxonomy event type key
+ // Event Types
$taxonomyEventTypeKey = $this->getRowKey('QubitTaxonomy', 'id', '<?php
echo QubitTaxonomy::EVENT_TYPE_ID."\n" ?>');
// Add QubitTerm:accumulation after QubitTerm:collection
$collectionKey = $this->getRowKey('QubitTerm', 'id', '<?php echo
QubitTerm::COLLECTION_ID."\n" ?>');
$collectionIndex =
QubitMigrateData::getArrayKeyIndex($this->data['QubitTerm'], $collectionKey);
- $newQubitTerms['QubitTerm_accumulation'] = array(
- 'taxonomy_id' => $taxonomyEventTypeKey,
- 'id' => '<?php echo QubitTerm::ACCUMULATION_ID."\n" ?>',
- 'source_culture' => 'en',
- 'name' => array('en' => 'Accumulation')
- );
- QubitMigrateData::array_insert($this->data['QubitTerm'],
($collectionIndex+1), $newQubitTerms);
+ if (false !== $collectionIndex)
+ {
+ $newEventTypes['QubitTerm_accumulation'] = array(
+ 'taxonomy_id' => $taxonomyEventTypeKey,
+ 'id' => '<?php echo QubitTerm::ACCUMULATION_ID."\n" ?>',
+ 'source_culture' => 'en',
+ 'name' => array('en' => 'Accumulation')
+ );
+ QubitMigrateData::array_insert($this->data['QubitTerm'],
($collectionIndex+1), $newEventTypes);
+ }
- // Event Types
$this->data['QubitTerm']['QubitTerm_writing'] = array(
'taxonomy_id' => $taxonomyEventTypeKey,
'source_culture' => 'en',
@@ -519,6 +575,24 @@
'name' => array('en' => 'Manufacturing')
);
+ // Note type
+ $taxonomyNoteTypeKey = $this->getRowKey('QubitTaxonomy', 'id', '<?php echo
QubitTaxonomy::NOTE_TYPE_ID."\n" ?>');
+
+ // Add display note after scope note
+ $scopeNoteKey = $this->getRowKey('QubitTerm', 'id', '<?php echo
QubitTerm::SCOPE_NOTE_ID."\n" ?>');
+ $scopeNoteIndex =
QubitMigrateData::getArrayKeyIndex($this->data['QubitTerm'], $scopeNoteKey);
+ if (false !== $scopeNoteIndex)
+ {
+ $newNoteTypes['QubitTerm_display_note'] = array(
+ 'taxonomy_id' => $taxonomyNoteTypeKey,
+ 'id' => '<?php echo QubitTerm::DISPLAY_NOTE_ID."\n" ?>',
+ 'class_name' => 'QubitTerm',
+ 'source_culture' => 'en',
+ 'name' => array('en' => 'Display note')
+ );
+ QubitMigrateData::array_insert($this->data['QubitTerm'],
($scopeNoteIndex+1), $newNoteTypes);
+ }
+
// Material Types
$this->data['QubitTerm']['QubitTerm_material_type_architectural_drawing']
= array(
'taxonomy_id' => 'QubitTaxonomy_MaterialType',
@@ -581,16 +655,6 @@
'name' => array('en' => 'Textual record')
);
- // Display Note
- $taxonomyNoteTypeKey = $this->getRowKey('QubitTaxonomy', 'id', '<?php echo
QubitTaxonomy::NOTE_TYPE_ID."\n" ?>');
- $this->data['QubitTerm']['QubitTerm_display_note'] = array(
- 'taxonomy_id' => $taxonomyNoteTypeKey,
- 'id' => '<?php echo QubitTerm::DISPLAY_NOTE_ID."\n" ?>',
- 'class_name' => 'QubitTerm',
- 'source_culture' => 'en',
- 'name' => array('en' => 'Display note')
- );
-
// RAD Note Types
$this->data['QubitTerm']['QubitTerm_rad_notes_edition'] = array(
'taxonomy_id' => 'QubitTaxonomy_Rad_Note',
@@ -702,11 +766,140 @@
}
/**
+ * Sort term objects with pre-defined IDs to start of array to prevent
+ * pre-emptive assignment IDs by auto-increment
+ *
+ * @return unknown
+ */
+ private function sortQubitTerms()
+ {
+ $qubitTermConstantIds = array(
+ //EventType taxonomy
+ 'CREATION_ID',
+ 'SUBJECT_ID',
+ 'CUSTODY_ID',
+ 'PUBLICATION_ID',
+ 'CONTRIBUTION_ID',
+ 'COLLECTION_ID',
+ 'ACCUMULATION_ID',
+ //NoteType taxonomy
+ 'TITLE_NOTE_ID',
+ 'PUBLICATION_NOTE_ID',
+ 'SOURCE_NOTE_ID',
+ 'SCOPE_NOTE_ID',
+ 'DISPLAY_NOTE_ID',
+ //CollectionType taxonomy
+ 'ARCHIVAL_MATERIAL_ID',
+ 'FINDING_AIDS_ID',
+ 'PUBLISHED_MATERIAL_ID',
+ 'ARTEFACT_MATERIAL_ID',
+ //ActorEntityType taxonomy
+ 'CORPORATE_BODY_ID',
+ 'PERSON_ID',
+ 'FAMILY_ID',
+ //OtherNameType taxonomy
+ 'FAMILY_NAME_FIRST_NAME_ID',
+ //MediaType taxonomy
+ 'AUDIO_ID',
+ 'IMAGE_ID',
+ 'TEXT_ID',
+ 'VIDEO_ID',
+ 'OTHER_ID',
+ //Digital Object Usage taxonomy
+ 'MASTER_ID',
+ 'REFERENCE_ID',
+ 'THUMBNAIL_ID',
+ //Physical Object Type taxonomy
+ 'LOCATION_ID',
+ 'CONTAINER_ID',
+ 'ARTEFACT_ID',
+ //Relation Type taxonomy
+ 'HAS_PHYSICAL_OBJECT_ID'
+ );
+
+ // Restack array with Constant values at top
+ $qubitTermArray = $this->data['QubitTerm'];
+ foreach ($qubitTermConstantIds as $key => $constantName)
+ {
+ foreach ($qubitTermArray as $key => $term)
+ {
+ if ($term['id'] == '<?php echo QubitTerm::'.$constantName.'."\n" ?>')
+ {
+ $newTermArray[$key] = $term;
+ unset($qubitTermArray[$key]);
+ break;
+ }
+ }
+ }
+
+ // Append remaining (variable id) terms to the end of the new array
+ foreach ($qubitTermArray as $key => $term)
+ {
+ $newTermArray[$key] = $term;
+ }
+
+ $this->data['QubitTerm'] = $newTermArray;
+
+ return $this;
+ }
+
+ /**
+ * Sort ORM classes to avoid foreign key constraint failures on data load
+ *
+ * @return QubitMigrate103to104 this object
+ */
+ private function sortClasses()
+ {
+ $ormSortOrder = array(
+ 'QubitTaxonomy',
+ 'QubitTerm',
+ 'QubitSetting',
+ 'QubitStaticPage',
+ 'QubitActor',
+ 'QubitUser',
+ 'QubitRole',
+ 'QubitUserRoleRelation',
+ 'QubitRepository',
+ 'QubitContactInformation',
+ 'QubitInformationObject',
+ 'QubitDigitalObject',
+ 'QubitPhysicalObject',
+ 'QubitEvent',
+ 'QubitObjectTermRelation',
+ 'QubitRelation',
+ 'QubitProperty',
+ 'QubitNote'
+ );
+
+ $originalData = $this->data;
+
+ foreach ($ormSortOrder as $i => $className)
+ {
+ $sortedData[$className] = $originalData[$className];
+ unset($originalData[$className]);
+ }
+
+ // If their are classes in the original data that are not listed in the
+ // ormSortOrder array then tack them on to the end of the sorted data
+ if (count($originalData))
+ {
+ foreach ($originalData as $className => $classData)
+ {
+ $sortedData[$className] = $classData;
+ }
+ }
+
+ $this->data = $sortedData;
+
+ return $this;
+ }
+
+ /**
* Get Taxonomy Actor Role key - used to delete the taxonomy and it's terms
*
* @return string key for the Taxonomy in $this->data array
*/
- protected function getTaxonomyActorRoleKey()
+ private function getTaxonomyActorRoleKey()
{
if (!isset($this->taxonomyActorRoleKey))
{
@@ -715,4 +908,19 @@
return $this->taxonomyActorRoleKey;
}
+
+ /**
+ * Get and cache Existence Term key
+ *
+ * @return string key in $this->data array
+ */
+ private function getTermExistenceKey()
+ {
+ if (!isset($this->termExistenceKey))
+ {
+ $this->termExistenceKey = $this->getRowKey('QubitTerm', 'id', '<?php
echo QubitTerm::EXISTENCE_ID."\n" ?>');
+ }
+
+ return $this->termExistenceKey;
+ }
} // Close class QubitMigrate103to104
Modified: trunk/qubit/lib/task/migrate/QubitMigrateData.class.php
===================================================================
--- trunk/qubit/lib/task/migrate/QubitMigrateData.class.php 2008-12-12
23:29:21 UTC (rev 1678)
+++ trunk/qubit/lib/task/migrate/QubitMigrateData.class.php 2008-12-13
01:07:46 UTC (rev 1679)
@@ -115,4 +115,4 @@
return false;
}
-}
+}
\ No newline at end of file
--~--~---------~--~----~------------~-------~--~----~
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.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---