public final class ResourceXPath extends Object implements ResourceSelector
ResourceSelector
based on XPath
.Modifier and Type | Field and Description |
---|---|
String |
kind
The kind of the resource (examples: "image",
"video").
|
XPath |
xpath
The XPath object used to select the XNodes containing
resource URLs in a document subtree.
|
Constructor and Description |
---|
ResourceXPath(String kind,
XPath xpath)
Constructs a resource selector initialized using specified
resource kind and specified XPath selector.
|
Modifier and Type | Method and Description |
---|---|
String |
getResourceKind()
Returns the kind of the resource (examples: "image",
"video") selected by this object.
|
XNode[] |
selectResource(Tree tree)
Returns the (possibly empty) array of XNodes containing resource URLs
found in specified document subtree.
|
public final String kind
null
if undetermined.public final XPath xpath
public String getResourceKind()
ResourceSelector
null
, which means: undetermined.getResourceKind
in interface ResourceSelector
public XNode[] selectResource(Tree tree)
ResourceSelector
selectResource
in interface ResourceSelector