[Volute] r4068 - trunk/projects/dm/provenance/description

Volute commit messages volutecommits at g-vo.org
Thu May 11 17:24:59 CEST 2017


Author: michele.sanguillon
Date: Thu May 11 17:24:59 2017
New Revision: 4068

Log:
serialization example added

Modified:
   trunk/projects/dm/provenance/description/Makefile
   trunk/projects/dm/provenance/description/ProvenanceDM.pdf
   trunk/projects/dm/provenance/description/provaccess.tex

Modified: trunk/projects/dm/provenance/description/Makefile
==============================================================================
--- trunk/projects/dm/provenance/description/Makefile	Thu May 11 14:54:10 2017	(r4067)
+++ trunk/projects/dm/provenance/description/Makefile	Thu May 11 17:24:59 2017	(r4068)
@@ -15,7 +15,7 @@
 
 # Source files for the TeX document (but the main file must always
 # be called $(DOCNAME).tex
-SOURCES = $(DOCNAME).tex
+SOURCES = $(DOCNAME).tex 
 
 # List of pixel image files to be included in submitted package 
 FIGURES = VOArchitecture-Prov2016.png CTA_DM_high_level.png CTA_prov.png usecase_Pollux_example1.png

Modified: trunk/projects/dm/provenance/description/ProvenanceDM.pdf
==============================================================================
Binary file (source and/or target). No diff available.

Modified: trunk/projects/dm/provenance/description/provaccess.tex
==============================================================================
--- trunk/projects/dm/provenance/description/provaccess.tex	Thu May 11 14:54:10 2017	(r4067)
+++ trunk/projects/dm/provenance/description/provaccess.tex	Thu May 11 17:24:59 2017	(r4068)
@@ -7,109 +7,281 @@
  %\TODO{TAP SCHEMA of the ProvenanceDM datamodel: Maybe Mathieu can provide us with a copy of the TAP schema he designed ?}
 
  \item Direct VOTABLE mapping by using some ad hoc mapping based on transcription of PROV-N format: this is called PROV-VOTABLE. Moreover in the future we could also define a VO-DML \citep{std:VODML} version of the mapping.
