1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.millscript.commons.xml.atttype;
22
23 import org.millscript.commons.util.IList;
24 import org.millscript.commons.xml.api.Name;
25 import org.millscript.commons.xml.api.atttype.EnumerationAttDef;
26 import org.millscript.commons.xml.tokenizer.AbstractXmlTokenizerImpl;
27
28 /**
29 * This class provides a default implementation of the
30 * <code>EnumerationAttDef</code> interface, to handle an enumeration attribute
31 * definition in the DTD.
32 */
33 public class EnumerationAttDefImpl extends AttDefImpl implements EnumerationAttDef {
34
35 /**
36 * The list of enumeration tokens in this enumerated declaration.
37 */
38 private final IList< String > enumerationNmtokens;
39
40 /**
41 * Constructs a new enumeration attribute definition object with the specified
42 * <code>Name</code>, reading the default mode and value from the specified
43 * XML tokenizer.
44 *
45 * @param an the attributes <code>Name</code>
46 * @param l the <code>List</code> of <code>String</code> enumeration tokens
47 * @param xt the XML tokenizer to obtain the default mode and value from
48 */
49 public EnumerationAttDefImpl( final Name an, final IList< String > l, final AbstractXmlTokenizerImpl xt ) {
50 super( an, xt );
51 this.enumerationNmtokens = l;
52 }
53
54 /**
55 * Constructs a new enumeration attribute definition object with the specified
56 * <code>Name</code>, default mode and default value.
57 *
58 * @param an the attributes <code>Name</code>
59 * @param l the <code>List</code> of <code>String</code> enumeration tokens
60 * @param dm the default mode for the attribute
61 * @param dv the default value for the attribute
62 */
63 public EnumerationAttDefImpl( final Name an, final IList< String > l, final String dv, final String dm ) {
64 super( an, dv, dm );
65 this.enumerationNmtokens = l;
66 }
67
68 }