lux.xml
Enum ValueType

java.lang.Object
  extended by java.lang.Enum<ValueType>
      extended by lux.xml.ValueType
All Implemented Interfaces:
Serializable, Comparable<ValueType>

public enum ValueType
extends Enum<ValueType>

These types correspond roughly to the XDM / XML Schema types, and there are some extensions, like BOOLEAN_FALSE, which is just like boolean, but takes on the opposite sense: BOOLEAN_FALSE.true==!BOOLEAN.true.


Enum Constant Summary
ATOMIC
           
ATTRIBUTE
           
BASE64_BINARY
           
BOOLEAN
           
BOOLEAN_FALSE
           
COMMENT
           
DATE
           
DATE_TIME
           
DAY
           
DECIMAL
           
DOCUMENT
           
DOUBLE
           
ELEMENT
           
EMPTY
           
FLOAT
           
HEX_BINARY
           
INT
           
INTEGER
           
MONTH
           
MONTH_DAY
           
NODE
           
PROCESSING_INSTRUCTION
           
QNAME
           
STRING
           
TEXT
           
TIME
           
UNTYPED_ATOMIC
           
VALUE
           
YEAR
           
YEAR_MONTH
           
 
Field Summary
static int ANY_NUMBER
           
static String[] CARDINALITY_MARKER
           
static int EXACTLY_ONE
           
static int EXACTLY_ZERO
           
 boolean isAtomic
           
 boolean isNode
           
 String name
           
static int ONE_OR_MORE
           
static int ZERO_OR_ONE
           
 
Method Summary
 boolean is(ValueType other)
           
 ValueType promote(ValueType type)
           
 ValueType restrict(ValueType type)
           
 String toString()
           
static ValueType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ValueType[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

VALUE

public static final ValueType VALUE

DOCUMENT

public static final ValueType DOCUMENT

NODE

public static final ValueType NODE

ELEMENT

public static final ValueType ELEMENT

ATTRIBUTE

public static final ValueType ATTRIBUTE

TEXT

public static final ValueType TEXT

COMMENT

public static final ValueType COMMENT

PROCESSING_INSTRUCTION

public static final ValueType PROCESSING_INSTRUCTION

ATOMIC

public static final ValueType ATOMIC

STRING

public static final ValueType STRING

INT

public static final ValueType INT

INTEGER

public static final ValueType INTEGER

BOOLEAN

public static final ValueType BOOLEAN

BOOLEAN_FALSE

public static final ValueType BOOLEAN_FALSE

DATE

public static final ValueType DATE

DATE_TIME

public static final ValueType DATE_TIME

DAY

public static final ValueType DAY

MONTH_DAY

public static final ValueType MONTH_DAY

YEAR

public static final ValueType YEAR

YEAR_MONTH

public static final ValueType YEAR_MONTH

FLOAT

public static final ValueType FLOAT

DOUBLE

public static final ValueType DOUBLE

DECIMAL

public static final ValueType DECIMAL

TIME

public static final ValueType TIME

HEX_BINARY

public static final ValueType HEX_BINARY

BASE64_BINARY

public static final ValueType BASE64_BINARY

MONTH

public static final ValueType MONTH

UNTYPED_ATOMIC

public static final ValueType UNTYPED_ATOMIC

QNAME

public static final ValueType QNAME

EMPTY

public static final ValueType EMPTY
Field Detail

EXACTLY_ZERO

public static final int EXACTLY_ZERO
See Also:
Constant Field Values

EXACTLY_ONE

public static final int EXACTLY_ONE
See Also:
Constant Field Values

ZERO_OR_ONE

public static final int ZERO_OR_ONE
See Also:
Constant Field Values

ONE_OR_MORE

public static final int ONE_OR_MORE
See Also:
Constant Field Values

ANY_NUMBER

public static final int ANY_NUMBER
See Also:
Constant Field Values

CARDINALITY_MARKER

public static final String[] CARDINALITY_MARKER

isNode

public final boolean isNode

isAtomic

public final boolean isAtomic

name

public final String name
Method Detail

values

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

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

valueOf

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

is

public boolean is(ValueType other)
Parameters:
other - another type
Returns:
whether this type is a subtype of the other

restrict

public ValueType restrict(ValueType type)

promote

public ValueType promote(ValueType type)
Parameters:
type - the other type
Returns:
the most specific type that includes both this and the other type.

toString

public String toString()
Overrides:
toString in class Enum<ValueType>


Copyright © 2013. All Rights Reserved.