Module: Dor::Geoable

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

Defined Under Namespace

Classes: CrosswalkError

Instance Method Summary collapse

Instance Method Details

#build_geoMetadata_datastream(ds) ⇒ Object



22
23
24
25
26
27
28
29
# File 'lib/dor/models/geoable.rb', line 22

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

#fetch_geoMetadata_datastreamString?

Returns XML.

Returns:

  • (String, nil)

    XML



15
16
17
18
19
20
# File 'lib/dor/models/geoable.rb', line 15

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