public class SearchNode extends Object implements DOMRange
XMLReferenceExpression.
If the expression doesn't define multiple
XMLReferenceExpression.isMultiple() the search node contains the same
ranges (start / end offsets) and the same value than the DOM node.
Ex :
In this sample the DOM node will generate one search node with the following
range:
If the expression defines multiple
XMLReferenceExpression.isMultiple() the DOM node generates several
search node with proper ranges and value.
Ex :
In this sample the DOM node will generate two search nodes with the following
ranges:
| Modifier and Type | Class and Description |
|---|---|
static class |
SearchNode.Direction |
static class |
SearchNode.ValidationStatus |
| Constructor and Description |
|---|
SearchNode(int start,
int end,
DOMNode node,
String prefix,
SearchNode.Direction direction) |
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.lsp4j.Range |
createRange() |
org.eclipse.lsp4j.Range |
createRange(boolean checkPrefix) |
SearchNode.Direction |
getDirection() |
int |
getEnd()
Returns the end offset of the node.
|
DOMNode |
getNode() |
DOMDocument |
getOwnerDocument()
Returns the owner document.
|
String |
getPrefix() |
int |
getStart()
Returns the start offset of the node.
|
SearchNode.ValidationStatus |
getValidationStatus()
Returns the validation status of the search node.
|
String |
getValue(String forcedPrefix) |
boolean |
isNeedToAjdustWithPrefix() |
boolean |
isValid()
Returns true if the search node is valid and false otherwise.
|
boolean |
matchesValue(SearchNode searchNode)
Returns true if the given search node
searchNode matches the
value of this search node and false otherwise. |
String |
toString() |
public SearchNode(int start,
int end,
DOMNode node,
String prefix,
SearchNode.Direction direction)
public String getPrefix()
public boolean matchesValue(SearchNode searchNode)
searchNode matches the
value of this search node and false otherwise.searchNode - the search node.searchNode matches the
value of this search node and false otherwise.public DOMNode getNode()
public int getStart()
DOMRangepublic int getEnd()
DOMRangepublic DOMDocument getOwnerDocument()
DOMRangegetOwnerDocument in interface DOMRangepublic SearchNode.Direction getDirection()
public org.eclipse.lsp4j.Range createRange()
public org.eclipse.lsp4j.Range createRange(boolean checkPrefix)
public boolean isNeedToAjdustWithPrefix()
public boolean isValid()
public SearchNode.ValidationStatus getValidationStatus()
Copyright © 2023. All rights reserved.