provconvert

Luc Moreau edited this page Jul 23, 2015 · 4 revisions

An executable to convert between PROV representations.

#USAGE

usage: provconvert [-index] [-version] [-help] [-layout string] [-compare
       file] [-generator string] [-outcompare file] [-outformat string]
       [-bindings file] [-infile file] [-merge file] [-bindformat string] [-title
       string] [-verbose] [-genorder] [-informat string] [-debug] [-formats]
       [-flatten] [-outfile file] [-namespaces file]
 -flatten               flatten all bundles in a single document (to used
                        with -index option or -merge option)
 -bindformat <string>   specify the format of the bindings
 -bindings <file>       use given file as bindings for template expansion
                        (template is provided as infile)
 -compare <file>        compare with given file
 -debug                 print debugging information
 -formats               list supported formats
 -generator <string>    graph generator N:n:first:seed:e1
 -genorder              In template expansion, generate order attribute.
                        By default does not.
 -help                  print this message
 -index                 index all elements and edges of a document,
                        merging them where appropriate
 -infile <file>         use given file as input
 -informat <string>     specify the format of the input
 -layout <string>       dot layout: circo, dot (default), fdp, neato,
                        osage, sfdp, twopi
 -merge <file>          merge all documents (listed in file argument) into
                        a single document
 -namespaces <file>     use given file as declaration of prefix namespaces
 -outcompare <file>     output file for log of comparison
 -outfile <file>        use given file as output
 -outformat <string>    specify the format of the output
 -title <string>        document title
 -verbose               be verbose
 -version               print the version information and exit



#RECOGNIZED FILE EXTENSIONS

 * prov-n notation:   .provn
 * prov-o ttl:        .ttl
 * prov-xml:          .provx or .xml
 * pdf:               .pdf
 * svg:               .svg


#EXAMPLE

To convert a file to pdf:

provconvert -infile pc1-full.xml -outfile pc1-full.pdf



To convert a ttl file to provn:

provconvert -infile pc1-full.ttl -outfile pc1-full.provn


#NOTES

* This is purely experimental, and relying on XML schemas, OWL ontologies, and ASN grammars that are still evolving.

* The conversions do not support all the PROV terms yet

* There are a number of assumptions underpinning the ASN parser and converter:
   - Entities, agents, activities always have to be declared
     In other words, if one writes 
       wasGeneratedBy(e2,a1)
     there must be
       entity(e2)
       activity(a1)

   - Declarations should occur before use (due to a 1 pass conversion)