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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/examples/attachments/attachment.rb +7 -8
- data/examples/attachments/nested_document.rb +6 -5
- data/examples/encryption/encryption.rb +5 -4
- data/examples/events/events.rb +7 -6
- data/examples/flash/flash.rb +10 -9
- data/examples/forms/javascript.rb +14 -13
- data/examples/forms/xfa.rb +67 -66
- data/examples/javascript/hello_world.rb +6 -5
- data/examples/javascript/js_emulation.rb +26 -26
- data/examples/loop/goto.rb +12 -11
- data/examples/loop/named.rb +17 -16
- data/examples/signature/signature.rb +11 -11
- data/examples/uri/javascript.rb +25 -24
- data/examples/uri/open-uri.rb +5 -4
- data/examples/uri/submitform.rb +11 -10
- data/lib/origami/3d.rb +330 -334
- data/lib/origami/acroform.rb +267 -268
- data/lib/origami/actions.rb +266 -278
- data/lib/origami/annotations.rb +659 -670
- data/lib/origami/array.rb +192 -196
- data/lib/origami/boolean.rb +66 -70
- data/lib/origami/catalog.rb +360 -363
- data/lib/origami/collections.rb +132 -133
- data/lib/origami/compound.rb +125 -129
- data/lib/origami/destinations.rb +226 -237
- data/lib/origami/dictionary.rb +155 -154
- data/lib/origami/encryption.rb +967 -923
- data/lib/origami/extensions/fdf.rb +270 -275
- data/lib/origami/extensions/ppklite.rb +323 -328
- data/lib/origami/filespec.rb +170 -173
- data/lib/origami/filters/ascii.rb +162 -167
- data/lib/origami/filters/ccitt/tables.rb +248 -252
- data/lib/origami/filters/ccitt.rb +309 -312
- data/lib/origami/filters/crypt.rb +31 -34
- data/lib/origami/filters/dct.rb +47 -50
- data/lib/origami/filters/flate.rb +57 -60
- data/lib/origami/filters/jbig2.rb +50 -53
- data/lib/origami/filters/jpx.rb +40 -43
- data/lib/origami/filters/lzw.rb +151 -155
- data/lib/origami/filters/predictors.rb +250 -255
- data/lib/origami/filters/runlength.rb +111 -115
- data/lib/origami/filters.rb +319 -325
- data/lib/origami/font.rb +173 -177
- data/lib/origami/functions.rb +62 -66
- data/lib/origami/graphics/colors.rb +203 -208
- data/lib/origami/graphics/instruction.rb +79 -81
- data/lib/origami/graphics/path.rb +141 -144
- data/lib/origami/graphics/patterns.rb +156 -160
- data/lib/origami/graphics/render.rb +51 -47
- data/lib/origami/graphics/state.rb +144 -142
- data/lib/origami/graphics/text.rb +185 -188
- data/lib/origami/graphics/xobject.rb +818 -804
- data/lib/origami/graphics.rb +25 -26
- data/lib/origami/header.rb +63 -65
- data/lib/origami/javascript.rb +718 -651
- data/lib/origami/linearization.rb +284 -285
- data/lib/origami/metadata.rb +156 -135
- data/lib/origami/name.rb +98 -100
- data/lib/origami/null.rb +49 -51
- data/lib/origami/numeric.rb +133 -135
- data/lib/origami/obfuscation.rb +180 -182
- data/lib/origami/object.rb +634 -631
- data/lib/origami/optionalcontent.rb +147 -149
- data/lib/origami/outline.rb +46 -48
- data/lib/origami/outputintents.rb +76 -77
- data/lib/origami/page.rb +637 -596
- data/lib/origami/parser.rb +214 -221
- data/lib/origami/parsers/fdf.rb +44 -45
- data/lib/origami/parsers/pdf/lazy.rb +147 -154
- data/lib/origami/parsers/pdf/linear.rb +104 -109
- data/lib/origami/parsers/pdf.rb +109 -107
- data/lib/origami/parsers/ppklite.rb +44 -46
- data/lib/origami/pdf.rb +886 -896
- data/lib/origami/reference.rb +116 -120
- data/lib/origami/signature.rb +617 -625
- data/lib/origami/stream.rb +560 -558
- data/lib/origami/string.rb +366 -368
- data/lib/origami/template/patterns.rb +50 -52
- data/lib/origami/template/widgets.rb +111 -114
- data/lib/origami/trailer.rb +153 -157
- data/lib/origami/tree.rb +55 -57
- data/lib/origami/version.rb +19 -19
- data/lib/origami/webcapture.rb +87 -90
- data/lib/origami/xfa/config.rb +409 -414
- data/lib/origami/xfa/connectionset.rb +113 -117
- data/lib/origami/xfa/datasets.rb +38 -42
- data/lib/origami/xfa/localeset.rb +33 -37
- data/lib/origami/xfa/package.rb +49 -52
- data/lib/origami/xfa/pdf.rb +54 -59
- data/lib/origami/xfa/signature.rb +33 -37
- data/lib/origami/xfa/sourceset.rb +34 -38
- data/lib/origami/xfa/stylesheet.rb +35 -39
- data/lib/origami/xfa/template.rb +1630 -1634
- data/lib/origami/xfa/xdc.rb +33 -37
- data/lib/origami/xfa/xfa.rb +132 -123
- data/lib/origami/xfa/xfdf.rb +34 -38
- data/lib/origami/xfa/xmpmeta.rb +34 -38
- data/lib/origami/xfa.rb +50 -53
- data/lib/origami/xreftable.rb +462 -462
- data/lib/origami.rb +37 -38
- data/test/test_actions.rb +22 -20
- data/test/test_annotations.rb +54 -52
- data/test/test_forms.rb +23 -21
- data/test/test_native_types.rb +82 -78
- data/test/test_object_tree.rb +25 -24
- data/test/test_pages.rb +43 -41
- data/test/test_pdf.rb +2 -0
- data/test/test_pdf_attachment.rb +23 -21
- data/test/test_pdf_create.rb +16 -15
- data/test/test_pdf_encrypt.rb +69 -66
- data/test/test_pdf_parse.rb +131 -129
- data/test/test_pdf_parse_lazy.rb +53 -53
- data/test/test_pdf_sign.rb +67 -67
- data/test/test_streams.rb +145 -143
- data/test/test_xrefs.rb +46 -45
- metadata +64 -8
data/lib/origami/xfa/config.rb
CHANGED
@@ -1,453 +1,448 @@
|
|
1
|
-
|
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
|
-
|
4
|
-
|
21
|
+
module Origami
|
22
|
+
module XFA
|
23
|
+
class ConfigElement < Element
|
24
|
+
include Lockable
|
25
|
+
include Descriptive
|
26
|
+
end
|
27
|
+
end
|
5
28
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
-
|
12
|
-
|
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
|
-
|
17
|
-
|
40
|
+
add_attribute 'xmlns:xfa', 'http://www.xfa.org/schema/xci/3.0/'
|
41
|
+
end
|
18
42
|
|
19
|
-
|
43
|
+
class URI < XFA::ConfigElement
|
44
|
+
def initialize(uri = "")
|
45
|
+
super('uri')
|
20
46
|
|
21
|
-
|
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
|
-
|
24
|
-
|
25
|
-
|
26
|
-
include Descriptive
|
54
|
+
def initialize
|
55
|
+
super('debug')
|
56
|
+
end
|
27
57
|
end
|
28
|
-
end
|
29
58
|
|
30
|
-
|
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
|
-
|
114
|
+
class Range < XFA::ConfigElement
|
115
|
+
def initialize(range = "")
|
116
|
+
super('range')
|
33
117
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
class Config < XFA::Element
|
38
|
-
mime_type 'text/xml'
|
118
|
+
self.text = range
|
119
|
+
end
|
120
|
+
end
|
39
121
|
|
40
|
-
|
41
|
-
|
122
|
+
class Record < XFA::ConfigElement
|
123
|
+
def initialize(record = "")
|
124
|
+
super('record')
|
42
125
|
|
43
|
-
|
44
|
-
|
126
|
+
self.text = record
|
127
|
+
end
|
128
|
+
end
|
45
129
|
|
46
|
-
|
47
|
-
|
48
|
-
|
130
|
+
class StartNode < XFA::ConfigElement
|
131
|
+
def initialize(somexpr = "")
|
132
|
+
super('startNode')
|
49
133
|
|
50
|
-
|
51
|
-
|
52
|
-
|
134
|
+
self.text = somexpr
|
135
|
+
end
|
136
|
+
end
|
53
137
|
|
54
|
-
|
55
|
-
|
138
|
+
class Window < XFA::ConfigElement
|
139
|
+
def initialize(win = "0")
|
140
|
+
super('window')
|
56
141
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
end
|
142
|
+
self.text = win
|
143
|
+
end
|
144
|
+
end
|
61
145
|
|
62
|
-
|
63
|
-
|
64
|
-
|
146
|
+
class XSL < XFA::ConfigElement
|
147
|
+
xfa_node 'debug', Config::Debug, 0..1
|
148
|
+
xfa_node 'uri', Config::URI, 0..1
|
65
149
|
|
66
|
-
|
67
|
-
|
68
|
-
|
150
|
+
def initialize
|
151
|
+
super('xsl')
|
152
|
+
end
|
153
|
+
end
|
69
154
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
IGNORE = "ignore"
|
155
|
+
class ExcludeNS < XFA::ConfigElement
|
156
|
+
def initialize(ns = "")
|
157
|
+
super('excludeNS')
|
74
158
|
|
75
|
-
|
76
|
-
|
159
|
+
self.text = ns
|
160
|
+
end
|
161
|
+
end
|
77
162
|
|
78
|
-
|
79
|
-
|
80
|
-
|
163
|
+
class GroupParent < XFA::ConfigElement
|
164
|
+
def initialize(parentname = "")
|
165
|
+
super('groupParent')
|
81
166
|
|
82
|
-
|
83
|
-
|
84
|
-
|
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
|
-
|
87
|
-
|
177
|
+
def initialize(default = DATAVALUE)
|
178
|
+
super('ifEmpty')
|
88
179
|
|
89
|
-
|
90
|
-
|
91
|
-
|
180
|
+
self.text = default
|
181
|
+
end
|
182
|
+
end
|
92
183
|
|
93
|
-
|
94
|
-
|
95
|
-
|
184
|
+
class NameAttr < XFA::ConfigElement
|
185
|
+
def initialize(name)
|
186
|
+
super('nameAttr')
|
96
187
|
|
97
|
-
|
98
|
-
|
99
|
-
|
188
|
+
self.text = name
|
189
|
+
end
|
190
|
+
end
|
100
191
|
|
101
|
-
|
102
|
-
|
103
|
-
|
192
|
+
class Picture < XFA::ConfigElement
|
193
|
+
def initialize(clause = "")
|
194
|
+
super('picture')
|
104
195
|
|
105
|
-
|
106
|
-
|
107
|
-
|
196
|
+
self.text = clause
|
197
|
+
end
|
198
|
+
end
|
108
199
|
|
109
|
-
|
110
|
-
|
200
|
+
class Presence < XFA::ConfigElement
|
201
|
+
PRESERVE = "preserve"
|
202
|
+
DISSOLVE = "dissolve"
|
203
|
+
DISSOLVESTRUCTURE = "dissolveStructure"
|
204
|
+
IGNORE = "ignore"
|
205
|
+
REMOVE = "remove"
|
111
206
|
|
112
|
-
|
113
|
-
|
114
|
-
end
|
115
|
-
end
|
207
|
+
def initialize(action = PRESERVE)
|
208
|
+
super('presence')
|
116
209
|
|
117
|
-
|
118
|
-
|
119
|
-
|
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
|
-
|
122
|
-
|
123
|
-
|
268
|
+
class Severity < XFA::ConfigElement
|
269
|
+
IGNORE = "ignore"
|
270
|
+
ERROR = "error"
|
271
|
+
INFORMATION = "information"
|
272
|
+
TRACE = "trace"
|
273
|
+
WARNING = "warning"
|
124
274
|
|
125
|
-
|
126
|
-
|
127
|
-
super('record')
|
275
|
+
def initialize(level = IGNORE)
|
276
|
+
super('severity')
|
128
277
|
|
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
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
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
|