public abstract class RecordPathSegment extends Object implements RecordPath
| Modifier and Type | Field and Description |
|---|---|
private boolean |
absolute |
private RecordPathSegment |
parentPath |
private String |
path |
| Constructor and Description |
|---|
RecordPathSegment(String path,
RecordPathSegment parentPath,
boolean absolute) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
RecordPathResult |
evaluate(Record record)
Evaluates the RecordPath against the given Record, returning a RecordPathResult that contains
a FieldValue for each field that matches
|
RecordPathResult |
evaluate(Record record,
FieldValue contextNode)
Evaluates a RecordPath against the given context node.
|
abstract Stream<FieldValue> |
evaluate(RecordPathEvaluationContext context) |
(package private) RecordPathSegment |
getParentPath() |
String |
getPath()
Returns the textual representation of the RecordPath
|
int |
hashCode() |
boolean |
isAbsolute()
Indicates whether the RecordPath is an Absolute Path (starts with a '/' character) or a Relative Path (starts with a '.' character).
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcompileprivate final String path
private final RecordPathSegment parentPath
private final boolean absolute
public RecordPathSegment(String path, RecordPathSegment parentPath, boolean absolute)
public String getPath()
RecordPathgetPath in interface RecordPathRecordPathSegment getParentPath()
public boolean isAbsolute()
RecordPathisAbsolute in interface RecordPathtrue if the RecordPath is an Absolute Path, false if the RecordPath is a Relative Pathpublic final RecordPathResult evaluate(Record record)
RecordPathevaluate in interface RecordPathrecord - the Record to evaluatepublic final RecordPathResult evaluate(Record record, FieldValue contextNode)
RecordPathRecordPath.evaluate(Record) and then have a Relative RecordPath evaluated against
the results. This method will throw an Exception if this RecordPath is an Absolute RecordPath.evaluate in interface RecordPathrecord - the Record to evaluatecontextNode - the context node that represents where in the Record the 'current node' or 'context node' ispublic abstract Stream<FieldValue> evaluate(RecordPathEvaluationContext context)
Copyright © 2023 Apache NiFi Project. All rights reserved.