bterlson / cadl-rdfs

A cadl to rdfs emitter
0 stars 0 forks source link

Intersection #14

Closed mspaulik closed 1 year ago

mspaulik commented 1 year ago

Hello @bterlson,

Basically, I am trying to make sure Intersection is working as expected. I have added 2 files (sample3 and sample4) with which ones I am testing my code.

I am not sure how to handle it - the code seems to work fine for sample4, however, there are issues with sample3 file, like:

ex:modelField a owl:ObjectProperty; rdfs:label "modelField"; rdfs:range ex:.

Could you help me with handling '&' correctly? I have marked the code with ' TODO' where I believe we should handle intersection - but I might be totally wrong about it.

I already requested correct RDF files for these 2 files for reference and should get them tomorrow.

Also. I implemented checkIfQuadsContain method for checking to prevent duplication in data properties. Basically, if you were to process the file sample2 you would have got 2 duplicate data property definitions for 'species' and 'name'. Right now, both appear only once. The issue was happening due to composite models processing logic - thus data properties were processed twice.

bterlson commented 1 year ago

I mentioned this on IM, but I don't think we will need to do anything special for spreads or intersections, these should be calculated inside cadl, and the result will look identical to a model that was declared with all the intersected fields. IOW, I think it should just work, but please let me know if that is not the case.