Class: Mead::Extractor
- Inherits:
-
Object
- Object
- Mead::Extractor
- Defined in:
- lib/mead/extractor.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
Returns the value of attribute doc.
-
#dsc ⇒ Object
Returns the value of attribute dsc.
-
#ead_location ⇒ Object
Returns the value of attribute ead_location.
-
#mead ⇒ Object
Returns the value of attribute mead.
-
#node ⇒ Object
Returns the value of attribute node.
-
#series ⇒ Object
Returns the value of attribute series.
-
#stack ⇒ Object
Returns the value of attribute stack.
Instance Method Summary collapse
- #extract ⇒ Object
-
#initialize(mead) ⇒ Extractor
constructor
a stack contains the data (unittitle, unitdate) from the identifier’s container all the way through to parent containers.
Constructor Details
#initialize(mead) ⇒ Extractor
a stack contains the data (unittitle, unitdate) from the identifier’s container all the way through to parent containers. The order is from most specific to least specific
9 10 11 12 13 |
# File 'lib/mead/extractor.rb', line 9 def initialize(mead) @stack = [] get_mead_obj(mead) self end |
Instance Attribute Details
#doc ⇒ Object
Returns the value of attribute doc.
4 5 6 |
# File 'lib/mead/extractor.rb', line 4 def doc @doc end |
#dsc ⇒ Object
Returns the value of attribute dsc.
4 5 6 |
# File 'lib/mead/extractor.rb', line 4 def dsc @dsc end |
#ead_location ⇒ Object
Returns the value of attribute ead_location.
4 5 6 |
# File 'lib/mead/extractor.rb', line 4 def ead_location @ead_location end |
#mead ⇒ Object
Returns the value of attribute mead.
4 5 6 |
# File 'lib/mead/extractor.rb', line 4 def mead @mead end |
#node ⇒ Object
Returns the value of attribute node.
4 5 6 |
# File 'lib/mead/extractor.rb', line 4 def node @node end |
#series ⇒ Object
Returns the value of attribute series.
4 5 6 |
# File 'lib/mead/extractor.rb', line 4 def series @series end |
#stack ⇒ Object
Returns the value of attribute stack.
4 5 6 |
# File 'lib/mead/extractor.rb', line 4 def stack @stack end |
Instance Method Details
#extract ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/mead/extractor.rb', line 15 def extract get_ead_location eadxml = get_eadxml @doc = Nokogiri::XML(eadxml) do_extraction @mead. = @stack # make sure the metadata always gets cached to the identifier return @stack end |