org.specrunner.util.xom.node
Interface INodeHolder

All Superinterfaces:
IAbstraction
All Known Implementing Classes:
CellAdapter, NodeHolderDefault, RowAdapter, TableAdapter

public interface INodeHolder
extends IAbstraction

Stands for any object which hold an element.

Author:
Thiago Santos

Field Summary
static String ATTRIBUTE_ARGUMENT_CONVERTER_PREFIX
          Attribute for arguments prefix.
static String ATTRIBUTE_ARGUMENT_FORMATTER_PREFIX
          Attribute for arguments prefix.
static String ATTRIBUTE_COMPARATOR
          Attribute for comparator.
static String ATTRIBUTE_CONVERTER
          Attribute for converter.
static String ATTRIBUTE_EVALUATION
          Attribute for value evaluation.
static String ATTRIBUTE_FORCE_CONTENT
          Attribute to force evaluation using 'tag getValue()'.
static String ATTRIBUTE_FORCE_VALUE
          Attribute to force evaluation using 'attribute value' or 'tag getValue()'.
static String ATTRIBUTE_FORMATTER
          Attribute for formatter.
static String ATTRIBUTE_PROPERTY
          Attribute for property access.
static String ATTRIBUTE_READER
          Attribute for reader.
static String ATTRIBUTE_VALUE
          Attribute for value.
static Boolean DEFAULT_PROPERTY_ACCEPT_NULL_PATH
          Default is to accept null paths as null.
static Boolean DEFAULT_PROPERTY_INVALID_PATH_AS_NULL
          Default is to not accept invalid paths.
static String FEATURE_PROPERTY_ACCEPT_NULL_PATH
          Feature to accept children properties as null a parent object in path is null.
static String FEATURE_PROPERTY_INVALID_PATH_AS_NULL
          Feature to accept invalid property paths as null.
 
Fields inherited from interface org.specrunner.util.expression.IAbstraction
DEFAULT_EVAL_ARGS, FEATURE_EVAL_ARGS
 
Method Summary
 void append(nu.xom.Node node)
          Append node to the node.
 void append(String text)
          Append text to the node.
 boolean attributeContains(String name, String value)
          Check if an attribute exists, and if it exists, if it contains the given value.
 boolean attributeEquals(String name, String value)
          Check if an attribute exists, and if it exists, if it is equal to the given value.
 void detach()
          Detaches the current node.
 String getAttribute(String name)
          Get attribute value by type.
 String getAttribute(String name, String defaultValue)
          Get attribute value by type.
 String getAttributeValue()
          Set attribute value to look for on getObject(...)
 nu.xom.Node getNode()
          Get the hold node.
 String getQualifiedName()
          Get qualified name (include namespace).
 boolean hasAttribute(String name)
          Check if an given attribute is present.
 boolean hasName(String name)
          Check a tag name.
 void prepend(nu.xom.Node node)
          Prepend a note to the node.
 void prepend(String text)
          Prepend text to the node.
 void removeAttribute(String name)
          Remove a attribute.
 void setAttribute(String name, String value)
          Set attribute value.
 void setAttributeValue(String attributeValue)
          Set value attribute holder.
 void setNode(nu.xom.Node node)
          Set the hold node.
 void setValue(String text)
          Set text to a node removing all children elements.
 String toXML()
          The XML representation.
 
Methods inherited from interface org.specrunner.util.expression.IAbstraction
getArguments, getArguments, getComparator, getComparator, getConverter, getConverter, getFormatter, getFormatter, getFormatterArguments, getFormatterArguments, getObject, getObject, getReader, getReader, getValue, getValue
 

Field Detail

ATTRIBUTE_PROPERTY

static final String ATTRIBUTE_PROPERTY
Attribute for property access.

See Also:
Constant Field Values

FEATURE_PROPERTY_ACCEPT_NULL_PATH

static final String FEATURE_PROPERTY_ACCEPT_NULL_PATH
Feature to accept children properties as null a parent object in path is null.


DEFAULT_PROPERTY_ACCEPT_NULL_PATH

static final Boolean DEFAULT_PROPERTY_ACCEPT_NULL_PATH
Default is to accept null paths as null.


FEATURE_PROPERTY_INVALID_PATH_AS_NULL

static final String FEATURE_PROPERTY_INVALID_PATH_AS_NULL
Feature to accept invalid property paths as null.


DEFAULT_PROPERTY_INVALID_PATH_AS_NULL

