Author: peter
Date: 2008-09-29 16:45:38 -0700 (Mon, 29 Sep 2008)
New Revision: 1406

Modified:
   trunk/apps/qubit/lib/SearchIndex.class.php
   trunk/apps/qubit/modules/informationobject/actions/updateAction.class.php
   trunk/apps/qubit/modules/informationobject/templates/showISADSuccess.php
   trunk/config/schema.yml
   trunk/data/sql/lib.model.schema.sql
   trunk/lib/model/map/InformationObjectI18nMapBuilder.php
   trunk/lib/model/om/BaseInformationObject.php
   trunk/lib/model/om/BaseInformationObjectI18n.php
Log:
change name of informationobject attribute 'version' to 'edition' to be more 
consistent  with EAD and MODS

Modified: trunk/apps/qubit/lib/SearchIndex.class.php
===================================================================
--- trunk/apps/qubit/lib/SearchIndex.class.php  2008-09-29 23:36:24 UTC (rev 
1405)
+++ trunk/apps/qubit/lib/SearchIndex.class.php  2008-09-29 23:45:38 UTC (rev 
1406)
@@ -178,7 +178,7 @@
 
    // I18N FIELDS
     $doc->addField(Zend_Search_Lucene_Field::Unstored('alternatetitle', 
strtolower($informationObject->getAlternateTitle(array('culture' => 
$language))), $encoding));
-    $doc->addField(Zend_Search_Lucene_Field::Unstored('version', 
strtolower($informationObject->getVersion(array('culture' => $language))), 
$encoding));
+    $doc->addField(Zend_Search_Lucene_Field::Unstored('edition', 
strtolower($informationObject->getEdition(array('culture' => $language))), 
$encoding));
     $doc->addField(Zend_Search_Lucene_Field::Unstored('extentandmedium', 
strtolower($informationObject->getExtentAndMedium(array('culture' => 
$language))), $encoding));
     $doc->addField(Zend_Search_Lucene_Field::Unstored('archivalhistory', 
strtolower($informationObject->getArchivalHistory(array('culture' => 
$language))), $encoding));
     $doc->addField(Zend_Search_Lucene_Field::Unstored('acquisition', 
strtolower($informationObject->getAcquisition(array('culture' => $language))), 
$encoding));

Modified: 
trunk/apps/qubit/modules/informationobject/actions/updateAction.class.php
===================================================================
--- trunk/apps/qubit/modules/informationobject/actions/updateAction.class.php   
2008-09-29 23:36:24 UTC (rev 1405)
+++ trunk/apps/qubit/modules/informationobject/actions/updateAction.class.php   
2008-09-29 23:45:38 UTC (rev 1406)
@@ -103,9 +103,9 @@
     {
       
$informationObject->setIdentifier($this->getRequestParameter('identifier'));
     }
-    if ($this->hasRequestParameter('version'))
+    if ($this->hasRequestParameter('edition'))
     {
-      $informationObject->setVersion($this->getRequestParameter('version'));
+      $informationObject->setVersion($this->getRequestParameter('edition'));
     }
     if ($this->hasRequestParameter('extent_and_medium'))
     {
@@ -558,4 +558,4 @@
     }
     
   } // end fuction updatePhysicalObjects
-}
\ No newline at end of file
+}

Modified: 
trunk/apps/qubit/modules/informationobject/templates/showISADSuccess.php
===================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showISADSuccess.php    
2008-09-29 23:36:24 UTC (rev 1405)
+++ trunk/apps/qubit/modules/informationobject/templates/showISADSuccess.php    
2008-09-29 23:45:38 UTC (rev 1406)
@@ -17,9 +17,9 @@
 </tr>
 <?php endif; ?>
 
-<?php if (strlen($value = 
$informationObject->getVersion(array('cultureFallback' => true))) > 0) : ?>
+<?php if (strlen($value = 
$informationObject->getEdition(array('cultureFallback' => true))) > 0) : ?>
 <tr>
