Package Torello.Browser
Class DOMSnapshot.DOMNode
- java.lang.Object
-
- Torello.Java.JSON.BaseType
-
- Torello.Browser.DOMSnapshot.DOMNode
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- DOMSnapshot
public static class DOMSnapshot.DOMNode extends BaseType implements java.io.Serializable
A Node in the DOM tree.- See Also:
- Serialized Form
Hi-Lited Source-Code:- View Here: Torello/Browser/DOMSnapshot.java
- Open New Browser-Tab: Torello/Browser/DOMSnapshot.java
File Size: 20,713 Bytes Line Count: 467 '\n' Characters Found
-
-
Field Summary
Serializable ID Modifier and Type Field protected static long
serialVersionUID
For Object Serialization.Type Properties Modifier and Type Field DOMSnapshot.NameValue[]
attributes
Attributes of anElement
node.int
backendNodeId
Node
's id, corresponds to DOM.Node.backendNodeId.String
baseURL
Base URL thatDocument
orFrameOwner
node uses for URL completion.int[]
childNodeIndexes
The indexes of the node's child nodes in thedomNodes
array returned bygetSnapshot
, if any.Integer
contentDocumentIndex
The index of a frame owner element's content document in thedomNodes
array returned bygetSnapshot
, if any.String
contentLanguage
Only set for documents, contains the document's content language.String
currentSourceURL
The selected url for nodes with a srcset attribute.String
documentEncoding
Only set for documents, contains the document's character set encoding.String
documentURL
Document URL thatDocument
orFrameOwner
node points to.DOMDebugger.EventListener[]
eventListeners
Details of the node's event listeners, if any.String
frameId
Frame ID for frame owner elements and also for the document node.Boolean
inputChecked
Only set for radio and checkbox input elements, indicates if the element has been checked
OPTIONALString
inputValue
Only set for input elements, contains the input's associated text value.Boolean
isClickable
Whether this DOM node responds to mouse clicks.Integer
layoutNodeIndex
The index of the node's related layout tree node in thelayoutTreeNodes
array returned bygetSnapshot
, if any.String
nodeName
Node
's nodeName.int
nodeType
Node
's nodeType.String
nodeValue
Node
's nodeValue.Boolean
optionSelected
Only set for option elements, indicates if the element has been selected
OPTIONALString
originURL
The url of the script (if any) that generates this node.int[]
pseudoElementIndexes
Indexes of pseudo elements associated with this node in thedomNodes
array returned bygetSnapshot
, if any.String
pseudoType
Type of a pseudo element node.String
publicId
DocumentType
node's publicId.Number
scrollOffsetX
Scroll offsets, set when this node is a Document.Number
scrollOffsetY
[No Description Provided by Google]
OPTIONALString
shadowRootType
Shadow root type.String
systemId
DocumentType
node's systemId.String
textValue
Only set for textarea elements, contains the text value.
-
Constructor Summary
Constructors Constructor Description DOMNode(int nodeType, String nodeName, String nodeValue, String textValue, String inputValue, Boolean inputChecked, Boolean optionSelected, int backendNodeId, int[] childNodeIndexes, DOMSnapshot.NameValue[] attributes, int[] pseudoElementIndexes, Integer layoutNodeIndex, String documentURL, String baseURL, String contentLanguage, String documentEncoding, String publicId, String systemId, String frameId, Integer contentDocumentIndex, String pseudoType, String shadowRootType, Boolean isClickable, DOMDebugger.EventListener[] eventListeners, String currentSourceURL, String originURL, Number scrollOffsetX, Number scrollOffsetY)
ConstructorDOMNode(JsonObject jo)
JSON Object Constructor
-
Method Summary
Generate Array that Indicates which Parameter are Optional Modifier and Type Method boolean[]
optionals()
Implementing this method allows sub-classes to specify which JSON Properties may be absent or null.Methods: class java.lang.Object Modifier and Type Method boolean
equals(Object other)
Checks whether'this'
equals an input Java-Object
int
hashCode()
Generates a Hash-Code for'this'
instance
-
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
For Object Serialization. java.io.Serializable- See Also:
- Constant Field Values
-
nodeType
public final int nodeType
Node
's nodeType.
-
nodeName
public final java.lang.String nodeName
Node
's nodeName.
-
nodeValue
public final java.lang.String nodeValue
Node
's nodeValue.
-
textValue
public final java.lang.String textValue
Only set for textarea elements, contains the text value.
OPTIONAL
-
inputValue
public final java.lang.String inputValue
Only set for input elements, contains the input's associated text value.
OPTIONAL
-
inputChecked
public final java.lang.Boolean inputChecked
Only set for radio and checkbox input elements, indicates if the element has been checked
OPTIONAL
-
optionSelected
public final java.lang.Boolean optionSelected
Only set for option elements, indicates if the element has been selected
OPTIONAL
-
backendNodeId
public final int backendNodeId
Node
's id, corresponds to DOM.Node.backendNodeId.
-
childNodeIndexes
public final int[] childNodeIndexes
The indexes of the node's child nodes in thedomNodes
array returned bygetSnapshot
, if any.
OPTIONAL
-
attributes
public final DOMSnapshot.NameValue[] attributes
Attributes of anElement
node.
OPTIONAL
-
pseudoElementIndexes
public final int[] pseudoElementIndexes
Indexes of pseudo elements associated with this node in thedomNodes
array returned bygetSnapshot
, if any.
OPTIONAL
-
layoutNodeIndex
public final java.lang.Integer layoutNodeIndex
The index of the node's related layout tree node in thelayoutTreeNodes
array returned bygetSnapshot
, if any.
OPTIONAL
-
documentURL
public final java.lang.String documentURL
Document URL thatDocument
orFrameOwner
node points to.
OPTIONAL
-
baseURL
public final java.lang.String baseURL
Base URL thatDocument
orFrameOwner
node uses for URL completion.
OPTIONAL
-
contentLanguage
public final java.lang.String contentLanguage
Only set for documents, contains the document's content language.
OPTIONAL
-
documentEncoding
public final java.lang.String documentEncoding
Only set for documents, contains the document's character set encoding.
OPTIONAL
-
publicId
public final java.lang.String publicId
DocumentType
node's publicId.
OPTIONAL
-
systemId
public final java.lang.String systemId
DocumentType
node's systemId.
OPTIONAL
-
frameId
public final java.lang.String frameId
Frame ID for frame owner elements and also for the document node.
OPTIONAL
-
contentDocumentIndex
public final java.lang.Integer contentDocumentIndex
The index of a frame owner element's content document in thedomNodes
array returned bygetSnapshot
, if any.
OPTIONAL
-
pseudoType
public final java.lang.String pseudoType
Type of a pseudo element node.
OPTIONAL
-
shadowRootType
public final java.lang.String shadowRootType
Shadow root type.
OPTIONAL
-
isClickable
public final java.lang.Boolean isClickable
Whether this DOM node responds to mouse clicks. This includes nodes that have had click event listeners attached via JavaScript as well as anchor tags that naturally navigate when clicked.
OPTIONAL
-
eventListeners
public final DOMDebugger.EventListener[] eventListeners
Details of the node's event listeners, if any.
OPTIONAL
-
currentSourceURL
public final java.lang.String currentSourceURL
The selected url for nodes with a srcset attribute.
OPTIONAL
-
originURL
public final java.lang.String originURL
The url of the script (if any) that generates this node.
OPTIONAL
-
scrollOffsetX
public final java.lang.Number scrollOffsetX
Scroll offsets, set when this node is a Document.
OPTIONAL
-
scrollOffsetY
public final java.lang.Number scrollOffsetY
[No Description Provided by Google]
OPTIONAL
-
-
Constructor Detail
-
DOMNode
public DOMNode(int nodeType, java.lang.String nodeName, java.lang.String nodeValue, java.lang.String textValue, java.lang.String inputValue, java.lang.Boolean inputChecked, java.lang.Boolean optionSelected, int backendNodeId, int[] childNodeIndexes, DOMSnapshot.NameValue[] attributes, int[] pseudoElementIndexes, java.lang.Integer layoutNodeIndex, java.lang.String documentURL, java.lang.String baseURL, java.lang.String contentLanguage, java.lang.String documentEncoding, java.lang.String publicId, java.lang.String systemId, java.lang.String frameId, java.lang.Integer contentDocumentIndex, java.lang.String pseudoType, java.lang.String shadowRootType, java.lang.Boolean isClickable, DOMDebugger.EventListener[] eventListeners, java.lang.String currentSourceURL, java.lang.String originURL, java.lang.Number scrollOffsetX, java.lang.Number scrollOffsetY)
Constructor- Parameters:
nodeType
-Node
's nodeType.nodeName
-Node
's nodeName.nodeValue
-Node
's nodeValue.textValue
- Only set for textarea elements, contains the text value.
OPTIONALinputValue
- Only set for input elements, contains the input's associated text value.
OPTIONALinputChecked
- Only set for radio and checkbox input elements, indicates if the element has been checked
OPTIONALoptionSelected
- Only set for option elements, indicates if the element has been selected
OPTIONALbackendNodeId
-Node
's id, corresponds to DOM.Node.backendNodeId.childNodeIndexes
- The indexes of the node's child nodes in thedomNodes
array returned bygetSnapshot
, if any.
OPTIONALattributes
- Attributes of anElement
node.
OPTIONALpseudoElementIndexes
- Indexes of pseudo elements associated with this node in thedomNodes
array returned bygetSnapshot
, if any.
OPTIONALlayoutNodeIndex
- The index of the node's related layout tree node in thelayoutTreeNodes
array returned bygetSnapshot
, if any.
OPTIONALdocumentURL
- Document URL thatDocument
orFrameOwner
node points to.
OPTIONALbaseURL
- Base URL thatDocument
orFrameOwner
node uses for URL completion.
OPTIONALcontentLanguage
- Only set for documents, contains the document's content language.
OPTIONALdocumentEncoding
- Only set for documents, contains the document's character set encoding.
OPTIONALpublicId
-DocumentType
node's publicId.
OPTIONALsystemId
-DocumentType
node's systemId.
OPTIONALframeId
- Frame ID for frame owner elements and also for the document node.
OPTIONALcontentDocumentIndex
- The index of a frame owner element's content document in thedomNodes
array returned bygetSnapshot
, if any.
OPTIONALpseudoType
- Type of a pseudo element node.
OPTIONALshadowRootType
- Shadow root type.
OPTIONALisClickable
- Whether this DOM node responds to mouse clicks. This includes nodes that have had click event listeners attached via JavaScript as well as anchor tags that naturally navigate when clicked.
OPTIONALeventListeners
- Details of the node's event listeners, if any.
OPTIONALcurrentSourceURL
- The selected url for nodes with a srcset attribute.
OPTIONALoriginURL
- The url of the script (if any) that generates this node.
OPTIONALscrollOffsetX
- Scroll offsets, set when this node is a Document.
OPTIONALscrollOffsetY
- -
OPTIONAL
-
DOMNode
public DOMNode(JsonObject jo)
JSON Object Constructor- Parameters:
jo
- A Json-Object having data about an instance of'DOMNode'
.
-
-
Method Detail
-
optionals
public boolean[] optionals()
Description copied from class:BaseType
Implementing this method allows sub-classes to specify which JSON Properties may be absent or null. When binding aJsonObject
to a Java-Object, if some of the expected fields for the Java-Object map to Properties which might be left-out or omitted, then that may be indicated by setting that fields array positionTRUE
.
NOTE: This array should have a length equal to the number of fields contained by the Java Object. The first boolean in the array should specify whether the first Object Field may by absent. The second boolean should specify whether the second Object Field is optional in the JSON - and so on and so forth...- Specified by:
optionals
in classBaseType
- Returns:
- A
boolean[]
array whose length is precisely equal to the number of fields in the Java Object. - Code:
- Exact Method Body:
return new boolean[] { false, false, false, true, true, true, true, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, };
-
equals
public boolean equals(java.lang.Object other)
Checks whether'this'
equals an input Java-Object
- Overrides:
equals
in classjava.lang.Object
- Code:
- Exact Method Body:
if (other == null) return false; if (other.getClass() != this.getClass()) return false; DOMNode o = (DOMNode) other; return (this.nodeType == o.nodeType) && Objects.equals(this.nodeName, o.nodeName) && Objects.equals(this.nodeValue, o.nodeValue) && Objects.equals(this.textValue, o.textValue) && Objects.equals(this.inputValue, o.inputValue) && Objects.equals(this.inputChecked, o.inputChecked) && Objects.equals(this.optionSelected, o.optionSelected) && Objects.equals(this.backendNodeId, o.backendNodeId) && Arrays.equals(this.childNodeIndexes, o.childNodeIndexes) && Arrays.deepEquals(this.attributes, o.attributes) && Arrays.equals(this.pseudoElementIndexes, o.pseudoElementIndexes) && Objects.equals(this.layoutNodeIndex, o.layoutNodeIndex) && Objects.equals(this.documentURL, o.documentURL) && Objects.equals(this.baseURL, o.baseURL) && Objects.equals(this.contentLanguage, o.contentLanguage) && Objects.equals(this.documentEncoding, o.documentEncoding) && Objects.equals(this.publicId, o.publicId) && Objects.equals(this.systemId, o.systemId) && Objects.equals(this.frameId, o.frameId) && Objects.equals(this.contentDocumentIndex, o.contentDocumentIndex) && Objects.equals(this.pseudoType, o.pseudoType) && Objects.equals(this.shadowRootType, o.shadowRootType) && Objects.equals(this.isClickable, o.isClickable) && Arrays.deepEquals(this.eventListeners, o.eventListeners) && Objects.equals(this.currentSourceURL, o.currentSourceURL) && Objects.equals(this.originURL, o.originURL) && Objects.equals(this.scrollOffsetX, o.scrollOffsetX) && Objects.equals(this.scrollOffsetY, o.scrollOffsetY);
-
hashCode
public int hashCode()
Generates a Hash-Code for'this'
instance- Overrides:
hashCode
in classjava.lang.Object
- Code:
- Exact Method Body:
return this.nodeType + Objects.hashCode(this.nodeName) + Objects.hashCode(this.nodeValue) + Objects.hashCode(this.textValue) + Objects.hashCode(this.inputValue) + Objects.hashCode(this.inputChecked) + Objects.hashCode(this.optionSelected) + this.backendNodeId + Arrays.hashCode(this.childNodeIndexes) + Arrays.deepHashCode(this.attributes) + Arrays.hashCode(this.pseudoElementIndexes) + Objects.hashCode(this.layoutNodeIndex) + Objects.hashCode(this.documentURL) + Objects.hashCode(this.baseURL) + Objects.hashCode(this.contentLanguage) + Objects.hashCode(this.documentEncoding) + Objects.hashCode(this.publicId) + Objects.hashCode(this.systemId) + Objects.hashCode(this.frameId) + Objects.hashCode(this.contentDocumentIndex) + Objects.hashCode(this.pseudoType) + Objects.hashCode(this.shadowRootType) + Objects.hashCode(this.isClickable) + Arrays.deepHashCode(this.eventListeners) + Objects.hashCode(this.currentSourceURL) + Objects.hashCode(this.originURL) + Objects.hashCode(this.scrollOffsetX) + Objects.hashCode(this.scrollOffsetY);
-
-