@@ -42,101 +42,290 @@ This file is part of the iText (R) project.
42
42
*/
43
43
package com .itextpdf .kernel .pdf .tagutils ;
44
44
45
+ import com .itextpdf .kernel .pdf .PdfName ;
46
+ import com .itextpdf .kernel .pdf .PdfString ;
45
47
import com .itextpdf .kernel .pdf .tagging .PdfNamespace ;
48
+ import com .itextpdf .kernel .pdf .tagging .PdfStructElem ;
46
49
import com .itextpdf .kernel .pdf .tagging .PdfStructureAttributes ;
50
+ import com .itextpdf .kernel .pdf .tagging .StandardRoles ;
47
51
48
52
import java .util .Collections ;
49
53
import java .util .List ;
50
54
55
+ /**
56
+ * The accessibility properties are used to define properties of {@link PdfStructElem structure elements}
57
+ * in Tagged PDF documents via {@link TagTreePointer} API.
58
+ */
51
59
public abstract class AccessibilityProperties {
60
+ /**
61
+ * Gets the role of element.
62
+ *
63
+ * <p>
64
+ * See also {@link StandardRoles}.
65
+ *
66
+ * @return the role
67
+ */
52
68
public String getRole () {
53
69
return null ;
54
70
}
55
71
72
+ /**
73
+ * Sets the role of element.
74
+ *
75
+ * <p>
76
+ * See also {@link StandardRoles}.
77
+ *
78
+ * @param role the role to be set
79
+ *
80
+ * @return this {@link AccessibilityProperties} instance
81
+ */
56
82
public AccessibilityProperties setRole (String role ) {
57
83
return this ;
58
84
}
59
85
86
+ /**
87
+ * Gets the language identifier of element. Should be in format xy-ZK (for example en-US).
88
+ *
89
+ * <p>
90
+ * For more information see PDF Specification ISO 32000-1 section 14.9.2.
91
+ *
92
+ * @return the language
93
+ */
60
94
public String getLanguage () {
61
95
return null ;
62
96
}
63
97
98
+ /**
99
+ * Sets the language identifier of element. Should be in format xy-ZK (for example en-US).
100
+ *
101
+ * <p>
102
+ * For more information see PDF Specification ISO 32000-1 section 14.9.2.
103
+ *
104
+ * @param language the language to be set
105
+ *
106
+ * @return this {@link AccessibilityProperties} instance
107
+ */
64
108
public AccessibilityProperties setLanguage (String language ) {
65
109
return this ;
66
110
}
67
111
112
+ /**
113
+ * Gets the actual text of element.
114
+ *
115
+ * @return the actual text
116
+ */
68
117
public String getActualText () {
69
118
return null ;
70
119
}
71
120
121
+ /**
122
+ * Sets the actual text of element.
123
+ *
124
+ * @param actualText the actual text to be set
125
+ *
126
+ * @return this {@link AccessibilityProperties} instance
127
+ */
72
128
public AccessibilityProperties setActualText (String actualText ) {
73
129
return this ;
74
130
}
75
131
132
+ /**
133
+ * Gets the alternate description of element.
134
+ *
135
+ * @return the alternate description
136
+ */
76
137
public String getAlternateDescription () {
77
138
return null ;
78
139
}
79
140
141
+ /**
142
+ * Sets the alternate description of element.
143
+ *
144
+ * @param alternateDescription the alternation description to be set
145
+ *
146
+ * @return this {@link AccessibilityProperties} instance
147
+ */
80
148
public AccessibilityProperties setAlternateDescription (String alternateDescription ) {
81
149
return this ;
82
150
}
83
151
152
+ /**
153
+ * Gets the expansion of element.
154
+ *
155
+ * <p>
156
+ * Expansion it is the expanded form of an abbreviation of structure element.
157
+ *
158
+ * @return the expansion
159
+ */
84
160
public String getExpansion () {
85
161
return null ;
86
162
}
87
163
164
+ /**
165
+ * Sets the expansion of element.
166
+ *
167
+ * <p>
168
+ * Expansion it is the expanded form of an abbreviation of structure element.
169
+ *
170
+ * @param expansion the expansion to be set
171
+ *
172
+ * @return this {@link AccessibilityProperties} instance
173
+ */
88
174
public AccessibilityProperties setExpansion (String expansion ) {
89
175
return this ;
90
176
}
91
177
178
+ /**
179
+ * Gets the phoneme of element.
180
+ *
181
+ * <p>
182
+ * For more information see {@link PdfStructElem#setPhoneme(PdfString)}.
183
+ *
184
+ * @return the phoneme
185
+ */
92
186
public String getPhoneme () {
93
187
return null ;
94
188
}
95
189
190
+ /**
191
+ * Sets the phoneme of element.
192
+ *
193
+ * <p>
194
+ * For more information see {@link PdfStructElem#setPhoneme(PdfString)}.
195
+ *
196
+ * @param phoneme the phoneme to be set
197
+ *
198
+ * @return this {@link AccessibilityProperties} instance
199
+ */
96
200
public AccessibilityProperties setPhoneme (String phoneme ) {
97
201
return this ;
98
202
}
99
203
204
+ /**
205
+ * Gets the phonetic alphabet of element.
206
+ *
207
+ * <p>
208
+ * For more information see {@link PdfStructElem#setPhoneticAlphabet(PdfName)}.
209
+ *
210
+ * @return the phonetic alphabet
211
+ */
100
212
public String getPhoneticAlphabet () {
101
213
return null ;
102
214
}
103
215
216
+ /**
217
+ * Sets the phonetic alphabet of element.
218
+ *
219
+ * <p>
220
+ * For more information see {@link PdfStructElem#setPhoneticAlphabet(PdfName)}.
221
+ *
222
+ * @param phoneticAlphabet the phonetic alphabet to be set
223
+ *
224
+ * @return this {@link AccessibilityProperties} instance
225
+ */
104
226
public AccessibilityProperties setPhoneticAlphabet (String phoneticAlphabet ) {
105
227
return this ;
106
228
}
107
229
230
+ /**
231
+ * Gets the namespace of element.
232
+ *
233
+ * @return the namespace
234
+ */
108
235
public PdfNamespace getNamespace () {
109
236
return null ;
110
237
}
111
238
239
+ /**
240
+ * Sets the namespace of element.
241
+ *
242
+ * @param namespace the namespace to be set
243
+ *
244
+ * @return this {@link AccessibilityProperties} instance
245
+ */
112
246
public AccessibilityProperties setNamespace (PdfNamespace namespace ) {
113
247
return this ;
114
248
}
115
249
250
+ /**
251
+ * Adds the reference to other tagged element.
252
+ *
253
+ * <p>
254
+ * For more information see {@link PdfStructElem#addRef(PdfStructElem)}.
255
+ *
256
+ * @param treePointer the reference to be set
257
+ *
258
+ * @return this {@link AccessibilityProperties} instance
259
+ */
116
260
public AccessibilityProperties addRef (TagTreePointer treePointer ) {
117
261
return this ;
118
262
}
119
263
264
+ /**
265
+ * Gets the list of references to other tagged elements.
266
+ *
267
+ * <p>
268
+ * For more information see {@link PdfStructElem#addRef(PdfStructElem)}.
269
+ *
270
+ * @return the list of references
271
+ */
120
272
public List <TagTreePointer > getRefsList () {
121
273
return Collections .<TagTreePointer >emptyList ();
122
274
}
123
275
276
+ /**
277
+ * Clears the list of references to other tagged elements.
278
+ *
279
+ * <p>
280
+ * For more information see {@link PdfStructElem#addRef(PdfStructElem)}.
281
+ *
282
+ * @return this {@link AccessibilityProperties} instance
283
+ */
124
284
public AccessibilityProperties clearRefs () {
125
285
return this ;
126
286
}
127
287
288
+ /**
289
+ * Adds the attributes to the element.
290
+ *
291
+ * @param attributes the attributes to be added
292
+ *
293
+ * @return this {@link AccessibilityProperties} instance
294
+ */
128
295
public AccessibilityProperties addAttributes (PdfStructureAttributes attributes ) {
129
296
return this ;
130
297
}
131
298
299
+ /**
300
+ * Adds the attributes to the element with specified index.
301
+ *
302
+ * <p>
303
+ * If an attribute with the same O and NS entries is specified more than once, the later (in array order)
304
+ * entry shall take precedence. For more information see PDF Specification ISO-32000 section 14.7.6.
305
+ *
306
+ * @param index the attributes index
307
+ * @param attributes the attributes to be added
308
+ *
309
+ * @return this {@link AccessibilityProperties} instance
310
+ */
132
311
public AccessibilityProperties addAttributes (int index , PdfStructureAttributes attributes ) {
133
312
return this ;
134
313
}
135
314
315
+ /**
316
+ * Clears the list of attributes.
317
+ *
318
+ * @return this {@link AccessibilityProperties} instance
319
+ */
136
320
public AccessibilityProperties clearAttributes () {
137
321
return this ;
138
322
}
139
323
324
+ /**
325
+ * Gets the attributes list.
326
+ *
327
+ * @return the attributes list
328
+ */
140
329
public List <PdfStructureAttributes > getAttributesList () {
141
330
return Collections .<PdfStructureAttributes >emptyList ();
142
331
}
0 commit comments