Module: Dor::Geoable

Extended by:
ActiveSupport::Concern
Includes:
SolrDocHelper
Included in:
BasicItem
Defined in:
lib/dor/models/geoable.rb

Defined Under Namespace

Classes: CrosswalkError

Instance Method Summary collapse

Methods included from SolrDocHelper

#add_solr_value

Instance Method Details

#build_geoMetadata_datastream(ds) ⇒ Object


26
27
28
29
30
31
32
33
34
# File 'lib/dor/models/geoable.rb', line 26

def (ds)
  content = 
  unless content.nil?
    ds.dsLabel = self.label
    ds.ng_xml = Nokogiri::XML(content)
    ds.ng_xml.normalize_text!
    ds.content = ds.ng_xml.to_xml
  end
end

#fetch_geoMetadata_datastreamString


16
17
18
19
20
21
22
23
24
# File 'lib/dor/models/geoable.rb', line 16

def 
  candidates = self.datastreams['identityMetadata'].otherId.collect { |oid| oid.to_s }
   = Dor::MetadataService.resolvable(candidates).first
  unless .nil?
    return Dor::MetadataService.fetch(.to_s)
  else
    return nil
  end
end