Skip to content

Commit

Permalink
Minor label changes, changed output to dot files instead of SVG
Browse files Browse the repository at this point in the history
  • Loading branch information
m6121 committed Feb 18, 2019
1 parent fb960e6 commit f33704b
Show file tree
Hide file tree
Showing 20 changed files with 1,615 additions and 4,627 deletions.
27 changes: 22 additions & 5 deletions PROV-Model Visualisation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"# Create DOT from PROV model\n",
"def prov2dot(prov_doc, dot_filename):\n",
" prov_to_dot(prov_doc).write('%s.dot' % (dot_filename,))\n",
" #with open(, 'w') as f:\n",
" # f.write()\n",
" # f.close()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"# Extract entities from PROV model\n",
"def prov2entities_csv(prov_doc, csv_filename):\n",
Expand All @@ -60,7 +74,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -83,7 +97,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"outputs": [
{
Expand All @@ -97,7 +111,8 @@
"Computing 'model-based/pattern/generation'...OK\n",
"Computing 'model-based/pattern/refinement'...OK\n",
"Computing 'model-based/pattern/composition'...OK\n",
"Computing 'model-based/pattern/parametrisation'...OK\n"
"Computing 'model-based/pattern/parameterisation'...OK\n",
"None\n"
]
}
],
Expand All @@ -111,10 +126,12 @@
" n = file.replace(\".ttl\", \"\")\n",
" print(\"Computing '%s'...\" % (n,), end='')\n",
" pdoc = readProv(n)\n",
" prov2svg(pdoc, n)\n",
" #prov2svg(pdoc, n)\n",
" dot = prov2dot(pdoc, n)\n",
" #prov2entities_csv(pdoc, n)\n",
" #prov2rel_csv(pdoc, n)\n",
" print(\"OK\")"
" print(\"OK\")\n",
"print(dot)"
]
}
],
Expand Down
298 changes: 298 additions & 0 deletions model-based/context_models.dot

Large diffs are not rendered by default.

901 changes: 0 additions & 901 deletions model-based/context_models.svg

This file was deleted.

338 changes: 338 additions & 0 deletions model-based/geometry.dot

Large diffs are not rendered by default.

998 changes: 0 additions & 998 deletions model-based/geometry.svg

This file was deleted.

2 changes: 1 addition & 1 deletion model-based/geometry.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ sw:mm
.
sw:gm
a prov:Entity;
prov:label "Geomagic Studio v12";
prov:label "GEOMAGIC Studio v12";
.

