|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.specrunner.util.xom.UtilNode
public final class UtilNode
Node utility class.
| Field Summary | |
|---|---|
static String |
ATT_CSS
The CSS attribute name. |
static String |
CSS_LETF
The CSS which set the left argument. |
static String |
CSS_RIGHT
The CSS which set the right argument. |
static String |
IGNORE
Any node in specification with attribute "ignore=true" will not be evaluated. |
static String |
PENDING
Any node in specification with attribute "pending=true" will be considered a pending item. |
| Method Summary | |
|---|---|
static nu.xom.Node |
appendCss(nu.xom.Node node,
String css)
Add a CSS to the node. |
static String |
getChildrenAsString(nu.xom.Node parent)
Get child elements as a String. |
static nu.xom.Node |
getCssNode(nu.xom.Node root,
String css)
Get the highest node with the style given. |
static int |
getDepth(nu.xom.Node node)
Get the node depth in the specification. |
static nu.xom.Node |
getHighest(nu.xom.Nodes nodes)
Get the highest node in the specification hierarchy. |
static nu.xom.Node |
getLeft(nu.xom.Node root)
Get highest descendant node with class 'CSS_LEFT'. |
static nu.xom.Node |
getRight(nu.xom.Node root)
Get highest descendant node with class 'CSS_RIGHT'. |
static boolean |
isElement(nu.xom.Node node,
String tag)
Check if a node is of a given tag type. |
static boolean |
isIgnore(nu.xom.Node node)
Check is a node is marked to be ignored. |
static boolean |
isPending(nu.xom.Node node)
Check is a node is marked as pending. |
static boolean |
isTable(nu.xom.Node node)
Check if a node is a table. |
static boolean |
matches(nu.xom.Node node,
String xpath)
Check if node matchs the XPath. |
static INodeHolder |
newNodeHolder(nu.xom.Node node)
Creates a element adapter for the given node. |
static TableAdapter |
newTableAdapter(nu.xom.Node node)
Creates a table adapter for the given node. |
static void |
removeCss(nu.xom.Node node,
String css)
Remove a CSS from node. |
static void |
setIgnore(nu.xom.Node node)
Adds the information that a given node might be ignored by runners. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String IGNORE
public static final String PENDING
public static final String ATT_CSS
public static final String CSS_LETF
public static final String CSS_RIGHT
| Method Detail |
|---|
public static boolean isIgnore(nu.xom.Node node)
node - The node to be checked.
public static boolean isPending(nu.xom.Node node)
node - The node to be checked.
public static void setIgnore(nu.xom.Node node)
node - The node to be ignored.
public static nu.xom.Node appendCss(nu.xom.Node node,
String css)
node - The node.css - The css to be added (appended).
public static void removeCss(nu.xom.Node node,
String css)
node - Node object.css - The node.public static String getChildrenAsString(nu.xom.Node parent)
parent - The parent element.
public static nu.xom.Node getHighest(nu.xom.Nodes nodes)
nodes - List of nodes.
public static int getDepth(nu.xom.Node node)
node - The node.
public static boolean matches(nu.xom.Node node,
String xpath)
node - The node.xpath - The xpath.
public static boolean isTable(nu.xom.Node node)
node - The node.
public static TableAdapter newTableAdapter(nu.xom.Node node)
node - The node.
public static INodeHolder newNodeHolder(nu.xom.Node node)
node - The node.
public static nu.xom.Node getLeft(nu.xom.Node root)
throws PluginException
root - The root.
PluginException - If node does not exist.
public static nu.xom.Node getRight(nu.xom.Node root)
throws PluginException
root - The root.
PluginException - If node does not exist.
public static nu.xom.Node getCssNode(nu.xom.Node root,
String css)
throws PluginException
root - The root node.css - The expected css.
PluginException - If child with css does not exist.
public static boolean isElement(nu.xom.Node node,
String tag)
node - The node.tag - The tag.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||