eadcodec 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. data/Rakefile +12 -5
  2. data/lib/eadcodec.rb +76 -1
  3. data/lib/elements/accessrestrict.rb +12 -0
  4. data/lib/elements/accruals.rb +11 -0
  5. data/lib/elements/acqinfo.rb +12 -0
  6. data/lib/elements/altformavail.rb +12 -0
  7. data/lib/elements/appraisal.rb +11 -0
  8. data/lib/elements/archdesc.rb +32 -0
  9. data/lib/elements/arrangement.rb +11 -0
  10. data/lib/elements/bibliography.rb +12 -0
  11. data/lib/elements/bioghist.rb +11 -0
  12. data/lib/elements/c.rb +65 -0
  13. data/lib/elements/chronitem.rb +12 -0
  14. data/lib/elements/chronlist.rb +12 -0
  15. data/lib/elements/container.rb +13 -0
  16. data/lib/elements/controlaccess.rb +10 -0
  17. data/lib/elements/creation.rb +4 -0
  18. data/lib/elements/custodhist.rb +11 -0
  19. data/lib/elements/date.rb +14 -0
  20. data/lib/elements/defitem.rb +10 -0
  21. data/lib/elements/description.rb +10 -0
  22. data/lib/elements/dimensions.rb +13 -0
  23. data/lib/elements/dsc.rb +21 -0
  24. data/lib/elements/ead.rb +39 -0
  25. data/lib/elements/eadheader.rb +28 -0
  26. data/lib/elements/event.rb +9 -0
  27. data/lib/elements/extent.rb +13 -0
  28. data/lib/elements/filedesc.rb +13 -0
  29. data/lib/elements/fileplan.rb +10 -0
  30. data/lib/elements/geogname.rb +16 -0
  31. data/lib/elements/head.rb +11 -0
  32. data/lib/elements/id.rb +12 -0
  33. data/lib/elements/item.rb +9 -0
  34. data/lib/elements/label.rb +9 -0
  35. data/lib/elements/langmaterial.rb +12 -0
  36. data/lib/elements/language.rb +20 -0
  37. data/lib/elements/list.rb +13 -0
  38. data/lib/elements/materialspec.rb +13 -0
  39. data/lib/elements/name.rb +15 -0
  40. data/lib/elements/note.rb +15 -0
  41. data/lib/elements/odd.rb +13 -0
  42. data/lib/elements/originalsloc.rb +12 -0
  43. data/lib/elements/origination.rb +12 -0
  44. data/lib/elements/otherfindaid.rb +11 -0
  45. data/lib/elements/p.rb +10 -0
  46. data/lib/elements/physdesc.rb +14 -0
  47. data/lib/elements/physfacet.rb +16 -0
  48. data/lib/elements/physloc.rb +14 -0
  49. data/lib/elements/phystech.rb +11 -0
  50. data/lib/elements/processinfo.rb +11 -0
  51. data/lib/elements/profiledesc.rb +10 -0
  52. data/lib/elements/relatedmaterial.rb +12 -0
  53. data/lib/elements/repository.rb +12 -0
  54. data/lib/elements/scopecontent.rb +12 -0
  55. data/lib/elements/subtitle.rb +4 -0
  56. data/lib/elements/titlestmt.rb +12 -0
  57. data/lib/elements/unitdate.rb +7 -0
  58. data/lib/elements/unitid.rb +16 -0
  59. data/lib/elements/unittitle.rb +13 -0
  60. data/lib/elements/userestrict.rb +12 -0
  61. data/test/{TestEADDescription.rb → description_test.rb} +27 -26
  62. data/test/{TestEADDocument.rb → document_test.rb} +2 -2
  63. data/test/level_test.rb +75 -0
  64. data/test/note_test.rb +36 -0
  65. data/test/partial_export_test.rb +63 -0
  66. data/test/phystech_test.rb +45 -0
  67. data/test/scopecontent_test.rb +41 -0
  68. data/test/{TestEADSubordinates.rb → subordinates_test.rb} +7 -8
  69. data/test/{TestEADSubtitle.rb → subtitle_test.rb} +5 -6
  70. data/test/test_helper.rb +45 -0
  71. data/test/xmlsoparser_test.rb +119 -0
  72. metadata +72 -50
  73. data/lib/EAD.rb +0 -229
  74. data/lib/EADAcqInfo.rb +0 -13
  75. data/lib/EADAltFormAvail.rb +0 -13
  76. data/lib/EADAppraisal.rb +0 -12
  77. data/lib/EADArrangement.rb +0 -12
  78. data/lib/EADBiogHist.rb +0 -10
  79. data/lib/EADChronList.rb +0 -27
  80. data/lib/EADContainer.rb +0 -15
  81. data/lib/EADControlAccess.rb +0 -12
  82. data/lib/EADCustodHist.rb +0 -12
  83. data/lib/EADDate.rb +0 -24
  84. data/lib/EADDescription.rb +0 -22
  85. data/lib/EADDimensions.rb +0 -15
  86. data/lib/EADDocument.rb +0 -106
  87. data/lib/EADEvent.rb +0 -11
  88. data/lib/EADExtent.rb +0 -15
  89. data/lib/EADFilePlan.rb +0 -12
  90. data/lib/EADGeogName.rb +0 -15
  91. data/lib/EADHeader.rb +0 -70
  92. data/lib/EADLabel.rb +0 -11
  93. data/lib/EADLang.rb +0 -42
  94. data/lib/EADLevel.rb +0 -73
  95. data/lib/EADList.rb +0 -36
  96. data/lib/EADMaterialSpec.rb +0 -14
  97. data/lib/EADName.rb +0 -17
  98. data/lib/EADNote.rb +0 -24
  99. data/lib/EADOtherFindAid.rb +0 -12
  100. data/lib/EADPhysFacet.rb +0 -17
  101. data/lib/EADPhysTech.rb +0 -16
  102. data/lib/EADProcessInfo.rb +0 -13
  103. data/lib/EADProfileDesc.rb +0 -17
  104. data/lib/EADRelatedMaterial.rb +0 -21
  105. data/lib/EADRepository.rb +0 -13
  106. data/lib/EADScopeContent.rb +0 -21
  107. data/lib/EADSubordinates.rb +0 -29
  108. data/lib/EADSubtitle.rb +0 -8
  109. data/test/TestEAD.rb +0 -50
  110. data/test/TestEADLevel.rb +0 -76
  111. data/test/TestEADNote.rb +0 -36
  112. data/test/TestEADPhysTech.rb +0 -44
  113. data/test/TestEADScopeContent.rb +0 -43
  114. data/test/TestPartialExport.rb +0 -61
  115. data/test/TestXMLStreamObjectParser.rb +0 -126