# Data Entities
Expand Down
113 changes: 113 additions & 0 deletions model-based/pattern/composition.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
digraph G {
charset="utf-8";
rankdir=BT;
n1 [URL="http://provenance.elaine.uni-rostock.de/macomposition:a1", color="#0000FF", fillcolor="#9FB1FC", label="ma:composition:a1", shape=box, style=filled];
ann1 [color=gray, fontcolor=black, fontsize=10, label=<<TABLE cellpadding="0" border="0">
<TR>
<TD align="left" href="http://www.w3.org/ns/prov#label">prov:label</TD>
<TD align="left">Modeling Geometry</TD>
</TR>
</TABLE>>, shape=note];
ann1 -> n1 [arrowhead=none, color=gray, style=dashed];
n2 [URL="http://provenance.elaine.uni-rostock.de/moel:left:a3d", color="#808080", fillcolor="#FFFC87", label="mo:el:left:a3d", shape=oval, style=filled];
ann2 [color=gray, fontcolor=black, fontsize=10, label=<<TABLE cellpadding="0" border="0">
<TR>
<TD align="left" href="http://www.w3.org/ns/prov#label">prov:label</TD>
<TD align="left">3D CAD model of Screw with NURBS surfaces (left)</TD>
</TR>
<TR>
<TD align="left" href="http://provenance.elaine.uni-rostock.de/dafileType">da:fileType</TD>
<TD align="left">IGES</TD>
</TR>
</TABLE>>, shape=note];
ann2 -> n2 [arrowhead=none, color=gray, style=dashed];
n3 [URL="http://provenance.elaine.uni-rostock.de/moa3d", color="#808080", fillcolor="#FFFC87", label="mo:a3d", shape=oval, style=filled];
ann3 [color=gray, fontcolor=black, fontsize=10, label=<<TABLE cellpadding="0" border="0">
<TR>
<TD align="left" href="http://www.w3.org/ns/prov#label">prov:label</TD>
<TD align="left">Anatomical 3D CAD model of the mandible with NURBS surfaces</TD>
</TR>
<TR>
<TD align="left" href="http://provenance.elaine.uni-rostock.de/dafileType">da:fileType</TD>
<TD align="left">IGES</TD>
</TR>
</TABLE>>, shape=note];
ann3 -> n3 [arrowhead=none, color=gray, style=dashed];
n4 [URL="http://provenance.elaine.uni-rostock.de/swcs", color="#808080", fillcolor="#FFFC87", label="sw:cs", shape=oval, style=filled];
ann4 [color=gray, fontcolor=black, fontsize=10, label=<<TABLE cellpadding="0" border="0">
<TR>
<TD align="left" href="http://www.w3.org/ns/prov#label">prov:label</TD>
<TD align="left">COMSOL Multiphysics v5.2a</TD>
</TR>
</TABLE>>, shape=note];
ann4 -> n4 [arrowhead=none, color=gray, style=dashed];
n5 [URL="http://provenance.elaine.uni-rostock.de/aghr", fillcolor="#FED37F", label="ag:hr", shape=house, style=filled];
ann5 [color=gray, fontcolor=black, fontsize=10, label=<<TABLE cellpadding="0" border="0">
<TR>
<TD align="left" href="http://www.w3.org/ns/prov#type">prov:type</TD>
<TD align="left" href="http://www.w3.org/ns/prov#Person">prov:Person</TD>
</TR>
<TR>
<TD align="left" href="http://xmlns.com/foaf/spec/#givenName">foaf:givenName</TD>
<TD align="left">Hendrikje Raben</TD>
</TR>
</TABLE>>, shape=note];
ann5 -> n5 [arrowhead=none, color=gray, style=dashed];
n6 [URL="http://provenance.elaine.uni-rostock.de/mogeom", color="#808080", fillcolor="#FFFC87", label="mo:geom", shape=oval, style=filled];
ann6 [color=gray, fontcolor=black, fontsize=10, label=<<TABLE cellpadding="0" border="0">
<TR>
<TD align="left" href="http://www.w3.org/ns/prov#label">prov:label</TD>
<TD align="left">Geometrical 3D Model of composed Components</TD>
</TR>
<TR>
<TD align="left" href="http://provenance.elaine.uni-rostock.de/dafileType">da:fileType</TD>
<TD align="left">mph</TD>
</TR>
<TR>
<TD align="left" href="http://www.w3.org/2000/01/rdf-schema#comment">rdfs:comment</TD>
<TD align="left">This is part of the COMSOL project file</TD>
</TR>
</TABLE>>, shape=note];
ann6 -> n6 [arrowhead=none, color=gray, style=dashed];
n6 -> n1 [color=darkgreen, fontcolor=darkgreen, fontsize="10.0", label=wasGeneratedBy];
b1 [color=gray, label="", shape=point];
n1 -> b1 [arrowhead=none, color="#FED37F", fontsize="10.0", label=wasAssociatedWith];
b1 -> n5 [color="#FED37F", fontsize="10.0"];
ann7 [color=gray, fontcolor=black, fontsize=10, label=<<TABLE cellpadding="0" border="0">
<TR>
<TD align="left" href="http://www.w3.org/ns/prov#role">prov:role</TD>
<TD align="left" href="http://provenance.elaine.uni-rostock.de/agmodeler">ag:modeler</TD>
</TR>
</TABLE>>, shape=note];
ann7 -> b1 [arrowhead=none, color=gray, style=dashed];
b2 [color=gray, label="", shape=point];
n1 -> b2 [arrowhead=none, color=red4, fontcolor=red, fontsize="10.0", label=used];
b2 -> n4 [color=red4, fontcolor=red, fontsize="10.0"];
ann8 [color=gray, fontcolor=black, fontsize=10, label=<<TABLE cellpadding="0" border="0">
<TR>
<TD align="left" href="http://www.w3.org/ns/prov#role">prov:role</TD>
<TD align="left" href="http://provenance.elaine.uni-rostock.de/swsoftwareToCompose">sw:softwareToCompose</TD>
</TR>
</TABLE>>, shape=note];
ann8 -> b2 [arrowhead=none, color=gray, style=dashed];
b3 [color=gray, label="", shape=point];
n1 -> b3 [arrowhead=none, color=red4, fontcolor=red, fontsize="10.0", label=used];
b3 -> n2 [color=red4, fontcolor=red, fontsize="10.0"];
ann9 [color=gray, fontcolor=black, fontsize=10, label=<<TABLE cellpadding="0" border="0">
<TR>
<TD align="left" href="http://www.w3.org/ns/prov#role">prov:role</TD>
<TD align="left" href="http://provenance.elaine.uni-rostock.de/momodelToCompose">mo:modelToCompose</TD>
</TR>
</TABLE>>, shape=note];
ann9 -> b3 [arrowhead=none, color=gray, style=dashed];
b4 [color=gray, label="", shape=point];
n1 -> b4 [arrowhead=none, color=red4, fontcolor=red, fontsize="10.0", label=used];
b4 -> n3 [color=red4, fontcolor=red, fontsize="10.0"];
ann10 [color=gray, fontcolor=black, fontsize=10, label=<<TABLE cellpadding="0" border="0">
<TR>
<TD align="left" href="http://www.w3.org/ns/prov#role">prov:role</TD>
<TD align="left" href="http://provenance.elaine.uni-rostock.de/momodelToCompose">mo:modelToCompose</TD>
</TR>
</TABLE>>, shape=note];
ann10 -> b4 [arrowhead=none, color=gray, style=dashed];
}
Loading

0 comments on commit f33704b

Please sign in to comment.