public enum AttributeType extends java.lang.Enum<AttributeType>
Enum Constant and Description |
---|
CDATA
Attribute type: the attribute value is a string.
|
ENTITIES
Attribute type: the attribute value is a list of entity names.
|
ENTITY
Attribute type: the attribute value is the name of an entity.
|
ENUMERATION
Attribute type: the attribute value is a name token from an
enumeration.
|
ID
Attribute type: the attribute value is a unique identifier.
|
IDREF
Attribute type: the attribute value is a reference to a
unique identifier.
|
IDREFS
Attribute type: the attribute value is a list of references to
unique identifiers.
|
NMTOKEN
Attribute type: the attribute value is a name token.
|
NMTOKENS
Attribute type: the attribute value is a list of name tokens.
|
NOTATION
Attribute type: the attribute value is the name of a notation.
|
UNDECLARED
Attribute type: the attribute has not been declared or type
is unknown.
|
Modifier and Type | Method and Description |
---|---|
static AttributeType |
byIndex(int index)
Deprecated.
Use normal Enums instead of int's
|
static AttributeType |
getAttributeType(java.lang.String typeName)
Returns the the JDOM AttributeType value from the SAX 2.0
attribute type string provided by the parser.
|
static AttributeType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static AttributeType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AttributeType UNDECLARED
getAttributeType(java.lang.String)
public static final AttributeType CDATA
Attribute.getAttributeType()
public static final AttributeType ID
getAttributeType(java.lang.String)
public static final AttributeType IDREF
getAttributeType(java.lang.String)
public static final AttributeType IDREFS
getAttributeType(java.lang.String)
public static final AttributeType ENTITY
getAttributeType(java.lang.String)
public static final AttributeType ENTITIES
Attribute type: the attribute value is a list of entity names.
getAttributeType(java.lang.String)
public static final AttributeType NMTOKEN
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
.
Attribute.getAttributeType()
public static final AttributeType NMTOKENS
getAttributeType(java.lang.String)
public static final AttributeType NOTATION
getAttributeType(java.lang.String)
public static final AttributeType ENUMERATION
getAttributeType(java.lang.String)
public static AttributeType[] values()
for (AttributeType c : AttributeType.values()) System.out.println(c);
public static AttributeType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null@Deprecated public static final AttributeType byIndex(int index)
index
- The AttributeType int equivalent to retrievejava.lang.IllegalArgumentException
- if there is no equivalentpublic static final AttributeType getAttributeType(java.lang.String typeName)
typeName
- String
the SAX 2.0 attribute
type string.int
the JDOM attribute type.Attribute.setAttributeType(org.jdom2.AttributeType)
,
Attributes.getType(int)
Copyright © 2021 Jason Hunter, Brett McLaughlin. All Rights Reserved.