KonradHoeffner / rickview

quick RDF viewer
MIT License
23 stars 2 forks source link

manchester syntax #41

Open KonradHoeffner opened 1 year ago

KonradHoeffner commented 1 year ago

Display OWL in manchester syntax, see https://www.w3.org/TR/owl2-manchester-syntax/. Well introduced in https://www.w3.org/2007/OWL/draft/ED-owl2-manchester-syntax-20081128/all.pdf. Part of #29.

KonradHoeffner commented 1 year ago

I couldn't find a Rust library that supports Manchester Syntax. Asked in https://softwarerecs.stackexchange.com/questions/87123/rust-library-to-serialize-owl-in-manchester-syntax but no response yet.

Alternatively, basic constructs such as "some" or "all" could be manually represented.

KonradHoeffner commented 1 year ago

For example:

[rdf:type](http://www.w3.org/1999/02/22-rdf-syntax-ns#type) [owl:Restriction](http://www.w3.org/2002/07/owl#Restriction)
[owl:onProperty](http://www.w3.org/2002/07/owl#onProperty) [<http://www.onto-med.de/ontologies/gfo.owl#partOf>](http://www.onto-med.de/ontologies/gfo.owl#partOf)
[owl:someValuesFrom](http://www.w3.org/2002/07/owl#someValuesFrom) [anno:Cranium](http://localhost:8101/ontology/Cranium)

This could be replaced by:

partOf some Cranium

An easy workaround for now would be to do a regular expression search and replace in the HTML generated by the blank node component, which currently looks like this:

<td class="td2">
    <span class="c2">
        <a href='/ontology/.well-known/genid/riog00000083'>_:riog00000083</a>
        <br>
         <a href='http://www.w3.org/1999/02/22-rdf-syntax-ns#type'>rdf:<b>type</b></a> <a href='http://www.w3.org/2002/07/owl#Restriction' target='_blank' >owl:Restriction</a><br><a href='http://www.w3.org/2002/07/owl#onProperty'>owl:<b>onProperty</b></a> <a href='http://www.onto-med.de/ontologies/gfo.owl#partOf' target='_blank' >&lt;http://www.onto-med.de/ontologies/gfo.owl#partOf&gt;</a><br><a href='http://www.w3.org/2002/07/owl#someValuesFrom'>owl:<b>someValuesFrom</b></a> <a href='/ontology/Cranium'>anno:Cranium<br><span>&#8618; Skull bone</span></a></span> <br /><span class="c2"><a href='http://www.w3.org/2002/07/owl#Thing' target='_blank' >owl:Thing</a></span>
</td>