origami-docspring 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/examples/attachments/attachment.rb +7 -8
  4. data/examples/attachments/nested_document.rb +6 -5
  5. data/examples/encryption/encryption.rb +5 -4
  6. data/examples/events/events.rb +7 -6
  7. data/examples/flash/flash.rb +10 -9
  8. data/examples/forms/javascript.rb +14 -13
  9. data/examples/forms/xfa.rb +67 -66
  10. data/examples/javascript/hello_world.rb +6 -5
  11. data/examples/javascript/js_emulation.rb +26 -26
  12. data/examples/loop/goto.rb +12 -11
  13. data/examples/loop/named.rb +17 -16
  14. data/examples/signature/signature.rb +11 -11
  15. data/examples/uri/javascript.rb +25 -24
  16. data/examples/uri/open-uri.rb +5 -4
  17. data/examples/uri/submitform.rb +11 -10
  18. data/lib/origami/3d.rb +330 -334
  19. data/lib/origami/acroform.rb +267 -268
  20. data/lib/origami/actions.rb +266 -278
  21. data/lib/origami/annotations.rb +659 -670
  22. data/lib/origami/array.rb +192 -196
  23. data/lib/origami/boolean.rb +66 -70
  24. data/lib/origami/catalog.rb +360 -363
  25. data/lib/origami/collections.rb +132 -133
  26. data/lib/origami/compound.rb +125 -129
  27. data/lib/origami/destinations.rb +226 -237
  28. data/lib/origami/dictionary.rb +155 -154
  29. data/lib/origami/encryption.rb +967 -923
  30. data/lib/origami/extensions/fdf.rb +270 -275
  31. data/lib/origami/extensions/ppklite.rb +323 -328
  32. data/lib/origami/filespec.rb +170 -173
  33. data/lib/origami/filters/ascii.rb +162 -167
  34. data/lib/origami/filters/ccitt/tables.rb +248 -252
  35. data/lib/origami/filters/ccitt.rb +309 -312
  36. data/lib/origami/filters/crypt.rb +31 -34
  37. data/lib/origami/filters/dct.rb +47 -50
  38. data/lib/origami/filters/flate.rb +57 -60
  39. data/lib/origami/filters/jbig2.rb +50 -53
  40. data/lib/origami/filters/jpx.rb +40 -43
  41. data/lib/origami/filters/lzw.rb +151 -155
  42. data/lib/origami/filters/predictors.rb +250 -255
  43. data/lib/origami/filters/runlength.rb +111 -115
  44. data/lib/origami/filters.rb +319 -325
  45. data/lib/origami/font.rb +173 -177
  46. data/lib/origami/functions.rb +62 -66
  47. data/lib/origami/graphics/colors.rb +203 -208
  48. data/lib/origami/graphics/instruction.rb +79 -81
  49. data/lib/origami/graphics/path.rb +141 -144
  50. data/lib/origami/graphics/patterns.rb +156 -160
  51. data/lib/origami/graphics/render.rb +51 -47
  52. data/lib/origami/graphics/state.rb +144 -142
  53. data/lib/origami/graphics/text.rb +185 -188
  54. data/lib/origami/graphics/xobject.rb +818 -804
  55. data/lib/origami/graphics.rb +25 -26
  56. data/lib/origami/header.rb +63 -65
  57. data/lib/origami/javascript.rb +718 -651
  58. data/lib/origami/linearization.rb +284 -285
  59. data/lib/origami/metadata.rb +156 -135
  60. data/lib/origami/name.rb +98 -100
  61. data/lib/origami/null.rb +49 -51
  62. data/lib/origami/numeric.rb +133 -135
  63. data/lib/origami/obfuscation.rb +180 -182
  64. data/lib/origami/object.rb +634 -631
  65. data/lib/origami/optionalcontent.rb +147 -149
  66. data/lib/origami/outline.rb +46 -48
  67. data/lib/origami/outputintents.rb +76 -77
  68. data/lib/origami/page.rb +637 -596
  69. data/lib/origami/parser.rb +214 -221
  70. data/lib/origami/parsers/fdf.rb +44 -45
  71. data/lib/origami/parsers/pdf/lazy.rb +147 -154
  72. data/lib/origami/parsers/pdf/linear.rb +104 -109
  73. data/lib/origami/parsers/pdf.rb +109 -107
  74. data/lib/origami/parsers/ppklite.rb +44 -46
  75. data/lib/origami/pdf.rb +886 -896
  76. data/lib/origami/reference.rb +116 -120
  77. data/lib/origami/signature.rb +617 -625
  78. data/lib/origami/stream.rb +560 -558
  79. data/lib/origami/string.rb +366 -368
  80. data/lib/origami/template/patterns.rb +50 -52
  81. data/lib/origami/template/widgets.rb +111 -114
  82. data/lib/origami/trailer.rb +153 -157
  83. data/lib/origami/tree.rb +55 -57
  84. data/lib/origami/version.rb +19 -19
  85. data/lib/origami/webcapture.rb +87 -90
  86. data/lib/origami/xfa/config.rb +409 -414
  87. data/lib/origami/xfa/connectionset.rb +113 -117
  88. data/lib/origami/xfa/datasets.rb +38 -42
  89. data/lib/origami/xfa/localeset.rb +33 -37
  90. data/lib/origami/xfa/package.rb +49 -52
  91. data/lib/origami/xfa/pdf.rb +54 -59
  92. data/lib/origami/xfa/signature.rb +33 -37
  93. data/lib/origami/xfa/sourceset.rb +34 -38
  94. data/lib/origami/xfa/stylesheet.rb +35 -39
  95. data/lib/origami/xfa/template.rb +1630 -1634
  96. data/lib/origami/xfa/xdc.rb +33 -37
  97. data/lib/origami/xfa/xfa.rb +132 -123
  98. data/lib/origami/xfa/xfdf.rb +34 -38
  99. data/lib/origami/xfa/xmpmeta.rb +34 -38
  100. data/lib/origami/xfa.rb +50 -53
  101. data/lib/origami/xreftable.rb +462 -462
  102. data/lib/origami.rb +37 -38
  103. data/test/test_actions.rb +22 -20
  104. data/test/test_annotations.rb +54 -52
  105. data/test/test_forms.rb +23 -21
  106. data/test/test_native_types.rb +82 -78
  107. data/test/test_object_tree.rb +25 -24
  108. data/test/test_pages.rb +43 -41
  109. data/test/test_pdf.rb +2 -0
  110. data/test/test_pdf_attachment.rb +23 -21
  111. data/test/test_pdf_create.rb +16 -15
  112. data/test/test_pdf_encrypt.rb +69 -66
  113. data/test/test_pdf_parse.rb +131 -129
  114. data/test/test_pdf_parse_lazy.rb +53 -53
  115. data/test/test_pdf_sign.rb +67 -67
  116. data/test/test_streams.rb +145 -143
  117. data/test/test_xrefs.rb +46 -45
  118. metadata +64 -8
