1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package de.fu_berlin.ties.xml;
23
24 /***
25 * Type-safe enumeration of the three variaties of tags employed for XML
26 * adjustment.
27 *
28 * @author Christian Siefkes
29 * @version $Revision: 1.1 $, $Date: 2004/02/02 18:50:16 $, $Author: siefkes $
30 */
31 public final class TagVariety {
32
33 /***
34 * Constant for the most common tag variety, marking all tags that
35 * pre-existed in the input data.
36 */
37 public static final TagVariety REGULAR = new TagVariety("regular");
38
39 /***
40 * Constant for start tags that were created when splitting a tag. Tags of
41 * this variety that be freely moved within a tag series, but the cannot
42 * be moved to the next series (if required, they must be split again).
43 */
44 public static final TagVariety CONTINUATION =
45 new TagVariety("continuation");
46
47 /***
48 * Constant for tentative start tags that were created when an end tag is
49 * followed by another end tag of the same type without a start tag of this
50 * type between them. The tentative tag replaces the missing start tag,
51 * it can be freely moved between tag series when required.
52 */
53 public static final TagVariety TENTATIVE = new TagVariety("tentative");
54
55 /***
56 * The name of this tag variety, printed by the {@link #toString()} method.
57 */
58 private final String name;
59
60 /***
61 * Private constructor to prevent creation of further instances.
62 * The static constants defined in this class are the only instantiations.
63 *
64 * @param varietyName the name of this tag variety, to be printed by the
65 * {@link #toString()} method
66 */
67 private TagVariety(final String varietyName) {
68 super();
69 name = varietyName;
70 }
71
72 /***
73 * Returns a string representation of this object.
74 *
75 * @return a textual representation
76 */
77 public String toString() {
78 return name;
79 }
80
81 }