public class HtmlLink extends HtmlElement
HtmlElement.DisplayStyle
DomElement.ChildElementsIterator
DomNode.ChildIterator, DomNode.DescendantElementsIterator<T extends DomNode>
Modifier and Type | Field and Description |
---|---|
static String |
TAG_NAME
The HTML tag represented by this element.
|
TAB_INDEX_OUT_OF_BOUNDS
ATTRIBUTE_NOT_DEFINED, ATTRIBUTE_VALUE_EMPTY
AS_TEXT_BLANK, AS_TEXT_BLOCK_SEPARATOR, AS_TEXT_NEW_LINE, AS_TEXT_TAB, PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZED
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
Modifier and Type | Method and Description |
---|---|
String |
getCharsetAttribute()
Returns the value of the attribute
charset . |
HtmlElement.DisplayStyle |
getDefaultStyleDisplay()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Returns the default display style. |
String |
getHrefAttribute()
Returns the value of the attribute
href . |
String |
getHrefLangAttribute()
Returns the value of the attribute
hreflang . |
String |
getMediaAttribute()
Returns the value of the attribute
media . |
String |
getRelAttribute()
Returns the value of the attribute
rel . |
String |
getRevAttribute()
Returns the value of the attribute
rev . |
String |
getTargetAttribute()
Returns the value of the attribute
target . |
String |
getTypeAttribute()
Returns the value of the attribute
type . |
WebRequest |
getWebRequest()
Returns the request which will allow us to retrieve the content referenced by the
href attribute. |
WebResponse |
getWebResponse(boolean downloadIfNeeded)
POTENIAL PERFORMANCE KILLER - DOWNLOADS THE RESOURCE - USE AT YOUR OWN RISK.
If the linked content is not already downloaded it triggers a download. |
WebResponse |
getWebResponse(boolean downloadIfNeeded,
WebRequest request)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
If the linked content is not already downloaded it triggers a download. |
boolean |
mayBeDisplayed()
Returns
true if nodes of this type can ever be displayed, false otherwise. |
acceptChar, addHtmlAttributeChangeListener, appendChildIfNoneExists, checkChildHierarchy, detach, doType, doType, fireHtmlAttributeAdded, fireHtmlAttributeRemoved, fireHtmlAttributeReplaced, getCanonicalXPath, getElementsByAttribute, getEnclosingElement, getEnclosingForm, getEnclosingFormOrDie, getHtmlElementsByTagName, getHtmlElementsByTagNames, getLangAttribute, getNodeName, getOnClickAttribute, getOnDblClickAttribute, getOneHtmlElementByAttribute, getOnKeyDownAttribute, getOnKeyPressAttribute, getOnKeyUpAttribute, getOnMouseDownAttribute, getOnMouseMoveAttribute, getOnMouseOutAttribute, getOnMouseOverAttribute, getOnMouseUpAttribute, getSrcAttributeNormalized, getTabIndex, getTextDirectionAttribute, getXmlLangAttribute, handles, hasEventHandlers, isAttributeCaseSensitive, isDisplayed, isSubmittableByEnter, removeAttribute, removeChild, removeEventHandler, removeHtmlAttributeChangeListener, setAttributeNode, setAttributeNS, setEventHandler, setEventHandler, setId, type, type, type, type, type, type, type, typeDone
blur, click, click, click, cloneNode, dblClick, dblClick, doClickFireChangeEvent, doClickFireClickEvent, doClickStateUpdate, fireEvent, fireEvent, focus, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getAttributesMap, getChildElementCount, getChildElements, getElementsByTagName, getElementsByTagNameNS, getEventTargetElement, getFirstElementChild, getId, getLastElementChild, getNextElementSibling, getNodeType, getPreviousElementSibling, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, hasAttributes, isEmptyXmlTagExpanded, isStateUpdateFirst, mouseDown, mouseDown, mouseMove, mouseMove, mouseOut, mouseOut, mouseOver, mouseOver, mouseUp, mouseUp, namespaces, preventDefault, printOpeningTagContentAsXml, printXml, propagateClickStateUpdateToParent, removeAttributeNode, removeAttributeNS, removeFocus, rightClick, rightClick, setAttribute, setAttributeNodeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, toString
getLocalName, getNamespaceURI, getPrefix, getQualifiedName, processImportNode, setPrefix
addCharacterDataChangeListener, addDomChangeListener, appendChild, asText, asXml, compareDocumentPosition, fireCharacterDataChanged, fireNodeAdded, fireNodeDeleted, getAncestors, getBaseURI, getByXPath, getByXPath, getChildNodes, getChildren, getDescendants, getDomElementDescendants, getEndColumnNumber, getEndLineNumber, getFeature, getFirstByXPath, getFirstByXPath, getFirstChild, getHtmlElementDescendants, getHtmlPageOrNull, getIndex, getLastChild, getNextSibling, getNodeValue, getOwnerDocument, getPage, getParentNode, getPreviousSibling, getReadyState, getScriptableObject, getScriptObject, getStartColumnNumber, getStartLineNumber, getTextContent, getUserData, hasChildNodes, hasFeature, insertBefore, insertBefore, isAncestorOf, isAncestorOfAny, isBlock, isDefaultNamespace, isDirectlyAttachedToPage, isEqualNode, isSameNode, isSupported, isTrimmedText, lookupNamespaceURI, lookupPrefix, normalize, notifyIncorrectness, onAddedToDocumentFragment, onAddedToPage, onAllChildrenAddedToPage, printChildrenAsXml, querySelector, querySelectorAll, remove, removeAllChildren, removeCharacterDataChangeListener, removeChild, removeDomChangeListener, replace, replaceChild, setNextSibling, setNodeValue, setParentNode, setPreviousSibling, setReadyState, setScriptableObject, setTextContent, setUserData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
appendChild, compareDocumentPosition, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
public static final String TAG_NAME
public final String getCharsetAttribute()
charset
. Refer to the
HTML 4.01
documentation for details on the use of this attribute.charset
or an empty string if that attribute isn't defined.public final String getHrefAttribute()
href
. Refer to the
HTML 4.01
documentation for details on the use of this attribute.href
or an empty string if that attribute isn't defined.public final String getHrefLangAttribute()
hreflang
. Refer to the
HTML 4.01
documentation for details on the use of this attribute.hreflang
or an empty string if that attribute isn't defined.public final String getTypeAttribute()
type
. Refer to the
HTML 4.01
documentation for details on the use of this attribute.type
or an empty string if that attribute isn't defined.public final String getRelAttribute()
rel
. Refer to the
HTML 4.01
documentation for details on the use of this attribute.rel
or an empty string if that attribute isn't defined.public final String getRevAttribute()
rev
. Refer to the
HTML 4.01
documentation for details on the use of this attribute.rev
or an empty string if that attribute isn't defined.public final String getMediaAttribute()
media
. Refer to the
HTML 4.01
documentation for details on the use of this attribute.media
or an empty string if that attribute isn't defined.public final String getTargetAttribute()
target
. Refer to the
HTML 4.01
documentation for details on the use of this attribute.target
or an empty string if that attribute isn't defined.public WebResponse getWebResponse(boolean downloadIfNeeded) throws IOException
downloadIfNeeded
- indicates if a request should be performed this hasn't been done previouslynull
if no download should be performed and when this wasn't already done; the response
received when performing a request for the content referenced by this tag otherwiseIOException
- if an error occurs while downloading the contentpublic WebResponse getWebResponse(boolean downloadIfNeeded, WebRequest request) throws IOException
downloadIfNeeded
- indicates if a request should be performed this hasn't been done previouslyrequest
- the request; if null getWebRequest() is called to create onenull
if no download should be performed and when this wasn't already done; the response
received when performing a request for the content referenced by this tag otherwiseIOException
- if an error occurs while downloading the contentpublic WebRequest getWebRequest() throws MalformedURLException
href
attribute.href
attributeMalformedURLException
- in case of problem resolving the URLpublic HtmlElement.DisplayStyle getDefaultStyleDisplay()
getDefaultStyleDisplay
in class HtmlElement
public boolean mayBeDisplayed()
true
if nodes of this type can ever be displayed, false
otherwise. Examples of nodes
that can never be displayed are <head>, <meta>, <script>, etc.mayBeDisplayed
in class DomNode
true
if nodes of this type can ever be displayed, false
otherwiseDomNode.isDisplayed()
Copyright © 2002–2016 Gargoyle Software Inc.. All rights reserved.