EDNA Plugin: EDPluginAccumulatorv1_0

Name:EDPluginAccumulatorv1_0
Project:execPlugins
Path:execPlugins/plugins/EDPluginAccumulator-v1.0/plugins/EDPluginAccumulatorv1_0.py
Author:Jérôme Kieffer
Date:
Copyright:ESRF
License:GPLv3+
Module doc:UseCase for EDPluginAccumulator:
* Keep in memory all items (accumulates them) when you feed it.
* Keep in memory queries as well.
When one or more queries are fulfilled, then return all fulfilled queries.
There are option to keep items in memory or remove them when they are used by a query (this is an option of the query.
There is a flush option that returns all items accumulated and remove them from the list.
There are static methods to emptyItems and emptyQueries
Class doc:Accumulate items and checks for fulfilled queries.
items should be strings, queries are list of strings.
EDPluginAccumulatorv1_0 is an simple plugin because:
* it is not a control plugin (as it controls nothing)
* it is not an execution plugin as it does not need to take a CPU (via SemaphoreNbCPU)

Datamodels: XSDataInputAccumulator
targetNamespace "http://www.edna-site.org"

import XSDataCommon.XSData
import XSDataCommon.XSDataInput
import XSDataCommon.XSDataResult
import XSDataCommon.XSDataBoolean
import XSDataCommon.XSDataString

complex type XSDataInputAccumulator extends XSDataInput {
    flush : XSDataBoolean optional
    item : XSDataString [] optional
    query : XSDataQuery [] optional
}

complex type XSDataQuery extends XSData {
    item : XSDataString []
    removeItems : XSDataBoolean optional
}

complex type XSDataResultAccumulator extends XSDataResult {
    query : XSDataQuery [] optional
}