-The following is an example of provenance metadata in this PROV-VOTABLE format. Objects become tables, their classes are rendered by a utype. Attributes and relationships become FIELDS or PARAMS. The model attribute names also become VOTABLE utypes.  
+%The following is an example of provenance metadata in this PROV-VOTABLE format. Objects become tables, their classes are rendered by a utype. Attributes and relationships become FIELDS or PARAMS. The model attribute names also become VOTABLE utypes.  
+
+\end{itemize}
+
+This can be done using the voprov \footnote{\url{https://github.com/sanguillon/voprov}} python module.
+The following is an example of a python program which describes the provenance and generates the different formats of serialization.
 \begin{verbatim}
+import sys
+from prov.model import ProvDocument
+from prov.dot import prov_to_dot
+import pdb
+
+try:
+    provdoc = ProvDocument()
+    provdoc.add_namespace('prov', 'http://www.w3.org/ns/prov#')
+    provdoc.add_namespace('voprov', 'http://www.ivoa.net/documents/dm/provdm/voprov/')
+    provdoc.add_namespace('ivo', 'http://www.ivoa.net/documents/rer/ivo/')
+    provdoc.add_namespace('hips', 'http://cds.u-strasbg.fr/data/')
+
+    provdoc.entity('ivo://CDS/P/DSS2color#RGB_NGC6946',\
+        {'voprov:name':'RGB DSS2 image for NGC 6946', \
+         'voprov:annotation':'This is a PNG RGB image built from DSS2 with Aladin for galaxy NGC 6946', \
+         'voprov:doculink':'http://cds.u-strasbg.fr/aladin.gml'})
+
+    provdoc.entity('ivo://CDS/P/DSS2/POSSII#POSSII.J-DSS2.143',\
+        {'voprov:name':'POSSII Blue Survey DSS2 NGC6946', \
+         'voprov:annotation':'This is the DSS2 digitazition of the Blue POSSII Schmidt survey around  NGC 6946', \
+         'voprov:doculink':'http://cds.u-strasbg.fr/aladin.gm'})
+
+    provdoc.entity('ivo://CDS/P/DSS2/POSSII#POSSII.F-DSS2.143',\
+        {'voprov:name':'POSSII Red Survey DSS2 NGC6946', \
+         'voprov:annotation':'This is the DSS2 digitazition of the Red POSSII Schmidt survey around NGC 6946', \
+         'voprov:doculink':'http://cds.u-strasbg.fr/aladin.gml'})
+
+    provdoc.entity('ivo://CDS/P/DSS2/POSSII#POSSII.N-DSS2.143',\
+        {'voprov:name':'POSSII Infra Red Survey DSS2 NGC6946', \
+         'voprov:annotation':'This is the DSS2 digitazition of the Infra red POSSII Schmidt survey around  NGC 6946', \
+         'voprov:doculink':'http://cds.u-strasbg.fr/aladin.gm'})
+
+    provdoc.activity('hips:AlaRGB1', '2017-04-18T17:28:00', '2017-04-19T17:29:00', \
+          {'voprov:name':'Aladin RGB 1',\
+           'voprov:annotation': 'Aladin RGB image generation for NGC 6946',\
+           'voprov:desc_id': 'AlaRGB', \
+           'voprov:desc_name': 'Aladin RGB image generation algorithm', \
+           'voprov:desc_type': 'RGBencoding', \
+           'voprov:desc_doculink':'http://cds.u-strasbg.fr/aladin.gml'})
+
+    provdoc.used('hips:AlaRGB1', 'ivo://CDS/P/DSS2/POSSII#POSSII.J-DSS2.143')
+    provdoc.used('hips:AlaRGB1', 'ivo://CDS/P/DSS2/POSSII#POSSII.F-DSS2.143')
+    provdoc.used('hips:AlaRGB1', 'ivo://CDS/P/DSS2/POSSII#POSSII.J-DSS2.143')
+
+    provdoc.wasGeneratedBy('ivo://CDS/P/DSS2color#RGB_NGC6946', 'hips:AlaRGB1', '')
+
+    f_out = open('ex1.json','w')
+    f_out.write(provdoc.serialize(indent=2))
+    f_out.close()
+    f_out = open('ex1.provn','w')
+    f_out.write(provdoc.get_provn())
+    f_out.close()
+    provdoc.serialize(format='xml', destination='ex1.xml')
+    f_out = open('ex1.votable','w')
+    f_out.write(provdoc.serialize(format='votable',indent=2))
+    f_out.close()
+
+except Exception, e:
+        print("Error while writing the file : %s !" %str(e))
+        sys.exit(1)
 
-<?xml version="1.0" encoding="UTF-8"?>
-<VOTABLE version="1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns="http://www.ivoa.net/xml/VOTable/v1.2"
-  xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.2 http://www.ivoa.net/xml/VOTable/v1.2">
-
-
-<RESOURCE name="RGB">
-
-<TABLE name="activities" utype="prov:Activity" >
-
-     
-     <FIELD name="ident" ucd="meta.id" utype ="prov:Activity.id" datatype="char" arraysize="*"/>
-     <FIELD name="label"  ucd="meta.title" utype="prov:Activity.label"  datatype="char" arraysize="*"/>
-     <FIELD name="start"  ucd="time.start" utype="prov:Activity.startTime" datatype="char" arraysize="*" xtype="ISO8601" />
-     <FIELD name ="stop" ucd="time.end" utype="prov:Activity.endTime"  datatype="char" arraysize="*" xtype="ISO8601"  />
-     <FIELD name="annotation" ucd="meta.description" utype="voprov:Activity.annotation" datatype="char" arraysize="*"  />
-     <FIELD name="description" utype="voprov:Activity.ActivityDescRef" datatype="char" arraysize="*"  />  
-
-<DATA>
-<TABLEDATA>
-<TR><TD>AlaRGB1</TD><TD>Aladin RGB 1</TD><TD>2017-04-18T17:28:00</TD><TD>2017-04-19T17:29:00</TD><TD>Aladin RGB image generation for NGC 6946 </TD><TD>AlaRGB</TD></TR>
-</TABLEDATA>
-</DATA>      
-</TABLE>
-
-<TABLE name="activity descriptions" utype="prov:ActivityDesc" >
-
-     
-     <FIELD name="ident" ucd="meta.id" utype="prov:ActivityDesc.id" datatype="char" arraysize="*"/>
-     <FIELD name="label" ucd="meta.title" utype="prov:ActivityDesc.label" datatype="char" arraysize="*"/>
-     <FIELD name="type" ucd="meta.code.class" utype="prov:ActivityDesc.type" datatype="char" arraysize="*" />
-     <FIELD name ="subtype" ucd="meta.code.class" utype="voprov:ActivityDesc.subtype"  datatype="char" arraysize="*"/>
-     <FIELD name="description_link" ucd="meta.ref.url" utype="voprov:ActivityDesc.doculink" datatype="char" arraysize="*"  />  
-<DATA>
-<TABLEDATA>
-<TR><TD>AlaRGB</TD><TD>Aladin RGB image generation algorithm</TD><TD>RGBencoding</TD><TD></TD><TD>http://cds.u-strasbg.fr/aladin.gml</TD></TR>
-</TABLEDATA>
-</DATA>      
-</TABLE>
-
-
-<TABLE name="entities" utype="prov:Entity" >
-       <FIELD name="ident" ucd="meta.id" utype="prov:Entitity.id" datatype = "char" arraysize="*" />
-      <FIELD name="label" ucd="meta.title" utype="prov:Entity.label" datatype="char" arraysize="*"  />
-
-      <FIELD name="type" ucd="meta.code.class" utype="prov:Entity.type" datatype="char" arraysize="*" />
-
-       <FIELD name="annotation" ucd="meta.description" utype="voprov:Entity.annotation" datatype="char" arraysize="*" />
-
-       <FIELD name="acref" ucd="meta.ref.url" utype="voprov:Entity.access_reference" datatype="char" arraysize="*" />
-       <FIELD name="description link" ucd="meta.ref.url"  utype="voprov:Entity.doculink" datatype="char"   />
-
-       <FIELD name="dataproduct type" ucd="meta.code.class"  utype="voprov:Entity.data_productype" datatype="char" arraysize="*"  />
-       <FIELD name="level" ucd="meta.code" utype="voprov:Entity.level" datatype="int"   />  
- 
-<DATA>
-<TABLEDATA>
-<TR><TD>ivo://CDS/P/DSS2color#RGB_NGC6946</TD><TD>RGB DSS2 image for NGC 6946</TD><TD></TD><TD>This is a PNG RGB image built from DSS2 with Aladin for galaxy NGC 6946</TD><TD>file://home/bonnarel/Aladin/RGB/RGB_NGC6946.png</TD><TD>http://cds.u-strasbg.fr/aladin.gml</TD><TD>image</TD><TD>3</TD></TR>
-<TR><TD>ivo://CDS/P/DSS2/POSSII#POSSII.J-DSS2.143</TD><TD>POSSII Blue Survey DSS2 NGC6946</TD><TD></TD><TD>This is the DSS2 digitazition of the Blue POSSII Schmidt survey around NGC 6946</TD><TD>file://home/bonnarel/Aladin/RGB/POSSII.J-DSS2.143.fits</TD><TD>http://cds.u-strasbg.fr/aladin.gml</TD><TD>image</TD><TD>2</TD></TR>
-<TR><TD>ivo://CDS/P/DSS2/POSSII#POSSII.F-DSS2.143</TD><TD>POSSII Red Survey DSS2 NGC6946</TD><TD></TD><TD>This is the DSS2 digitazition of the Red POSSII Schmidt survey around NGC 6946</TD><TD>file://home/bonnarel/Aladin/RGB/POSSII.F-DSS2.143.fits</TD><TD>http://cds.u-strasbg.fr/aladin.gml</TD><TD>image</TD><TD>2</TD></TR>
-<TR><TD>ivo://CDS/P/DSS2/POSSII#POSSII.N-DSS2.143</TD><TD>POSSII Infra Red Survey DSS2 NGC6946</TD><TD></TD><TD>This is the DSS2 digitazition of the Infra red POSSII Schmidt survey around  NGC 6946</TD><TD>file://home/bonnarel/Aladin/RGB/POSSII.N-DSS2.143.fits</TD><TD>http://cds.u-strasbg.fr/aladin.gml</TD><TD>image</TD><TD>2</TD></TR>
-</TABLEDATA>
-</DATA>
-</TABLE>
-
-<TABLE name="usedRelationship" utype="voprov:Used" >
-      <FIELD name="activity" ucd="meta.id" utype="prov:Activity.id" datatype="char" arraysize="*" />
-      <FIELD name="entity" ucd="meta.id" utype="prov:Entity.id" datatype="char" arraysize="*" />
-      <FIELD name="role" datatype="char" utype="voprov:Used.role" arraysize="*" />
-<DATA>
-<TABLEDATA>
-<TR><TD>AlaRGB1</TD><TD>ivo://CDS/P/DSS2/POSSII#POSSII.J-DSS2.143</TD><TD>voprov:input</TD></TR>
-<TR><TD>AlaRGB1</TD><TD>ivo://CDS/P/DSS2/POSSII#POSSII.F-DSS2.143</TD><TD>voprov:input</TD></TR>
-<TR><TD>AlaRGB1</TD><TD>ivo://CDS/P/DSS2/POSSII#POSSII.N-DSS2.143</TD><TD>voprov:input</TD></TR>
-</TABLEDATA>
-</DATA>
-</TABLE>
-
-<TABLE name="WasGeneratedByRelationship" utype="voprov:WasGeneratedBy" >
-      <FIELD name="entity" ucd="meta.id" utype="prov:Entity.id" datatype="char" arraysize="*" />
-      <FIELD name="activity" ucd="meta.id" utype="prov:Activity.id"  datatype="char" arraysize="*" />
-      <FIELD name="role" datatype="char" utype="voprov:WasGeneratedBy.role" arraysize="*" />
-<DATA>
-<TABLEDATA>
-<TR><TD>ivo://CDS/P/DSS2color#RGB_NGC6946</TD><TD>AlaRGB1</TD><TD></TD></TR>
-</TABLEDATA>
-</DATA>
-</TABLE>
+\end{verbatim}
+
+This is the PROV-N serialization:
+
+\begin{verbatim}
+
+document
+  prefix ivo <http://www.ivoa.net/documents/rer/ivo/>
+  prefix hips <http://cds.u-strasbg.fr/data/>
+  prefix voprov <http://www.ivoa.net/documents/dm/provdm/voprov/>
+
+  entity(ivo://CDS/P/DSS2color#RGB_NGC6946, [voprov:annotation="This is a PNG RGB image built from DSS2 with Aladin for galaxy NGC 6946", voprov:doculink="http://cds.u-strasbg.fr/aladin.gml", voprov:name="RGB DSS2 image for NGC 6946"])
+  entity(ivo://CDS/P/DSS2/POSSII#POSSII.J-DSS2.143, [voprov:annotation="This is the DSS2 digitazition of the Blue POSSII Schmidt survey around  NGC 6946", voprov:doculink="http://cds.u-strasbg.fr/aladin.gm", voprov:name="POSSII Blue Survey DSS2 NGC6946"])
+  entity(ivo://CDS/P/DSS2/POSSII#POSSII.F-DSS2.143, [voprov:annotation="This is the DSS2 digitazition of the Red POSSII Schmidt survey around NGC 6946", voprov:doculink="http://cds.u-strasbg.fr/aladin.gml", voprov:name="POSSII Red Survey DSS2 NGC6946"])
+  entity(ivo://CDS/P/DSS2/POSSII#POSSII.N-DSS2.143, [voprov:annotation="This is the DSS2 digitazition of the Infra red POSSII Schmidt survey around  NGC 6946", voprov:doculink="http://cds.u-strasbg.fr/aladin.gm", voprov:name="POSSII Infra Red Survey DSS2 NGC6946"])
+  activity(hips:AlaRGB1, 2017-04-18T17:28:00, 2017-04-19T17:29:00, [voprov:desc_id="AlaRGB", voprov:desc_type="RGBencoding", voprov:annotation="Aladin RGB image generation for NGC 6946", voprov:desc_name="Aladin RGB image generation algorithm", voprov:name="Aladin RGB 1", voprov:desc_doculink="http://cds.u-strasbg.fr/aladin.gml"])
+  used(hips:AlaRGB1, ivo://CDS/P/DSS2/POSSII#POSSII.J-DSS2.143, -)
+  used(hips:AlaRGB1, ivo://CDS/P/DSS2/POSSII#POSSII.F-DSS2.143, -)
+  used(hips:AlaRGB1, ivo://CDS/P/DSS2/POSSII#POSSII.N-DSS2.143, -)
+  wasGeneratedBy(ivo://CDS/P/DSS2color#RGB_NGC6946, hips:AlaRGB1, 2017-05-05T00:00:00)
+endDocument
+
+\end{verbatim}
+
+This is the json serialization:
+
+\begin{verbatim}
 
+{
+  "prefix": {
+    "ivo": "http://www.ivoa.net/documents/rer/ivo/",
+    "voprov": "http://www.ivoa.net/documents/dm/provdm/voprov/",
+    "hips": "http://cds.u-strasbg.fr/data/"
+  },
+  "activity": {
+    "hips:AlaRGB1": {
+      "voprov:desc_doculink": "http://cds.u-strasbg.fr/aladin.gml",
+      "voprov:desc_id": "AlaRGB",
+      "prov:startTime": "2017-04-18T17:28:00",
+      "voprov:annotation": "Aladin RGB image generation for NGC 6946",
+      "voprov:desc_type": "RGBencoding",
+      "voprov:desc_name": "Aladin RGB image generation algorithm",
+      "prov:endTime": "2017-04-19T17:29:00",
+      "voprov:name": "Aladin RGB 1"
+    }
+  },
+  "wasGeneratedBy": {
+    "_:id4": {
+      "prov:time": "2017-05-05T00:00:00",
+      "prov:entity": "ivo://CDS/P/DSS2color#RGB_NGC6946",
+      "prov:activity": "hips:AlaRGB1"
+    }
+  },
+  "used": {
+    "_:id1": {
+      "prov:entity": "ivo://CDS/P/DSS2/POSSII#POSSII.J-DSS2.143",
+      "prov:activity": "hips:AlaRGB1"
+    },
+    "_:id3": {
+      "prov:entity": "ivo://CDS/P/DSS2/POSSII#POSSII.N-DSS2.143",
+      "prov:activity": "hips:AlaRGB1"
+    },
+    "_:id2": {
+      "prov:entity": "ivo://CDS/P/DSS2/POSSII#POSSII.F-DSS2.143",
+      "prov:activity": "hips:AlaRGB1"
+    }
+  },
+  "entity": {
+    "ivo://CDS/P/DSS2/POSSII#POSSII.J-DSS2.143": {
+      "voprov:name": "POSSII Blue Survey DSS2 NGC6946",
+      "voprov:annotation": "This is the DSS2 digitazition of the Blue POSSII Schmidt survey around  NGC 6946",
+      "voprov:doculink": "http://cds.u-strasbg.fr/aladin.gm"
+    },
+    "ivo://CDS/P/DSS2/POSSII#POSSII.F-DSS2.143": {
+      "voprov:name": "POSSII Red Survey DSS2 NGC6946",
+      "voprov:annotation": "This is the DSS2 digitazition of the Red POSSII Schmidt survey around NGC 6946",
+      "voprov:doculink": "http://cds.u-strasbg.fr/aladin.gml"
+    },
+    "ivo://CDS/P/DSS2/POSSII#POSSII.N-DSS2.143": {
+      "voprov:name": "POSSII Infra Red Survey DSS2 NGC6946",
+      "voprov:annotation": "This is the DSS2 digitazition of the Infra red POSSII Schmidt survey around  NGC 6946",
+      "voprov:doculink": "http://cds.u-strasbg.fr/aladin.gm"
+    },
+    "ivo://CDS/P/DSS2color#RGB_NGC6946": {
+      "voprov:name": "RGB DSS2 image for NGC 6946",
+      "voprov:annotation": "This is a PNG RGB image built from DSS2 with Aladin for galaxy NGC 6946",
+      "voprov:doculink": "http://cds.u-strasbg.fr/aladin.gml"
+    }
+  }
+}
 
-</RESOURCE>
+\end{verbatim}
+
+This is the VOTABLE serialization:
+
+\begin{verbatim}
+
+<?xml version="1.0" encoding="UTF-8"?>
+<VOTABLE version="1.2" xmlns="http://www.ivoa.net/xml/VOTable/v1.2" xmlns:hips="http://cds.u-strasbg.fr/data/" xmlns:ivo="http://www.ivoa.net/documents/rer/ivo/" xmlns:voprov="http://www.ivoa.net/documents/dm/provdm/voprov/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.2 http://www.ivoa.net/xml/VOTable/VOTable-1.2.xsd">
+  <RESOURCE type="provenance">
+    <DESCRIPTION>Provenance VOTable</DESCRIPTION>
+    <TABLE name="Usage" utype="voprov:used">
+      <FIELD arraysize="*" datatype="char" name="activity" ucd="meta.id" utype="voprov:Usage.activity"/>
+      <FIELD arraysize="*" datatype="char" name="entity" ucd="meta.id" utype="voprov:Usage.entity"/>
+      <DATA>
+        <TABLEDATA>
+          <TR>
+            <TD>hips:AlaRGB1</TD>
+            <TD>ivo://CDS/P/DSS2/POSSII#POSSII.N-DSS2.143</TD>
+          </TR>
+        </TABLEDATA>
+      </DATA>
+    </TABLE>
+    <TABLE name="Generation" utype="voprov:wasGeneratedBy">
+      <FIELD arraysize="*" datatype="char" name="entity" ucd="meta.id" utype="voprov:Generation.entity"/>
+      <FIELD arraysize="*" datatype="char" name="activity" ucd="meta.id" utype="voprov:Generation.activity"/>
+      <DATA>
+        <TABLEDATA>
+          <TR>
+            <TD>ivo://CDS/P/DSS2color#RGB_NGC6946</TD>
+            <TD>hips:AlaRGB1</TD>
+          </TR>
+        </TABLEDATA>
+      </DATA>
+    </TABLE>
+    <TABLE name="Activity" utype="voprov:Activity">
+      <FIELD arraysize="*" datatype="char" name="id" ucd="meta.id" utype="voprov:Activity.id"/>
+      <FIELD arraysize="*" datatype="char" name="name" ucd="meta.title" utype="voprov:Activity.name"/>
+      <FIELD arraysize="*" datatype="char" name="start" ucd="" utype="voprov:Activity.startTime"/>
+      <FIELD arraysize="*" datatype="char" name="stop" ucd="" utype="voprov:Activity.endTime"/>
+      <FIELD arraysize="*" datatype="char" name="annotation" ucd="meta.description" utype="voprov:Activity.annotation"/>
+      <FIELD arraysize="*" datatype="char" name="desc_id" ucd="" utype="voprov:ActivityDescription.id"/>
+      <FIELD arraysize="*" datatype="char" name="desc_name" ucd="" utype="voprov:ActivityDescription.name"/>
+      <FIELD arraysize="*" datatype="char" name="desc_type" ucd="meta.code.class" utype="voprov:ActivityDescription.type"/>
+      <FIELD arraysize="*" datatype="char" name="desc_doculink" ucd="meta.ref.url" utype="voprov:ActivityDescription.doculink"/>
+      <DATA>
+        <TABLEDATA>
+          <TR>
+            <TD>hips:AlaRGB1</TD>
+            <TD>Aladin RGB 1</TD>
+            <TD>2017-04-18 17:28:00</TD>
+            <TD>2017-04-19 17:29:00</TD>
+            <TD>Aladin RGB image generation for NGC 6946</TD>
+            <TD>AlaRGB</TD>
+            <TD>Aladin RGB image generation algorithm</TD>
+            <TD>RGBencoding</TD>
+            <TD>http://cds.u-strasbg.fr/aladin.gml</TD>
+          </TR>
+        </TABLEDATA>
+      </DATA>
+    </TABLE>
+    <TABLE name="Entity" utype="voprov:Entity">
+      <FIELD arraysize="*" datatype="char" name="id" ucd="meta.id" utype="voprov:Entity.id"/>
+      <FIELD arraysize="*" datatype="char" name="name" ucd="meta.title" utype="voprov:Entity.name"/>
+      <FIELD arraysize="*" datatype="char" name="annotation" ucd="meta.description" utype="voprov:Entity.annotation"/>
+      <DATA>
+        <TABLEDATA>
+          <TR>
+            <TD>ivo://CDS/P/DSS2/POSSII#POSSII.J-DSS2.143</TD>
+            <TD>POSSII Blue Survey DSS2 NGC6946</TD>
+            <TD>This is the DSS2 digitazition of the Blue POSSII Schmidt survey around  NGC 6946</TD>
+          </TR>
+          <TR>
+            <TD>ivo://CDS/P/DSS2/POSSII#POSSII.F-DSS2.143</TD>
+            <TD>POSSII Red Survey DSS2 NGC6946</TD>
+            <TD>This is the DSS2 digitazition of the Red POSSII Schmidt survey around NGC 6946</TD>
+          </TR>
+          <TR>
+            <TD>ivo://CDS/P/DSS2/POSSII#POSSII.N-DSS2.143</TD>
+            <TD>POSSII Infra Red Survey DSS2 NGC6946</TD>
+            <TD>This is the DSS2 digitazition of the Infra red POSSII Schmidt survey around  NGC 6946</TD>
+          </TR>
+          <TR>
+            <TD>ivo://CDS/P/DSS2color#RGB_NGC6946</TD>
+            <TD>RGB DSS2 image for NGC 6946</TD>
+            <TD>This is a PNG RGB image built from DSS2 with Aladin for galaxy NGC 6946</TD>
+          </TR>
+        </TABLEDATA>
+      </DATA>
+    </TABLE>
+    <INFO name="QUERY_STATUS" value="OK"/>
+  </RESOURCE>
 </VOTABLE>
 
 \end{verbatim}
   
-  
-\end{itemize}
-
 Such serializations can be retrieved through Access protocols (see \ref{AccessPro} ) or directly integrated in datasets headers or "associated metadata" in order to provide provenance metadata for these datasets. 
 
+\subsection{Graphical formats}
+\label{Graphics}
+The voprov python module can also provide provenance information in graphical formats: PNG, SVG and PDF.
+In the above example, you have to add the following instructions in your python program:
+
+\begin{verbatim}
+    dot = prov_to_dot(provdoc, use_labels=True)
+    dot.write_png('ex1.png')
+    dot.write_svg('ex1.svg')
+    dot.write_pdf('ex1.pdf')
+\end{verbatim}
+
+\begin{figure}
+\centering
+\includegraphics[width=0.9\textwidth]{access_ex1.png}
+\caption{Example: png format@}
+\label{fig:example}
+\end{figure}
+
 
 \subsection{Access protocols}
 \label{AccessPro}


More information about the Volutecommits mailing list