@@ -1,453 +1,448 @@
1
- =begin
1
+ # frozen_string_literal: true
2
+
3
+ #
4
+ # This file is part of Origami, PDF manipulation framework for Ruby
5
+ # Copyright (C) 2017 Guillaume Delugré.
6
+ #
7
+ # Origami is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Lesser General Public License as published by
9
+ # the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # Origami is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public License
18
+ # along with Origami. If not, see <http://www.gnu.org/licenses/>.
19
+ #
2
20
 
3
- This file is part of Origami, PDF manipulation framework for Ruby
4
- Copyright (C) 2017 Guillaume Delugré.
21
+ module Origami
22
+ module XFA
23
+ class ConfigElement < Element
24
+ include Lockable
25
+ include Descriptive
26
+ end
27
+ end
5
28
 
6
- Origami is free software: you can redistribute it and/or modify
7
- it under the terms of the GNU Lesser General Public License as published by
8
- the Free Software Foundation, either version 3 of the License, or
9
- (at your option) any later version.
29
+ module XDP
30
+ module Packet
31
+ #
32
+ # This packet encloses the configuration settings.
33
+ #
34
+ class Config < XFA::Element
35
+ mime_type 'text/xml'
10
36
 
11
- Origami is distributed in the hope that it will be useful,
12
- but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- GNU Lesser General Public License for more details.
37
+ def initialize
38
+ super("config")
15
39
 