static final Boolean DEFAULT_PROPERTY_INVALID_PATH_AS_NULL
Default is to not accept invalid paths.


ATTRIBUTE_FORCE_VALUE

static final String ATTRIBUTE_FORCE_VALUE
Attribute to force evaluation using 'attribute value' or 'tag getValue()'.

See Also:
Constant Field Values

ATTRIBUTE_FORCE_CONTENT

static final String ATTRIBUTE_FORCE_CONTENT
Attribute to force evaluation using 'tag getValue()'.

See Also:
Constant Field Values

ATTRIBUTE_VALUE

static final String ATTRIBUTE_VALUE
Attribute for value.

See Also:
Constant Field Values

ATTRIBUTE_ARGUMENT_CONVERTER_PREFIX

static final String ATTRIBUTE_ARGUMENT_CONVERTER_PREFIX
Attribute for arguments prefix.

See Also:
Constant Field Values

ATTRIBUTE_EVALUATION

static final String ATTRIBUTE_EVALUATION
Attribute for value evaluation.

See Also:
Constant Field Values

ATTRIBUTE_READER

static final String ATTRIBUTE_READER
Attribute for reader.

See Also:
Constant Field Values

ATTRIBUTE_CONVERTER

static final String ATTRIBUTE_CONVERTER
Attribute for converter.

See Also:
Constant Field Values

ATTRIBUTE_FORMATTER

static final String ATTRIBUTE_FORMATTER
Attribute for formatter.

See Also:
Constant Field Values

ATTRIBUTE_ARGUMENT_FORMATTER_PREFIX

static final String ATTRIBUTE_ARGUMENT_FORMATTER_PREFIX
Attribute for arguments prefix.

See Also:
Constant Field Values

ATTRIBUTE_COMPARATOR

static final String ATTRIBUTE_COMPARATOR
Attribute for comparator.

See Also:
Constant Field Values
Method Detail

getNode

nu.xom.Node getNode()
Get the hold node.

Returns:
The node.

setNode

void setNode(nu.xom.Node node)
Set the hold node.

Parameters:
node - The node.

detach

void detach()
Detaches the current node.


getAttributeValue

String getAttributeValue()
Set attribute value to look for on getObject(...) calls.Default is ATTRIBUTE_VALUE.

Returns:
The attribute value holder.

setAttributeValue

void setAttributeValue(String attributeValue)
Set value attribute holder.

Parameters:
attributeValue - A attribute name.

getQualifiedName

String getQualifiedName()
Get qualified name (include namespace).

Returns:
The local name.

hasName

boolean hasName(String name)
Check a tag name.

Parameters:
name - The name.
Returns:
true, if element name match, false, otherwise.

hasAttribute

boolean hasAttribute(String name)
Check if an given attribute is present.

Parameters:
name - The attribute name.
Returns:
true, if present, false, otherwise.

getAttribute

String getAttribute(String name)
Get attribute value by type.

Parameters:
name - The name.
Returns:
The value, if exists, null, otherwise.

getAttribute

String getAttribute(String name,
                    String defaultValue)
Get attribute value by type.

Parameters:
name - The name.
defaultValue - The defaul value.
Returns:
The value, if exists, null, otherwise.

setAttribute

void setAttribute(String name,
                  String value)
Set attribute value.

Parameters:
name - The name.
value - The value.

removeAttribute

void removeAttribute(String name)
Remove a attribute.

Parameters:
name - The attribute name.

attributeContains

boolean attributeContains(String name,
                          String value)
Check if an attribute exists, and if it exists, if it contains the given value.

Parameters:
name - The attribute name.
value - The attribute value.
Returns:
true, if attribute exists and if contains value, false, otherwise.

attributeEquals

boolean attributeEquals(String name,
                        String value)
Check if an attribute exists, and if it exists, if it is equal to the given value.

Parameters:
name - The attribute name.
value - The attribute value.
Returns:
true, if attribute exists and the value matches, false, otherwise.

setValue

void setValue(String text)
Set text to a node removing all children elements.

Parameters:
text - The expected text.

prepend

void prepend(String text)
Prepend text to the node.

Parameters:
text - A text.

prepend

void prepend(nu.xom.Node node)
Prepend a note to the node.

Parameters:
node - A node.

append

void append(String text)
Append text to the node.

Parameters:
text - A text.

append

void append(nu.xom.Node node)
Append node to the node.

Parameters:
node - A node.

toXML

String toXML()
The XML representation.

Returns:
The XML version.


Copyright © 2015. All rights reserved.