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

Ability to annotate property shapes so that they are displayed as datatype properties in the diagram #137

Closed
tfrancart opened this issue Apr 8, 2024 · 12 comments
Assignees

Comments

@tfrancart
Copy link
Contributor

Original proposal at #136
Which annotation to use ? Add something in http://data.sparna.fr/ontologies/volipi/index-en.html ?

@tfrancart
Copy link
Contributor Author

For the moment use a SHACL-Play specific annotation:

eli-ep:P19 
  sh:path eli:is_derivative_of;
  sh:name "is derivative of"@en;
  sh:description "This work is derived from the other work. Example: a motion derived from an oral question."@en;
  sh:nodeKind sh:IRI;
  sh:class eli:Work;
  # extra annotation to control behavior in the graph
  shacl-play:diagramViewer shacl-play:DiagramDatatypeViewer .
.

@tfrancart
Copy link
Contributor Author

Rather implement it using sh:group and property groups :

eli-ep:P19 
  sh:path eli:is_derivative_of;
  sh:name "is derivative of"@en;
  sh:description "This work is derived from the other work. Example: a motion derived from an oral question."@en;
  sh:nodeKind sh:IRI;
  sh:class eli:Work;
  # extra annotation to control section in the graph
  sh:group eli-ep:Group1
.

eli-ep:Group1 a sh:PropertyGroup
  rdfs:label "my group"@en ;
.

``

@tfrancart
Copy link
Contributor Author

  1. Si plusieurs propriétés sont dans le même groupe, il faut les merger, sinon le groupe va apparaitre dupliqué
  2. Si c'est une propriété qui devrait faire une flèche, il ne faut pas que la flèche soit affichée (et idéalement, il faudrait mettre le petit rond vert comme pour les autres propriétés qui sont rentrées dans la boite)
  3. supprimer la police en gras et le code de langue

@tfrancart
Copy link
Contributor Author

Need to document it on the page

@tfrancart tfrancart reopened this Jun 17, 2024
@tfrancart tfrancart assigned tfrancart and unassigned JAs2701 Jun 17, 2024
@cecemel
Copy link
Contributor

cecemel commented Sep 2, 2024

Hi,

I tried to fiddle with it, but I couldn't make it work. Would it be possible to give me an example e.g. on this?

_:test a a sh:NodeShape ;
  sh:targetClass _:Ticket;
  sh:property [
    sh:path _:hasPriority;
    sh:class skos:Concept
  ];
  sh:property [
    sh:path _:hasStatus;
    sh:class skos:Concept
  ].
  sh:closed false .

thanks

@tfrancart
Copy link
Contributor Author

Here is a working example:

@prefix : <http://ex.com> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

:test a sh:NodeShape ;
  sh:targetClass _:Ticket;
  sh:property [
    sh:path :hasPriority;
    sh:class skos:Concept;
   # put this property in a section inside the box
    sh:group :MyGroup ;
  ];
  sh:property [
    sh:path :hasStatus;
    sh:class skos:Concept
  ];
  sh:closed false .

# declare the section with its label
 :MyGroup a sh:PropertyGroup ;
    rdfs:label "My Group"@en .

@cecemel
Copy link
Contributor

cecemel commented Sep 2, 2024

thanks for taking the time to do so!! Is this the expected output. (If so, maybe I didn't understand the scope of this change)
image

I found a discrepancy: online version renders correctly, vs shacl-play-app-0.8.0-onejar.jar

@tfrancart
Copy link
Contributor Author

tfrancart commented Sep 2, 2024 via email

@cecemel
Copy link
Contributor

cecemel commented Sep 2, 2024

I think there was an issue uploading the image in your reply.
But I assume it should something like :
image
this is output from https://shacl-play.sparna.fr/play/draw

@tfrancart
Copy link
Contributor Author

Yes, correct !

@cecemel
Copy link
Contributor

cecemel commented Sep 2, 2024

Well; that's an issue I think. Since using shacl-play-app-0.8.0-onejar.jar I get the wrong diagram, vs when I use the version online it works.
So I think there is a subtle packaging or dependency problem. The version of gaphviz i am using:


dot - graphviz version 2.43.0 (0)
libdir = "/usr/lib/x86_64-linux-gnu/graphviz"
Activated plugin library: libgvplugin_dot_layout.so.6

@tfrancart
Copy link
Contributor Author

This is not released in a downloadable release. This is only deployed in the online version.
You would need to recompile from source to use this feature locally.

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

No branches or pull requests

3 participants