]> _ Git - cubeextranet.git/blob
6aadddcb3fb5cdf1dea8d94496b052e4df88f43d
[cubeextranet.git] /
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements.  See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License.  You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 package org.apache.pdfbox.pdmodel.documentinterchange.taggedpdf;
18
19 import java.lang.reflect.Field;
20 import java.lang.reflect.Modifier;
21 import java.util.ArrayList;
22 import java.util.Collections;
23 import java.util.List;
24
25 /**
26  * The standard structure types.
27  * 
28  * @author <a href="mailto:Johannes%20Koch%20%3Ckoch@apache.org%3E">Johannes Koch</a>
29  * @version $Revision: $
30  */
31 public class StandardStructureTypes
32 {
33
34     private StandardStructureTypes()
35     {
36     }
37
38
39     // Grouping Elements
40     /**
41      * Document
42      */
43     public static final String DOCUMENT = "Document";
44
45     /**
46      * Part
47      */
48     public static final String PART = "Part";
49
50     /**
51      * Art
52      */
53     public static final String ART = "Art";
54
55     /**
56      * Sect
57      */
58     public static final String SECT = "Sect";
59
60     /**
61      * Div
62      */
63     public static final String DIV = "Div";
64
65     /**
66      * BlockQuote
67      */
68     public static final String BLOCK_QUOTE = "BlockQuote";
69
70     /**
71      * Caption
72      */
73     public static final String CAPTION = "Caption";
74
75     /**
76      * TOC
77      */
78     public static final String TOC = "TOC";
79
80     /**
81      * TOCI
82      */
83     public static final String TOCI = "TOCI";
84
85     /**
86      * Index
87      */
88     public static final String INDEX = "Index";
89
90     /**
91      * NonStruct
92      */
93     public static final String NON_STRUCT = "NonStruct";
94
95     /**
96      * Private
97      */
98     public static final String PRIVATE = "Private";
99
100
101     // Block-Level Structure Elements
102     /**
103      * P
104      */
105     public static final String P = "P";
106
107     /**
108      * H
109      */
110     public static final String H = "H";
111
112     /**
113      * H1
114      */
115     public static final String H1 = "H1";
116
117     /**
118      * H2
119      */
120     public static final String H2 = "H2";
121
122     /**
123      * H3
124      */
125     public static final String H3 = "H3";
126
127     /**
128      * H4
129      */
130     public static final String H4 = "H4";
131
132     /**
133      * H5
134      */
135     public static final String H5 = "H5";
136
137     /**
138      * H6
139      */
140     public static final String H6 = "H6";
141
142     /**
143      * L
144      */
145     public static final String L = "L";
146
147     /**
148      * LI
149      */
150     public static final String LI = "LI";
151
152     /**
153      * Lbl
154      */
155     public static final String LBL = "Lbl";
156
157     /**
158      * LBody
159      */
160     public static final String L_BODY = "LBody";
161
162     /**
163      * Table
164      */
165     public static final String TABLE = "Table";
166
167     /**
168      * TR
169      */
170     public static final String TR = "TR";
171
172     /**
173      * TH
174      */
175     public static final String TH = "TH";
176
177     /**
178      * TD
179      */
180     public static final String TD = "TD";
181
182     /**
183      * THead
184      */
185     public static final String T_HEAD = "THead";
186
187     /**
188      * TBody
189      */
190     public static final String T_BODY = "TBody";
191
192     /**
193      * TFoot
194      */
195     public static final String T_FOOT = "TFoot";
196
197
198     // Inline-Level Structure Elements
199     /**
200      * Span
201      */
202     public static final String SPAN = "Span";
203
204     /**
205      * Quote
206      */
207     public static final String QUOTE = "Quote";
208
209     /**
210      * Note
211      */
212     public static final String NOTE = "Note";
213
214     /**
215      * Reference
216      */
217     public static final String REFERENCE = "Reference";
218
219     /**
220      * BibEntry
221      */
222     public static final String BIB_ENTRY = "BibEntry";
223
224     /**
225      * Code
226      */
227     public static final String CODE = "Code";
228
229     /**
230      * Link
231      */
232     public static final String LINK = "Link";
233
234     /**
235      * Annot
236      */
237     public static final String ANNOT = "Annot";
238
239     /**
240      * Ruby
241      */
242     public static final String RUBY = "Ruby";
243
244     /**
245      * RB
246      */
247     public static final String RB = "RB";
248
249     /**
250      * RT
251      */
252     public static final String RT = "RT";
253
254     /**
255      * RP
256      */
257     public static final String RP = "RP";
258
259     /**
260      * Warichu
261      */
262     public static final String WARICHU = "Warichu";
263
264     /**
265      * WT
266      */
267     public static final String WT = "WT";
268
269     /**
270      * WP
271      */
272     public static final String WP = "WP";
273
274
275     // Illustration Elements
276     /**
277      * Figure
278      */
279     public static final String Figure = "Figure";
280
281     /**
282      * Formula
283      */
284     public static final String FORMULA = "Formula";
285
286     /**
287      * Form
288      */
289     public static final String FORM = "Form";
290
291     /**
292      * All standard structure types.
293      */
294     public static List<String> types = new ArrayList<String>();
295
296     static
297     {
298         Field[] fields = StandardStructureTypes.class.getFields();
299         for (int i = 0; i < fields.length; i++)
300         {
301             if (Modifier.isFinal(fields[i].getModifiers()))
302             {
303                 try
304                 {
305                     types.add(fields[i].get(null).toString());
306                 }
307                 catch (IllegalArgumentException e)
308                 {
309                     e.printStackTrace();
310                 }
311                 catch (IllegalAccessException e)
312                 {
313                     e.printStackTrace();
314                 }
315             }
316         }
317         Collections.sort(types);
318     }
319
320 }