eadsax 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. data/.document +5 -0
  2. data/.rspec +1 -0
  3. data/.rvmrc +2 -0
  4. data/Gemfile +17 -0
  5. data/Gemfile.lock +34 -0
  6. data/LICENSE.txt +20 -0
  7. data/README.rdoc +14 -0
  8. data/Rakefile +50 -0
  9. data/VERSION +1 -0
  10. data/bin/eadsax +48 -0
  11. data/lib/eadsax.rb +75 -0
  12. data/lib/eadsax/accessrestrict.rb +15 -0
  13. data/lib/eadsax/accruals.rb +14 -0
  14. data/lib/eadsax/acqinfo.rb +14 -0
  15. data/lib/eadsax/address.rb +7 -0
  16. data/lib/eadsax/altformavail.rb +15 -0
  17. data/lib/eadsax/appraisal.rb +15 -0
  18. data/lib/eadsax/archdesc.rb +37 -0
  19. data/lib/eadsax/arrangement.rb +14 -0
  20. data/lib/eadsax/bibliography.rb +21 -0
  21. data/lib/eadsax/bioghist.rb +17 -0
  22. data/lib/eadsax/blockquote.rb +12 -0
  23. data/lib/eadsax/change.rb +8 -0
  24. data/lib/eadsax/chronitem.rb +9 -0
  25. data/lib/eadsax/chronlist.rb +9 -0
  26. data/lib/eadsax/components.rb +59 -0
  27. data/lib/eadsax/container.rb +8 -0
  28. data/lib/eadsax/controlaccess.rb +25 -0
  29. data/lib/eadsax/custodhist.rb +16 -0
  30. data/lib/eadsax/dao.rb +7 -0
  31. data/lib/eadsax/daodesc.rb +14 -0
  32. data/lib/eadsax/defitem.rb +8 -0
  33. data/lib/eadsax/did.rb +23 -0
  34. data/lib/eadsax/div.rb +15 -0
  35. data/lib/eadsax/dsc.rb +19 -0
  36. data/lib/eadsax/ead.rb +9 -0
  37. data/lib/eadsax/eadheader.rb +10 -0
  38. data/lib/eadsax/editionstmt.rb +8 -0
  39. data/lib/eadsax/filedesc.rb +11 -0
  40. data/lib/eadsax/fileplan.rb +15 -0
  41. data/lib/eadsax/frontmatter.rb +8 -0
  42. data/lib/eadsax/index.rb +17 -0
  43. data/lib/eadsax/indexentry.rb +21 -0
  44. data/lib/eadsax/list.rb +10 -0
  45. data/lib/eadsax/listhead.rb +8 -0
  46. data/lib/eadsax/namegrp.rb +17 -0
  47. data/lib/eadsax/note.rb +13 -0
  48. data/lib/eadsax/notestmt.rb +7 -0
  49. data/lib/eadsax/odd.rb +17 -0
  50. data/lib/eadsax/originalsloc.rb +15 -0
  51. data/lib/eadsax/origination.rb +22 -0
  52. data/lib/eadsax/otherfindaid.rb +21 -0
  53. data/lib/eadsax/phystech.rb +15 -0
  54. data/lib/eadsax/prefercite.rb +15 -0
  55. data/lib/eadsax/processinfo.rb +15 -0
  56. data/lib/eadsax/profiledesc.rb +9 -0
  57. data/lib/eadsax/publicationstmt.rb +11 -0
  58. data/lib/eadsax/relatedmaterial.rb +21 -0
  59. data/lib/eadsax/revisiondesc.rb +8 -0
  60. data/lib/eadsax/row.rb +7 -0
  61. data/lib/eadsax/scopecontent.rb +8 -0
  62. data/lib/eadsax/separatedmaterial.rb +21 -0
  63. data/lib/eadsax/seriesstmt.rb +9 -0
  64. data/lib/eadsax/table.rb +8 -0
  65. data/lib/eadsax/tbody.rb +7 -0
  66. data/lib/eadsax/tgroup.rb +9 -0
  67. data/lib/eadsax/thead.rb +7 -0
  68. data/lib/eadsax/titlepage.rb +22 -0
  69. data/lib/eadsax/titleproper.rb +8 -0
  70. data/lib/eadsax/titlestmt.rb +10 -0
  71. data/lib/eadsax/userestrict.rb +15 -0
  72. data/spec/accessrestrict_spec.rb +9 -0
  73. data/spec/acqinfo_spec.rb +8 -0
  74. data/spec/archdesc_spec.rb +9 -0
  75. data/spec/arrangement_spec.rb +11 -0
  76. data/spec/bioghist_spec.rb +23 -0
  77. data/spec/chronitem_spec.rb +11 -0
  78. data/spec/chronlist_spec.rb +11 -0
  79. data/spec/components_spec.rb +11 -0
  80. data/spec/controlaccess_spec.rb +11 -0
  81. data/spec/did_spec.rb +14 -0
  82. data/spec/dsc_spec.rb +11 -0
  83. data/spec/ead_spec.rb +9 -0
  84. data/spec/eadheader_spec.rb +9 -0
  85. data/spec/eads/example.xml +315 -0
  86. data/spec/eadsax_spec.rb +8 -0
  87. data/spec/filedesc_spec.rb +11 -0
  88. data/spec/prefercite_spec.rb +11 -0
  89. data/spec/profiledesc_spec.rb +11 -0
  90. data/spec/publicationstmt_spec.rb +11 -0
  91. data/spec/scopecontent_spec.rb +13 -0
  92. data/spec/spec_helper.rb +16 -0
  93. data/spec/titleproper_spec.rb +11 -0
  94. data/spec/titlestmt_spec.rb +11 -0
  95. data/spec/userestrict_spec.rb +11 -0
  96. data/watchr.rb +34 -0
  97. metadata +274 -0
@@ -0,0 +1,17 @@
1
+ module Eadsax
2
+ class Odd
3
+ include SAXMachine
4
+ element :address, :class => Address
5
+ element :blockquote, :class => Blockquote
6
+ element :chronlist, :class => Chronlist
7
+ element :dao, :class => Dao
8
+ element :daogrp
9
+ element :head
10
+ element :list, :class => List
11
+ element :note, :class => Note
12
+ element :odd, :class => Odd
13
+ element :p
14
+ element :table, :class => Table
15
+ end
16
+ end
17
+
@@ -0,0 +1,15 @@
1
+ module Eadsax
2
+ class Originalsloc
3
+ include SAXMachine
4
+ element :address, :class => Address
5
+ element :blockquote, :class => Blockquote
6
+ element :chronlist, :class => Chronlist
7
+ element :head
8
+ element :list, :class => List
9
+ element :note, :class => Note
10
+ element :originalsloc, :class => Originalsloc
11
+ element :p
12
+ element :table, :class => Table
13
+ end
14
+ end
15
+
@@ -0,0 +1,22 @@
1
+ module Eadsax
2
+ class Origination
3
+ include SAXMachine
4
+ element :abbr
5
+ element :archref
6
+ element :bibref
7
+ element :corpname
8
+ element :emph
9
+ element :expan
10
+ element :extptr
11
+ element :extref
12
+ element :famname
13
+ element :lb
14
+ element :linkgrp
15
+ element :name
16
+ element :persname
17
+ element :ptr
18
+ element :ref
19
+ element :title
20
+ end
21
+ end
22
+
@@ -0,0 +1,21 @@
1
+ module Eadsax
2
+ class Otherfindaid
3
+ include SAXMachine
4
+ element :address, :class => Address
5
+ element :archref
6
+ element :bibref
7
+ element :blockquote, :class => Blockquote
8
+ element :chronlist, :class => Chronlist
9
+ element :extref
10
+ element :head
11
+ element :linkgrp
12
+ element :list, :class => List
13
+ element :note, :class => Note
14
+ element :otherfindaid, :class => Otherfindaid
15
+ element :p
16
+ element :ref
17
+ element :table, :class => Table
18
+ element :title
19
+ end
20
+ end
21
+
@@ -0,0 +1,15 @@
1
+ module Eadsax
2
+ class Phystech
3
+ include SAXMachine
4
+ element :address, :class => Address
5
+ element :blockquote, :class => Blockquote
6
+ element :chronlist, :class => Chronlist
7
+ element :head
8
+ element :list, :class => List
9
+ element :note, :class => Note
10
+ element :p
11
+ element :phystech, :class => Phystech
12
+ element :table, :class => Table
13
+ end
14
+ end
15
+
@@ -0,0 +1,15 @@
1
+ module Eadsax
2
+ class Prefercite
3
+ include SAXMachine
4
+ element :address, :class => Address
5
+ element :blockquote, :class => Blockquote
6
+ element :chronlist, :class => Chronlist
7
+ element :head
8
+ elements :list, :as => :lists, :class => List
9
+ elements :note, :as => :notes, :class => Note
10
+ elements :p, :as => :ps
11
+ element :prefercite, :class => Prefercite
12
+ element :table, :class => Table
13
+ end
14
+ end
15
+
@@ -0,0 +1,15 @@
1
+ module Eadsax
2
+ class Processinfo
3
+ include SAXMachine
4
+ element :address, :class => Address
5
+ element :blockquote, :class => Blockquote
6
+ element :chronlist, :class => Chronlist
7
+ element :head
8
+ elements :list, :as => :lists, :class => List
9
+ elements :note, :as => :notes, :class => Note
10
+ elements :p, :as => :ps
11
+ element :processinfo, :class => Processinfo
12
+ element :table, :class => Table
13
+ end
14
+ end
15
+
@@ -0,0 +1,9 @@
1
+ module Eadsax
2
+ class Profiledesc
3
+ include SAXMachine
4
+ element :creation
5
+ element :descrules
6
+ element :langusage
7
+ end
8
+ end
9
+
@@ -0,0 +1,11 @@
1
+ module Eadsax
2
+ class Publicationstmt
3
+ include SAXMachine
4
+ element :address, :class => Address
5
+ element :date
6
+ element :num
7
+ elements :p, :as => :ps
8
+ element :publisher
9
+ end
10
+ end
11
+
@@ -0,0 +1,21 @@
1
+ module Eadsax
2
+ class Relatedmaterial
3
+ include SAXMachine
4
+ element :address, :class => Address
5
+ element :archref
6
+ element :bibref
7
+ element :blockquote, :class => Blockquote
8
+ element :chronlist, :class => Chronlist
9
+ element :extref
10
+ element :head
11
+ element :linkgrp
12
+ elements :list, :as => :lists, :class => List
13
+ elements :note, :as => :notes
14
+ elements :p, :as => :ps
15
+ element :ref
16
+ element :relatedmaterial, :class => Relatedmaterial
17
+ element :table, :class => Table
18
+ element :title
19
+ end
20
+ end
21
+
@@ -0,0 +1,8 @@
1
+ module Eadsax
2
+ class Revisiondesc
3
+ include SAXMachine
4
+ element :change, :class => Change
5
+ element :list, :class => List
6
+ end
7
+ end
8
+
@@ -0,0 +1,7 @@
1
+ module Eadsax
2
+ class Row
3
+ include SAXMachine
4
+ element :entry
5
+ end
6
+ end
7
+
@@ -0,0 +1,8 @@
1
+ module Eadsax
2
+ class Scopecontent
3
+ include SAXMachine
4
+ element :head
5
+ elements :p, :as => :ps
6
+ end
7
+ end
8
+
@@ -0,0 +1,21 @@
1
+ module Eadsax
2
+ class Separatedmaterial
3
+ include SAXMachine
4
+ element :address, :class => Address
5
+ element :archref
6
+ element :bibref
7
+ element :blockquote, :class => Blockquote
8
+ element :chronlist, :class => Chronlist
9
+ element :extref
10
+ element :head
11
+ element :linkgrp
12
+ elements :list, :as => :lists, :class => List
13
+ elements :note, :as => :notes, :class => Note
14
+ elements :p, :as => :ps
15
+ element :ref
16
+ element :separatedmaterial, :class => Separatedmaterial
17
+ element :table, :class => Table
18
+ element :title
19
+ end
20
+ end
21
+
@@ -0,0 +1,9 @@
1
+ module Eadsax
2
+ class Seriesstmt
3
+ include SAXMachine
4
+ element :num
5
+ element :p
6
+ element :titleproper, :class => Titleproper
7
+ end
8
+ end
9
+
@@ -0,0 +1,8 @@
1
+ module Eadsax
2
+ class Table
3
+ include SAXMachine
4
+ element :head
5
+ element :tgroup, :class => Tgroup
6
+ end
7
+ end
8
+
@@ -0,0 +1,7 @@
1
+ module Eadsax
2
+ class Tbody
3
+ include SAXMachine
4
+ element :row, :class => Row
5
+ end
6
+ end
7
+
@@ -0,0 +1,9 @@
1
+ module Eadsax
2
+ class Tgroup
3
+ include SAXMachine
4
+ element :colspec
5
+ element :tbody, :class => Tbody
6
+ element :thead, :class => Thead
7
+ end
8
+ end
9
+
@@ -0,0 +1,7 @@
1
+ module Eadsax
2
+ class Thead
3
+ include SAXMachine
4
+ element :row, :class => Row
5
+ end
6
+ end
7
+
@@ -0,0 +1,22 @@
1
+ module Eadsax
2
+ class Titlepage
3
+ include SAXMachine
4
+ element :address, :class => Address
5
+ element :author
6
+ element :bibseries
7
+ element :blockquote, :class => Blockquote
8
+ element :chronlist, :class => Chronlist
9
+ element :date
10
+ element :edition
11
+ element :list, :class => List
12
+ element :note, :class => Note
13
+ element :num
14
+ element :p
15
+ element :publisher
16
+ element :sponsor
17
+ element :subtitle
18
+ element :table, :class => Table
19
+ element :titleproper, :class => Titleproper
20
+ end
21
+ end
22
+
@@ -0,0 +1,8 @@
1
+ module Eadsax
2
+ class Titleproper
3
+ include SAXMachine
4
+ element :date
5
+ element :num
6
+ end
7
+ end
8
+
@@ -0,0 +1,10 @@
1
+ module Eadsax
2
+ class Titlestmt
3
+ include SAXMachine
4
+ element :author
5
+ element :sponsor
6
+ element :subtitle
7
+ element :titleproper, :class => Titleproper
8
+ end
9
+ end
10
+
@@ -0,0 +1,15 @@
1
+ module Eadsax
2
+ class Userestrict
3
+ include SAXMachine
4
+ element :address, :class => Address
5
+ element :blockquote, :class => Blockquote
6
+ element :chronlist, :class => Chronlist
7
+ element :head
8
+ elements :list, :as => :lists, :class => List
9
+ elements :note, :as => :notes, :class => Note
10
+ elements :p, :as => :ps
11
+ element :table, :class => Table
12
+ element :userestrict, :class => Userestrict
13
+ end
14
+ end
15
+
@@ -0,0 +1,9 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Accessrestrict" do
4
+
5
+ it "should be present" do
6
+ @ead.archdesc.accessrestrict.should be_a_kind_of(Eadsax::Accessrestrict)
7
+ end
8
+ end
9
+
@@ -0,0 +1,8 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Acqinfo" do
4
+ it "should be present" do
5
+ @ead.archdesc.acqinfo.should be_a_kind_of(Eadsax::Acqinfo)
6
+ end
7
+ end
8
+
@@ -0,0 +1,9 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Archdesc" do
4
+
5
+ it "should be present" do
6
+ @ead.archdesc.should be_a_kind_of(Eadsax::Archdesc)
7
+ end
8
+ end
9
+
@@ -0,0 +1,11 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Arrangement" do
4
+ before(:all) do
5
+ @arrangement = @ead.archdesc.arrangement
6
+ end
7
+ it "should be present" do
8
+ @arrangement.should be_a_kind_of(Eadsax::Arrangement)
9
+ end
10
+ end
11
+
@@ -0,0 +1,23 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Bioghist" do
4
+ before(:all) do
5
+ @bioghist = @ead.archdesc.bioghist
6
+ end
7
+ it "should be present" do
8
+ @bioghist.should be_a_kind_of(Eadsax::Bioghist)
9
+ end
10
+
11
+ it "should have a head" do
12
+ @bioghist.head.should eq('Biographical Note')
13
+ end
14
+
15
+ it "should have two paragraphs" do
16
+ @bioghist.ps.length.should eq(2)
17
+ end
18
+
19
+ it "should have content for the paragraphs" do
20
+ @bioghist.ps.first.clean.should eq("Dr. Paul Dix was born in 1868 in Darmstadt, Germany. The grandson of a chief forester, Schenck studied forestry at Tubingen University and entered the state forest service in Hessen in 1890.")
21
+ end
22
+ end
23
+
@@ -0,0 +1,11 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Ead" do
4
+ before(:all) do
5
+ @chronitems = @ead.archdesc.bioghist.chronlist.chronitems
6
+ end
7
+ it "should be present" do
8
+ @chronitems.first.should be_a_kind_of(Eadsax::Chronitem)
9
+ end
10
+ end
11
+
@@ -0,0 +1,11 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Chronlist" do
4
+ before(:all) do
5
+ @chronlist = @ead.archdesc.bioghist.chronlist
6
+ end
7
+ it "should be present" do
8
+ @chronlist.should be_a_kind_of(Eadsax::Chronlist)
9
+ end
10
+ end
11
+
@@ -0,0 +1,11 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "C01" do
4
+ before(:all) do
5
+ @c01s = @ead.archdesc.dsc.c01s
6
+ end
7
+ it "should be present" do
8
+ @c01s.first.should be_a_kind_of(Eadsax::C01)
9
+ end
10
+ end
11
+