isl / x3ml

X3ML Engine supports the data transformation which is part of the data provisioning and aggregation process.
Apache License 2.0
19 stars 7 forks source link

Generate the same URI/UUID regardless if a variable is declared or not #71

Open ymark opened 7 years ago

ymark commented 7 years ago

The generation of a URI/UUID will be the same if a variable is being used. Practically this means that if we want to generate a UUID for input A, then the same UUID should be generated if for the same piece of input we exploit a variable. For example the following mappings should create the same UUID for the two mappings

<mapping>
   <domain>
      <source_node>//COIN</source_node>
      <target_node>
         <entity>
            <type>crm:E22_Man-Made_Object</type>
            <instance_generator name="UUID"/>
         </entity>
      </target_node>
   </domain>
</mapping>
<mapping>
   <domain>
      <source_node>//COIN</source_node>
      <target_node>
         <entity variable="v1">
            <type>crm:E22_Man-Made_Object</type>
            <instance_generator name="UUID"/>
         </entity>
      </target_node>
   </domain>
</mapping>
ymark commented 7 years ago

Apart from creating the same value if in some cases a variable is used and in others it is not used, we should take care of the cases where two or more different variables are used for the same input (which is normal) and two or more different variables are used for the same input and a mapping for that input without a variable (this should be forbidden since it might cause inconsistencies)