Package org.jdom2
Enum Class AttributeType
- All Implemented Interfaces:
Serializable
,Comparable<AttributeType>
,Constable
Use a simple enumeration for the Attribute Types
- Author:
- Rolf Lear
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAttribute type: the attribute value is a string.Attribute type: the attribute value is a list of entity names.Attribute type: the attribute value is the name of an entity.Attribute type: the attribute value is a name token from an enumeration.Attribute type: the attribute value is a unique identifier.Attribute type: the attribute value is a reference to a unique identifier.Attribute type: the attribute value is a list of references to unique identifiers.Attribute type: the attribute value is a name token.Attribute type: the attribute value is a list of name tokens.Attribute type: the attribute value is the name of a notation.Attribute type: the attribute has not been declared or type is unknown. -
Method Summary
Modifier and TypeMethodDescriptionstatic final AttributeType
byIndex
(int index) Deprecated.Use normal Enums instead of int'sstatic final AttributeType
getAttributeType
(String typeName) Returns the the JDOM AttributeType value from the SAX 2.0 attribute type string provided by the parser.static AttributeType
Returns the enum constant of this class with the specified name.static AttributeType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNDECLARED
Attribute type: the attribute has not been declared or type is unknown.- See Also:
-
CDATA
Attribute type: the attribute value is a string.- See Also:
-
ID
Attribute type: the attribute value is a unique identifier.- See Also:
-
IDREF
Attribute type: the attribute value is a reference to a unique identifier.- See Also:
-
IDREFS
Attribute type: the attribute value is a list of references to unique identifiers.- See Also:
-
ENTITY
Attribute type: the attribute value is the name of an entity.- See Also:
-
ENTITIES
Attribute type: the attribute value is a list of entity names.
- See Also:
-
NMTOKEN
Attribute type: the attribute value is a name token.According to SAX 2.0 specification, attributes of enumerated types should be reported as "NMTOKEN" by SAX parsers. But the major parsers (Xerces and Crimson) provide specific values that permit to recognize them as
ENUMERATION
.- See Also:
-
NMTOKENS
Attribute type: the attribute value is a list of name tokens.- See Also:
-
NOTATION
Attribute type: the attribute value is the name of a notation.- See Also:
-
ENUMERATION
Attribute type: the attribute value is a name token from an enumeration.- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
byIndex
Deprecated.Use normal Enums instead of int'sObtain a AttributeType by a int constant. This goes against the logic of enums, but this is used for backward compatibility. Thus, this method is marked Deprecated.- Parameters:
index
- The AttributeType int equivalent to retrieve- Returns:
- The AttributeType corresponding to the specified equivalent
- Throws:
IllegalArgumentException
- if there is no equivalent
-
getAttributeType
Returns the the JDOM AttributeType value from the SAX 2.0 attribute type string provided by the parser.- Parameters:
typeName
-String
the SAX 2.0 attribute type string.- Returns:
int
the JDOM attribute type.- See Also:
-