org.cdmckay.coffeedom
Enum Attribute.Type

java.lang.Object
  extended by java.lang.Enum<Attribute.Type>
      extended by org.cdmckay.coffeedom.Attribute.Type
All Implemented Interfaces:
Serializable, Comparable<Attribute.Type>
Enclosing class:
Attribute

public static enum Attribute.Type
extends Enum<Attribute.Type>


Enum Constant Summary
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.
ENUMERATED
          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.
 
Method Summary
static Attribute.Type valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Attribute.Type[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNDECLARED

public static final Attribute.Type UNDECLARED
Attribute type: the attribute has not been declared or type is unknown.

See Also:
Attribute.getAttributeType()

CDATA

public static final Attribute.Type CDATA
Attribute type: the attribute value is a string.

See Also:
Attribute.getAttributeType()

ID

public static final Attribute.Type ID
Attribute type: the attribute value is a unique identifier.

See Also:
Attribute.getAttributeType()

IDREF

public static final Attribute.Type IDREF
Attribute type: the attribute value is a reference to a unique identifier.

See Also:
Attribute.getAttributeType()

IDREFS

public static final Attribute.Type IDREFS
Attribute type: the attribute value is a list of references to unique identifiers.

See Also:
Attribute.getAttributeType()

ENTITY

public static final Attribute.Type ENTITY
Attribute type: the attribute value is the name of an entity.

See Also:
Attribute.getAttributeType()

ENTITIES

public static final Attribute.Type ENTITIES
Attribute type: the attribute value is a list of entity names.

See Also:
Attribute.getAttributeType()

NMTOKEN

public static final Attribute.Type 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 ENUMERATED.

See Also:
Attribute.getAttributeType()

NMTOKENS

public static final Attribute.Type NMTOKENS
Attribute type: the attribute value is a list of name tokens.

See Also:
Attribute.getAttributeType()

NOTATION

public static final Attribute.Type NOTATION
Attribute type: the attribute value is the name of a notation.

See Also:
Attribute.getAttributeType()

ENUMERATED

public static final Attribute.Type ENUMERATED
Attribute type: the attribute value is a name token from an enumeration.

See Also:
Attribute.getAttributeType()
Method Detail

values

public static Attribute.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Attribute.Type c : Attribute.Type.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Attribute.Type valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2011. All Rights Reserved.