data/Rakefile CHANGED
@@ -1,11 +1,12 @@
1
1
  PKG_NAME = 'eadcodec'
2
- PKG_VERSION = '0.0.4'
2
+ PKG_VERSION = '0.1.0'
3
3
 
4
4
  require 'rake'
5
5
  require 'rake/testtask'
6
6
  require 'rake/rdoctask'
7
7
  require 'rake/gempackagetask'
8
8
  require 'rubygems'
9
+ require 'rcov/rcovtask'
9
10
 
10
11
  task :default => ['test']
11
12
 
@@ -30,7 +31,7 @@ spec = Gem::Specification.new do |s|
30
31
  s.author = 'Pedro Côrte-Real'
31
32
  s.email = 'pedrocr@gmail.com'
32
33
  s.requirements << 'xmlcodec'
33
- s.add_dependency('xmlcodec', '>= 0.0.4')
34
+ s.add_dependency('xmlcodec', '>= 0.1.0')
34
35
  s.require_path = 'lib'
35
36
  s.autorequire = 'rake'
36
37
  s.files = PKG_FILES
@@ -50,9 +51,8 @@ end
50
51
 
51
52
  Rake::TestTask.new do |t|
52
53
  t.libs << "test"
53
- t.test_files = FileList['test/Test*.rb'].exclude('test/TestEAD.rb')
54
- t.libs = ['../lib','..']
55
- t.ruby_opts = ['-xtest']
54
+ t.test_files = FileList['test/*_test.rb']
55
+ t.libs = ['lib']
56
56
  t.verbose = true
57
57
  end
58
58
 
@@ -77,6 +77,13 @@ task :stats do
77
77
  puts "Code to test ratio: 1:%.2f" % ratio
78
78
  end
79
79
 
80
+ Rcov::RcovTask.new do |t|
81
+ t.libs << "test"
82
+ t.test_files = FileList['test/*_test.rb']
83
+ t.output_dir = 'test/coverage'
84
+ t.verbose = true
85
+ end
86
+
80
87
  def count_lines(files)
81
88
  code = 0
82
89
  comments = 0
data/lib/eadcodec.rb CHANGED
@@ -1 +1,76 @@
1
- require 'EAD'
1
+ require "rexml/document"
2
+ require "xmlcodec"
3
+
4
+ # This module includes all the support for EAD import/export. The main class to
5
+ # use is EADDocument that is a subclass of XMLUtils::XMLElement. All elements
6
+ # supported are based on the EAD DTD and have the same names. Currently not all
7
+ # attributes and elements have been added. Adding an element is pretty easy
8
+ # though.
9
+ module EADCodec
10
+ class EADElement < XMLCodec::XMLElement #:nodoc:
11
+ xmlformat 'EAD'
12
+ end
13
+
14
+ class EADSimpleElement < EADElement
15
+ elwithvalue
16
+
17
+ def to_s
18
+ value
19
+ end
20
+ end
21
+
22
+ include XMLUtils
23
+
24
+ def self.sclass(name, string)
25
+ const_set(name, Class.new(EADSimpleElement)).send(:elname, string)
26
+ end
27
+
28
+ # Create a bunch of classes for simple elements with just values
29
+ # Most of these actually can have children so they should be promoted to
30
+ # actual classes.
31
+ sclass "Abstract", "abstract"
32
+ sclass "Author", "author"
33
+ sclass "Sponsor", "sponsor"
34
+ sclass "TitleProper", "titleproper"
35
+ sclass "Abbr", "abbr"
36
+ sclass "Emph", "emph"
37
+ sclass "Expan", "expan"
38
+ sclass "ExtPtr", "extptr"
39
+ sclass "Lb", "lb"
40
+ sclass "Num", "num"
41
+ sclass "Ptr", "ptr"
42
+ sclass "ArchRef", "archref"
43
+ sclass "BibRef", "bibref"
44
+ sclass "ExtRef", "extref"
45
+ sclass "Ref", "ref"
46
+ sclass "LinkGrp", "linkgrp"
47
+ sclass "Title", "title"
48
+
49
+
50
+
51
+ # Module included in classes that have paragraphs as subelements
52
+ module WithParagraphs
53
+ def initialize(value=nil)
54
+ value = [] if not value
55
+ value = [value] if not value.is_a? Array
56
+ value.each{|v| self << P.new(v)}
57
+ end
58
+ end
59
+
60
+ # Module included in classes that have text and other elements as subelements
61
+ module WithText
62
+ def initialize(value=nil)
63
+ value = [] if not value
64
+ value = [value] if not value.is_a? Array
65
+ value.each{|v| self << v}
66
+ end
67
+
68
+ def value
69
+ self.subelements[0].to_s
70
+ end
71
+ end
72
+ end
73
+
74
+ Dir.glob(File.dirname(__FILE__)+'/elements/*.rb').each do |el|
75
+ EADCodec.module_eval File.open(el).read
76
+ end
@@ -0,0 +1,12 @@
1
+ class AccessRestrict < EADElement
2
+ include WithParagraphs
3
+ elname "accessrestrict"
4
+
5
+ xmlattr :altrender
6
+ xmlattr :audience
7
+ xmlattr :encodinganalog
8
+ xmlattr :id
9
+ xmlattr :type
10
+
11
+ xmlsubelements
12
+ end
@@ -0,0 +1,11 @@
1
+ class Accruals < EADElement
2
+ include WithParagraphs
3
+ elname "accruals"
4
+
5
+ xmlattr :altrender
6
+ xmlattr :audience
7
+ xmlattr :encodinganalog
8
+ xmlattr :id
9
+
10
+ xmlsubelements
11
+ end
@@ -0,0 +1,12 @@
1
+ class AcqInfo < EADElement
2
+ include WithParagraphs
3
+ elname "acqinfo"
4
+
5
+ xmlattr :altrender
6
+ xmlattr :audience
7
+ xmlattr :encodinganalog
8
+ xmlattr :id
9
+ xmlattr :label
10
+
11
+ xmlsubelements
12
+ end
@@ -0,0 +1,12 @@
1
+ class AltFormAvail < EADElement
2
+ include WithParagraphs
3
+ elname "altformavail"
4
+
5
+ xmlattr :altrender
6
+ xmlattr :audience
7
+ xmlattr :encodinganalog
8
+ xmlattr :id
9
+ xmlattr :type
10
+
11
+ xmlsubelements
12
+ end
@@ -0,0 +1,11 @@
1
+ class Appraisal < EADElement
2
+ include WithParagraphs
3
+ elname "appraisal"
4
+
5
+ xmlattr :altrender
6
+ xmlattr :audience
7
+ xmlattr :encodinganalog
8
+ xmlattr :id
9
+
10
+ xmlsubelements
11
+ end
@@ -0,0 +1,32 @@
1
+ class ArchDesc < EADElement
2
+ elname "archdesc"
3
+
4
+ xmlattr :altrender
5
+ xmlattr :audience
6
+ xmlattr :encodinganalog
7
+ xmlattr :id
8
+ xmlattr :level
9
+ xmlattr :otherlevel
10
+ xmlattr :relatedencoding
11
+ xmlattr :type
12
+
13
+ xmlsubelements
14
+ def initialize
15
+ @level = "fonds"
16
+ end
17
+
18
+ def current_content
19
+ text = create_open_tag+"\n"
20
+ each_subel do |name|
21
+ if not subel_mult?(name)
22
+ value = send(name)
23
+ if value
24
+ doc = REXML::Document.new
25
+ xml = value.create_xml(doc)
26
+ doc.write(text,2)
27
+ end
28
+ end
29
+ end
30
+ text
31
+ end
32
+ end
@@ -0,0 +1,11 @@
1
+ class Arrangement < EADElement
2
+ include WithParagraphs
3
+ elname "arrangement"
4
+
5
+ xmlattr :altrender
6
+ xmlattr :audience
7
+ xmlattr :encodinganalog
8
+ xmlattr :id
9
+
10
+ xmlsubelements
11
+ end
@@ -0,0 +1,12 @@
1
+ class Bibliography < EADElement
2
+ include WithParagraphs
3
+ elname "bibliography"
4
+
5
+ xmlattr :altrender
6
+ xmlattr :audience
7
+ xmlattr :encodinganalog
8
+ xmlattr :id
9
+ xmlattr :type
10
+
11
+ xmlsubelements
12
+ end
@@ -0,0 +1,11 @@
1
+ class BiogHist < EADElement
2
+ include WithParagraphs
3
+ elname "bioghist"
4
+
5
+ xmlattr :altrender
6
+ xmlattr :audience
7
+ xmlattr :encodinganalog
8
+ xmlattr :id
9
+
10
+ xmlsubelements
11
+ end
data/lib/elements/c.rb ADDED
@@ -0,0 +1,65 @@
1
+ class Level < EADElement
2
+ xmlattr :altrender
3
+ xmlattr :audience
4
+ xmlattr :encodinganalog
5
+ xmlattr :id
6
+ xmlattr :level
7
+ xmlattr :otherlevel
8
+ xmlattr :tpattern
9
+
10
+ xmlsubelements
11
+
12
+ attr_reader :parent
13
+
14
+ #elnames(*["c","c01","c02","c03","c04","c05","c06",
15
+ # "c07","c08","c09","c10","c11","c12"])
16
+
17
+ elname 'c'
18
+
19
+ def initialize
20
+ @unnumbered = false
21
+ end
22
+
23
+ def set_unnumbered
24
+ @unnumbered = true
25
+ end
26
+
27
+ def set_numbered
28
+ @unnumbered = false
29
+ end
30
+
31
+ def unnumbered?
32
+ if not instance_variables.index('@unnumbered')
33
+ @unnumbered = false
34
+ end
35
+ @unnumbered
36
+ end
37
+
38
+ def __parent=(parent)
39
+ super
40
+ if parent.unnumbered?
41
+ self.set_unnumbered
42
+ end
43
+ end
44
+
45
+ def description_level
46
+ if __parent
47
+ return __parent.description_level + 1
48
+ else
49
+ return 0
50
+ end
51
+ end
52
+
53
+ #alias_method :oldelname, :elname # Just to shut up the warning
54
+ #def elname
55
+ # if unnumbered?
56
+ # return "c"
57
+ # end
58
+
59
+ # if description_level < 10
60
+ # return "c0" + description_level.to_s
61
+ # else
62
+ # return "c" + description_level.to_s
63
+ # end
64
+ #end
65
+ end
@@ -0,0 +1,12 @@
1
+ class ChronItem < EADElement
2
+ elname "chronitem"
3
+
4
+ xmlattr :altrender
5
+ xmlattr :audience
6
+ xmlattr :encodinganalog
7
+ xmlattr :id
8
+
9
+ xmlsubel :date
10
+ xmlsubel :event
11
+ xmlsubel :eventgrp
12
+ end
@@ -0,0 +1,12 @@
1
+ class ChronList < EADElement
2
+ elname "chronlist"
3
+
4
+ xmlattr :altrender
5
+ xmlattr :audience
6
+ xmlattr :encodinganalog
7
+ xmlattr :id
8
+
9
+ xmlsubelements
10
+ end
11
+
12
+
@@ -0,0 +1,13 @@
1
+ class Container < EADElement
2
+ elname "container"
3
+
4
+ xmlattr :altrender
5
+ xmlattr :audience
6
+ xmlattr :encodinganalog
7
+ xmlattr :id
8
+ xmlattr :label
9
+ xmlattr :parent
10
+ xmlattr :type
11
+
12
+ xmlsubelements
13
+ end
@@ -0,0 +1,10 @@
1
+ class ControlAccess < EADElement
2
+ elname :controlaccess
3
+
4
+ xmlattr :altrender
5
+ xmlattr :audience
6
+ xmlattr :encodinganalog
7
+ xmlattr :id
8
+
9
+ xmlsubelements
10
+ end
@@ -0,0 +1,4 @@
1
+ class Creation < EADElement
2
+ elname "creation"
3
+ xmlsubelements
4
+ end
@@ -0,0 +1,11 @@
1
+ class CustodHist < EADElement
2
+ include WithParagraphs
3
+ elname "custodhist"
4
+
5
+ xmlattr :altrender
6
+ xmlattr :audience
7
+ xmlattr :encodinganalog
8
+ xmlattr :id
9
+
10
+ xmlsubelements
11
+ end
@@ -0,0 +1,14 @@
1
+ class Date < EADElement
2
+ elname "date"
3
+ elwithvalue
4
+
5
+ xmlattr :altrender
6
+ xmlattr :audience
7
+ xmlattr :calendar
8
+ xmlattr :certainty
9
+ xmlattr :encodinganalog
10
+ xmlattr :era
11
+ xmlattr :id
12
+ xmlattr :normal
13
+ xmlattr :type
14
+ end
@@ -0,0 +1,10 @@
1
+ class DefItem < EADElement
2
+ elname "defitem"
3
+
4
+ xmlattr :altrender
5
+ xmlattr :audience
6
+ xmlattr :id
7
+
8
+ xmlsubel :label
9
+ xmlsubel :item
10
+ end
@@ -0,0 +1,10 @@
1
+ class Description < EADElement
2
+ elname "did"
3
+
4
+ xmlattr :altrender
5
+ xmlattr :audience
6
+ xmlattr :encodinganalog
7
+ xmlattr :id
8
+
9
+ xmlsubelements
10
+ end
@@ -0,0 +1,13 @@
1
+ class Dimensions < EADElement
2
+ elname "dimensions"
3
+
4
+ xmlattr :altrender
5
+ xmlattr :audience
6
+ xmlattr :encodinganalog
7
+ xmlattr :id
8
+ xmlattr :label
9
+ xmlattr :type
10
+ xmlattr :unit
11
+
12
+ xmlsubelements
13
+ end
@@ -0,0 +1,21 @@
1
+ class Subordinates < EADElement
2
+ elname "dsc"
3
+
4
+ xmlattr :altrender
5
+ xmlattr :audience
6
+ xmlattr :encondinganalog
7
+ xmlattr :id
8
+ xmlattr :othertype
9
+ xmlattr :tpattern
10
+ xmlattr :type
11
+
12
+ xmlsubelements
13
+
14
+ def description_level
15
+ 0
16
+ end
17
+
18
+ def unnumbered?
19
+ false
20
+ end
21
+ end
@@ -0,0 +1,39 @@
1
+ class Document < EADElement
2
+ elname "ead"
3
+
4
+ COUNTRY_CODE = "pt"
5
+ AGENCY_CODE = "iantt"
6
+
7
+ xmlsubel :eadheader
8
+ xmlsubel :archdesc
9
+
10
+ def self.from_file(file)
11
+ doc = REXML::Document.new(File.new(file))
12
+ self.import_xml(doc.elements[1])
13
+ end
14
+
15
+ def initialize(id, title)
16
+ self.eadheader = Header.new(id, title)
17
+ self.archdesc = ArchDesc.new
18
+ end
19
+
20
+ def export(filename)
21
+ doc = REXML::Document.new
22
+ doc << REXML::XMLDecl.new("1.0", "UTF-8")
23
+ doc << REXML::DocType.new("ead SYSTEM", '"file:///home/pedrocr/ead.dtd"')
24
+ create_xml(doc)
25
+ output = File.open(filename, "w")
26
+
27
+ doc.write(output, 0)
28
+ output.write "\n"
29
+ output.close
30
+ end
31
+
32
+ def start_partial_export(file)
33
+ if not already_partial_exported?
34
+ file << "<?xml version='1.0' encoding='UTF-8'?>\n"
35
+ file << "<!DOCTYPE ead SYSTEM \"file:///home/pedrocr/ead.dtd\">\n"
36
+ super
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,28 @@
1
+ class Header < EADElement
2
+ elname 'eadheader'
3
+
4
+ xmlattr :altrender
5
+ xmlattr :audience
6
+ xmlattr :countryenconding
7
+ xmlattr :dateencoding
8
+ xmlattr :encodinganalog
9
+ xmlattr :findaidstatus
10
+ xmlattr :id
11
+ xmlattr :langenconding
12
+ xmlattr :relatedencoding
13
+ xmlattr :repositoryencoding
14
+ xmlattr :scriptencoding
15
+
16
+ xmlsubel :eadid
17
+ xmlsubel :filedesc
18
+ xmlsubel :profiledesc
19
+
20
+ def initialize(id, title)
21
+ self.eadid = Id.new(id)
22
+ self.filedesc = FileDesc.new(title)
23
+ end
24
+
25
+ def eadtitle
26
+ self.filedesc.titlestmt.titleproper
27
+ end
28
+ end
@@ -0,0 +1,9 @@
1
+ class Event < EADElement
2
+ elname "event"
3
+
4
+ xmlattr :altrender
5
+ xmlattr :audience
6
+ xmlattr :id
7
+
8
+ xmlsubelements
9
+ end
@@ -0,0 +1,13 @@
1
+ class Extent < EADElement
2
+ elname "extent"
3
+
4
+ xmlattr :altrender
5
+ xmlattr :audience
6
+ xmlattr :encodinganalog
7
+ xmlattr :id
8
+ xmlattr :label
9
+ xmlattr :type
10
+ xmlattr :unit
11
+
12
+ xmlsubelements
13
+ end
@@ -0,0 +1,13 @@
1
+ class FileDesc < EADElement
2
+ elname 'filedesc'
3
+
4
+ xmlattr :altrender
5
+ xmlattr :audience
6
+ xmlattr :encodinganalog
7
+ xmlattr :id
8
+ xmlsubel :titlestmt
9
+
10
+ def initialize(title)
11
+ self.titlestmt = TitleStatement.new(title)
12
+ end
13
+ end
@@ -0,0 +1,10 @@
1
+ class FilePlan< EADElement
2
+ elname "fileplan"
3
+
4
+ xmlattr :altrender
5
+ xmlattr :audience
6
+ xmlattr :encodinganalog
7
+ xmlattr :id
8
+
9
+ xmlsubelements
10
+ end
@@ -0,0 +1,16 @@
1
+ class GeogName < EADElement
2
+ include WithText
3
+ elname 'geogname'
4
+
5
+ xmlattr :altrender
6
+ xmlattr :audience
7
+ xmlattr :authfilenumber
8
+ xmlattr :encondinganalog
9
+ xmlattr :id
10
+ xmlattr :normal
11
+ xmlattr :role
12
+ xmlattr :rules
13
+ xmlattr :source
14
+
15
+ xmlsubelements
16
+ end
@@ -0,0 +1,11 @@
1
+ class Head < EADElement
2
+ include WithText
3
+ elname "head"
4
+
5
+ xmlattr :althead
6
+ xmlattr :altrender
7
+ xmlattr :audience
8
+ xmlattr :id
9
+
10
+ xmlsubelements
11
+ end
@@ -0,0 +1,12 @@
1
+ class Id < EADElement
2
+ elname 'eadid'
3
+ elwithvalue
4
+
5
+ xmlattr :countrycode
6
+ xmlattr :encodinganalog
7
+ xmlattr :identifier
8
+ xmlattr :mainagencycode
9
+ xmlattr :publicid
10
+ xmlattr :url
11
+ xmlattr :urn
12
+ end
@@ -0,0 +1,9 @@
1
+ class Item < EADElement
2
+ elname "item"
3
+
4
+ xmlattr :altrender
5
+ xmlattr :audience
6
+ xmlattr :id
7
+
8
+ xmlsubelements
9
+ end
@@ -0,0 +1,9 @@
1
+ class Label < EADElement
2
+ elname "label"
3
+
4
+ xmlattr :altrender
5
+ xmlattr :audience
6
+ xmlattr :id
7
+
8
+ xmlsubelements
9
+ end
@@ -0,0 +1,12 @@
1
+ class LangMaterial < EADElement
2
+ include WithText
3
+ elname "langmaterial"
4
+
5
+ xmlattr :altrender
6
+ xmlattr :audience
7
+ xmlattr :encodinganalog
8
+ xmlattr :id
9
+ xmlattr :label
10
+
11
+ xmlsubelements
12
+ end