owlcs / owlapi

OWL API main repository
828 stars 315 forks source link

stamp of quality and user edits #38

Open stdotjohn opened 11 years ago

stdotjohn commented 11 years ago

At a first guess, I think that this feature request may be tricky to implement and it may be too much effort for the benefit.

When I look at an OWL ontology formatted as RDF, I often look for the "Generated by the OWL API" line at the bottom as a stamp of quality. However even if the OWL API generated a perfectly good ontology, it is possible that a user will use some sort of text editor to modify the ontology and will forget to update the comment at the bottom of the file.

It would be nice if the OWL api included a checksum of the data above the "generated by the OWL API" comment. A user who wants to see if the ontology has been modified since it was written by the OWL api can remove the last line of the OWL file and see if the checksums match. This will not prevent malicious behavior but it will usually allow a user to see if an ontology as seen by the user was actually output from the OWL API.

When I think about this it seems that it might be a bit tricky to implement. I think that it would have to be done at the byte level as opposed to the character level. This might involve somehow hooking in an input stream at in the IO channel This came up because I was looking at an OWL 2 full ontology recently that had the "Generated by the OWL API" message at the bottom. This left me curious as to how this had happened.

ignazio1977 commented 11 years ago

An SHA1 of the file could be computed, but attached after the computation - and verification would have to strip it off before. It's interesting but I wonder if users need this. It does not guarantee quality by itself, or authenticate the content, since a malicious substitution could clearly be done with the OWL API as well, or whatever checksum that comes with the file could be altered to match the changed content.