ADTF
|
Factory to create a MappingConfiguration out of a XML based description. More...
Public Types | |
using | xml_base_type = MappingConfigurationFromXMLFactoryBase< DomNodeType > |
base factory type for xml reading | |
using | xml_mapping10_type = MappingConfigurationFromXMLFactory10< DomNodeType > |
mapping10 xml reading factory type for compatibility of mapping 1.0 definition | |
Static Public Member Functions | |
template<typename T > | |
static utility::Optional< T > | getAttributeMandatory (const DomNodeType &dom_node, const std::string &attribute_name) |
Get the mandatory attribute helper function. More... | |
template<typename T > | |
static utility::Optional< T > | getAttribute (const DomNodeType &dom_node, const std::string &attribute_name) |
Get the attribute. More... | |
template<typename T > | |
static utility::Optional< T > | getDataSubNodeMandatory (const DomNodeType &dom_node, const std::string &tag_name, const std::string &additional_info={}) |
Get the mandatory sub node data helper function. More... | |
template<typename T > | |
static utility::Optional< T > | getDataSubNode (const DomNodeType &dom_node, const std::string &tag_name) |
Get the mandatory sub node data helper function. More... | |
static datamodel::Header | createHeader (const DomNodeType &dom_node, const Version &version) |
Create a Header object. More... | |
template<typename PropertiesType > | |
static void | setDataOrSubNodesAsProperty (const DomNodeType &dom_node, PropertiesType &properties) |
Set the Data Or Sub Nodes As Property. More... | |
static datamodel::Source | createSource (const DomNodeType &dom_node) |
Create a Source object. More... | |
static datamodel::ParameterValue | createParameterValue (const DomNodeType &dom_node) |
Create a ParameterValue object. More... | |
static datamodel::Assignment | createAssignment (const DomNodeType &dom_node) |
Create a Assignment object. More... | |
static datamodel::Trigger | createPeriodTrigger (const DomNodeType &dom_node) |
Create a Trigger object as Trigger(Period) More... | |
static datamodel::Trigger | createDataTrigger (const DomNodeType &dom_node) |
Create a Trigger object as Trigger(Data) More... | |
static datamodel::Trigger | createSourceTrigger (const DomNodeType &dom_node) |
Create a Trigger object as Trigger(Source) More... | |
static datamodel::Trigger | createTrigger (const DomNodeType &dom_node, const Version &version) |
Create a Trigger object. More... | |
static datamodel::Trigger | createTrigger (const DomNodeType &dom_node) |
Create a Trigger object. More... | |
static datamodel::Target | createTarget (const DomNodeType &dom_node, const Version &version) |
Create a Target object. More... | |
static datamodel::Target | createTarget (const DomNodeType &dom_node) |
Create a Target object. More... | |
static datamodel::Function | createFunction (const DomNodeType &dom_node) |
Create a Function. More... | |
static datamodel::MappingConfiguration | createConfiguration (const DomNodeType &dom_node, const Version &mapping_version=Version::getLatestVersion()) |
Creates a MappingConfiguration and read all sub node. More... | |
Static Public Attributes | |
static constexpr auto | mapping_reading_version = "Mapping20::" |
Error message definition string. | |
Factory to create a MappingConfiguration out of a XML based description.
This factory uses a template type DomNodeType which is design to follow the a concept class type definition of the a_util::DOMElement.
DomNodeType | a DOMElement class must implement following funtions:
|
Definition at line 41 of file datamodel_xml_configurationfromxml.h.
|
inlinestatic |
Create a Assignment object.
dom_node | the node to create the Assignment from (should be "assignment" tag name). |
Definition at line 233 of file datamodel_xml_configurationfromxml.h.
References MappingConfigurationFromXMLFactory< DomNodeType >::createParameterValue(), TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS >::emplace(), and Assignment::getParameterValues().
Referenced by MappingConfigurationFromXMLFactory< DomNodeType >::createTarget().
|
inlinestatic |
Creates a MappingConfiguration and read all sub node.
dom_node | node to create the MappingConfiguration from. |
mapping_version | forced language version if no header-tag or language-version is found within the dom_node |
Definition at line 440 of file datamodel_xml_configurationfromxml.h.
References MappingConfigurationFromXMLFactory10< DomNodeType >::createConfiguration(), MappingConfigurationFromXMLFactory< DomNodeType >::createFunction(), MappingConfigurationFromXMLFactory< DomNodeType >::createHeader(), MappingConfigurationFromXMLFactory< DomNodeType >::createSource(), MappingConfigurationFromXMLFactory< DomNodeType >::createTarget(), MappingConfiguration::getFunctions(), Header::getMappingVersion(), MappingConfiguration::getSources(), MappingConfiguration::getTargets(), and MappingConfiguration::setHeader().
|
inlinestatic |
Create a Trigger object as Trigger(Data)
dom_node | the node to create the Trigger from (should be "trigger" tag name). |
Definition at line 288 of file datamodel_xml_configurationfromxml.h.
Referenced by MappingConfigurationFromXMLFactory< DomNodeType >::createTrigger().
|
inlinestatic |
Create a Function.
dom_node | the node to create the function from (should be "function" tag name). |
Definition at line 415 of file datamodel_xml_configurationfromxml.h.
References Function::getProperties(), and MappingConfigurationFromXMLFactory< DomNodeType >::setDataOrSubNodesAsProperty().
Referenced by MappingConfigurationFromXMLFactory< DomNodeType >::createConfiguration().
|
inlinestatic |
Create a Header object.
dom_node | the node to create the header from (should be "header" tag name). |
version | mapping version to use if no "language_version" attribute is found |
Definition at line 133 of file datamodel_xml_configurationfromxml.h.
References VersionConversion::fromString(), Header::setAuthor(), Header::setDateChange(), Header::setDateCreation(), Header::setDescription(), and Header::setMappingVersion().
Referenced by MappingConfigurationFromXMLFactory< DomNodeType >::createConfiguration().
|
inlinestatic |
Create a ParameterValue object.
dom_node | the node to create the ParameterValue from (should be "parameter_value" tag name). |
Definition at line 202 of file datamodel_xml_configurationfromxml.h.
Referenced by MappingConfigurationFromXMLFactory< DomNodeType >::createAssignment().
|
inlinestatic |
Create a Trigger object as Trigger(Period)
dom_node | the node to create the Trigger from (should be "trigger" tag name). |
Definition at line 274 of file datamodel_xml_configurationfromxml.h.
Referenced by MappingConfigurationFromXMLFactory< DomNodeType >::createTrigger().
|
inlinestatic |
Create a Source object.
dom_node | the node to create the Source from (should be "source" tag name). |
Definition at line 180 of file datamodel_xml_configurationfromxml.h.
References Source::getProperties(), and MappingConfigurationFromXMLFactory< DomNodeType >::setDataOrSubNodesAsProperty().
Referenced by MappingConfigurationFromXMLFactory< DomNodeType >::createConfiguration().
|
inlinestatic |
Create a Trigger object as Trigger(Source)
dom_node | the node to create the Trigger from (should be "trigger" tag name). |
Definition at line 307 of file datamodel_xml_configurationfromxml.h.
Referenced by MappingConfigurationFromXMLFactory< DomNodeType >::createTrigger().
|
inlinestatic |
Create a Target object.
dom_node | the node to create the Target from (should be "target" tag name). |
Definition at line 405 of file datamodel_xml_configurationfromxml.h.
References MappingConfigurationFromXMLFactory< DomNodeType >::createTarget().
|
inlinestatic |
Create a Target object.
dom_node | the node to create the Target from (should be "target" tag name). |
version | Mapping Version of the current parsed xml content |
Definition at line 367 of file datamodel_xml_configurationfromxml.h.
References MappingConfigurationFromXMLFactory< DomNodeType >::createAssignment(), MappingConfigurationFromXMLFactory< DomNodeType >::createTrigger(), TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS >::emplace(), TypeAccessVector< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS >::emplace(), Target::getAssignments(), Target::getProperties(), Target::getTriggers(), and MappingConfigurationFromXMLFactory< DomNodeType >::setDataOrSubNodesAsProperty().
Referenced by MappingConfigurationFromXMLFactory< DomNodeType >::createConfiguration(), and MappingConfigurationFromXMLFactory< DomNodeType >::createTarget().
|
inlinestatic |
Create a Trigger object.
dom_node | the node to create the Trigger from (should be "trigger" tag name). |
Definition at line 355 of file datamodel_xml_configurationfromxml.h.
References MappingConfigurationFromXMLFactory< DomNodeType >::createTrigger().
|
inlinestatic |
Create a Trigger object.
dom_node | the node to create the Trigger from (should be "trigger" tag name). |
version | Mapping Version of the current parsed xml content |
Definition at line 320 of file datamodel_xml_configurationfromxml.h.
References MappingConfigurationFromXMLFactory< DomNodeType >::createDataTrigger(), MappingConfigurationFromXMLFactory< DomNodeType >::createPeriodTrigger(), MappingConfigurationFromXMLFactory< DomNodeType >::createSourceTrigger(), and Trigger::setTimeStrategy().
Referenced by MappingConfigurationFromXMLFactory< DomNodeType >::createTarget(), and MappingConfigurationFromXMLFactory< DomNodeType >::createTrigger().
|
inlinestatic |
Get the attribute.
T | the type to retrieve |
dom_node | the node where the attribute may be retrieved fron |
attribute_name | the attribute name |
Definition at line 84 of file datamodel_xml_configurationfromxml.h.
|
inlinestatic |
Get the mandatory attribute helper function.
T | the type to retrieve |
dom_node | the node where the attribute may be retrieved fron |
attribute_name | the attribute name |
throws | mapping::Error if attribute does not exist |
Definition at line 64 of file datamodel_xml_configurationfromxml.h.
References MappingConfigurationFromXMLFactory< DomNodeType >::mapping_reading_version.
|
inlinestatic |
Get the mandatory sub node data helper function.
T | the type to retrieve |
dom_node | the node where the attribute may be retrieved fron |
tag_name | the tag name |
Definition at line 121 of file datamodel_xml_configurationfromxml.h.
|
inlinestatic |
Get the mandatory sub node data helper function.
T | the type to retrieve |
dom_node | the node where the attribute may be retrieved fron |
tag_name | the tag name |
additional_info | additional info if not retrieved within the exception |
throws | mapping::Error if attribute does not exist |
Definition at line 100 of file datamodel_xml_configurationfromxml.h.
|
inlinestatic |
Set the Data Or Sub Nodes As Property.
PropertiesType | the type for properties to set the properties to |
dom_node | the "properties" node to read the values from |
properties | the properties collection to set the found properties to |
Definition at line 168 of file datamodel_xml_configurationfromxml.h.
Referenced by MappingConfigurationFromXMLFactory< DomNodeType >::createFunction(), MappingConfigurationFromXMLFactory< DomNodeType >::createSource(), and MappingConfigurationFromXMLFactory< DomNodeType >::createTarget().