org.foray.fotree.xml
Enum XmlProperty

java.lang.Object
  extended by java.lang.Enum<XmlProperty>
      extended by org.foray.fotree.xml.XmlProperty
All Implemented Interfaces:
Serializable, Comparable<XmlProperty>, PropertyType

public enum XmlProperty
extends Enum<XmlProperty>
implements PropertyType

An enumeration for property types in the xml: namespace.


Enum Constant Summary
LANG
          Constant indicating a "xml:lang" property.
 
Method Summary
 String toStringUnparsed()
          Returns the raw, unparsed value of this property type that would be found in an input file, or that would be meaningful to a user in a user message.
static XmlProperty valueOf(String name)
          Returns the enum constant of this type with the specified name.
static XmlProperty[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
static XmlProperty xmlValueOf(String xmlName)
          Similar to valueOf(String) method, but operates on the XML name of the property instead of its enumerated name.
 
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

LANG

public static final XmlProperty LANG
Constant indicating a "xml:lang" property.

Method Detail

values

public static XmlProperty[] 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 (XmlProperty c : XmlProperty.values())
    System.out.println(c);

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

valueOf

public static XmlProperty 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

toStringUnparsed

public String toStringUnparsed()
Description copied from interface: PropertyType
Returns the raw, unparsed value of this property type that would be found in an input file, or that would be meaningful to a user in a user message. For example, an implementation might be an enum with an element called WRITING_MODE. But the unparsed value of this element would be "writing-mode".

Specified by:
toStringUnparsed in interface PropertyType
Returns:
The unparsed name for the property type.

xmlValueOf

public static XmlProperty xmlValueOf(String xmlName)
Similar to valueOf(String) method, but operates on the XML name of the property instead of its enumerated name. For example, for the XML property "lang", the enum is LANG. The valueOf(String) method operates on the enum name "LANG". This method instead operates on "lang".

Parameters:
xmlName - The name of the XML property for which the enumerated value is needed.
Returns:
The enumerated value for xmlName.


Copyright © 2017. All rights reserved.