Warning:
This wiki has been archived and is now read-only.

PROV OWL ontology component examples

From Provenance WG Wiki
Jump to: navigation, search

Author: Tim Lebo

This page provides an overview of the ontology component examples available in the mercurial repository at:

http://dvcs.w3.org/hg/prov/file/tip/ontology/components

For an introduction to the purpose and use of components, see PROV OWL ontology components.

For artificial examples, see Artificial PROV OWL ontology component examples.

Don't forget PROV-XG's scenarios (disease outbreak).

ComplementarityUseCases was created 2011 Dec 01 to accumulate uses cases for the highly controversial complementarity construct in PROV-DM.

This list didn't get anywhere, PROV examples is an new attempt at collecting examples. 2012 Feb lebot.

Contents

Purchasing a car

components/EntityInRole/car-purchase.ttl

Writing an article about crime

This is the example described in PROV-DM and PROV OWL

Adopting the Ordnance Survey Ontology

components/wasDerivedFrom/ordnance-survey-ontology-adoption.ttl

Adopting the Ordnance Survey Ontology - citing controller

components/wasControlledBy/ordnance-survey-ontology-adoption.ttl

Appending a file to itself

components/assumedBy/appending-a-file-to-itself.ttl

Adding contents to a file using parts of two files from the web

This example is discussed in Using named graphs to model Accounts

components/Account/tbl-jah-2.trig.prov.ttl

Ordering from a restaurant

components/assumedBy/khalid-restaurant.ttl

Issuing a traffic ticket

This example emphasizes the "evidence gathering" activities during an event. The traffic officer is gathering information and recording it. This is also used to illustrate how human-readable identifiers are needed to associate Entities found in different sets of assertions.

components/identifier/traffic-ticket.ttl

Handgun sale and crime scene evidence

Shop owner creates different URIs for the same handgun than the URIs created by the crime scene investigators. Both reference the same handgun serial number. Is the gun sold the same as the gun found?

Performing an owl:imports closure

  1. prov.ttl cites other RDF files that should be aggregated to produce a full OWL ontology (using owl:imports). prov.owl.prov.ttl cites the URLs of files that were included in the result, prov.owl.
  2. While prov.ttl only included one file, prov-variant-1.ttl cites many. Its provenance cites the URLs of all files that were included in the result.

Cache-graphing http://dbpedia.org/resource/World_Wide_Web_Consortium

components/NamedGraph/World_Wide_Web_Consortium.trig

Discussed in Using named graphs to model Accounts.

Tim was at MIT on 2011-10-12

http://twitter.com/timrdf/statuses/124126690506055680 (was described in RDF, which was referenced in foaf)

Who is the author of a document

Paul Groth wanted to model a quote in a read web page. 2011 Oct 20 telecon

Self portrait

Stian's self-portrait example

http://lists.w3.org/Archives/Public/public-prov-wg/2011Oct/0236.html

Two Online Accounts held by the same Person

Tim has a twitter account "timrdf" and a W3C PROV wiki account of "Tlebo":

http://dvcs.w3.org/hg/prov/file/tip/ontology/components/wasComplementOf/two-entities-about-tim.ttl

Two-entities-about-tim.png

asserting the wasComplementOf between the two Entities should let me assert:

http://dvcs.w3.org/hg/prov/file/tip/ontology/components/wasComplementOf/two-entities-about-tim/test-1.rq

problem: prov-o doesn't let me associate an entity to what it is talking about (me). This is modeled as :x in the example.

Quoting some text in an email archived on the web

Tim quoted something Luc said in an email. The email was archived on the web.

The example is version controlled at:

The follow PROV-O components were added to support this example:

Some questions from this example:

  • Would the prov-wg accept using rdf:value for the string that is quoted?
    • PG: I think we don't say. It's not clear how you identify the quoted string. You could quote something else. [1]
    • SSR: Agreed - it's just an attribute characterizing the entity. A very good characterization in this case - but not if we were worried about formatting, coffee stains, etc. [2]
  • Would "wasQuotedFrom" be more intuitive than "wasQuoteOf"?
    • PG: Seems a reasonable change to me [3]
  • Isn't this just a special kind of derivation? Shouldn't be handled with the core constructs with appropriate roles, etc?
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix time:    <http://www.w3.org/2006/time#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix prov:    <http://www.w3.org/ns/prov-o/> .
@prefix :        <#> .

