Open Provenance Model Tutorial Session 8: OPM Toolbox

Slides:



Advertisements
Similar presentations
© 2008 Oracle Corporation – Proprietary and Confidential.
Advertisements

1 Dynamic Proxies Explained Simply. 2 Dynamic Proxies License Copyright © 2008 Ciaran McHale. Permission is hereby granted, free of charge, to any person.
Focus on Your Content, Not on Ingesting Your Content Terry Brady Applications Programmer Analyst Georgetown University Library
Brief Introduction to Provenance "As data becomes plentiful, verifiable truth becomes scarce
26/10/2008 SWESE'08 1 Enhanced Semantic Access to Software Artefacts Danica Damljanović and Kalina Bontcheva.
Q UERY L ANGUAGE C ONSTRUCTS FOR P ROVENANCE Murali Mani, Mohamad Alawa, Arunlal Kalyanasundaram University of Michigan, Flint Presented at IDEAS 2011.
Open Provenance Model Tutorial Session 2: OPM Overview and Semantics Luc Moreau University of Southampton.
Open Provenance Model Tutorial Session 7: Open Provenance Model Vocabulary.
Open Provenance Model Tutorial Session 3: OPM Serializations Luc Moreau University of Southampton.
UTPB: A Benchmark for Scientific Workflow Provenance Storage and Querying Systems Artem Chebotko Joint work with E. De Hoyos, C. Gomez, A. Kashlev, X.
RDF Tutorial.
CA ERwin r8 installing the application things you should know before installing your CA ERwin r8 Data modeling application.
IMPORTANT READ CAREFULLY BEFORE USING THIS PRODUCT LICENSE AGREEMENT AND LIMITED WARRANTY BY INSTALLING OR USING THE SOFTWARE, FILES OR OTHER ELECTRONIC.
 Copyright 2004 Digital Enterprise Research Institute. All rights reserved. SPARQL Query Language for RDF presented by Cristina Feier.
Open Source Software – Lessons Learned
What legal inferences in OPM OPM Workshop Luc Moreau.
© 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Open Source Software A Commercial.
Jul The New Geant4 License J. Perl The New Geant4 License Makes clear the user’s wide- ranging freedom to use, extend or redistribute Geant4, even.
Open Provenance Model Tutorial Session 5: OPM Emerging Profiles.
Content Management Systems …mostly Umbraco ALL ABOUT.
FPGA and ASIC Technology Comparison - 1 © 2009 Xilinx, Inc. All Rights Reserved How do I Get Started with PlanAhead?
® IBM Software Group © 2012 IBM Corporation OPTIM Data Studio – Jon Sayles, IBM/Rational November, 2012.
1 Multi-threaded Performance Pitfalls Ciaran McHale.
Adding Genes This presentation gives a quick overview on how to add Genes to Osprey.
Internet of Things with Intel Edison Compiling and running Pierre Collet Intel Software.
X3D Graphics for Web Authors X3D-Edit Update SIGGRAPH 2008 Don Brutzman Naval Postgraduate School Monterey California USA.
Blue Diamond Scott Auge Amduus Information Works, Inc.
EES Staff v10.0 Copyright © The Center for Educational Effectiveness, All Rights Reserved. EDUCATIONAL EFFECTIVENESS SURVEY TM Staff Survey 3-Way.
April 30, 2007 openSUSE.org Build Service a short introduction Moiz Kohari VP Engineering.
Digital Intuition Cluster, Smart Geometry 2013, Stylianos Dritsas, Mirco Becker, David Kosdruy, Juan Subercaseaux Setup Instructions Overview 1. License.
Andrew McNab - License issues - 10 Apr 2002 License issues for EU DataGrid (on behalf of Anders Wannanen) Andrew McNab, University of Manchester
NRCCL (University of Oslo, Faculty of Law) Copyleft and Open Source Jon Bing Notrwegian Research Center for Computers and Law Master Lecture 13 October.
IBIS-AMI and Direction Decisions
Designing the Architecture for Grid File System (GFS) Arun swaran Jagatheesan San Diego Supercomputer Center Global Grid Forum 12 Brussels, Belgium.
Resource Management in OGSA Authored by the CMM-WG.
International Telecommunication Union New Delhi, India, December 2011 ITU Workshop on Standards and Intellectual Property Rights (IPR) Issues Philip.
Pegasus Update February 2001 February Karl Schopmeyer.
Unix Shell Basics Edited from Greg Wilson's "Software Carpentry"
National Alliance for Medical Image Computing Licensing in NAMIC 3 requirements from NCBC RFA (paraphrased)
Oracle Fusion Applications 11gR1 ( ) Functional Overview (L2) Manage Inbound Logistics (L3) Manage Receipts.
Oracle Fusion Applications 11gR1 ( ) Functional Overview (L2) Manage Outbound Logistics (L3) Pick Loads.
Oracle Fusion Applications 11gR1 ( ) Functional Overview (L2) Manage Inbound Logistics (L3) Put Away Loads.
Oracle Fusion Applications 11gR1 ( ) Functional Overview (L2) Manage Inbound Logistics (L3) Manage Supplier Returns.
Click to add text © 2012 IBM Corporation 1 InfoSphere Streams Streams Console Applications InfoSphere Streams Version 3.0 Warren Acker InfoSphere Streams.
Oracle Fusion Applications 11gR1 ( ) Functional Overview (L2) Manage Inbound Logistics (L3) Manage and Disposition Inventory Returns.
Oracle Fusion Applications 11gR1 ( ) Functional Overview (L2) Manage Inbound Logistics (L3) Inspect Material.
Copyright © 2008, Oracle. All rights reserved. Oracle Online Training Materials – Usage Agreement Use of this Site (“Site”) or Materials constitutes agreement.
-1- Oracle E-Business Suite R12.1 Accounts Receivables Essentials Partner Boot Camp Training Courseware.
Digital Intuition Cluster, Smart Geometry 2013, Stylianos Dritsas, Mirco Becker, David Kosdruy, Juan Subercaseaux Search Basics – Templates Tutorial Overview.
Oracle E-Business Suite R12.1 Accounts Payables Partner Boot Camp Training Courseware Part VIII – Transaction Taxes in Payables.
Nomenclature for the OGSA Platform document Fred Maciel.
1 of 26 For Oracle employees and authorized partners only. Do not distribute to third parties. © 2009 Oracle Corporation – Proprietary and Confidential.
Grid File System Working Group SAGA and GFS-WG Grid File System Working Group (GFS-WG) Global Grid Forum (GGF)
Oracle E-Business Suite R12.1 Accounts Receivables Essentials Partner Boot Camp Training Courseware.
1 Example Uses of Java Reflection Explained Simply.
-1- For Oracle employees and authorized partners only. Do not distribute to third parties. © 2009 Oracle Corporation – Proprietary and Confidential Oracle.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Oracle Proprietary and Confidential. 1.
Open Source Software Practices Quiz #8 October
Oracle Customer Hub (UCM) 8.2 – List Import Oracle MDM Product Management.
-1- For Oracle employees and authorized partners only. Do not distribute to third parties. © 2009 Oracle Corporation – Proprietary and Confidential Oracle.
Jester – The JUnit Test Tester
Models for Resources and Management
Resource Management in OGSA
Open Source Software: Top 10 Myths that Every In-House, Government, & Private Practice Lawyer Should Know 2017 NAPABA Convention Washington, D.C.
Mini Robot Chassis Top View
Automation in an XML Authoring Environment
© Healthcare Inspirations. All rights reserved
Task 55 Scope – TOSCA Profile
Emotional Intelligence: The Core of Family Offices
Presentation transcript:

