Detailed Description
A FlowElement is placed inside a Pipeline It receives Evidence via a FlowData object It uses this to optionally create ElementData on the FlowData Any errors in processing are caught in the FlowData's errors object.
Inheritance diagram for fiftyone_pipeline_core.flowelement.FlowElement:
Collaboration diagram for fiftyone_pipeline_core.flowelement.FlowElement:
Public Member Functions | |
| __init__ (self) | |
| List of Pipelines the FlowElement has been added to. | |
| process (self, flowdata) | |
| Function for getting the FlowElement's EvidenceKeyFilter Used by the filterEvidence method. | |
| on_registration (self, pipeline) | |
| Function called when an element is added to the pipeline. | |
| close (self) | |
| Release the resources the element holds. | |
| get_evidence_key_filter (self) | |
| Filter FlowData evidence using the FlowElement's EvidenceKeyFilter. | |
| filter_evidence (self, flowdata) | |
| Filter FlowData evidence using the FlowElement's EvidenceKeyFilter. | |
| filter_evidence_key (self, key) | |
| Filter FlowData.evidence using the flowElement's EvidenceKeyFilter with the property key of evidence of interest. | |
| process_internal (self, flowdata) | |
| The method behind FlowElement.Process - it is called by the process() function. | |
| get_properties (self) | |
| Get the FlowElement.properties of a FlowElement. | |
Public Attributes | |
| list | pipelines = [] |
| dict | properties = {} |
| str | datakey = "" |
| bool | exclude_from_messages = False |
Protected Member Functions | |
| _log (self, level, message) | |
Constructor & Destructor Documentation
◆ __init__()
| fiftyone_pipeline_core.flowelement.FlowElement.__init__ | ( | self | ) |
List of Pipelines the FlowElement has been added to.
Member Function Documentation
◆ _log()
|
protected |
◆ close()
| fiftyone_pipeline_core.flowelement.FlowElement.close | ( | self | ) |
Release the resources the element holds.
The pipeline calls this when it is closed. This element holds none, and elements that hold native data or threads override it.
Reimplemented in fiftyone_pipeline_engines.engine.Engine, fiftyone_pipeline_engines_fiftyone.share_usage.ShareUsage, tests.test_close.ClosingElement, tests.test_close.FailingElement, and tests.test_close.RecordedElement.
◆ filter_evidence()
| fiftyone_pipeline_core.flowelement.FlowElement.filter_evidence | ( | self, | |
| flowdata ) |
Filter FlowData evidence using the FlowElement's EvidenceKeyFilter.
@type flowdata: FlowData
- Parameters
-
flowdata a FlowData that has some Evidence set
@rtype: dict
- Returns
- : Returns a dictionary of evidence that has passed the filter
◆ filter_evidence_key()
| fiftyone_pipeline_core.flowelement.FlowElement.filter_evidence_key | ( | self, | |
| key ) |
Filter FlowData.evidence using the flowElement's EvidenceKeyFilter with the property key of evidence of interest.
@type key: string
- Parameters
-
key the property key being sought within FlowData.evidence
@rtype: dict
- Returns
- : Returns a dictionary containing the property key and the evidence related to it as its value
◆ get_evidence_key_filter()
| fiftyone_pipeline_core.flowelement.FlowElement.get_evidence_key_filter | ( | self | ) |
Filter FlowData evidence using the FlowElement's EvidenceKeyFilter.
@rtype: EvidenceKeyFilter
- Returns
- : Returns an EvidenceKeyFilter
Reimplemented in examples.client_side_evidence_custom_flow_element.AstrologyFlowElement, fiftyone_pipeline_cloudrequestengine.cloudrequestengine.CloudRequestEngine, fiftyone_pipeline_core.javascriptbuilder.JavascriptBuilderElement, fiftyone_pipeline_core.sequenceelement.SequenceElement, fiftyone_pipeline_engines_fiftyone.share_usage.ShareUsage, tests.classes.apvflowelement.APVFlowElement, tests.classes.errorflowdata.ErrorFlowData, tests.classes.exampleflowelement1.ExampleFlowElement1, tests.classes.exampleflowelement2.ExampleFlowElement2, tests.classes.stopflowdata.StopFlowData, and tests.test_engines.ExampleAspectEngine.
◆ get_properties()
| fiftyone_pipeline_core.flowelement.FlowElement.get_properties | ( | self | ) |
Get the FlowElement.properties of a FlowElement.
This is usually overridden by specific flowElements.
@rtype: DataPropertyDictionary
- Returns
- : Returns dictionary of the FlowElement's properties
◆ on_registration()
| fiftyone_pipeline_core.flowelement.FlowElement.on_registration | ( | self, | |
| pipeline ) |
Function called when an element is added to the pipeline.
Used for example, for elements that depend on other elements in a pipeline
@type pipeline: Pipeline
- Parameters
-
pipeline Pipeline the element has been added to
Reimplemented in fiftyone_pipeline_cloudrequestengine.cloudengine.CloudEngine, and fiftyone_pipeline_engines.engine.Engine.
◆ process()
| fiftyone_pipeline_core.flowelement.FlowElement.process | ( | self, | |
| flowdata ) |
Function for getting the FlowElement's EvidenceKeyFilter Used by the filterEvidence method.
@type flowdata: FlowData
- Parameters
-
flowdata FlowData to be processed
@rtype: mixed
- Returns
- : Returns whatever the self.processInternal method is set to return
Reimplemented in fiftyone_pipeline_engines.engine.Engine.
◆ process_internal()
| fiftyone_pipeline_core.flowelement.FlowElement.process_internal | ( | self, | |
| flowdata ) |
The method behind FlowElement.Process - it is called by the process() function.
It is usually overridden by specific flowElements to do their core work.
@type flowdata: FlowData
- Parameters
-
flowdata FlowData to be processed
@rtype: bool
- Returns
- : Returns True
Reimplemented in examples.client_side_evidence_custom_flow_element.AstrologyFlowElement, fiftyone_pipeline_cloudrequestengine.cloudengine.CloudEngine, fiftyone_pipeline_cloudrequestengine.cloudrequestengine.CloudRequestEngine, fiftyone_pipeline_core.javascriptbuilder.JavascriptBuilderElement, fiftyone_pipeline_core.jsonbundler.JSONBundlerElement, fiftyone_pipeline_core.sequenceelement.SequenceElement, fiftyone_pipeline_core.setheaderelement.SetHeaderElement, fiftyone_pipeline_engines_fiftyone.share_usage.ShareUsage, fiftyone_pipeline_examples.cloud.engines.WeightedCloudEngine, tests.classes.apvflowelement.APVFlowElement, tests.classes.errorflowdata.ErrorFlowData, tests.classes.exampleflowelement1.ExampleFlowElement1, tests.classes.exampleflowelement2.ExampleFlowElement2, tests.classes.stopflowdata.StopFlowData, tests.test_close.ClosingElement, tests.test_close.PlainElement, tests.test_engines.ExampleAspectEngine, tests.test_javascriptbuilder.CookieEngine, tests.test_javascriptbuilder.DelayedExecutionEngine1, tests.test_javascriptbuilder.DelayedExecutionEngine2, tests.test_javascriptbuilder.DelayedExecutionEngine3, and tests.test_javascriptbuilder.TestEngine.
Member Data Documentation
◆ datakey
| str fiftyone_pipeline_core.flowelement.FlowElement.datakey = "" |
◆ exclude_from_messages
| bool fiftyone_pipeline_core.flowelement.FlowElement.exclude_from_messages = False |
◆ pipelines
| list fiftyone_pipeline_core.flowelement.FlowElement.pipelines = [] |
◆ properties
| dict fiftyone_pipeline_core.flowelement.FlowElement.properties = {} |
