Class ArrayProcessor
- java.lang.Object
-
- io.wcm.caravan.io.jsontransform.processor.AbstractBufferingProcessor
-
- io.wcm.caravan.io.jsontransform.processor.AbstractPathProcessor
-
- io.wcm.caravan.io.jsontransform.processor.ArrayProcessor
-
- All Implemented Interfaces:
Processor
,Source
,Closeable
,AutoCloseable
,Iterator<JsonElement>
@ProviderType public final class ArrayProcessor extends AbstractPathProcessor
Converts elements identified by passed keys to JSON array elements and the children into JSON array values.
-
-
Field Summary
-
Fields inherited from class io.wcm.caravan.io.jsontransform.processor.AbstractBufferingProcessor
outputBuffer, source
-
-
Constructor Summary
Constructors Constructor Description ArrayProcessor(Source source, Set<String> keys)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isProcessable(JsonPath path, JsonElement element)
protected void
process(JsonPath path, JsonElement element)
Processes the current JSON stream element-
Methods inherited from class io.wcm.caravan.io.jsontransform.processor.AbstractPathProcessor
getCurrentJsonPath, process, processToPath, seekToNext, seekToNext, seekToPath
-
Methods inherited from class io.wcm.caravan.io.jsontransform.processor.AbstractBufferingProcessor
close, hasNext, next
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Method Detail
-
isProcessable
protected boolean isProcessable(JsonPath path, JsonElement element)
- Specified by:
isProcessable
in classAbstractPathProcessor
- Parameters:
path
- The current JSON pathelement
- The current JSON stream element- Returns:
- True if process with the given parameter should get called
-
process
protected void process(JsonPath path, JsonElement element)
Description copied from class:AbstractPathProcessor
Processes the current JSON stream element- Specified by:
process
in classAbstractPathProcessor
- Parameters:
path
- The current JSON pathelement
- The current JSON stream element
-
-