16
- You should have received a copy of the GNU Lesser General Public License
17
- along with Origami. If not, see <http://www.gnu.org/licenses/>.
40
+ add_attribute 'xmlns:xfa', 'http://www.xfa.org/schema/xci/3.0/'
41
+ end
18
42
 
19
- =end
43
+ class URI < XFA::ConfigElement
44
+ def initialize(uri = "")
45
+ super('uri')
20
46
 
21
- module Origami
47
+ self.text = uri
48
+ end
49
+ end
50
+
51
+ class Debug < XFA::ConfigElement
52
+ xfa_node 'uri', Config::URI, 0..1
22
53
 
23
- module XFA
24
- class ConfigElement < Element
25
- include Lockable
26
- include Descriptive
54
+ def initialize
55
+ super('debug')
56
+ end
27
57
  end
28
- end
29
58
 
30
- module XDP
59
+ class AdjustData < XFA::ConfigElement
60
+ def initialize(coercion = "0")
61
+ super('adjustData')
62
+
63
+ self.text = coercion
64
+ end
65
+ end
66
+
67
+ class Attributes < XFA::ConfigElement
68
+ PRESERVE = "preserve"
69
+ DELEGATE = "delegate"
70
+ IGNORE = "ignore"
71
+
72
+ def initialize(attr = PRESERVE)
73
+ super('attributes')
74
+
75
+ self.text = attr
76
+ end
77
+ end
78
+
79
+ class IncrementalLoad < XFA::ConfigElement
80
+ NONE = "none"
81
+ FORWARDONLY = "forwardOnly"
82
+
83
+ def initialize(incload = NONE)
84
+ super('incrementalLoad')
85
+
86
+ self.text = incload
87
+ end
88
+ end
89
+
90
+ class Locale < XFA::ConfigElement
91
+ def initialize(locale = "")
92
+ super('locale')
93
+
94
+ self.text = locale
95
+ end
96
+ end
97
+
98
+ class LocaleSet < XFA::ConfigElement
99
+ def initialize(uri = "")
100
+ super('localeSet')
101
+
102
+ self.text = uri
103
+ end
104
+ end
105
+
106
+ class OutputXSL < XFA::ConfigElement
107
+ xfa_node 'uri', Config::URI, 0..1
108
+
109
+ def initialize
110
+ super('outputXSL')
111
+ end
112
+ end
31
113
 
32
- module Packet
114
+ class Range < XFA::ConfigElement
115
+ def initialize(range = "")
116
+ super('range')
33
117
 
34
- #
35
- # This packet encloses the configuration settings.
36
- #
37
- class Config < XFA::Element
38
- mime_type 'text/xml'
118
+ self.text = range
119
+ end
120
+ end
39
121
 
40
- def initialize
41
- super("config")
122
+ class Record < XFA::ConfigElement
123
+ def initialize(record = "")
124
+ super('record')
42
125
 
43
- add_attribute 'xmlns:xfa', 'http://www.xfa.org/schema/xci/3.0/'
44
- end
126
+ self.text = record
127
+ end
128
+ end
45
129
 
46
- class URI < XFA::ConfigElement
47
- def initialize(uri = "")
48
- super('uri')
130
+ class StartNode < XFA::ConfigElement
131
+ def initialize(somexpr = "")
132
+ super('startNode')
49
133
 
50
- self.text = uri
51
- end
52
- end
134
+ self.text = somexpr
135
+ end
136
+ end
53
137
 
54
- class Debug < XFA::ConfigElement
55
- xfa_node 'uri', Config::URI, 0..1
138
+ class Window < XFA::ConfigElement
139
+ def initialize(win = "0")
140
+ super('window')
56
141
 
57
- def initialize
58
- super('debug')
59
- end
60
- end
142
+ self.text = win
143
+ end
144
+ end
61
145
 
62
- class AdjustData < XFA::ConfigElement
63
- def initialize(coercion = "0")
64
- super('adjustData')
146
+ class XSL < XFA::ConfigElement
147
+ xfa_node 'debug', Config::Debug, 0..1
148
+ xfa_node 'uri', Config::URI, 0..1
65
149
 