:what_luc_said
   a prov:Entity;
   rdf:value
"""Remember that an entity is a perspective on a thing.
So, here, we can have multiple perspectives:

e1 Luc
e2 Luc at age=5
e3 Luc at age=10

e3 and e2 have a same attribute name age, but different values. So they 
must be different entities,i.e. perspectives, over human being e1.""";
   prov:wasQuoteOf <http://lists.w3.org/Archives/Public/public-prov-wg/2011Nov/0090.html>;
   prov:qualifiedQuotation [
      a prov:Quotation;
      prov:hadQualifiedEntity <http://lists.w3.org/Archives/Public/public-prov-wg/2011Nov/0090.html>;
      prov:hadQuoter          <http://purl.org/twc/id/person/TimLebo>;
      prov:hadQuotee          <http://data.semanticweb.org/person/luc-moreau>;
   ];
.

Two ages of the same person

Concrete example at https://dvcs.w3.org/hg/prov/file/tip/ontology/components/Entity/public-prov-wg-2011Nov-0090-person-e1-e2-e3.ttl

Required addition of PROV-O component: https://dvcs.w3.org/hg/prov/file/tip/ontology/components/viewOf.ttl

@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix time:    <http://www.w3.org/2006/time#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix foaf:    <http://xmlns.com/foaf/0.1/> .
@prefix prov:    <http://www.w3.org/ns/prov-o/> .
@prefix :        <#> .

:e1
   rdfs:seeAlso <http://lists.w3.org/Archives/Public/public-prov-wg/2011Nov/0090.html>,
                <http://dvcs.w3.org/hg/prov/raw-file/7b8b64840980/ontology/components/Quote/public-prov-wg-2011Nov-0090.ttl#what_luc_said>;
   dcterms:description
"""Remember that an entity is a perspective on a thing.
So, here, we can have multiple perspectives:

e1 Luc
e2 Luc at age=5
e3 Luc at age=10

e3 and e2 have a same attribute name age, but different values. So they 
must be different entities,i.e. perspectives, over human being e1.""";
   a prov:Entity, foaf:Person;
   foaf:firstName "Luc";
.

:e2
   a prov:Entity, foaf:Person;
   foaf:firstName "Luc";
   :age 5;
   rdfs:comment "e2 is a perspective on e1";
   prov:viewOf          :e1;
.


:e2 owl:differentFrom :e3 .


:e3
   a prov:Entity, foaf:Person;
   foaf:firstName "Luc";
   :age 10;
   rdfs:comment "e3 is a perspective on e1";
   prov:viewOf          :e1;
.

Building a statue example

Example by Satya, augmented by Luc [4], encoded by Tim.

http://dvcs.w3.org/hg/prov/file/tip/ontology/components/Entity/public-prov-wg-2011Nov-0090-building-statue.ttl

Quoting a blog

Paul's example "blogpost wasDerivedFrom Report at 10am Thursday"

http://lists.w3.org/Archives/Public/public-prov-wg/2011Nov/0170.html

http://dvcs.w3.org/hg/prov/file/e0d6f1a69062/ontology/components/wasDerivedFrom/public-prov-wg-2011Nov-0170-blogpost.ttl

Quality Control supervisor

""For example, a quality control inspector "qci1" on a factory floor is "involved" in production (PE instance "prod1") of "honda civic car" by observing the prod1 PE and taking notes. But qci1 is not linked to prod1 by "used" or "wasControlledBy" or "wasComplementOf" properties, but qci1 is a participant in prod1.""

http://www.w3.org/mid/EMEW3%7Ce07a70f2242a39ca44eadd786e825237nAYCre08L.Moreau%7Cecs.soton.ac.uk%7C4ED6274F.6010703@ecs.soton.ac.uk

Multiple in; multiple out

TODO: Tim

:a
   a prov:Activity;

  prov:used :input;
  prov:qualifiedUsage [
     a prov:Usage;
     prov:qualifiedEntity   :input;
     prov:hadRole         io:input;
  ];

  prov:used :parameters;
  prov:qualifiedUsage [
     a prov:Usage;
     prov:qualifiedEntity   :parameters;
     prov:hadRole         io:parameters;
  ];

  prov:generated :output;
  prov:qualifiedGeneration [
     a prov:Generation;
     prov:qualifiedEntity   :output;
     prov:hadRole         io:output;
  ];

  prov:generated :metadata;
  prov:qualifiedGeneration [
     a prov:Generation;
     prov:qualifiedEntity   :metadata;
     prov:hadRole         io:metadata;
  ];
