Dynamic Configuration of the DPU Using RDF Configuration
Dynamic Configuration of the DPU Using RDF Configuration
This section contains a short guide on the dynamic configuration of a DPU.
Dynamic configuration allows a DPU to be configured dynamically over one of its input data unit (configuration input data unit).
If the DPU supporting dynamic configuration, receives certain configuration over its configuration input data unit, it is used instead of stored configuration for the given DPU. Dynamic configuration is defined in RDF data format.
Dynamic configuration support may be added to the DPU by defining RdfConfiguration
extension:
@ExtensionInitializer.Init public RdfConfiguration _rdfConfiguration;
Additionally you can define one of the input data units to the DPU as configuration data unit:
@RdfConfiguration.ContainsConfiguration @DataUnit.AsInput(name = "config", optional = true) public RDFDataUnit rdfConfiguration;
Sample main class using dynamic configuration: https://github.com/UnifiedViews/Plugins/blob/master/e-filesDownload/src/main/java/eu/unifiedviews/plugins/extractor/filesdownload/FilesDownload.java
Further, the config
class of the DPU has to be annotated, so that it is clear how the RDF classes and properties are mapped to the config
class and attributes of the config
class.For details, refer to the sample config
annotated: https://github.com/UnifiedViews/Plugins/blob/master/e-filesDownload/src/main/java/eu/unifiedviews/plugins/extractor/filesdownload/FilesDownloadConfig_V1.java
The RDF configuration e-filesDownload
supports: https://github.com/UnifiedViews/Plugins/blob/97bcdcfc24da88411cbdf61000756a1ab5ec9752/e-filesDownload/doc/About.md
Note
Do not use blank nodes in the RDF configuration dynamically configuring the target DPU.
For collections of items use
LinkedList
.