Author: peter
Date: Fri Sep 11 17:34:25 2009
New Revision: 3238
Log:
add Dublin Core encoding analogs for <eadheader> and ISAD(G)v2 encoding analogs
for <archdesc>. Fixes issue #635
Modified:
trunk/apps/qubit/modules/informationobject/templates/exportEadSuccess.xml.php
Modified:
trunk/apps/qubit/modules/informationobject/templates/exportEadSuccess.xml.php
==============================================================================
---
trunk/apps/qubit/modules/informationobject/templates/exportEadSuccess.xml.php
Fri Sep 11 16:52:23 2009 (r3237)
+++
trunk/apps/qubit/modules/informationobject/templates/exportEadSuccess.xml.php
Fri Sep 11 17:34:25 2009 (r3238)
@@ -57,23 +57,22 @@
<language langcode="<?php echo ($iso6392 =
$iso639convertor->getID3($sourceLanguage)) ? strtolower($iso6392) :
$sourceLanguage ?>" encodinganalog="Language"><?php echo
format_language($sourceLanguage) ?></language>
</langusage>
<?php if (0 < strlen($rules =
$informationObject->getRules(array('cultureFallback' => true)))): ?>
- <descrules><?php echo htmlspecialchars($rules) ?></descrules>
+ <descrules encodinganalog="3.7.2"><?php echo htmlspecialchars($rules)
?></descrules>
<?php endif; ?>
</profiledesc>
</eadheader>
<frontmatter></frontmatter>
-<archdesc <?php if (0 < strlen($levelOfDescription =
$informationObject->getLevelOfDescription()->getName(array('culture' =>
'en')))): ?>level="<?php if (in_array(strtolower($levelOfDescription),
$eadLevels)): ?><?php echo strtolower($levelOfDescription).'"' ?><?php else:
?><?php echo 'otherlevel" otherlevel="'.$levelOfDescription.'"' ?><?php endif;
?><?php endif; ?>>
+<archdesc <?php if (0 < strlen($levelOfDescription =
$informationObject->getLevelOfDescription()->getName(array('culture' =>
'en')))): ?>level="<?php if (in_array(strtolower($levelOfDescription),
$eadLevels)): ?><?php echo strtolower($levelOfDescription).'"' ?><?php else:
?><?php echo 'otherlevel" otherlevel="'.$levelOfDescription.'"' ?><?php endif;
?><?php endif; ?> relatedencoding="ISAD(G)v2">
<did>
<?php if (0 < strlen($value =
$informationObject->getTitle(array('cultureFallback' => true)))): ?>
- <unittitle><?php echo htmlspecialchars($value) ?></unittitle><?php endif; ?>
- <unitid <?php if ($informationObject->getRepository()): ?><?php if
($repocode = $informationObject->getRepository()->getIdentifier()): ?><?php
echo 'repositorycode="'.htmlspecialchars($repocode).'" ' ?><?php endif; ?>
- <?php if ($countrycode =
$informationObject->getRepository()->getCountryCode()): ?><?php echo
'countrycode="'.$countrycode.'"' ?><?php endif;?><?php endif; ?>><?php echo
htmlspecialchars($informationObject->getIdentifier()) ?></unitid>
+ <unittitle encodinganalog="3.1.2"><?php echo htmlspecialchars($value)
?></unittitle><?php endif; ?>
+ <?php if (0 < strlen($value = $informationObject->getIdentifier())):
?><unitid <?php if ($informationObject->getRepository()): ?><?php if ($repocode
= $informationObject->getRepository()->getIdentifier()): ?><?php echo
'repositorycode="'.htmlspecialchars($repocode).'" ' ?><?php endif; ?><?php if
($countrycode = $informationObject->getRepository()->getCountryCode()): ?><?php
echo 'countrycode="'.$countrycode.'"' ?><?php endif;?><?php endif; ?>
encodinganalog="3.1.1"><?php echo htmlspecialchars($value) ?></unitid><?php
endif; ?>
<?php foreach ($informationObject->getDates() as $date): ?>
- <unitdate <?php if ($datechar = $date->getType()->__toString()): ?><?php
echo 'datechar="'.strtolower($datechar).'" ' ?><?php endif; ?><?php if
($startdate = $date->getStartDate()): ?><?php echo 'normal="'?><?php echo
collapse_date($startdate) ?><?php if ($enddate = $date->getEndDate()): ?><?php
echo '/'?><?php echo collapse_date($enddate) ?><?php endif; ?><?php echo '"'
?><?php endif; ?>><?php echo htmlspecialchars(date_display($date))
?></unitdate><?php endforeach; ?>
+ <unitdate <?php if ($datechar = $date->getType()->__toString()): ?><?php
echo 'datechar="'.strtolower($datechar).'" ' ?><?php endif; ?><?php if
($startdate = $date->getStartDate()): ?><?php echo 'normal="'?><?php echo
collapse_date($startdate) ?><?php if ($enddate = $date->getEndDate()): ?><?php
echo '/'?><?php echo collapse_date($enddate) ?><?php endif; ?><?php echo '"'
?><?php endif; ?> encodinganalog="3.1.3"><?php echo
htmlspecialchars(date_display($date)) ?></unitdate><?php endforeach; ?>
<?php if (0 < count($creators = $informationObject->getCreators())): ?>
- <origination>
+ <origination encodinganalog="3.2.1">
<?php foreach ($creators as $creator): ?>
<?php if ($type = $creator->getEntityTypeId()): ?>
<?php if ($type == QubitTerm::PERSON_ID): ?>
@@ -87,7 +86,7 @@
<?php endforeach; ?>
</origination><?php endif; ?>
<?php if (0 < strlen($value =
$informationObject->getExtentAndMedium(array('cultureFallback' => true)))): ?>
- <physdesc><extent><?php echo htmlspecialchars($value)
?></extent></physdesc><?php endif; ?>
+ <physdesc><extent encodinganalog="3.1.5"><?php echo htmlspecialchars($value)
?></extent></physdesc><?php endif; ?>
<?php if ($value = $informationObject->getRepository()): ?>
<repository>
<corpname><?php echo htmlspecialchars($value->__toString()) ?></corpname>
@@ -114,20 +113,20 @@
</address><?php endif; ?>
</repository><?php endif; ?>
<?php if (0 < count($langmaterial = $informationObject->language)): ?>
- <langmaterial>
+ <langmaterial encodinganalog="3.4.3">
<?php foreach ($langmaterial as $languageCode): ?>
<language langcode="<?php echo ($iso6392 =
$iso639convertor->getID3($languageCode)) ? strtolower($iso6392) : $languageCode
?>"><?php echo format_language($languageCode) ?></language><?php endforeach; ?>
</langmaterial><?php endif; ?>
<?php if (0 < count($notes = $informationObject->getNotes())): ?><?php
foreach ($notes as $note): ?>
- <note type="<?php echo
htmlspecialchars($note->getType(array('cultureFallback' => true))) ?>"><p><?php
echo htmlspecialchars($note->getContent(array('cultureFallback' => true)))
?></p></note><?php endforeach; ?><?php endif; ?>
+ <note type="<?php echo
htmlspecialchars($note->getType(array('cultureFallback' => true))) ?>"
encodinganalog="3.6.1"><p><?php echo
htmlspecialchars($note->getContent(array('cultureFallback' => true)))
?></p></note><?php endforeach; ?><?php endif; ?>
</did>
<?php foreach ($informationObject->getCreators() as $creator): ?>
<?php if ($value = $creator->getHistory(array('cultureFallback' =>
true))): ?>
- <bioghist><p><?php echo htmlspecialchars($value) ?></p></bioghist><?php
endif; ?><?php endforeach; ?>
+ <bioghist encodinganalog="3.2.2"><p><?php echo htmlspecialchars($value)
?></p></bioghist><?php endif; ?><?php endforeach; ?>
<?php if (0 < strlen($value =
$informationObject->getScopeAndContent(array('cultureFallback' => true)))): ?>
- <scopecontent><p><?php echo htmlspecialchars($value)
?></p></scopecontent><?php endif; ?>
+ <scopecontent encodinganalog="3.3.1"><p><?php echo htmlspecialchars($value)
?></p></scopecontent><?php endif; ?>
<?php if (0 < strlen($value =
$informationObject->getArrangement(array('cultureFallback' => true)))): ?>
- <arrangement><p><?php echo htmlspecialchars($value)
?></p></arrangement><?php endif; ?>
+ <arrangement encodinganalog="3.3.4"><p><?php echo htmlspecialchars($value)
?></p></arrangement><?php endif; ?>
<?php if ((0 < count($materialtypes =
$informationObject->getMaterialTypes())) ||
(0 < count($subjects =
$informationObject->getSubjectAccessPoints())) ||
(0 < count($places = $informationObject->getPlaceAccessPoints()))
||
@@ -154,29 +153,29 @@
</controlaccess>
<?php endif; ?>
<?php if (0 < strlen($value =
$informationObject->getPhysicalCharacteristics(array('cultureFallback' =>
true)))): ?>
- <phystech><p><?php echo htmlspecialchars($value) ?></p></phystech><?php
endif; ?>
+ <phystech encodinganalog="3.4.3"><p><?php echo htmlspecialchars($value)
?></p></phystech><?php endif; ?>
<?php if (0 < strlen($value =
$informationObject->getAppraisal(array('cultureFallback' => true)))): ?>
- <appraisal><p><?php echo htmlspecialchars($value) ?></p></appraisal><?php
endif; ?>
+ <appraisal encodinganalog="3.3.2"><p><?php echo htmlspecialchars($value)
?></p></appraisal><?php endif; ?>
<?php if (0 < strlen($value =
$informationObject->getAcquisition(array('cultureFallback' => true)))): ?>
- <acqinfo><p><?php echo htmlspecialchars($value) ?></p></acqinfo><?php endif;
?>
+ <acqinfo encodinganalog="3.2.4"><p><?php echo htmlspecialchars($value)
?></p></acqinfo><?php endif; ?>
<?php if (0 < strlen($value =
$informationObject->getAccruals(array('cultureFallback' => true)))): ?>
- <accruals><p><?php echo htmlspecialchars($value) ?></p></accruals><?php
endif; ?>
+ <accruals encodinganalog="3.3.3"><p><?php echo htmlspecialchars($value)
?></p></accruals><?php endif; ?>
<?php if (0 < strlen($value =
$informationObject->getArchivalHistory(array('cultureFallback' => true)))): ?>
- <custodhist><p><?php echo htmlspecialchars($value) ?></p></custodhist><?php
endif; ?>
+ <custodhist encodinganalog="3.2.3"><p><?php echo htmlspecialchars($value)
?></p></custodhist><?php endif; ?>
<?php if (0 < strlen($value =
$informationObject->getRevisionHistory(array('cultureFallback' => true)))): ?>
- <processinfo><p><?php echo htmlspecialchars($value)
?></p></processinfo><?php endif; ?>
+ <processinfo encodinganalog="3.7.1"><p><?php echo htmlspecialchars($value)
?></p></processinfo><?php endif; ?>
<?php if (0 < strlen($value =
$informationObject->getLocationOfOriginals(array('cultureFallback' => true)))):
?>
- <originalsloc><p><?php echo htmlspecialchars($value)
?></p></originalsloc><?php endif; ?>
+ <originalsloc encodinganalog="3.5.1"><p><?php echo htmlspecialchars($value)
?></p></originalsloc><?php endif; ?>
<?php if (0 < strlen($value =
$informationObject->getLocationOfCopies(array('cultureFallback' => true)))): ?>
- <altformavail><p><?php echo htmlspecialchars($value)
?></p></altformavail><?php endif; ?>
+ <altformavail encodinganalog="3.5.2"><p><?php echo htmlspecialchars($value)
?></p></altformavail><?php endif; ?>
<?php if (0 < strlen($value =
$informationObject->getRelatedUnitsOfDescription(array('cultureFallback' =>
true)))): ?>
- <relatedmaterial><p><?php echo htmlspecialchars($value)
?></p></relatedmaterial><?php endif; ?>
+ <relatedmaterial encodinganalog="3.5.3"><p><?php echo
htmlspecialchars($value) ?></p></relatedmaterial><?php endif; ?>
<?php if (0 < strlen($value =
$informationObject->getAccessConditions(array('cultureFallback' => true)))): ?>
- <accessrestrict><p><?php echo htmlspecialchars($value)
?></p></accessrestrict><?php endif; ?>
+ <accessrestrict encodinganalog="3.4.1"><p><?php echo
htmlspecialchars($value) ?></p></accessrestrict><?php endif; ?>
<?php if (0 < strlen($value =
$informationObject->getReproductionConditions(array('cultureFallback' =>
true)))): ?>
- <userestrict><p><?php echo htmlspecialchars($value)
?></p></userestrict><?php endif; ?>
+ <userestrict encodinganalog="3.4.2"><p><?php echo htmlspecialchars($value)
?></p></userestrict><?php endif; ?>
<?php if (0 < strlen($value =
$informationObject->getFindingAids(array('cultureFallback' => true)))): ?>
- <otherfindaid><p><?php echo htmlspecialchars($value)
?></p></otherfindaid><?php endif; ?>
+ <otherfindaid encodinganalog="3.4.5"><p><?php echo htmlspecialchars($value)
?></p></otherfindaid><?php endif; ?>
<dsc type="combined"><?php $nestedRgt = array() ?><?php foreach
($informationObject->getDescendants()->orderBy('lft') as $descendant): ?>
<c <?php if (0 < strlen($levelOfDescription =
$descendant->getLevelOfDescription()->getName(array('culture' => 'en')))):
?>level="<?php if (in_array(strtolower($levelOfDescription), $eadLevels)):
?><?php echo strtolower($levelOfDescription).'"' ?><?php else: ?><?php echo
'otherlevel" otherlevel="'.$levelOfDescription.'"' ?><?php endif; ?><?php
endif; ?>>
@@ -188,13 +187,12 @@
<?php endforeach; ?>
<?php if (0 < strlen($value =
$descendant->getTitle(array('cultureFallback' => true)))): ?>
- <unittitle><?php echo htmlspecialchars($value) ?></unittitle><?php endif;
?>
- <unitid <?php if ($descendant->getRepository()): ?><?php if ($repocode =
$descendant->getRepository()->getIdentifier()): ?><?php echo
'repositorycode="'.htmlspecialchars($repocode).'" ' ?><?php endif; ?>
- <?php if ($countrycode = $descendant->getRepository()->getCountryCode()):
?><?php echo 'countrycode="'.$countrycode.'"' ?><?php endif;?><?php endif;
?>><?php echo htmlspecialchars($descendant->getIdentifier()) ?></unitid>
+ <unittitle encodinganalog="3.1.2"><?php echo htmlspecialchars($value)
?></unittitle><?php endif; ?>
+ <?php if (0 < strlen($value = $descendant->getIdentifier())): ?><unitid
<?php if ($descendant->getRepository()): ?><?php if ($repocode =
$descendant->getRepository()->getIdentifier()): ?><?php echo
'repositorycode="'.htmlspecialchars($repocode).'" ' ?><?php endif; ?><?php if
($countrycode = $descendant->getRepository()->getCountryCode()): ?><?php echo
'countrycode="'.$countrycode.'"' ?><?php endif;?><?php endif; ?>
encodinganalog="3.1.1"><?php echo htmlspecialchars($value) ?></unitid><?php
endif; ?>
<?php foreach ($descendant->getDates() as $date): ?>
- <unitdate <?php if ($datechar = $date->getType()->__toString()): ?><?php
echo 'datechar="'.strtolower($datechar).'" ' ?><?php endif; ?><?php if
($startdate = $date->getStartDate()): ?><?php echo 'normal="'?><?php echo
collapse_date($startdate) ?><?php if ($enddate = $date->getEndDate()): ?><?php
echo '/'?><?php echo collapse_date($enddate) ?><?php endif; ?><?php echo '"'
?><?php endif; ?>><?php echo htmlspecialchars(date_display($date))
?></unitdate><?php endforeach; ?>
+ <unitdate <?php if ($datechar = $date->getType()->__toString()): ?><?php
echo 'datechar="'.strtolower($datechar).'" ' ?><?php endif; ?><?php if
($startdate = $date->getStartDate()): ?><?php echo 'normal="'?><?php echo
collapse_date($startdate) ?><?php if ($enddate = $date->getEndDate()): ?><?php
echo '/'?><?php echo collapse_date($enddate) ?><?php endif; ?><?php echo '"'
?><?php endif; ?> encodinganalog="3.1.3"><?php echo
htmlspecialchars(date_display($date)) ?></unitdate><?php endforeach; ?>
<?php if (0 < count($creators = $descendant->getCreators())): ?>
- <origination>
+ <origination encodinganalog="3.2.1">
<?php foreach ($creators as $creator): ?>
<?php if ($type = $creator->getEntityTypeId()): ?>
<?php if ($type == QubitTerm::PERSON_ID): ?>
@@ -208,7 +206,7 @@
<?php endforeach; ?>
</origination><?php endif; ?>
<?php if (0 < strlen($value =
$descendant->getExtentAndMedium(array('cultureFallback' => true)))): ?>
- <physdesc><extent><?php echo htmlspecialchars($value)
?></extent></physdesc><?php endif; ?>
+ <physdesc><extent encodinganalog="3.1.5"><?php echo
htmlspecialchars($value) ?></extent></physdesc><?php endif; ?>
<?php if ($value = $descendant->getRepository()): ?>
<repository>
<corpname><?php echo htmlspecialchars($value->__toString()) ?></corpname>
@@ -235,20 +233,20 @@
</address><?php endif; ?>
</repository><?php endif; ?>
<?php if (0 < count($langmaterial = $descendant->language)): ?>
- <langmaterial>
+ <langmaterial encodinganalog="3.4.3">
<?php foreach ($langmaterial as $languageCode): ?>
<language langcode="<?php echo ($iso6392 =
$iso639convertor->getID3($languageCode)) ? strtolower($iso6392) : $languageCode
?>"><?php echo format_language($languageCode) ?></language><?php endforeach; ?>
</langmaterial><?php endif; ?>
<?php if (0 < count($notes = $descendant->getNotes())): ?><?php foreach
($notes as $note): ?>
- <note type="<?php echo htmlspecialchars($note->getType()) ?>"><p><?php
echo htmlspecialchars($note->getContent(array('cultureFallback' => true)))
?></p></note><?php endforeach; ?><?php endif; ?>
+ <note type="<?php echo htmlspecialchars($note->getType()) ?>"
encodinganalog="3.6.1"><p><?php echo
htmlspecialchars($note->getContent(array('cultureFallback' => true)))
?></p></note><?php endforeach; ?><?php endif; ?>
</did>
<?php foreach ($descendant->getCreators() as $creator): ?>
<?php if ($value = $creator->getHistory(array('cultureFallback' =>
true))): ?>
- <bioghist><p><?php echo htmlspecialchars($value) ?></p></bioghist><?php
endif; ?><?php endforeach; ?>
+ <bioghist encodinganalog="3.2.2"><p><?php echo htmlspecialchars($value)
?></p></bioghist><?php endif; ?><?php endforeach; ?>
<?php if (0 < strlen($value =
$descendant->getScopeAndContent(array('cultureFallback' => true)))): ?>
- <scopecontent><p><?php echo htmlspecialchars($value)
?></p></scopecontent><?php endif; ?>
+ <scopecontent encodinganalog="3.3.1"><p><?php echo
htmlspecialchars($value) ?></p></scopecontent><?php endif; ?>
<?php if (0 < strlen($value =
$descendant->getArrangement(array('cultureFallback' => true)))): ?>
- <arrangement><p><?php echo htmlspecialchars($value)
?></p></arrangement><?php endif; ?>
+ <arrangement encodinganalog="3.3.4"><p><?php echo htmlspecialchars($value)
?></p></arrangement><?php endif; ?>
<?php if ((0 < count($materialtypes = $descendant->getMaterialTypes())) ||
(0 < count($subjects = $descendant->getSubjectAccessPoints())) ||
(0 < count($places = $descendant->getPlaceAccessPoints())) ||
@@ -274,29 +272,29 @@
<?php endforeach; ?>
</controlaccess><?php endif; ?>
<?php if (0 < strlen($value =
$descendant->getPhysicalCharacteristics(array('cultureFallback' => true)))): ?>
- <phystech><p><?php echo htmlspecialchars($value) ?></p></phystech><?php
endif; ?>
+ <phystech encodinganalog="3.4.4"><p><?php echo htmlspecialchars($value)
?></p></phystech><?php endif; ?>
<?php if (0 < strlen($value =
$descendant->getAppraisal(array('cultureFallback' => true)))): ?>
- <appraisal><p><?php echo htmlspecialchars($value) ?></p></appraisal><?php
endif; ?>
+ <appraisal encodinganalog="3.3.2"><p><?php echo htmlspecialchars($value)
?></p></appraisal><?php endif; ?>
<?php if (0 < strlen($value =
$descendant->getAcquisition(array('cultureFallback' => true)))): ?>
- <acqinfo><p><?php echo htmlspecialchars($value) ?></p></acqinfo><?php
endif; ?>
+ <acqinfo encodinganalog="3.2.4"><p><?php echo htmlspecialchars($value)
?></p></acqinfo><?php endif; ?>
<?php if (0 < strlen($value =
$descendant->getAccruals(array('cultureFallback' => true)))): ?>
- <accruals><p><?php echo htmlspecialchars($value) ?></p></accruals><?php
endif; ?>
+ <accruals encodinganalog="3.3.3"><p><?php echo htmlspecialchars($value)
?></p></accruals><?php endif; ?>
<?php if (0 < strlen($value =
$descendant->getArchivalHistory(array('cultureFallback' => true)))): ?>
- <custodhist><p><?php echo htmlspecialchars($value)
?></p></custodhist><?php endif; ?>
+ <custodhist encodinganalog="3.2.3"><p><?php echo htmlspecialchars($value)
?></p></custodhist><?php endif; ?>
<?php if (0 < strlen($value =
$descendant->getRevisionHistory(array('cultureFallback' => true)))): ?>
- <processinfo><p><?php echo htmlspecialchars($value)
?></p></processinfo><?php endif; ?>
+ <processinfo encodinganalog="3.7.1"><p><?php echo htmlspecialchars($value)
?></p></processinfo><?php endif; ?>
<?php if (0 < strlen($value =
$descendant->getLocationOfOriginals(array('cultureFallback' => true)))): ?>
- <originalsloc><p><?php echo htmlspecialchars($value)
?></p></originalsloc><?php endif; ?>
+ <originalsloc encodinganalog="3.5.1"><p><?php echo
htmlspecialchars($value) ?></p></originalsloc><?php endif; ?>
<?php if (0 < strlen($value =
$descendant->getLocationOfCopies(array('cultureFallback' => true)))): ?>
- <altformavail><p><?php echo htmlspecialchars($value)
?></p></altformavail><?php endif; ?>
+ <altformavail encodinganalog="3.5.2"><p><?php echo
htmlspecialchars($value) ?></p></altformavail><?php endif; ?>
<?php if (0 < strlen($value =
$descendant->getRelatedUnitsOfDescription(array('cultureFallback' => true)))):
?>
- <relatedmaterial><p><?php echo htmlspecialchars($value)
?></p></relatedmaterial><?php endif; ?>
+ <relatedmaterial encodinganalog="3.5.3"><p><?php echo
htmlspecialchars($value) ?></p></relatedmaterial><?php endif; ?>
<?php if (0 < strlen($value =
$descendant->getAccessConditions(array('cultureFallback' => true)))): ?>
- <accessrestrict><p><?php echo htmlspecialchars($value)
?></p></accessrestrict><?php endif; ?>
+ <accessrestrict encodinganalog="3.4.1"><p><?php echo
htmlspecialchars($value) ?></p></accessrestrict><?php endif; ?>
<?php if (0 < strlen($value =
$descendant->getReproductionConditions(array('cultureFallback' => true)))): ?>
- <userestrict><p><?php echo htmlspecialchars($value)
?></p></userestrict><?php endif; ?>
+ <userestrict encodinganalog="3.4.2"><p><?php echo htmlspecialchars($value)
?></p></userestrict><?php endif; ?>
<?php if (0 < strlen($value =
$descendant->getFindingAids(array('cultureFallback' => true)))): ?>
- <otherfindaid><p><?php echo htmlspecialchars($value)
?></p></otherfindaid><?php endif; ?>
+ <otherfindaid encodinganalog="3.4.5"><p><?php echo
htmlspecialchars($value) ?></p></otherfindaid><?php endif; ?>
<?php if ($descendant->getRgt() == $descendant->getLft() + 1): ?>
</c>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---