.

Programmer and Researcher

Yolanda: "a programmer and a researcher could both be associated with running a workflow, but it may not matter what programmer clicked the button to start the workflow while it would matter a lot what researcher told the programmer to do so."

Student posting Department info

Yolanda: "a student publishing a web page describing an academic department could result in both the student and the department being agents associated with the activity, and it may not matter what student published a web page but it matters a lot that the department told the student to put up the web page. "

the student acted on behalf of his supervisor, who acted on behalf of the department chair, who acts on behalf of the university, and all those agents are responsible in some way for the activity to take place but we don't say explicitly who bears responsibility and to what degree. 

Mail app run by person

"So in the example of someone running a mail program, the program is an agent of that activity and the person is also an agent of the activity, but we would also add that the mail software agent is running on the person's behalf. "

LibC upgrade affecting program execution

Stian: "The C program prov:uses some text files and a connection to a web server. On a lower granularity perhaps, /lib/libc.so.6 (the C standard library) is prov:associatedWith with the programme. The asserter does not feel that *his* C program is *using* libc - that is merely an side-effect of the compiler and operating system. It is not an agent, it is not like a Python interpreter responsible for running a script, it is just there for those boring system calls. However the asserter wants to link this stronger than just as some custom attribute on the plan-entity for the C-program-activity."

"The reason is that a concurrent system upgrade overwrites the /lib/libc.so.6 file (and this is captured by provenance) , and causes the C programme to crash. "

"I did not specify any prov:SoftwareAgent up here, because agents are currently disjoint from activities, and so the active :exec can't be an agent - while the dormant entity :myProgramme can."


http://dvcs.w3.org/hg/prov/file/b9e12115bcba/ontology/components/wasAssociatedWith/libc.ttl

http://lists.w3.org/Archives/Public/public-prov-wg/2012Feb/0073.html


The MonaLisa portrait is dated to circa 1503–1519

http://www.w3.org/mid/4F3E6354.3020506@nasa.gov

 On 02/16/2012 05:04 PM, Luc Moreau wrote:
 >On 16/02/12 21:36, Satya Sahoo wrote:
 >>Also, I believe the DM supports representation of a simple provenance
 >>assertion such as, "The MonaLisa portrait is dated to circa 1503–1519"
 >>(MonaLisa portrait is an Entity).
 >
 >How would you do it? I don't know.

Time is instantaneous, so you couldn't specify it as a generation time, but could you just define a domain specific attribute for the generation?

 wasGeneratedBy(ex:MonaLisa, [ex:creationEstimate="1503-1519"]);

Is it ok to leave out both activity and time in order to specify generation attributes? DM would seem to allow it since everything but entity is optional.


How would such a thing get mapped to RDF?

 ex:MonaLisa a prov:Entity .
 _:a a prov:Activity .
 _:g a prov:Generation .
 ex:MonaLisa prov:wasGeneratedBy _:a .
 _:a prov:hadQualifiedGeneration _:g .
 _:g a prov:QualifiedInvolvement .
 _:g prov:hadQualifiedEntity ex:MonaLisa .
 _:g ex:creationEstimate "1503-1519" .


Probably easier to just express this outside PROV:

 ex:MonaLisa ex:creationEstimate "1503-1519" .

