Closed Jefidev closed 4 years ago
The latest commit contains an XMIReader working on the generated typhonML.rsc
The handlers for the change operators have been updated in order to work with the new XMI syntax. The code was tested on all the available change operators.
I ran a test on the XMI reader (function smokeTest3
). It seems that the name of attributes get lost. Without applying the pull request, the produced schema is:
schema(
{
<"Review",one(),"user","reviews",zero_many(),"User",false>,
<"Product",zero_many(),"reviews","product",one(),"Review",true>,
<"User",zero_many(),"reviews","user",one(),"Review",true>,
<"Biography",one(),"user","biography",zero_one(),"User",false>,
<"Review",one(),"product","reviews",zero_many(),"Product",false>,
<"User",zero_one(),"biography","user",one(),"Biography",true>
},
{
<"User","name","string(256)">,
<"Product","productionDate","date">,
<"User","address","string(256)">,
<"Biography","content","string(256)">,
<"Product","description","string(256)">,
<"Review","content","text">,
<"Product","name","string(256)">,
<"Product","price","int">
},
customs={},
placement={
<<sql(),"Inventory">,"User">,
<<sql(),"Inventory">,"Product">,
<<mongodb(),"Reviews">,"Biography">,
<<mongodb(),"Reviews">,"Review">
},
changeOperators=[])
With the pull request integrated, I got:
schema(
{
<"Review",one(),"user","reviews",zero_many(),"User",false>,
<"Product",zero_many(),"reviews","product",one(),"Review",true>,
<"User",zero_many(),"reviews","user",one(),"Review",true>,
<"Biography",one(),"user","biography",zero_one(),"User",false>,
<"Review",one(),"product","reviews",zero_many(),"Product",false>,
<"User",zero_one(),"biography","user",one(),"Biography",true>
},
{
<"Product","","int">,
<"User","","int">,
<"Biography","","int">,
<"Review","","int">
},
customs={},
placement={
<<sql(),"Inventory">,"User">,
<<sql(),"Inventory">,"Product">,
<<mongodb(),"Reviews">,"Biography">,
<<mongodb(),"Reviews">,"Review">
},
changeOperators=[])
With the latest commit, the attributes name are now correctly extracted.
I extended the XMI reader in order to handle the various change operators. All the operators needed by the evolution team are implemented.