public interface XMLTransformer
Modifier and Type | Interface and Description |
---|---|
static interface |
XMLTransformer.InputType |
static interface |
XMLTransformer.OutputType |
Modifier and Type | Method and Description |
---|---|
default Runnable |
transform(InputValue<?> input,
OutputValue<?> output) |
Runnable |
transform(Map<QName,InputValue<?>> input,
Map<QName,OutputValue<?>> output) |
static Map<QName,InputValue<?>> |
validateInput(Map<QName,InputValue<?>> input,
Map<QName,XMLTransformer.InputType> types)
Check that the expected inputs are present and are of the expected type.
|
static Map<QName,OutputValue<?>> |
validateOutput(Map<QName,OutputValue<?>> output,
Map<QName,XMLTransformer.OutputType> types)
Check that the expected outputs are present and are of the expected type.
|
Runnable transform(Map<QName,InputValue<?>> input, Map<QName,OutputValue<?>> output)
input
- Supplier of XDM values as a map from port name (QName
) to InputValue
object. If the map returns null for a certain key it means that port is
not connected. If the map itself is null it means no input ports are connected.output
- Consumer of XDM values as a map from port name (QName
) to OutputValue
object. If the map returns null for a certain key it means that port is
not connected. If the map itself is null it means no output ports are connected.Runnable
that executes the transformation. Transformations can be run
inside threads to keep the buffers between transformers small. If not run inside
threads, the transformations must be executed in the correct order. Runnable.run()
may throw a TransformerException
if an input could not be
read, the transformation failed, or an output could not be written.IllegalArgumentException
- if an invalid input or output value was provided or if an
input or output value is missing.default Runnable transform(InputValue<?> input, OutputValue<?> output)
static Map<QName,InputValue<?>> validateInput(Map<QName,InputValue<?>> input, Map<QName,XMLTransformer.InputType> types) throws IllegalArgumentException
IllegalArgumentException
static Map<QName,OutputValue<?>> validateOutput(Map<QName,OutputValue<?>> output, Map<QName,XMLTransformer.OutputType> types) throws IllegalArgumentException
IllegalArgumentException
Copyright © 2010–2024 The DAISY Consortium. All rights reserved.