If people haven’t seen it, our spec GitHub repo contains the diagrams produced 
by transforming the ontology to PlantUML:
https://github.com/spdx/spdx-spec/tree/development/v2.2.1/ontology

-- zvr

From: [email protected] <[email protected]> On Behalf Of David 
Kemp
Sent: Tuesday, 27 July, 2021 21:39
To: SPDX-list <[email protected]>
Subject: [spdx-tech] GraphViz, PlantUML, and IdStrings

We discussed GraphViz and PlantUML today; here is the GraphViz version of the 
SPDX 2.2 information model (level of detail: conceptual).  You can paste it 
into any number of tools, I like https://sketchviz.com/ (not because it has a 
sketchy mode, but because the UI feels friendliest to me.)

As you can see, it does it's own layout. This is convenient and often provides 
valuable insight, but isn't what a true artist like William would put into a 
model diagram 😁.  Artists need layout control, so a format like 
diagrams.net<http://diagrams.net> (the new name for draw.io<http://draw.io>) 
that gives that control is required.

-----------------------

Also look at the content of the GraphViz file.  The IdStrings are simple 
numbers n0-n37, each node ID is accompanied by hints ([label="xyz"]), and the 
hints can be deleted without destroying the graph.

The graph will be laid out the same with or without the labels/hints, and most 
importantly, n3 without a hint is the same node as n3 with a hint.  IdStrings 
should have this same property - hints do not affect equality.

Dave


# title: SPDX v2.2 Information Model
# package: http://spdx.org/spdx-v2.2
# license: CC0-1.0
# namespaces: {'ll': 'http://spdx.org/license-list'}
# exports: ['Document']

digraph G {
  graph [fontname=Times, fontsize=12];
  node [fontname=Arial, fontsize=8, shape=box, style=filled, 
fillcolor=lightskyblue1];
  edge [fontname=Arial, fontsize=7, arrowsize=0.5, labelangle=45.0, 
labeldistance=0.9];
  bgcolor="transparent";

  n0 [label="Document"]
    n0 -> n1 [label="externalDocumentRefs", headlabel="0..*", taillabel="1"]
    n0 -> n2 [label="creationInfo", headlabel="1", taillabel="1"]
    n0 -> n3 [label="packages", headlabel="0..*", taillabel="1"]
    n0 -> n4 [label="files", headlabel="1..*", taillabel="1"]
    n0 -> n5 [label="snippets", headlabel="0..*", taillabel="1"]
    n0 -> n36 [label="hasExtractedLicensingInfos", headlabel="0..*", 
taillabel="1"]
    n0 -> n6 [label="relationships", headlabel="0..*", taillabel="1"]
    n0 -> n7 [label="annotations", headlabel="0..*", taillabel="1"]
  n1 [label="External\nDocument\nRef"]
    n1 -> n26 [label="checksum", headlabel="1", taillabel="1"]
  n2 [label="Creation\nInfo"]
  n3 [label="Package\nInfo"]
    n3 -> n25 [label="packageVerificationCode", headlabel="0..1", taillabel="1"]
    n3 -> n26 [label="checksums", headlabel="0..*", taillabel="1"]
    n3 -> n28 [label="externalRefs", headlabel="0..*", taillabel="1"]
    n3 -> n7 [label="annotations", headlabel="0..*", taillabel="1"]
  n4 [label="File\nInfo"]
    n4 -> n26 [label="checksums", headlabel="0..*", taillabel="1"]
    n4 -> n28 [label="externalRefs", headlabel="0..*", taillabel="1"]
    n4 -> n7 [label="annotations", headlabel="0..*", taillabel="1"]
    n4 -> n35 [label="artifactOf", headlabel="0..*", taillabel="1"]
  n5 [label="Snippet\nInfo"]
    n5 -> n33 [label="ranges", headlabel="1..*", taillabel="1"]
    n5 -> n7 [label="annotations", headlabel="0..*", taillabel="1"]
  n6 [label="Relationship"]
  n7 [label="Annotation"]
  n23 [label="Entity\nAlternate"]
  n25 [label="Package\nVerification\nCode"]
  n26 [label="Checksum"]
  n27 [label="Checksum\nAlternate"]
  n28 [label="External\nRef"]
  n33 [label="Range"]
    n33 -> n34 [label="startPointer", headlabel="1", taillabel="1"]
    n33 -> n34 [label="endPointer", headlabel="1", taillabel="1"]
  n34 [label="Range\nPointer"]
  n35 [label="Artifact"]
  n36 [label="Extra\nLicensing\nInfo"]
  n37 [label="Cross\nRef"]
}

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#4136): https://lists.spdx.org/g/Spdx-tech/message/4136
Mute This Topic: https://lists.spdx.org/mt/84489874/21656
Group Owner: [email protected]
Unsubscribe: https://lists.spdx.org/g/Spdx-tech/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to