oeg-upm / Chowlk

Tool to transform an ontology diagram into OWL code.
Apache License 2.0
22 stars 6 forks source link

Add links to resources in exported diagram #32

Open GordianDziwis opened 2 years ago

GordianDziwis commented 2 years ago

It is possible to export the ontology with draw.io to SVG and HTML. It would be nice if the elements in the exported diagram are linked to their resource. For example, that a click on a box representing a class redirect to the resource.

mariapoveda commented 2 years ago

Do you mean to include the svg in a HTML file with the description of the resources? Like the HTML generated by Widoco?

GordianDziwis commented 2 years ago

My specific use case is:

  1. Create an ontology with chowlk.
  2. Export it to ttl with the chowlk converter.
  3. Create a html documentation with pylode.
  4. Export the ontology in draw.io to svg.
  5. Add the svg diagram of the onology to the html documentation generated with pylode.

Now I if the boxes in the diagram have a href reference to the ressource they represent. A click on it would lead to the pylode part in the documentation. Which would be very neat.

mariapoveda commented 2 years ago

Yes. That is handy (actually used it http://fairreviews.linkeddata.es/def/core/index.html) but that has to be done in draw.io right? As it is draw.io who exports the svg.

GordianDziwis commented 2 years ago

I suppose you added the links manually, if not disregard the rest.

There is a plugin which adds metadata to an svg export: https://www.diagrams.net/doc/faq/plugins, so it should be possible to write an plugin, which adds an href to each element on svg export.

Another possiblilty would be to post-process the svg and add the links there.

mariapoveda commented 1 year ago

Then is this a requirement for a new plugin for driagrams.net? I can't see it as part of Chowlk as chowlk exports RDF.

GordianDziwis commented 1 year ago

Yes, this would be a new plugin for diagrams.net.