eadsax 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.rspec +1 -0
- data/.rvmrc +2 -0
- data/Gemfile +17 -0
- data/Gemfile.lock +34 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +14 -0
- data/Rakefile +50 -0
- data/VERSION +1 -0
- data/bin/eadsax +48 -0
- data/lib/eadsax.rb +75 -0
- data/lib/eadsax/accessrestrict.rb +15 -0
- data/lib/eadsax/accruals.rb +14 -0
- data/lib/eadsax/acqinfo.rb +14 -0
- data/lib/eadsax/address.rb +7 -0
- data/lib/eadsax/altformavail.rb +15 -0
- data/lib/eadsax/appraisal.rb +15 -0
- data/lib/eadsax/archdesc.rb +37 -0
- data/lib/eadsax/arrangement.rb +14 -0
- data/lib/eadsax/bibliography.rb +21 -0
- data/lib/eadsax/bioghist.rb +17 -0
- data/lib/eadsax/blockquote.rb +12 -0
- data/lib/eadsax/change.rb +8 -0
- data/lib/eadsax/chronitem.rb +9 -0
- data/lib/eadsax/chronlist.rb +9 -0
- data/lib/eadsax/components.rb +59 -0
- data/lib/eadsax/container.rb +8 -0
- data/lib/eadsax/controlaccess.rb +25 -0
- data/lib/eadsax/custodhist.rb +16 -0
- data/lib/eadsax/dao.rb +7 -0
- data/lib/eadsax/daodesc.rb +14 -0
- data/lib/eadsax/defitem.rb +8 -0
- data/lib/eadsax/did.rb +23 -0
- data/lib/eadsax/div.rb +15 -0
- data/lib/eadsax/dsc.rb +19 -0
- data/lib/eadsax/ead.rb +9 -0
- data/lib/eadsax/eadheader.rb +10 -0
- data/lib/eadsax/editionstmt.rb +8 -0
- data/lib/eadsax/filedesc.rb +11 -0
- data/lib/eadsax/fileplan.rb +15 -0
- data/lib/eadsax/frontmatter.rb +8 -0
- data/lib/eadsax/index.rb +17 -0
- data/lib/eadsax/indexentry.rb +21 -0
- data/lib/eadsax/list.rb +10 -0
- data/lib/eadsax/listhead.rb +8 -0
- data/lib/eadsax/namegrp.rb +17 -0
- data/lib/eadsax/note.rb +13 -0
- data/lib/eadsax/notestmt.rb +7 -0
- data/lib/eadsax/odd.rb +17 -0
- data/lib/eadsax/originalsloc.rb +15 -0
- data/lib/eadsax/origination.rb +22 -0
- data/lib/eadsax/otherfindaid.rb +21 -0
- data/lib/eadsax/phystech.rb +15 -0
- data/lib/eadsax/prefercite.rb +15 -0
- data/lib/eadsax/processinfo.rb +15 -0
- data/lib/eadsax/profiledesc.rb +9 -0
- data/lib/eadsax/publicationstmt.rb +11 -0
- data/lib/eadsax/relatedmaterial.rb +21 -0
- data/lib/eadsax/revisiondesc.rb +8 -0
- data/lib/eadsax/row.rb +7 -0
- data/lib/eadsax/scopecontent.rb +8 -0
- data/lib/eadsax/separatedmaterial.rb +21 -0
- data/lib/eadsax/seriesstmt.rb +9 -0
- data/lib/eadsax/table.rb +8 -0
- data/lib/eadsax/tbody.rb +7 -0
- data/lib/eadsax/tgroup.rb +9 -0
- data/lib/eadsax/thead.rb +7 -0
- data/lib/eadsax/titlepage.rb +22 -0
- data/lib/eadsax/titleproper.rb +8 -0
- data/lib/eadsax/titlestmt.rb +10 -0
- data/lib/eadsax/userestrict.rb +15 -0
- data/spec/accessrestrict_spec.rb +9 -0
- data/spec/acqinfo_spec.rb +8 -0
- data/spec/archdesc_spec.rb +9 -0
- data/spec/arrangement_spec.rb +11 -0
- data/spec/bioghist_spec.rb +23 -0
- data/spec/chronitem_spec.rb +11 -0
- data/spec/chronlist_spec.rb +11 -0
- data/spec/components_spec.rb +11 -0
- data/spec/controlaccess_spec.rb +11 -0
- data/spec/did_spec.rb +14 -0
- data/spec/dsc_spec.rb +11 -0
- data/spec/ead_spec.rb +9 -0
- data/spec/eadheader_spec.rb +9 -0
- data/spec/eads/example.xml +315 -0
- data/spec/eadsax_spec.rb +8 -0
- data/spec/filedesc_spec.rb +11 -0
- data/spec/prefercite_spec.rb +11 -0
- data/spec/profiledesc_spec.rb +11 -0
- data/spec/publicationstmt_spec.rb +11 -0
- data/spec/scopecontent_spec.rb +13 -0
- data/spec/spec_helper.rb +16 -0
- data/spec/titleproper_spec.rb +11 -0
- data/spec/titlestmt_spec.rb +11 -0
- data/spec/userestrict_spec.rb +11 -0
- data/watchr.rb +34 -0
- metadata +274 -0
data/lib/eadsax/odd.rb
ADDED
@@ -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,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
|
+
|
data/lib/eadsax/row.rb
ADDED
@@ -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
|
+
|
data/lib/eadsax/table.rb
ADDED
data/lib/eadsax/tbody.rb
ADDED
data/lib/eadsax/thead.rb
ADDED
@@ -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,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,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
|
+
|