-<th><?php echo __('version'); ?></th>
+<th><?php echo __('edition'); ?></th>
 <td><?php echo $value; ?></td>
 </tr>
 <?php endif; ?>

Modified: trunk/config/schema.yml
===================================================================
--- trunk/config/schema.yml     2008-09-29 23:36:24 UTC (rev 1405)
+++ trunk/config/schema.yml     2008-09-29 23:45:38 UTC (rev 1406)
@@ -20,7 +20,7 @@
   information_object_i18n:
     title: varchar(255)
     alternate_title: varchar(255)
-    version: varchar(255)
+    edition: varchar(255)
     extent_and_medium: longvarchar
     archival_history: longvarchar
     acquisition: longvarchar

Modified: trunk/data/sql/lib.model.schema.sql
===================================================================
--- trunk/data/sql/lib.model.schema.sql 2008-09-29 23:36:24 UTC (rev 1405)
+++ trunk/data/sql/lib.model.schema.sql 2008-09-29 23:45:38 UTC (rev 1406)
@@ -82,7 +82,7 @@
 (
        `title` VARCHAR(255),
        `alternate_title` VARCHAR(255),
-       `version` VARCHAR(255),
+       `edition` VARCHAR(255),
        `extent_and_medium` TEXT,
        `archival_history` TEXT,
        `acquisition` TEXT,

Modified: trunk/lib/model/map/InformationObjectI18nMapBuilder.php
===================================================================
--- trunk/lib/model/map/InformationObjectI18nMapBuilder.php     2008-09-29 
23:36:24 UTC (rev 1405)
+++ trunk/lib/model/map/InformationObjectI18nMapBuilder.php     2008-09-29 
23:45:38 UTC (rev 1406)
@@ -36,7 +36,7 @@
 
                $tMap->addColumn('ALTERNATE_TITLE', 'AlternateTitle', 'string', 
CreoleTypes::VARCHAR, false, 255);
 
-               $tMap->addColumn('VERSION', 'Version', 'string', 
CreoleTypes::VARCHAR, false, 255);
+               $tMap->addColumn('EDITION', 'Edition', 'string', 
CreoleTypes::VARCHAR, false, 255);
 
                $tMap->addColumn('EXTENT_AND_MEDIUM', 'ExtentAndMedium', 
'string', CreoleTypes::LONGVARCHAR, false, null);
 

Modified: trunk/lib/model/om/BaseInformationObject.php
===================================================================
--- trunk/lib/model/om/BaseInformationObject.php        2008-09-29 23:36:24 UTC 
(rev 1405)
+++ trunk/lib/model/om/BaseInformationObject.php        2008-09-29 23:45:38 UTC 
(rev 1406)
@@ -896,20 +896,20 @@
     return $this;
   }
 
-  public function getVersion(array $options = array())
+  public function getEdition(array $options = array())
   {
-    $version = $this->getCurrentInformationObjectI18n($options)->getVersion();
-    if (!empty($options['cultureFallback']) && strlen($version) < 1)
+    $edition = $this->getCurrentInformationObjectI18n($options)->getEdition();
+    if (!empty($options['cultureFallback']) && strlen($edition) < 1)
     {
-      $version = $this->getCurrentInformationObjectI18n(array('sourceCulture' 
=> true) + $options)->getVersion();
+      $edition = $this->getCurrentInformationObjectI18n(array('sourceCulture' 
=> true) + $options)->getEdition();
     }
 
-    return $version;
+    return $edition;
   }
 
-  public function setVersion($value, array $options = array())
+  public function setEdition($value, array $options = array())
   {
-    $this->getCurrentInformationObjectI18n($options)->setVersion($value);
+    $this->getCurrentInformationObjectI18n($options)->setEdition($value);
 
     return $this;
   }