GK comment: this topic (uncertain times) has been discussed in the context of CIDOC CRM, and the discussion was quite involved. I think we need to avoid getting into the rathole of creating ontologies for uncertain time intervals, but provide something to which such work can be attached. In this case, the prov:Activity provides the placeholder, and we can duck the actual problem of how to represent the uncertain time interval. I think this is what the final example above is suggesting, except that I would see the time estimate property being applied to the prov:Activity resource rather than the prov:Entity. (E.g. what if we were trying to say Mona Lisa was created about 1503-1519, and touched up in some later period? Do we really want to contemplate new time-related properties for every possible activity type?

Different trust annotations determined in different bundles

http://www.w3.org/mid/EMEW3%7C83f3b5be6281b5c54cf0953ca29bcabao1LMWS08l.moreau%7Cecs.soton.ac.uk%7C4F456CF2.8020003@ecs.soton.ac.uk

:prov_0 {
:simon a prov:Human;
:robbery prov:wasAssociatedWith :simon
}


:prov_1 {
:simon a prov:Human;
       prov:hasAnnotation [
            a prov:Note; ex3:reputation "excellent";
            rdfs:comment "This is a kludge way to get indirection. Use prov:Provenance instead.";
       ];
}

:prov_2 {
 :simon ex3:reputation "excellent" .
}


I think it's important for annotation to be expressed in the context of the entities where they occur. A trust rating algorithm
may find agent simon "excellent" in prov_1 but "not so good" in prov_0.

(and Tim's response modelling)


Mike Lang example 2012 Feb

This wiki offers an overview look at the example we have been working on with the provenance ontology - http://www.knoodl.com/ui/groups/BioBIG/wiki/Provenance_Details. It is still a work in progress, but you may find it to be an interesting example. Lauren Kustner (cc'ed) can help explain the use case and provide you with the data we are using, if you are interested. We would be interested to hear feedback from you on how we are using the ontology.

tripadvisor

http://www.guardian.co.uk/media/2012/feb/01/tripadvisor-criticise-honest-contribution-claim

Macted's table

discussed in telecon, modeled by Paul http://www.w3.org/mid/4F22DDE8.1040202@vu.nl

Macted's painting destroyed

Done some time after the first table, but table is elaborated here

http://www.w3.org/mid/4F630AC2.5070200@vu.nl

Stian/Simon's scruff + proper BBC provenance

alt/specOf applied

http://www.w3.org/mid/FE37361E55FDC343A27E119DFB7785BB40AF279C08@KCL-MAIL04.kclad.ds.kcl.ac.uk

Graham's AV example

expiration/destruction

http://www.w3.org/mid/4F6224D9.80109@zoo.ox.ac.uk

Chewed gum and coupons

invalidation and destruction

Tim http://www.w3.org/mid/6DE0F6B6-2544-4486-A436-37137B574EE1@rpi.edu

NASA reproducing big datasets

Curt http://www.w3.org/mid/4F79A245.80807@nasa.gov

Composing a tweet with a quote

"I have always loved the #blah. Like @Abe said, "Four score and seven years ago"

http://www.w3.org/mid/B604E927-F057-4C47-8BA7-8BCDE465C71A@rpi.edu


Downloading a file is a very common wasQuotedFrom

:myFile
  a foaf:Document, prov:Entity;
  prov:atLocation <file:///Users/me/files/working.html>;
  prov:wasQuotedFrom <http://www.w3.org/2011/prov/wiki/WorkingDrafts>;
  :size "45"^^:kilobytes;
.

Any sort of copy-paste operation is naturally modeled with wasQuotedFrom

:copy
   a prov:Activity;
   prov:wasAssociatedWith :tlebo;
   prov:generated :clipboard_contents;
.

:tlebo
	a foaf:Account;
      prov:atLocation :tim_laptop;
.

:clipboard_contents
   a prov:Entity;
   prov:value "Provenance Data Model (PROV-DM)";
   prov:wasQuotedFrom :page;
   prov:wasInvalidatedBy :the_next_copy_operation;
.

:page
    a prov:Entity;
    dcterms;date "2012-04-13";
    prov:specializationOf <http://www.w3.org/2011/prov/wiki/WorkingDrafts>;
.

:tech_report
   a prov:Entity, :TechReport;
    prov:used :clipboard_contents;
   prov:wasAttributedTo <http://data.semanticweb.org/person/timothy-lebo>;
.
<pre>
:copy
   a prov:Activity;
   prov:wasAssociatedWith :tlebo;
   prov:generated :clipboard;
.

:tlebo
	a foaf:Account;
      prov:atLocation :tim_laptop;
.

:clipboard_contents
   a prov:Entity;
   prov:value "Provenance Data Model (PROV-DM)";
   prov:wasQuotedFrom :page;
.

:page
    a prov:Entity;
    dcterms;date "2012-04-13";
    prov:specializationOf <http://www.w3.org/2011/prov/wiki/WorkingDrafts>;
.

:tech_report
    prov:used :clipboard_contents;
.

Did my bug report help get it fixed?

http://www.w3.org/mid/F60C1C8F-FB34-4E56-BAB0-AC221BC42AE8@rpi.edu

BioBIG

http://www.knoodl.com/ui/groups/BioBIG/wiki/Provenance_Details

making and buying a water bottle is scruffy

http://www.w3.org/mid/F557A26E-13B7-4485-B949-69CCDA9A86FA@rpi.edu