com.gargoylesoftware.htmlunit.html
Class HtmlAttr

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.html.DomNode
      extended by com.gargoylesoftware.htmlunit.html.DomNamespaceNode
          extended by com.gargoylesoftware.htmlunit.html.HtmlAttr
All Implemented Interfaces:
Serializable, Cloneable, Map.Entry

public class HtmlAttr
extends DomNamespaceNode
implements Map.Entry

An attribute of an element. Attributes are stored in HtmlElement, but the xpath engine expects attributes to be in a DomNode.

Version:
$Revision: 2132 $
Author:
Denis N. Antonioli, David K. Taylor, Ahmed Ashour
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.html.DomNode
DomNode.ChildIterator, DomNode.DescendantElementsIterator
 
Field Summary
 
Fields inherited from class com.gargoylesoftware.htmlunit.html.DomNode
ATTRIBUTE_NODE, COMMENT_NODE, DOCUMENT_NODE, ELEMENT_NODE, PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZED, TEXT_NODE
 
Constructor Summary
HtmlAttr(HtmlElement htmlElement, Map.Entry mapEntry)
          Deprecated. Use constructor with explicit names.
HtmlAttr(HtmlPage page, String namespaceURI, String qualifiedName, String value)
          Instantiate a new attribute.
 
Method Summary
 Object getHtmlValue()
           
 Object getKey()
          Deprecated. The implements Map.Entry is deprecated. Use getName() instead.
 String getName()
           
 String getNodeName()
          Get the name for the current node.
 short getNodeType()
          Get the type of the current node.
 String getNodeValue()
          Get the value for the current node.
 Object getValue()
          Deprecated. This method conflicts with the W3C DOM API since the return values are different. Use getHtmlValue() instead.
 Object setHtmlValue(Object value)
          Set the value of the attribute.
 Object setValue(Object value)
          Deprecated. This method conflicts with the W3C DOM API since the return values are different. Use setHtmlValue(Object) instead.
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNamespaceNode
getLocalName, getNamespaceURI, getPrefix, getQualifiedName, setPrefix
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNode
addDomChangeListener, addPropertyChangeListener, appendChild, appendDomChild, asText, asXml, cloneDomNode, cloneNode, fireNodeAdded, fireNodeDeleted, firePropertyChange, getAllHtmlChildElements, getByXPath, getChildIterator, getChildrenAsText, getEndColumnNumber, getEndLineNumber, getEventHandler, getFirstByXPath, getFirstChild, getFirstDomChild, getLastChild, getLastDomChild, getLog, getNativePage, getNextDomSibling, getNextSibling, getPage, getParentDomNode, getParentNode, getPreviousDomSibling, getPreviousSibling, getReadyState, getScriptObject, getStartColumnNumber, getStartLineNumber, hasAttributes, insertBefore, isAncestorOf, isRenderedVisible, isTrimmedText, notifyIncorrectness, onAddedToPage, onAllChildrenAddedToPage, printChildrenAsXml, printXml, reduceWhitespace, remove, removeAllChildren, removeDomChangeListener, removeEventHandler, removePropertyChangeListener, replace, setEventHandler, setEventHandler, setNextSibling, setNodeValue, setParentNode, setPreviousSibling, setReadyState, setScriptObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map.Entry
equals, hashCode
 

Constructor Detail

HtmlAttr

public HtmlAttr(HtmlElement htmlElement,
                Map.Entry mapEntry)
Deprecated. Use constructor with explicit names.

Instantiate a new attribute.

Parameters:
htmlElement - The parent element.
mapEntry - The wrapped Map.Entry.

HtmlAttr

public HtmlAttr(HtmlPage page,
                String namespaceURI,
                String qualifiedName,
                String value)
Instantiate a new attribute.

Parameters:
page - The page that the attribute belongs to.
namespaceURI - The namespace that defines the attribute name. May be null.
qualifiedName - The name of the attribute.
value - The value of the attribute.
Method Detail

getNodeType

public short getNodeType()
Get the type of the current node.

Specified by:
getNodeType in class DomNode
Returns:
The node type

getNodeName

public String getNodeName()
Get the name for the current node.

Specified by:
getNodeName in class DomNode
Returns:
The node name

getNodeValue

public String getNodeValue()
Get the value for the current node.

Overrides:
getNodeValue in class DomNode
Returns:
The node value

getKey

public Object getKey()
Deprecated. The implements Map.Entry is deprecated. Use getName() instead.

Specified by:
getKey in interface Map.Entry

getName

public String getName()
Returns:
The qualified name of the attribute.

getValue

public Object getValue()
Deprecated. This method conflicts with the W3C DOM API since the return values are different. Use getHtmlValue() instead.

Specified by:
getValue in interface Map.Entry
Returns:
The value of the attribute.

getHtmlValue

public Object getHtmlValue()
Returns:
The value of wrapped map entry.

setValue

public Object setValue(Object value)
Deprecated. This method conflicts with the W3C DOM API since the return values are different. Use setHtmlValue(Object) instead.

Set the value of the attribute.

Specified by:
setValue in interface Map.Entry
Parameters:
value - new value to be stored in this entry.
Returns:
old value corresponding to the entry.

setHtmlValue

public Object setHtmlValue(Object value)
Set the value of the attribute.

Parameters:
value - new value to be stored in this entry.
Returns:
old value corresponding to the entry.


Copyright © 2002-2010 Gargoyle Software Inc.. All Rights Reserved.