01: package com.jclark.xml.parse;
02:
03: import java.util.Enumeration;
04:
05: /**
06: * Information about the definition of an Attribute.
07: *
08: * @see ElementType#getAttributeDefinition
09: * @version $Revision: 1.1 $ $Date: 1998/06/25 04:41:53 $
10: */
11:
12: public interface AttributeDefinition {
13: /**
14: * Returns the normalized default value
15: * or null if no default value was specified.
16: */
17: String getDefaultValue();
18:
19: /**
20: * Returns the unnormalized default value
21: * or null if no default value was specified.
22: */
23: String getDefaultUnnormalizedValue();
24:
25: /**
26: * Returns true if the attribute was #REQUIRED or #FIXED.
27: */
28: boolean isRequired();
29:
30: static byte UNDECLARED = -1;
31: static byte CDATA = 0;
32: static byte ID = 1;
33: static byte IDREF = 2;
34: static byte IDREFS = 3;
35: static byte ENTITY = 4;
36: static byte ENTITIES = 5;
37: static byte NMTOKEN = 6;
38: static byte NMTOKENS = 7;
39: static byte ENUM = 8;
40: static byte NOTATION = 9;
41:
42: /**
43: * Returns an integer corresponding to the type of the attribute.
44: */
45: byte getType();
46:
47: /**
48: * Returns an enumeration over the allowed values
49: * if this was declared as an enumerated type, and null otherwise.
50: */
51: Enumeration allowedValues();
52: }
|