Modified: trunk/lib/model/om/BaseInformationObjectI18n.php
===================================================================
--- trunk/lib/model/om/BaseInformationObjectI18n.php    2008-09-29 23:36:24 UTC 
(rev 1405)
+++ trunk/lib/model/om/BaseInformationObjectI18n.php    2008-09-29 23:45:38 UTC 
(rev 1406)
@@ -8,7 +8,7 @@
 
   const TITLE = 'q_information_object_i18n.TITLE';
   const ALTERNATE_TITLE = 'q_information_object_i18n.ALTERNATE_TITLE';
-  const VERSION = 'q_information_object_i18n.VERSION';
+  const EDITION = 'q_information_object_i18n.EDITION';
   const EXTENT_AND_MEDIUM = 'q_information_object_i18n.EXTENT_AND_MEDIUM';
   const ARCHIVAL_HISTORY = 'q_information_object_i18n.ARCHIVAL_HISTORY';
   const ACQUISITION = 'q_information_object_i18n.ACQUISITION';
@@ -34,7 +34,7 @@
   {
     $criteria->addSelectColumn(QubitInformationObjectI18n::TITLE);
     $criteria->addSelectColumn(QubitInformationObjectI18n::ALTERNATE_TITLE);
-    $criteria->addSelectColumn(QubitInformationObjectI18n::VERSION);
+    $criteria->addSelectColumn(QubitInformationObjectI18n::EDITION);
     $criteria->addSelectColumn(QubitInformationObjectI18n::EXTENT_AND_MEDIUM);
     $criteria->addSelectColumn(QubitInformationObjectI18n::ARCHIVAL_HISTORY);
     $criteria->addSelectColumn(QubitInformationObjectI18n::ACQUISITION);
@@ -149,16 +149,16 @@
     return $this;
   }
 
-  protected $version = null;
+  protected $edition = null;
 
-  public function getVersion()
+  public function getEdition()
   {
-    return $this->version;
+    return $this->edition;
   }
 
-  public function setVersion($version)
+  public function setEdition($edition)
   {
-    $this->version = $version;
+    $this->edition = $edition;
 
     return $this;
   }
@@ -458,7 +458,7 @@
   {
     $this->columnValues['title'] = $this->title;
     $this->columnValues['alternateTitle'] = $this->alternateTitle;
-    $this->columnValues['version'] = $this->version;
+    $this->columnValues['edition'] = $this->edition;
     $this->columnValues['extentAndMedium'] = $this->extentAndMedium;
     $this->columnValues['archivalHistory'] = $this->archivalHistory;
     $this->columnValues['acquisition'] = $this->acquisition;
@@ -487,7 +487,7 @@
   {
     $this->title = $results->getString($columnOffset++);
     $this->alternateTitle = $results->getString($columnOffset++);
-    $this->version = $results->getString($columnOffset++);
+    $this->edition = $results->getString($columnOffset++);
     $this->extentAndMedium = $results->getString($columnOffset++);
     $this->archivalHistory = $results->getString($columnOffset++);
     $this->acquisition = $results->getString($columnOffset++);
@@ -574,9 +574,9 @@
       $criteria->add(QubitInformationObjectI18n::ALTERNATE_TITLE, 
$this->alternateTitle);
     }
 
-    if ($this->isColumnModified('version'))
+    if ($this->isColumnModified('edition'))
     {
-      $criteria->add(QubitInformationObjectI18n::VERSION, $this->version);
+      $criteria->add(QubitInformationObjectI18n::EDITION, $this->edition);
     }
 
     if ($this->isColumnModified('extentAndMedium'))
@@ -706,9 +706,9 @@
       $criteria->add(QubitInformationObjectI18n::ALTERNATE_TITLE, 
$this->alternateTitle);
     }
 
-    if ($this->isColumnModified('version'))
+    if ($this->isColumnModified('edition'))
     {
-      $criteria->add(QubitInformationObjectI18n::VERSION, $this->version);
+      $criteria->add(QubitInformationObjectI18n::EDITION, $this->edition);
     }
 
     if ($this->isColumnModified('extentAndMedium'))


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

Reply via email to