curationexperts / tufts_models

Hydra models for Tufts
0 stars 3 forks source link

Existing repository objects throw namespace errors #1

Closed mark-dce closed 10 years ago

mark-dce commented 10 years ago

Given an existing object created by MIRA that lacks the new namespace definitions, the system may throw an error as follows:

a = TuftsImage.first
puts a.datastreams['DCA-ADMIN'].content
<dca_admin:admin xmlns:admin="http://nils.lib.tufts.edu/admin/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dca_admin="http://nils.lib.tufts.edu/dca_admin/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xlink="http://www.w3.org/TR/xlink">
  <admin:status>current</admin:status>
  <admin:accessPoint>Tufts Digital Library</admin:accessPoint>
  <admin:los>Archival/Public</admin:los>
  <admin:responsibleParty>Digital Collections and Archives</admin:responsibleParty>
  <admin:contact>n/a</admin:contact>
  <admin:transferDate>2005-09-30</admin:transferDate>
  <admin:accessionDate>null</admin:accessionDate>
  <admin:provenance>Images from the Edwin Rollins Collection (MS054).</admin:provenance>
  <admin:subAgreement>n/a</admin:subAgreement>
  <admin:disposition>archival</admin:disposition>
  <admin:bdefSubscriptions>bdef:AssetDef, bdef:TuftsAccess, bdef:TuftsAccessRights, bdef:TuftsArchival, bdef:TuftsImage, bdef:TuftsMetadata, bdef:TuftsReference, bdef:TuftsType</admin:bdefSubscriptions>
  <admin:accessRights>This image is freely available for research or educational use. Use of the image for publication or redistribution is prohibited except by permission of the Digital Collections and Archives, Tufts University</admin:accessRights>
  <admin:notes>On Wed May 20 16:40:06 2009 GMT-5, this file was modified to transform URNs from the Tufts naming service to point to CNRI Handles. Old URN: </admin:notes>
  <admin:checksum>null</admin:checksum>
</dca_admin:admin>
a.displays = a.displays + ['tdil']
ArgumentError: Namespace local has not been defined
    from /Users/mark/.rvm/gems/ruby-2.1.1@tdil/gems/om-3.0.7/lib/om/xml/term_value_operators.rb:170:in `eval'
    from (eval):1:in `block (2 levels) in insert_from_template'
    from /Users/mark/.rvm/gems/ruby-2.1.1@tdil/gems/om-3.0.7/lib/om/xml/term_value_operators.rb:170:in `eval'
...
mark-dce commented 10 years ago

Closing this ticket and adding to https://github.com/curationexperts/tufts-image-library/issues/52