Open Provenance Model Tutorial Session 8: OPM Toolbox Luc Moreau L.Moreau@ecs.soton.ac.uk University of Southampton

Session 8: Aims In this session, you will learn about: How to install the OPM Toolbox How to write a Java program that generates an OPM graph How to serialize an OPM graph to XML or RDF How to convert and pretty print OPM graphs from the command line How to contribute to the OPM toolbox development

Session 8: Contents Installation Command line commands Java programming Open source development

OPM Toolbox

OPM Toolbox A set of utilities to manipulate OPM graphs in Java Binary distribution: toolbox-1.1.X-release.zip Available from http://openprovenance.org/java/maven-releases/org/openprovenance/toolbox/ Unzip it!

Binary Release Contents -rw-r--r--@ 1 lavm staff 1083 Sep 15 08:26 README-licenses.txt -rw-r--r--@ 1 lavm staff 944 Sep 15 08:26 README-opm2dot.txt -rw-r--r--@ 1 lavm staff 1070 Sep 15 08:26 README-opmconvert.txt -rw-r--r--@ 1 lavm staff 640 Sep 15 08:26 README-opmrdf2xml.txt -rw-r--r--@ 1 lavm staff 453 Sep 15 08:26 README-opmxml-validate.txt -rw-r--r--@ 1 lavm staff 632 Sep 15 08:26 README-opmxml2rdf.txt drwxr-xr-x 16 lavm staff 544 Sep 15 08:26 bin drwxr-xr-x 9 lavm staff 306 Sep 15 08:26 examples -rw-r--r--@ 1 lavm staff 1095 Sep 15 08:17 license.txt drwxr-xr-x 22 lavm staff 748 Sep 15 08:26 repo

License Copyright (@) 2008, 2009, 2010 University of Southampton Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Command Line executables

opm2dot opmFile.xml out.dot out.pdf [configuration.xml] Converting to pdf Graphviz must be installed, and dot executable in PATH Usage: opm2dot opmFile.xml out.dot out.pdf [configuration.xml] Example: cd opmToolbox cat examples/bad-cake.xml bin/opm2dot examples/bad-cake.xml cake.dot cake.pdf

