sk.uniba.euromath.document
Enum IdTypeEnum

java.lang.Object
  extended by java.lang.Enum<IdTypeEnum>
      extended by sk.uniba.euromath.document.IdTypeEnum
All Implemented Interfaces:
Serializable, Comparable<IdTypeEnum>

public enum IdTypeEnum
extends Enum<IdTypeEnum>

Enumeration of ID types, depending on the node identified by the ID.

Author:
Martin Vysny

Enum Constant Summary
ATTRIBUTE
          ID identifies an attribute node.
ELEMENT
          ID identifies an element node.
NODE
          ID identifies an ordinary node (text/cdata/comment/processing instruction).
 
Method Summary
static IdTypeEnum getIdType(String id)
          Returns type of ID (type of node, where this ID may point).
 boolean isSynthetic()
          Checks if this ID is synthetic (if it had to be generated).
static IdTypeEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static IdTypeEnum[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ELEMENT

public static final IdTypeEnum ELEMENT
ID identifies an element node.


ATTRIBUTE

public static final IdTypeEnum ATTRIBUTE
ID identifies an attribute node.


NODE

public static final IdTypeEnum NODE
ID identifies an ordinary node (text/cdata/comment/processing instruction).

Method Detail

values

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

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

valueOf

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

getIdType

public static IdTypeEnum getIdType(String id)
Returns type of ID (type of node, where this ID may point). It doesn't check validness of this ID (well-formedness, or if the node, denoted by given ID really exists).

Parameters:
id - id to check.
Returns:
the node type.

isSynthetic

public boolean isSynthetic()
Checks if this ID is synthetic (if it had to be generated). All nodes except elements have synthetic IDs.

Returns:
true if this ID is synthetic, false if it is native.


Copyright 2003-2003-2006 null. All Rights Reserved.