66
- self.text = coercion
67
- end
68
- end
150
+ def initialize
151
+ super('xsl')
152
+ end
153
+ end
69
154
 
70
- class Attributes < XFA::ConfigElement
71
- PRESERVE = "preserve"
72
- DELEGATE = "delegate"
73
- IGNORE = "ignore"
155
+ class ExcludeNS < XFA::ConfigElement
156
+ def initialize(ns = "")
157
+ super('excludeNS')
74
158
 
75
- def initialize(attr = PRESERVE)
76
- super('attributes')
159
+ self.text = ns
160
+ end
161
+ end
77
162
 
78
- self.text = attr
79
- end
80
- end
163
+ class GroupParent < XFA::ConfigElement
164
+ def initialize(parentname = "")
165
+ super('groupParent')
81
166
 
82
- class IncrementalLoad < XFA::ConfigElement
83
- NONE = "none"
84
- FORWARDONLY = "forwardOnly"
167
+ self.text = parentname
168
+ end
169
+ end
170
+
171
+ class IfEmpty < XFA::ConfigElement
172
+ DATAVALUE = "dataValue"
173
+ DATAGROUP = "dataGroup"
174
+ IGNORE = "ignore"
175
+ REMOVE = "remove"
85
176
 
86
- def initialize(incload = NONE)
87
- super('incrementalLoad')
177
+ def initialize(default = DATAVALUE)
178
+ super('ifEmpty')
88
179
 
89
- self.text = incload
90
- end
91
- end
180
+ self.text = default
181
+ end
182
+ end
92
183
 
93
- class Locale < XFA::ConfigElement
94
- def initialize(locale = "")
95
- super('locale')
184
+ class NameAttr < XFA::ConfigElement
185
+ def initialize(name)
186
+ super('nameAttr')
96
187
 
97
- self.text = locale
98
- end
99
- end
188
+ self.text = name
189
+ end
190
+ end
100
191
 
101
- class LocaleSet < XFA::ConfigElement
102
- def initialize(uri = "")
103
- super('localeSet')
192
+ class Picture < XFA::ConfigElement
193
+ def initialize(clause = "")
194
+ super('picture')
104
195
 
105
- self.text = uri
106
- end
107
- end
196
+ self.text = clause
197
+ end
198
+ end
108
199
 
109
- class OutputXSL < XFA::ConfigElement
110
- xfa_node 'uri', Config::URI, 0..1
200
+ class Presence < XFA::ConfigElement
201
+ PRESERVE = "preserve"
202
+ DISSOLVE = "dissolve"
203
+ DISSOLVESTRUCTURE = "dissolveStructure"
204
+ IGNORE = "ignore"
205
+ REMOVE = "remove"
111
206
 
112
- def initialize
113
- super('outputXSL')
114
- end
115
- end
207
+ def initialize(action = PRESERVE)
208
+ super('presence')
116
209
 
