@API.Public public final class FieldProjector extends BaseFieldProjector
FieldPaths
and in association with a DocumentReader, determines which fields form the document reader are
emitted to the applications.
A single instance of ProjectionTree can not be, concurrently, used with multiple DocumentReaders.
Use cloneWithSharedProjectionTree() in such cases.currentSegment, includeAllChildren, includeField, lastSegment, level, readerFieldSegment, rootSegment| Constructor and Description |
|---|
FieldProjector(Collection<FieldPath> includedPaths) |
FieldProjector(FieldPath... includedPaths) |
FieldProjector(org.ojai.util.impl.ProjectionTree rootSegment) |
FieldProjector(String... includedPaths) |
| Modifier and Type | Method and Description |
|---|---|
FieldProjector |
cloneWithSharedProjectionTree()
Creates a lightweight clone of this FieldProjector with shared ProjectionTree.
|
void |
moveTo(DocumentReader.EventType event)
This is the main algorithm that determine if the current
DocumentReader
node should be included or excluded based on the set of projected fields. |
FieldProjector |
reset(DocumentReader reader)
Resets the state of this projection tree to the root of the Document.
|
asJsonString, asJsonString, done, isDone, moveTo, reset, shouldEmitEvent, toStringpublic FieldProjector(@API.NonNullable String... includedPaths)
public FieldProjector(@API.NonNullable FieldPath... includedPaths)
public FieldProjector(@API.NonNullable Collection<FieldPath> includedPaths)
public FieldProjector(org.ojai.util.impl.ProjectionTree rootSegment)
public FieldProjector cloneWithSharedProjectionTree()
cloneWithSharedProjectionTree in class BaseFieldProjectorpublic void moveTo(DocumentReader.EventType event)
DocumentReader
node should be included or excluded based on the set of projected fields.moveTo in class BaseFieldProjectorpublic FieldProjector reset(DocumentReader reader)
reset in class BaseFieldProjectorthis for chaining.Copyright © 2015–2019 MapR Technologies, Inc.. All rights reserved.