Converting to RDF Usage: Example: opmconvert -xml2rdf fileIn fileOut NS [yes] opmconvert -xml2n3 fileIn fileOut NS [yes] opmconvert -rdf2xml fileIn fileOut NS [gid] Example: cd opmToolbox cat examples/bad-cake.xml bin/opmconvert –xml2n3 examples/bad-cake.xml cake.n3 http://ex.com/ bin/opmconvert –xml2rdf examples/bad-cake.xml cake.rdf http://ex.com/ bin/opmconvert –rdf2xml examples/bad-cake.rdf foo.xml http://example.com/cake1/ gr_50

Writing a Java Program that creates an OPM GRAPH

A simple maven project opmexample2.tar.gz from the tutorial distribution tar xvf opmexample2.tar.gz cd opmexample2 mvn clean install

Resulting graph in target/

Maven Repository <repositories> <repository> <id>opm</id> <name>OPM releases Repository</name> <url>http://openprovenance.org/java/maven-releases/</url> </repository> <id>opm-snaphsot</id> <name>OPM snapshot Repository</name> <url>http://openprovenance.org/java/maven-snapshots/</url> </repositories>

Programming with the toolbox Java model derived from XML Schema (JAXB) Key class (and subclasses): OPMFactory Contains factory methods for all OPM objects Graph generator parameterized by factory public OPMGraph getGraph(OPMFactory oFactory) { OPMGraph graph = ...; return graph; } Full example in src/main/java/uk/ac/soton/ecs/opmdemo/MyGraph.java

Artifact/Process creation Artifact a4=oFactory.newArtifact("a4", orange, "6"); Process p5=oFactory.newProcess("p5", "http://process.org/cons"); Arguments are: node id, list of accounts, label for pretty-printing

Edge creation Used u1=oFactory.newUsed(p1, oFactory.newRole("in"), a1, green); WasGeneratedBy wg1=oFactory.newWasGeneratedBy(a2, oFactory.newRole("out"), p1, WasDerivedFrom wdf1=oFactory.newWasDerivedFrom(a6, Arguments refer to previously created processes or artifacts

Graph creation OPMGraph graph =oFactory.newOPMGraph(green_orange, new Overlaps[] {}, new Process[] {p1,p2,p3,p4,p5}, new Artifact[] {a1,a2,a3,a4,a5,a6}, new Agent[] {}, new Object[] {u1,u2,u3,u4,u5,u6, wg1,wg2,wg3,wg4,wg5, wdf1,wdf2, wdf3}, new Annotation[] {} ); Arguments refer to previously created nodes, edges, and accounts

Annotation creation EmbeddedAnnotation ann =oFactory.newEmbeddedAnnotation ("an15", "http://property.org/hasQuality", "average", green); oFactory.addAnnotation(a1,ann15);

Serialization Get thread-safe serializer Invoke serialization method with file, graph, and flag to pretty print OPMGraph graph=new MyGraph().getGraph(oFactory); OPMSerialiser serial =OPMSerialiser.getThreadOPMSerialiser(); serial.serialiseOPMGraph(new File("target/example.xml"), graph, true); Full code in src/test/java/uk/ac/soton/ecs/opmdemo/ExampleTest.java

Deserialization Get thread-safe deserializer Invoke deserialization method with file OPMDeserialiser deserial =OPMDeserialiser.getThreadOPMDeserialiser(); OPMGraph graph =deserial.deserialiseOPMGraph(new File(”exmpl.xml"));

Conversion to dot/pdf Create converter Invoke conversion method (like command line) OPMToDot toDot=new OPMToDot(); toDot.convert(graph, "target/example.dot", "target/example.pdf");

What about generation of RDF? The Java data model is directly derived from the XML schema JAXB converts from Java to XML and back RDFOPMFactory is a subclass of OPMFactory, which also constructs an RDF representation in a Sesame model Relies on Sesame’s elmo generating Java interfaces/classes from an OWL ontology RDF representation compatible with OPM OWL ontology by construction! Serializing is by dumping the RDF model

Conversion to RDF Create the RDFOPMFactory: oFactory= new RdfOPMFactory(new RdfObjectFactory(manager, TEST_NS)); Dump RDF (relies on helper class) File file = new File("target/example.n3"); rHelper.dumpToRDF(file, (SesameManager)manager, RDFFormat.N3, prefixes); Full example in src/test/java/uk/ac/soton/ecs/opmdemo/RdfTest.java

Other stuff IndexedOPMGraph: a class that allows incremental creation of OPM graph, indexing of its nodes, and easy traversal in a forward or backward manner Basic support for graph normalization and comparison Intended to support OPM graph algebra

Contributing to the OPM Toolbox

Source code on github

Get Involved Source code: http://github.com/lucmoreau/OpenProvenanceModel Currently three branches: master, opmsig, opmowl Download, compile by a simple mvn clean install (note build relies on existence of unix executables such as sed in the path) Fork in github.com and modify

Conclusion OPM Toolbox intended to support useful and common functionality for manipulating OPM graphs Community involvement would be desirable Try and experiment with it!