Top Description Fields Constructors Methods
org.jdom2

public final Enum AttributeType

extends Enum<AttributeType>
Class Inheritance
Imports
org.xml.sax.Attributes

Use a simple enumeration for the Attribute Types
Author
Rolf Lear

Field Summary

Modifier and TypeField and Description
public static final AttributeType
CDATA

Attribute type: the attribute value is a string.

public static final AttributeType
ENTITIES

Attribute type: the attribute value is a list of entity names.

public static final AttributeType
ENTITY

Attribute type: the attribute value is the name of an entity.

public static final AttributeType
ENUMERATION

Attribute type: the attribute value is a name token from an enumeration.

public static final AttributeType
ID

Attribute type: the attribute value is a unique identifier.

public static final AttributeType
IDREF

Attribute type: the attribute value is a reference to a unique identifier.

public static final AttributeType
IDREFS

Attribute type: the attribute value is a list of references to unique identifiers.

public static final AttributeType
NMTOKEN

Attribute type: the attribute value is a name token.

public static final AttributeType
NMTOKENS

Attribute type: the attribute value is a list of name tokens.

public static final AttributeType
NOTATION

Attribute type: the attribute value is the name of a notation.

public static final AttributeType
UNDECLARED

Attribute type: the attribute has not been declared or type is unknown.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static final AttributeType

Returns:

The AttributeType corresponding to the specified equivalent
byIndex
(int
The AttributeType int equivalent to retrieve
index
)

Deprecated Use normal Enums instead of int's
Obtain a AttributeType by a int constant.
public static final AttributeType

Returns:

int the JDOM attribute type.
getAttributeType
(String
String the SAX 2.0 attribute type string.
typeName
)

Returns the the JDOM AttributeType value from the SAX 2.0 attribute type string provided by the parser.

public static AttributeType
public static AttributeType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CDATAback to summary
public static final AttributeType CDATA

Attribute type: the attribute value is a string.

See Also
Attribute#getAttributeType
ENTITIESback to summary
public static final AttributeType ENTITIES

Attribute type: the attribute value is a list of entity names.

See Also
getAttributeType
ENTITYback to summary
public static final AttributeType ENTITY

Attribute type: the attribute value is the name of an entity.

See Also
getAttributeType
ENUMERATIONback to summary
public static final AttributeType ENUMERATION

Attribute type: the attribute value is a name token from an enumeration.

See Also
getAttributeType
IDback to summary
public static final AttributeType ID

Attribute type: the attribute value is a unique identifier.

See Also
getAttributeType
IDREFback to summary
public static final AttributeType IDREF

Attribute type: the attribute value is a reference to a unique identifier.

See Also
getAttributeType
IDREFSback to summary
public static final AttributeType IDREFS

Attribute type: the attribute value is a list of references to unique identifiers.

See Also
getAttributeType
NMTOKENback to summary
public static final AttributeType 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
Attribute#getAttributeType
NMTOKENSback to summary
public static final AttributeType NMTOKENS

Attribute type: the attribute value is a list of name tokens.

See Also
getAttributeType
NOTATIONback to summary
public static final AttributeType NOTATION

Attribute type: the attribute value is the name of a notation.

See Also
getAttributeType
UNDECLAREDback to summary
public static final AttributeType UNDECLARED

Attribute type: the attribute has not been declared or type is unknown.

See Also
getAttributeType

Constructor Detail

AttributeTypeback to summary
private AttributeType()

Method Detail

byIndexback to summary
public static final AttributeType byIndex(int index)

Deprecated

Use normal Enums instead of int's

Obtain 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:int

The AttributeType int equivalent to retrieve

Returns:AttributeType

The AttributeType corresponding to the specified equivalent

Annotations
@Deprecated
Exceptions
IllegalArgumentException:
if there is no equivalent
getAttributeTypeback to summary
public static final AttributeType getAttributeType(String typeName)

Returns the the JDOM AttributeType value from the SAX 2.0 attribute type string provided by the parser.

Parameters
typeName:String

String the SAX 2.0 attribute type string.

Returns:AttributeType

int the JDOM attribute type.

See Also
Attribute#setAttributeType, Attributes#getType
valueOfback to summary
public static AttributeType valueOf(String name)
valuesback to summary
public static AttributeType[] values()