org.eclipse.actf.visualization.eval.html

## Class HtmlTagUtil

- java.lang.Object
- - org.eclipse.actf.visualization.eval.html.HtmlTagUtil

All Implemented Interfaces:
  IHtmlEventHandlerAttributes

Direct Known Subclasses:
  HtmlEvalUtil

    public class HtmlTagUtil
    extends Object
    implements IHtmlEventHandlerAttributes

Utility class for HTML evaluation.

### Field Summary

Fields
`static String` `ATTR_ALT`
`static String` `ATTR_HREF`
`static String` `ATTR_SRC`
`static String` `ATTR_TITLE`
`static String` `FLASH_CODEBASE`
`static String` `FLASH_OBJECT`
`static String` `FLASH_PLUGINSPAGE`
`static String` `FLASH_TYPE`

### Fields inherited from interface org.eclipse.actf.visualization.eval.html.IHtmlEventHandlerAttributes

`ATTR_ONABORT, ATTR_ONBLUR, ATTR_ONCLICK, ATTR_ONDBLCLICK, ATTR_ONDRAGDROP, ATTR_ONERROR, ATTR_ONFOCUS, ATTR_ONKEYDOWN, ATTR_ONKEYPRESS, ATTR_ONKEYUP, ATTR_ONLOAD, ATTR_ONMOUSEDOWN, ATTR_ONMOUSEMOVE, ATTR_ONMOUSEOUT, ATTR_ONMOUSEOVER, ATTR_ONMOUSEUP, ATTR_ONMOVE, ATTR_ONRESIZE, ATTR_ONSELECT, ATTR_ONUNLOAD`

### Constructor Summary

Constructors
Constructor and Description
`HtmlTagUtil()`

### Method Summary

Methods
`static Node` `getAncestor(Node target, String ancestorName)` Get ancestor node whose name is specified target name
`static Set<String>` `getBlockElementSet()` Get tag names of block element in HTML
`static List<Element>` `getImgElementsFromMap(Document target, Element map)`
`static String` `getNoScriptText(Node target)` Get noscript text of the `Node`
`static String` `getTextAltDescendant(Node target)` Gather text and alternative text from descendant nodes and return it as String.
`static String` `getTextDescendant(Node target)` Gather text from descendant nodes and return it as String.
`static boolean` `hasAncestor(Node target, String ancestorName)` Check if target `Node` has ancestor whose name is specified target name.
`static boolean` `hasTextDescendant(Node target)` Check if target `Node` has text descendant
`static boolean` `isBlankString(String str)`
`static boolean` `isButtonControl(Element ctrl)`
`static boolean` `isTextControl(Element ctrl)`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### ATTR_HREF

    public static final String ATTR_HREF

See Also:
  Constant Field Values

#### ATTR_ALT

    public static final String ATTR_ALT

See Also:
  Constant Field Values

#### ATTR_SRC

    public static final String ATTR_SRC

See Also:
  Constant Field Values

#### ATTR_TITLE

    public static final String ATTR_TITLE

See Also:
  Constant Field Values

#### FLASH_OBJECT

    public static final String FLASH_OBJECT

See Also:
  Constant Field Values

#### FLASH_CODEBASE

    public static final String FLASH_CODEBASE

See Also:
  Constant Field Values

#### FLASH_TYPE

    public static final String FLASH_TYPE

See Also:
  Constant Field Values

#### FLASH_PLUGINSPAGE

    public static final String FLASH_PLUGINSPAGE

See Also:
  Constant Field Values

### Constructor Detail

#### HtmlTagUtil

    public HtmlTagUtil()

### Method Detail

#### getBlockElementSet

    public static Set<String> getBlockElementSet()

Get tag names of block element in HTML

Returns:
  set of block element tag names

#### hasAncestor

    public static boolean hasAncestor(Node target,
                      String ancestorName)

Check if target `Node` has ancestor whose name is specified target name.

Parameters:
  `target` - target `Node`
  `ancestorName` - target ancestor tag name
Returns:
  true if target `Node` has target ancestor

#### getAncestor

    public static Node getAncestor(Node target,
                   String ancestorName)

Get ancestor node whose name is specified target name

Parameters:
  `target` - target `Node`
  `ancestorName` - target ancestor tag name
Returns:
  target ancestor `Node` or null

#### getNoScriptText

    public static String getNoScriptText(Node target)

Get noscript text of the `Node`

Parameters:
  `target` - target `Node`
Returns:
  noscript text

#### getTextAltDescendant

    public static String getTextAltDescendant(Node target)

Gather text and alternative text from descendant nodes and return it as String.

Parameters:
  `target` - target `Node`
Returns:
  gathered text and alternative text

#### getTextDescendant

    public static String getTextDescendant(Node target)

Gather text from descendant nodes and return it as String.

Parameters:
  `target` - target `Node`
Returns:
  gathered text

#### hasTextDescendant

    public static boolean hasTextDescendant(Node target)

Check if target `Node` has text descendant

Parameters:
  `target` - target `Node`
Returns:
  true if target `Node` has text descendant

#### getImgElementsFromMap

    public static List<Element> getImgElementsFromMap(Document target,
                                      Element map)

#### isTextControl

    public static boolean isTextControl(Element ctrl)

#### isButtonControl

    public static boolean isButtonControl(Element ctrl)

#### isBlankString

    public static boolean isBlankString(String str)