Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On "Visualize RDF Shapes (SHACL and ShEx)" #8

Open
tfrancart opened this issue Jul 23, 2020 · 8 comments
Open

On "Visualize RDF Shapes (SHACL and ShEx)" #8

tfrancart opened this issue Jul 23, 2020 · 8 comments

Comments

@tfrancart
Copy link

Hi !

What are your ideas about "Visualize RDF Shapes (SHACL and ShEx)" ? I'm thinking about parsing SHACL in Java using https://github.com/TopQuadrant/shacl and then output PLantUML text. Did you had any specific plans on this ? (I would have been happy to do that using RDF4J but I can't find a SHACL Object modelling in RDF4J).

Cheers

@VladimirAlexiev
Copy link
Owner

If I do this, it'll be in perl.
But the idea is in the freezer :-(

I'm also considering a bastardized syntax to add cardinalities to turtle examples, which will be simpler to write and interpret:

:node1 :link :node2,
  [puml:min 1, puml:max 2]

@tfrancart what do you think?

@tfrancart
Copy link
Author

Actually, since then, I developed this SHACL to PlantUML converter, in Java, based on TopQuadrant SHACL lib, and the result is at https://shacl-play.sparna.fr/play/draw and code at https://github.com/sparna-git/shacl-play/tree/master/shacl-diagram

I don't have a strong opinion on the example you provide, an alternative idea that comes to my mind is

:node1 :link [
  rdf:value :node2;
  puml:min 1 ;
  puml:max 2 ;
]

But this changes the structure of the example graph itself, which might not be convenient

@VladimirAlexiev
Copy link
Owner

@tfrancart nice!

  • where are the datatypes?
  • i don't quite understand this "prop|^invProp"
  • the ELI shapes are very disconnected and even broken? Eg Format.media_type has two conflicting shapes

@VladimirAlexiev
Copy link
Owner

Ok, I see

ShapeEntry
issued : xsd:date [1..1]

So I guess peopl just don't bother to declare the type of their literals?

@VladimirAlexiev
Copy link
Owner

Scalability problems:

  • SHACL for SHACL returns NPE
  • SKOS (OPOCE) returns blank page

@VladimirAlexiev
Copy link
Owner

Suggestion: move cardinality from edge label to arrowhead, this way you shorten the label and use the space better. Eg

ConceptScheme -> "0..*" Concept : hasTopConcept

instead of

ConceptScheme -> Concept : hasTopConcept [0..*]

(Sorry I'm too lazy to post properly in your project but I'm writing on mobile while watching the 1/4 final ;-)

@tfrancart
Copy link
Author

where are the datatypes?

Indicated inside the box

i don't quite understand this "prop|^invProp"

That's a SPARQL property path used as the vaule of sh:path

the ELI shapes are very disconnected and even broken? Eg Format.media_type has two conflicting shapes

Yeah, forget about these Shapes, they are very special : we defined one Shape for each property to be able to check domain / range

So I guess peopl just don't bother to declare the type of their literals?

I don't see what you mean ?

SHACL for SHACL returns NPE

It used to work - I'll see what happens

SKOS (OPOCE) returns blank page

It used to work - I'll see what happens

Try with "OpenArchaeo Shapes", it's the closest to a typical SHACL file we design and use in our projects. The others are all a little fancy.

@VladimirAlexiev
Copy link
Owner

Doc generator should render markdown in Abstract, else:
Screenshot_20210702-223400_Chrome.jpg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants