zazuko / xrm

A friendly language for mappings to RDF
MIT License
1 stars 0 forks source link

Validation on duplicate mapping names #33

Closed nicky508 closed 4 years ago

nicky508 commented 4 years ago

At this moment it is possible to have duplicated mapping names:

map BuildingMapping from parceldata.t_parcelscommplumbing {
    subject template "http://data.monroein.firegraph.store/data/fd/objects/{0}/building/{1}" with pin_18 commdetail;
    types oeg.PhysicalObject bot.Building

    properties
        prop.showerUnit from showerunit
}

map BuildingMapping from parceldata.t_parcelcommwalls {
    subject template "http://data.monroein.firegraph.store/data/fd/objects/{0}/building/{1}" with pin_18 commdetail;
    types oeg.PhysicalObject bot.Building

    properties
        prop.levels from floornumbe
}

This causing weird errors when trying to execute the mapping. We could solve this by adding a validating rule, which checks for duplicate names.

nicky508 commented 4 years ago

Added the validation. If two or more mappings have the same name, a warning is given to the user.

mchlrch commented 4 years ago

I integrated the changes in master. Closing this.