Class: GeoCombine::Metadata

Inherits:
Object
  • Object
show all
Defined in:
lib/geo_combine.rb

Overview

Abstract class for GeoCombine objects

Direct Known Subclasses

Fgdc, Geoblacklight, Iso19139

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metadata) ⇒ Metadata

Creates a new GeoCombine::Metadata object, where metadata parameter is can be a File path or String of XML “./tmp/edu.stanford.purl/bb/338/jh/0716/iso19139.xml” or a String of XML metadata



23
24
25
26
27
# File 'lib/geo_combine.rb', line 23

def initialize 
   = File.read  if File.readable? 
   = Nokogiri::XML() if .instance_of? String
   = 
end

Instance Attribute Details

#metadataObject (readonly)

Returns the value of attribute metadata



15
16
17
# File 'lib/geo_combine.rb', line 15

def 
  
end

Instance Method Details

#to_geoblacklightGeoCombine::Geoblacklight

Perform an XSLT tranformation on metadata using an object's XSL



32
33
34
# File 'lib/geo_combine.rb', line 32

def to_geoblacklight
  GeoCombine::Geoblacklight.new(xsl_geoblacklight.transform())
end

#to_htmlString

Perform an XSLT transformation to HTML using an object's XSL



39
40
41
# File 'lib/geo_combine.rb', line 39

def to_html
  xsl_html.transform().to_html
end