org.apache.maven.shared.web.test
Class XPathExpressionUtil

java.lang.Object
  extended by org.apache.maven.shared.web.test.XPathExpressionUtil

public class XPathExpressionUtil
extends java.lang.Object

Utility class for creating xpath expressions


Field Summary
static java.lang.String ANCHOR
           
static java.lang.String AND
           
static java.lang.String CONTAINS
           
static java.lang.String CURRENT_NODE
           
static java.lang.String ELEMENT_ANY_LEVEL
           
static java.lang.String END_NODE_TEST
           
static java.lang.String GRANDPARENT_NODE
           
static java.lang.String IMG
           
static java.lang.String LINE
           
static java.lang.String LIST
           
static java.lang.String PARENT_NODE
           
static java.lang.String START_NODE_TEST
           
static java.lang.String TABLE_COLUMN
           
static java.lang.String TABLE_ROW
           
 
Constructor Summary
XPathExpressionUtil()
           
 
Method Summary
static java.lang.String getColumnElement(java.lang.String element, int elementIndex, java.lang.String[] columnValues)
          expression for acquiring an element in one of the table columns
static java.lang.String getColumnElement(java.lang.String element, int elementIndex, java.lang.String elementValue, java.lang.String[] columnValues)
          expression for acquiring an element in one of the table columns
static java.lang.String getImgColumnElement(java.lang.String element, int elementIndex, java.lang.String imageName, java.lang.String[] columnValues)
          expression for acquiring an element in one of the table columns
static java.lang.String getList(java.lang.String[] values)
           
static java.lang.String getTableRow(java.lang.String[] columnValues)
          expression for acquiring the table row that matches all column values with the same order as the list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTAINS

public static final java.lang.String CONTAINS
See Also:
Constant Field Values

AND

public static final java.lang.String AND
See Also:
Constant Field Values

CURRENT_NODE

public static final java.lang.String CURRENT_NODE
See Also:
Constant Field Values

PARENT_NODE

public static final java.lang.String PARENT_NODE
See Also:
Constant Field Values

GRANDPARENT_NODE

public static final java.lang.String GRANDPARENT_NODE
See Also:
Constant Field Values

ELEMENT_ANY_LEVEL

public static final java.lang.String ELEMENT_ANY_LEVEL
See Also:
Constant Field Values

TABLE_COLUMN

public static final java.lang.String TABLE_COLUMN
See Also:
Constant Field Values

TABLE_ROW

public static final java.lang.String TABLE_ROW
See Also:
Constant Field Values

START_NODE_TEST

public static final java.lang.String START_NODE_TEST
See Also:
Constant Field Values

END_NODE_TEST

public static final java.lang.String END_NODE_TEST
See Also:
Constant Field Values

ANCHOR

public static final java.lang.String ANCHOR
See Also:
Constant Field Values

IMG

public static final java.lang.String IMG
See Also:
Constant Field Values

LIST

public static final java.lang.String LIST
See Also:
Constant Field Values

LINE

public static final java.lang.String LINE
See Also:
Constant Field Values
Constructor Detail

XPathExpressionUtil

public XPathExpressionUtil()
Method Detail

getList

public static java.lang.String getList(java.lang.String[] values)

getColumnElement

public static java.lang.String getColumnElement(java.lang.String element,
                                                int elementIndex,
                                                java.lang.String[] columnValues)
expression for acquiring an element in one of the table columns

Parameters:
element - the node element
elementIndex - column index of the element, used for skipping
columnValues - the values to be matched in each column, element column is included
Returns:

getColumnElement

public static java.lang.String getColumnElement(java.lang.String element,
                                                int elementIndex,
                                                java.lang.String elementValue,
                                                java.lang.String[] columnValues)
expression for acquiring an element in one of the table columns

Parameters:
element - the node element
elementIndex - column index of the element, used for skipping
elementValue - the matched element value
columnValues - the values to be matched in each column, element column is included
Returns:

getImgColumnElement

public static java.lang.String getImgColumnElement(java.lang.String element,
                                                   int elementIndex,
                                                   java.lang.String imageName,
                                                   java.lang.String[] columnValues)
expression for acquiring an element in one of the table columns

Parameters:
element - the node element
elementIndex - column index of the element, used for skipping
imageName - the matched image name
columnValues - the values to be matched in each column, element column is included
Returns:

getTableRow

public static java.lang.String getTableRow(java.lang.String[] columnValues)
expression for acquiring the table row that matches all column values with the same order as the list

Parameters:
columnValues - the matched list of columnValues
Returns:


Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.