sparna-git / shacl-play

SHACL validation UI, SHACL documentation generator, SHACL generator from RDF.
http://shacl-play.sparna.fr
GNU Lesser General Public License v3.0
24 stars 15 forks source link

0.6.1 release will not generate diagrams without a title #65

Closed agustaf9 closed 1 year ago

agustaf9 commented 1 year ago

I get the error Error java.lang.NullPointerException : Cannot invoke "String.contains(java.lang.CharSequence)" because "uri" is null when trying to generate a diagram.

On my fork I added a check on the getLocalName function in shacl-diagram/src/main/java/fr/sparna/rdf/shacl/diagram/PlantUmlDiagramOutput.java to see if the uri is undefined, and to return an empty string if it is undefined. Ideally the fix would be making sure the uri is defined, but I am not familiar enough with the code to know where that information comes from

agustaf9 commented 1 year ago

I am also not sure how the user would provide a title for the diagram

tfrancart commented 1 year ago

Oups oups oups, sorry about that. I have fixed this, redeployed the online version, and replaced the war and jar file in the release. Thanks for pointing this out.

How to provide a title and description for a diagram is documented at https://shacl-play.sparna.fr/play/draw#custom-nodeShapes (dct:title and dct:description on the diagram resource referenced using the foaf:depiction)

Don't hesitate to drop a line on how you use shacl-play and what is/are your use-case.

I let you close the issue if it is OK for you