23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_entityAttribute.rb', line 23
def writeHtml(hAttribute)
periodClass = Html_TimePeriod.new(@html)
citationClass = Html_Citation.new(@html)
unless hAttribute[:attributeName].nil?
@html.em('Name: ')
@html.text!(hAttribute[:attributeName])
@html.br
end
unless hAttribute[:attributeCode].nil?
@html.em('Code: ')
@html.text!(hAttribute[:attributeCode])
@html.br
end
hAttribute[:attributeAlias].each do |otherName|
@html.em('Alias: ')
@html.text!(otherName)
@html.br
end
unless hAttribute[:attributeDefinition].nil?
@html.em('Definition: ')
@html.div(:class => 'block') do
@html.text!(hAttribute[:attributeDefinition])
end
end
unless hAttribute[:dataType].nil?
@html.em('Datatype: ')
@html.text!(hAttribute[:dataType])
@html.br
end
@html.em('Allow NULL Values: ')
@html.text!(hAttribute[:allowNull].to_s)
@html.br
@html.em('Attribute Values Must Be Unique: ')
@html.text!(hAttribute[:mustBeUnique].to_s)
@html.br
unless hAttribute[:unitOfMeasure].nil?
@html.em('Unit of Measure: ')
@html.text!(hAttribute[:unitOfMeasure])
@html.br
end
unless hAttribute[:measureResolution].nil?
@html.em('Unit of Measure Resolution: ')
@html.text!(hAttribute[:measureResolution].to_s)
@html.br
end
@html.em('Value is Case Sensitive: ')
@html.text!(hAttribute[:isCaseSensitive].to_s)
@html.br
unless hAttribute[:fieldWidth].nil?
@html.em('Field Width: ')
@html.text!(hAttribute[:fieldWidth].to_s)
@html.br
end
unless hAttribute[:missingValue].nil?
@html.em('Missing Value: ')
@html.text!(hAttribute[:missingValue])
@html.br
end
unless hAttribute[:domainId].nil?
@html.em('Domain ID: ')
@html.text!(hAttribute[:domainId])
@html.br
end
unless hAttribute[:minValue].nil?
@html.em('Minimum Value: ')
@html.text!(hAttribute[:minValue].to_s)
@html.br
end
unless hAttribute[:maxValue].nil?
@html.em('Maximum Value: ')
@html.text!(hAttribute[:maxValue].to_s)
@html.br
end
hAttribute[:valueRange].each do |hRange|
@html.div do
@html.div('Range of Values', {'class' => 'h5'})
@html.div(:class => 'block') do
unless hRange[:minRangeValue].nil?
@html.em('Range Minimum: ')
@html.text!(hRange[:minRangeValue].to_s)
@html.br
end
unless hRange[:maxRangeValue].nil?
@html.em('Range Maximum: ')
@html.text!(hRange[:maxRangeValue].to_s)
@html.br
end
end
end
end
hAttribute[:timePeriod].each do |hPeriod|
@html.div do
@html.div('Time Period of Values', {'class' => 'h5'})
@html.div(:class => 'block') do
periodClass.writeHtml(hPeriod)
end
end
end
unless hAttribute[:attributeReference].empty?
@html.div do
@html.div('Reference', {'class' => 'h5'})
@html.div(:class => 'block') do
citationClass.writeHtml(hAttribute[:attributeReference])
end
end
end
end
|