117
- class Range < XFA::ConfigElement
118
- def initialize(range = "")
119
- super('range')
210
+ self.text = action
211
+ end
212
+ end
213
+
214
+ class Rename < XFA::ConfigElement
215
+ def initialize(nodename = "")
216
+ super('rename')
217
+
218
+ self.text = nodename
219
+ end
220
+ end
221
+
222
+ class Whitespace < XFA::ConfigElement
223
+ PRESERVE = "preserve"
224
+ LTRIM = "ltrim"
225
+ NORMALIZE = "normalize"
226
+ RTRIM = "rtrim"
227
+ TRIM = "trim"
228
+
229
+ def initialize(action = PRESERVE)
230
+ super('whitespace')
231
+
232
+ self.text = action
233
+ end
234
+ end
235
+
236
+ class Transform < XFA::ConfigElement
237
+ xfa_attribute 'ref'
238
+
239
+ xfa_node 'groupParent', Config::GroupParent, 0..1
240
+ xfa_node 'ifEmpty', Config::IfEmpty, 0..1
241
+ xfa_node 'nameAttr', Config::NameAttr, 0..1
242
+ xfa_node 'picture', Config::Picture, 0..1
243
+ xfa_node 'presence', Config::Presence, 0..1
244
+ xfa_node 'rename', Config::Rename, 0..1
245
+ xfa_node 'whitespace', Config::Whitespace, 0..1
246
+ end
247
+
248
+ class Data < XFA::ConfigElement
249
+ xfa_node 'adjustData', Config::AdjustData, 0..1
250
+ xfa_node 'attributes', Config::Attributes, 0..1
251
+ xfa_node 'incrementalLoad', Config::IncrementalLoad, 0..1
252
+ xfa_node 'outputXSL', Config::OutputXSL, 0..1
253
+ xfa_node 'range', Config::Range, 0..1
254
+ xfa_node 'record', Config::Record, 0..1
255
+ xfa_node 'startNode', Config::StartNode, 0..1
256
+ xfa_node 'uri', Config::URI, 0..1
257
+ xfa_node 'window', Config::Window, 0..1
258
+ xfa_node 'xsl', Config::XSL, 0..1
259
+
260
+ xfa_node 'excludeNS', Config::ExcludeNS
261
+ xfa_node 'transform', Config::Transform
262
+
263
+ def initialize
264
+ super('data')
265
+ end
266
+ end
120
267
 
121
- self.text = range
122
- end
123
- end
268
+ class Severity < XFA::ConfigElement
269
+ IGNORE = "ignore"
270
+ ERROR = "error"
271
+ INFORMATION = "information"
272
+ TRACE = "trace"
273
+ WARNING = "warning"
124
274
 
125
- class Record < XFA::ConfigElement
126
- def initialize(record = "")
127
- super('record')
275
+ def initialize(level = IGNORE)
276
+ super('severity')
128
277
 
