◆ addError() [1/2]
void fiftyone.pipeline.core.data.FlowData.addError | ( | FlowError | error | ) |
Add an error which has occurred during processing.
- Parameters
-
- error - which was thrown
\r\n
A closeable structure to contain the inputs and outputs of Pipeline processing.
void | process () |
boolean | isStopped () |
void | stop ()
Set the stop flag. More...
|
Pipeline | getPipeline () |
Collection< FlowError > | getErrors ()
Obtain the collection of errors which occurred so far. More...
|
void | addError (FlowError error)
Add an error which has occurred during processing. More...
|
void | addError (Throwable e, FlowElement element)
Add an error which has occurred during processing. More...
|
Evidence | getEvidence () |
< T > TryGetResult< T > | tryGetEvidence (String key, Class< T > type)
Try to get the data value from evidence. More...
|
List< String > | getDataKeys ()
Get a list of keys for elements of the Pipeline that have created data. More...
|
FlowData | addEvidence (String key, Object value)
Add a single item of evidence. More...
|
FlowData | addEvidence (Map< String, ?> values)
Add a map of evidence items. More...
|
< T extends ElementData > T | get (TypedKey< T > key)
Get the ElementData for the requested aspect. More...
|
ElementData | get (String key)
Get the ElementData for the requested data key. More...
|
< T extends ElementData > T | get (Class< T > type) |
< T extends ElementData > T | getFromElement (FlowElement< T, ?> element) |
< T > T | getAs (String key, Class< T > type)
Get the specified property as the specified type. More...
|
< T extends ElementData > TryGetResult< T > | tryGetValue (TypedKey< T > key)
Check if the flow data contains an item with the specified key name and type. More...
|
String | getAsString (String propertyName)
Get the specified property as a string. More...
|
Boolean | getAsBool (String propertyName)
Get the specified property as a boolean. More...
|
Integer | getAsInt (String propertyName)
Get the specified property as an integer. More...
|
Long | getAsLong (String propertyName)
Get the specified property as a long. More...
|
Float | getAsFloat (String propertyName)
Get the specified property as a float. More...
|
Double | getAsDouble (String propertyName)
Get the specified property as a double. More...
|
< T extends ElementData > T | getOrAdd (String elementDataKey, FlowElement.DataFactory< T > dataFactory)
Get or add the specified element data to the internal map. More...
|
< T extends ElementData > T | getOrAdd (TypedKey< T > key, FlowElement.DataFactory< T > dataFactory)
Get or add the specified element data to the internal map. More...
|
Map< String, Object > | elementDataAsMap () |
Iterable< ElementData > | elementDataAsIterable () |
Map< String, String > | getWhere (PropertyMatcher matcher)
Get all element data values that match the specified predicate. More...
|
DataKey | generateKey (EvidenceKeyFilter filter) |
EvidenceKeyFilter | getEvidenceKeyFilter ()
Get a filter that will only include the evidence keys that can be used by the elements within the pipeline that created this flow element. More...
|
void fiftyone.pipeline.core.data.FlowData.addError | ( | FlowError | error | ) |
Add an error which has occurred during processing.
void fiftyone.pipeline.core.data.FlowData.addError | ( | Throwable | e, |
FlowElement | element | ||
) |
Add an error which has occurred during processing.
Iterable<ElementData> fiftyone.pipeline.core.data.FlowData.elementDataAsIterable | ( | ) |
Get the ElementData for this instance as an Iterable.
Map<String, Object> fiftyone.pipeline.core.data.FlowData.elementDataAsMap | ( | ) |
Get the ElementData for this instance as a Map.
DataKey fiftyone.pipeline.core.data.FlowData.generateKey | ( | EvidenceKeyFilter | filter | ) |
Generate a DataKey that contains the evidence data from this instance that matches the specified filter.
<T extends ElementData> T fiftyone.pipeline.core.data.FlowData.get | ( | TypedKey< T > | key | ) |
Get the ElementData for the requested aspect.
ElementData fiftyone.pipeline.core.data.FlowData.get | ( | String | key | ) |
Get the ElementData for the requested data key.
<T extends ElementData> T fiftyone.pipeline.core.data.FlowData.get | ( | Class< T > | type | ) |
Get the ElementData for the requested ElementData implementation.
If multiple instances of the type exist then an exception is thrown.
<T> T fiftyone.pipeline.core.data.FlowData.getAs | ( | String | key, |
Class< T > | type | ||
) |
Get the specified property as the specified type.
Boolean fiftyone.pipeline.core.data.FlowData.getAsBool | ( | String | propertyName | ) |
Get the specified property as a boolean.
Double fiftyone.pipeline.core.data.FlowData.getAsDouble | ( | String | propertyName | ) |
Get the specified property as a double.
Float fiftyone.pipeline.core.data.FlowData.getAsFloat | ( | String | propertyName | ) |
Get the specified property as a float.
Integer fiftyone.pipeline.core.data.FlowData.getAsInt | ( | String | propertyName | ) |
Get the specified property as an integer.
Long fiftyone.pipeline.core.data.FlowData.getAsLong | ( | String | propertyName | ) |
Get the specified property as a long.
String fiftyone.pipeline.core.data.FlowData.getAsString | ( | String | propertyName | ) |
Get the specified property as a string.
List<String> fiftyone.pipeline.core.data.FlowData.getDataKeys | ( | ) |
Get a list of keys for elements of the Pipeline that have created data.
(so far).
Collection<FlowError> fiftyone.pipeline.core.data.FlowData.getErrors | ( | ) |
Obtain the collection of errors which occurred so far.
This cannot be added to externally.
Evidence fiftyone.pipeline.core.data.FlowData.getEvidence | ( | ) |
Get an Evidence collection.
Evidence should only be added via the addEvidence(Map) and addEvidence(String, Object) methods.
EvidenceKeyFilter fiftyone.pipeline.core.data.FlowData.getEvidenceKeyFilter | ( | ) |
Get a filter that will only include the evidence keys that can be used by the elements within the pipeline that created this flow element.
<T extends ElementData> T fiftyone.pipeline.core.data.FlowData.getFromElement | ( | FlowElement< T, ?> | element | ) |
Get the ElementData for the requested FlowElement.
This method uses the data type returned by the Element, and the key which belongs to the Element.
<T extends ElementData> T fiftyone.pipeline.core.data.FlowData.getOrAdd | ( | String | elementDataKey, |
FlowElement.DataFactory< T > | dataFactory | ||
) |
Get or add the specified element data to the internal map.
<T extends ElementData> T fiftyone.pipeline.core.data.FlowData.getOrAdd | ( | TypedKey< T > | key, |
FlowElement.DataFactory< T > | dataFactory | ||
) |
Get or add the specified element data to the internal map.
Map<String, String> fiftyone.pipeline.core.data.FlowData.getWhere | ( | PropertyMatcher | matcher | ) |
Get all element data values that match the specified predicate.
boolean fiftyone.pipeline.core.data.FlowData.isStopped | ( | ) |
If this flag is set to true, future FlowElements will not process this FlowData.
void fiftyone.pipeline.core.data.FlowData.stop | ( | ) |
Set the stop flag.
<T> TryGetResult<T> fiftyone.pipeline.core.data.FlowData.tryGetEvidence | ( | String | key, |
Class< T > | type | ||
) |
Try to get the data value from evidence.
<T extends ElementData> TryGetResult<T> fiftyone.pipeline.core.data.FlowData.tryGetValue | ( | TypedKey< T > | key | ) |
Check if the flow data contains an item with the specified key name and type.
If it does exist, retrieve it.