org.specrunner.source.resource.positional
Class Position

java.lang.Object
  extended by org.specrunner.source.resource.positional.Position

public final class Position
extends Object

Stand for a position in the document where something can be added, i.e., //head.

Author:
Thiago Santos

Field Summary
static String BODY
          The body position is given by this specification XPath.
static Position BODY_END
          On body end.
static Position BODY_START
          On body start.
static String HEAD
          The head position is given by this specification XPath.
static Position HEAD_END
          On header end.
static Position HEAD_START
          On header start.
 
Method Summary
 EPlace getPlace()
          The placement element.
 String getXpath()
          The XPath reference.
static Position newPosition(String xpath, EPlace place)
          Creates a new position based on XPath information.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HEAD

public static final String HEAD
The head position is given by this specification XPath.

See Also:
Constant Field Values

BODY

public static final String BODY
The body position is given by this specification XPath.

See Also:
Constant Field Values

HEAD_START

public static final Position HEAD_START
On header start.


HEAD_END

public static final Position HEAD_END
On header end.


BODY_START

public static final Position BODY_START
On body start.


BODY_END

public static final Position BODY_END
On body end.

Method Detail

getXpath

public String getXpath()
The XPath reference.

Returns:
The xpath.

getPlace

public EPlace getPlace()
The placement element.

Returns:
The placement.

newPosition

public static Position newPosition(String xpath,
                                   EPlace place)
Creates a new position based on XPath information.

Parameters:
xpath - The XPath target.
place - The place relative to the XPath.
Returns:
A position which reflects the XPath and position.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014. All rights reserved.