129
- self.text = record
130
- end
131
- end
132
-
133
- class StartNode < XFA::ConfigElement
134
- def initialize(somexpr = "")
135
- super('startNode')
136
-
137
- self.text = somexpr
138
- end
139
- end
140
-
141
- class Window < XFA::ConfigElement
142
- def initialize(win = "0")
143
- super('window')
144
-
145
- self.text = win
146
- end
147
- end
148
-
149
- class XSL < XFA::ConfigElement
150
- xfa_node 'debug', Config::Debug, 0..1
151
- xfa_node 'uri', Config::URI, 0..1
152
-
153
- def initialize
154
- super('xsl')
155
- end
156
- end
157
-
158
- class ExcludeNS < XFA::ConfigElement
159
- def initialize(ns = "")
160
- super('excludeNS')
161
-
162
- self.text = ns
163
- end
164
- end
165
-
166
- class GroupParent < XFA::ConfigElement
167
- def initialize(parentname = "")
168
- super('groupParent')
169
-
170
- self.text = parentname
171
- end
172
- end
173
-
174
- class IfEmpty < XFA::ConfigElement
175
- DATAVALUE = "dataValue"
176
- DATAGROUP = "dataGroup"
177
- IGNORE = "ignore"
178
- REMOVE = "remove"
179
-
180
- def initialize(default = DATAVALUE)
181
- super('ifEmpty')
182
-
183
- self.text = default
184
- end
185
- end
186
-
187
- class NameAttr < XFA::ConfigElement
188
- def initialize(name)
189
- super('nameAttr')
190
-
191
- self.text = name
192
- end
193
- end
194
-
195
- class Picture < XFA::ConfigElement
196
- def initialize(clause = "")
197
- super('picture')
198
-
199
- self.text = clause
200
- end
201
- end
202
-
203
- class Presence < XFA::ConfigElement
204
- PRESERVE = "preserve"
205
- DISSOLVE = "dissolve"
206
- DISSOLVESTRUCTURE = "dissolveStructure"
207
- IGNORE = "ignore"
208
- REMOVE = "remove"
209
-
210
- def initialize(action = PRESERVE)
211
- super('presence')
212
-
213
- self.text = action
214
- end
215
- end
216
-
217
- class Rename < XFA::ConfigElement
218
- def initialize(nodename = "")
219
- super('rename')
220
-
221
- self.text = nodename
222
- end
223
- end
224
-
225
- class Whitespace < XFA::ConfigElement
226
- PRESERVE = "preserve"
227
- LTRIM = "ltrim"
228
- NORMALIZE = "normalize"
229
- RTRIM = "rtrim"
230
- TRIM = "trim"
231
-
232
- def initialize(action = PRESERVE)
233
- super('whitespace')
234
-
235
- self.text = action
236
- end
237
- end
238
-
239
- class Transform < XFA::ConfigElement
240
- xfa_attribute 'ref'
241
-
242
- xfa_node 'groupParent', Config::GroupParent, 0..1
243
- xfa_node 'ifEmpty', Config::IfEmpty, 0..1
244
- xfa_node 'nameAttr', Config::NameAttr, 0..1
245
- xfa_node 'picture', Config::Picture, 0..1
246
- xfa_node 'presence', Config::Presence, 0..1
247
- xfa_node 'rename', Config::Rename, 0..1
248
- xfa_node 'whitespace', Config::Whitespace, 0..1
249
- end
250
-
251
- class Data < XFA::ConfigElement
252
- xfa_node 'adjustData', Config::AdjustData, 0..1
253
- xfa_node 'attributes', Config::Attributes, 0..1
254
- xfa_node 'incrementalLoad', Config::IncrementalLoad, 0..1
255
- xfa_node 'outputXSL', Config::OutputXSL, 0..1
256
- xfa_node 'range', Config::Range, 0..1
257
- xfa_node 'record', Config::Record, 0..1
258
- xfa_node 'startNode', Config::StartNode, 0..1
259
- xfa_node 'uri', Config::URI, 0..1
260
- xfa_node 'window', Config::Window, 0..1
261
- xfa_node 'xsl', Config::XSL, 0..1
262
-
263
- xfa_node 'excludeNS', Config::ExcludeNS
264
- xfa_node 'transform', Config::Transform
265
-
266
- def initialize
267
- super('data')
268
- end
269
- end
270
-
271
- class Severity < XFA::ConfigElement
272
- IGNORE = "ignore"
273
- ERROR = "error"
274
- INFORMATION = "information"
275
- TRACE = "trace"
276
- WARNING = "warning"
277
-
278
- def initialize(level = IGNORE)
279
- super('severity')
280
-
281
- self.text = level
282
- end
283
- end
284
-
285
- class MsgId < XFA::ConfigElement
286
- def initialize(uid = "1")
287
- super('msgId')
288
-
289
- self.text = uid
290
- end
291
- end
292
-
293
- class Message < XFA::ConfigElement
294
- xfa_node 'msgId', Config::MsgId, 0..1
295
- xfa_node 'severity', Config::Severity, 0..1
296
-
297
- def initialize
298
- super('message')
299
- end
300
- end
301
-
302
- class Messaging < XFA::ConfigElement
303
- xfa_node 'message', Config::Message
304
-
305
- def initialize
306
- super('messaging')
307
- end
308
- end
309
-
310
- class SuppressBanner < XFA::ConfigElement
311
- ALLOWED = "0"
312
- DENIED = "1"
313
-
314
- def initialize(display = ALLOWED)
315
- super('suppressBanner')
316
-
317
- self.text = display
318
- end
319
- end
320
-
321
- class Base < XFA::ConfigElement
322
- def initialize(uri = "")
323
- super('base')
324
-
325
- self.text = uri
326
- end
327
- end
328
-
329
- class Relevant < XFA::ConfigElement
330
- def initialize(token = "")
331
- super('relevant')
332
-
333
- self.text = token
334
- end
335
- end
336
-
337
- class StartPage < XFA::ConfigElement
338
- def initialize(pagenum = "0")
339
- super('startPage')
340
-
341
- self.text = pagenum
342
- end
343
- end
344
-
345
- class Template < XFA::ConfigElement
346
- xfa_node 'base', Config::Base, 0..1
347
- xfa_node 'relevant', Config::Relevant, 0..1
348
- xfa_node 'startPage', Config::StartPage, 0..1
349
- xfa_node 'uri', Config::URI, 0..1
350
- xfa_node 'xsl', Config::XSL, 0..1
351
-
352
- def initialize
353
- super('template')
354
- end
355
- end
356
-
357
- class ValidationMessaging < XFA::ConfigElement
358
- ALL_INDIVIDUALLY = "allMessagesIndividually"
359
- ALL_TOGETHER = "allMessagesTogether"
360
- FIRST_ONLY = "firstMessageOnly"
361
- NONE = "noMessages"
362
-
363
- def initialize(validate = ALL_INDIVIDUALLY)
364
- super('validationMessaging')
365
-
366
- self.text = validate
367
- end
368
- end
369
-
370
- class VersionControl < XFA::Element
371
- include Lockable
372
-
373
- xfa_attribute 'outputBelow'
374
- xfa_attribute 'sourceAbove'
375
- xfa_attribute 'sourceBelow'
376
-
377
- def initialize
378
- super('versionControl')
379
- end
380
- end
381
-
382
- class Mode < XFA::ConfigElement
383
- APPEND = "append"
384
- OVERWRITE = "overwrite"
385
-
386
- def initialize(mode = APPEND)
387
- super('mode')
388
-
389
- self.text = mode
390
- end
391
- end
392
-
393
- class Threshold < XFA::ConfigElement
394
- TRACE = "trace"
395
- ERROR = "error"
396
- INFORMATION = "information"
397
- WARN = "warn"
398
-
399
- def initialize(threshold = TRACE)
400
- super('threshold')
401
-
402
- self.text = threshold
403
- end
404
- end
405
-
406
- class To < XFA::ConfigElement
407
- NULL = "null"
408
- MEMORY = "memory"
409
- STD_ERR = "stderr"
410
- STD_OUT = "stdout"
411
- SYSTEM = "system"
412
- URI = "uri"
413
-
414
- def initialize(dest = NULL)
415
- super('to')
416
-
417
- self.text = dest
418
- end
419
- end
420
-
421
- class Log < XFA::ConfigElement
422
- xfa_node 'mode', Config::Mode, 0..1
423
- xfa_node 'threshold', Config::Threshold, 0..1
424
- xfa_node 'to', Config::To, 0..1
425
- xfa_node 'uri', Config::URI, 0..1
426
-
427
- def initialize
428
- super('log')
429
- end
430
- end
431
-
432
- class Common < XFA::ConfigElement
433
- xfa_node 'data', Config::Data, 0..1
434
- xfa_node 'locale', Config::Locale, 0..1
435
- xfa_node 'localeSet', Config::LocaleSet, 0..1
436
- xfa_node 'messaging', Config::Messaging, 0..1
437
- xfa_node 'suppressBanner', Config::SuppressBanner, 0..1
438
- xfa_node 'template', Config::Template, 0..1
439
- xfa_node 'validationMessaging', Config::ValidationMessaging, 0..1
440
- xfa_node 'versionControl', Config::VersionControl, 0..1
441
-
442
- xfa_node 'log', Config::Log
443
-
444
- def initialize
445
- super("common")
446
- end
447
- end
448
-
449
- end
278
+ self.text = level
279
+ end
280
+ end
281
+
282
+ class MsgId < XFA::ConfigElement
283
+ def initialize(uid = "1")
284
+ super('msgId')
285
+
286
+ self.text = uid
287
+ end
288
+ end
289
+
290
+ class Message < XFA::ConfigElement
291
+ xfa_node 'msgId', Config::MsgId, 0..1
292
+ xfa_node 'severity', Config::Severity, 0..1
293
+
294
+ def initialize
295
+ super('message')
296
+ end
297
+ end
298
+
299
+ class Messaging < XFA::ConfigElement
300
+ xfa_node 'message', Config::Message
301
+
302
+ def initialize
303
+ super('messaging')
304
+ end
305
+ end
306
+
307
+ class SuppressBanner < XFA::ConfigElement
308
+ ALLOWED = "0"
309
+ DENIED = "1"
310
+
311
+ def initialize(display = ALLOWED)
312
+ super('suppressBanner')
313
+
314
+ self.text = display
315
+ end
316
+ end
317
+
318
+ class Base < XFA::ConfigElement
319
+ def initialize(uri = "")
320
+ super('base')
321
+
322
+ self.text = uri
323
+ end
324
+ end
325
+
326
+ class Relevant < XFA::ConfigElement
327
+ def initialize(token = "")
328
+ super('relevant')
329
+
330
+ self.text = token
331
+ end
332
+ end
333
+
334
+ class StartPage < XFA::ConfigElement
335
+ def initialize(pagenum = "0")
336
+ super('startPage')
337
+
338
+ self.text = pagenum
339
+ end
340
+ end
341
+
342
+ class Template < XFA::ConfigElement
343
+ xfa_node 'base', Config::Base, 0..1
344
+ xfa_node 'relevant', Config::Relevant, 0..1
345
+ xfa_node 'startPage', Config::StartPage, 0..1
346
+ xfa_node 'uri', Config::URI, 0..1
347
+ xfa_node 'xsl', Config::XSL, 0..1
348
+
349
+ def initialize
350
+ super('template')
351
+ end
352
+ end
353
+
354
+ class ValidationMessaging < XFA::ConfigElement
355
+ ALL_INDIVIDUALLY = "allMessagesIndividually"
356
+ ALL_TOGETHER = "allMessagesTogether"
357
+ FIRST_ONLY = "firstMessageOnly"
358
+ NONE = "noMessages"
359
+
360
+ def initialize(validate = ALL_INDIVIDUALLY)
361
+ super('validationMessaging')
362
+
363
+ self.text = validate
364
+ end
365
+ end
366
+
367
+ class VersionControl < XFA::Element
368
+ include Lockable
369
+
370
+ xfa_attribute 'outputBelow'
371
+ xfa_attribute 'sourceAbove'
372
+ xfa_attribute 'sourceBelow'
373
+
374
+ def initialize
375
+ super('versionControl')
376
+ end
377
+ end
378
+
379
+ class Mode < XFA::ConfigElement
380
+ APPEND = "append"
381
+ OVERWRITE = "overwrite"
382
+
383
+ def initialize(mode = APPEND)
384
+ super('mode')
385
+
386
+ self.text = mode
387
+ end
388
+ end
389
+
390
+ class Threshold < XFA::ConfigElement
391
+ TRACE = "trace"
392
+ ERROR = "error"
393
+ INFORMATION = "information"
394
+ WARN = "warn"
395
+
396
+ def initialize(threshold = TRACE)
397
+ super('threshold')
398
+
399
+ self.text = threshold
400
+ end
401
+ end
402
+
403
+ class To < XFA::ConfigElement
404
+ NULL = "null"
405
+ MEMORY = "memory"
406
+ STD_ERR = "stderr"
407
+ STD_OUT = "stdout"
408
+ SYSTEM = "system"
409
+ URI = "uri"
410
+
411
+ def initialize(dest = NULL)
412
+ super('to')
413
+
414
+ self.text = dest
415
+ end
416
+ end
417
+
418
+ class Log < XFA::ConfigElement
419
+ xfa_node 'mode', Config::Mode, 0..1
420
+ xfa_node 'threshold', Config::Threshold, 0..1
421
+ xfa_node 'to', Config::To, 0..1
422
+ xfa_node 'uri', Config::URI, 0..1
423
+
424
+ def initialize
425
+ super('log')
426
+ end
427
+ end
450
428
 
429
+ class Common < XFA::ConfigElement
430
+ xfa_node 'data', Config::Data, 0..1
431
+ xfa_node 'locale', Config::Locale, 0..1
432
+ xfa_node 'localeSet', Config::LocaleSet, 0..1
433
+ xfa_node 'messaging', Config::Messaging, 0..1
434
+ xfa_node 'suppressBanner', Config::SuppressBanner, 0..1
435
+ xfa_node 'template', Config::Template, 0..1
436
+ xfa_node 'validationMessaging', Config::ValidationMessaging, 0..1
437
+ xfa_node 'versionControl', Config::VersionControl, 0..1
438
+
439
+ xfa_node 'log', Config::Log
440
+
441
+ def initialize
442
+ super("common")
443
+ end
451
444
  end
445
+ end
452
446
  end
447
+ end
453
448
  end