sk.uniba.euromath.document
Enum DomPointerFlag

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

public enum DomPointerFlag
extends Enum<DomPointerFlag>

Attributes for the DomPointer class.

Author:
Martin Vysny

Enum Constant Summary
InsertElement
          States that there must be some element insertable at returned pointer.
InsertText
          States that there must be some text insertable at returned pointer.
NotEntityReference
          States that returned pointer must not have pointsTo containing an entity reference node.
NotIntoEntity
          If specified, then getNext and getPrevious can not return pointer having inEntity equal to true.
NotNullParentElement
          States that the pointer returned must not have parentElement null.
PointToContent
          States that the pointer must have pointsTo pointing to a regular element or a text/cdata node.
PointToElement
           States that returned pointer must have pointsTo pointing to a regular element.
PointToNode
          States that returned pointer must have pointsTo pointing to a non- null node.
PointToText
           States that returned pointer must have pointsTo pointing to a text (or cdata) node.
 
Method Summary
abstract  boolean complies(DomPointer ptr)
          Checks if given pointer complies the flag.
static boolean complies(DomPointer ptr, EnumSet<DomPointerFlag> flags)
          Checks if the pointer complies all defined flags (for behaviour when both PointToText and PointToElement flags are specified please see their specification).
static DomPointerFlag valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DomPointerFlag[] 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

InsertText

public static final DomPointerFlag InsertText
States that there must be some text insertable at returned pointer. It cooperates with document schema, so returned pointer complies to this requirement. However, this text may not be AnyString, you should consult with document schema for additional type specification.


InsertElement

public static final DomPointerFlag InsertElement
States that there must be some element insertable at returned pointer. However, it doesn't cooperate with document schema, so this flag is presently ignored and should not be used.


PointToNode

public static final DomPointerFlag PointToNode
States that returned pointer must have pointsTo pointing to a non- null node. Then, in pointsToId is id of this node.


PointToText

public static final DomPointerFlag PointToText

States that returned pointer must have pointsTo pointing to a text (or cdata) node. Then, in pointsToId is id of this node. This flag implies the PTR_POINT_TO_NODE flag.

Warning: It should not be used in combination with PTR_POINT_TO_ELEMENT: no DOM pointer can point to text AND element at the same time.


PointToElement

public static final DomPointerFlag PointToElement

States that returned pointer must have pointsTo pointing to a regular element. Then, in pointsToId is id of this element. This flag implies the PTR_POINT_TO_NODE flag.

Warning: It should not be used in combination with PTR_POINT_TO_TEXT: no DOM pointer can point to text AND element at the same time.


PointToContent

public static final DomPointerFlag PointToContent
States that the pointer must have pointsTo pointing to a regular element or a text/cdata node. In other words, pointer must comply PointToText OR PointToElement flags.


NotIntoEntity

public static final DomPointerFlag NotIntoEntity
If specified, then getNext and getPrevious can not return pointer having inEntity equal to true.


NotEntityReference

public static final DomPointerFlag NotEntityReference
States that returned pointer must not have pointsTo containing an entity reference node. This does not prevent getNext() and getPrevious() to go into entity contents if the IntoEntity is specified.


NotNullParentElement

public static final DomPointerFlag NotNullParentElement
States that the pointer returned must not have parentElement null.

Method Detail

values

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

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

valueOf

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

complies

public abstract boolean complies(DomPointer ptr)
Checks if given pointer complies the flag.

Parameters:
ptr - pointer to check.
Returns:
true if the pointer complies to the flag, false otherwise.

complies

public static boolean complies(DomPointer ptr,
                               EnumSet<DomPointerFlag> flags)
Checks if the pointer complies all defined flags (for behaviour when both PointToText and PointToElement flags are specified please see their specification).

Parameters:
ptr - pointer to check
flags - set of flags
Returns:
true if the pointer complies all flags.


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