Each of the PROV-N examples provided in chapter 2 are provided below along with PROV-XML and PROV-O translations. Note that the translations are not word for word, as some representations have features which are useful to illustrate with these examples.
You can download the xml and owl files if you want to work with them on using your own hardware and software. Scroll on to see them displayed.
2.4.2 Introduction
PROV-N
entity(grapes)
entity(wine)
activity(vinification)
agent(JeMiRi-Winery)
used(vinification, grapes)
wasGeneratedBy(wine, vinification)
wasDerivedFrom(wine, grapes)
wasAssociatedWith(vinification, JeMiRi-Winery)
wasAttributedTo(wine, JeMiRi-Winery)
PROV-XML
<?xml version="1.0" encoding="UTF-8"?>
<prov:document xmlns:prov="http://www.w3.org/ns/prov#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ex="http://example.com/ns/ex#"
xsi:schemaLocation="http://www.w3.org/ns/prov#
http://www.w3.org/ns/prov.xsd">
<prov:entity prov:id="ex:grapes"/>
<prov:entity prov:id="ex:wine"/>
<prov:activity prov:id="ex:vinification"/>
<prov:agent prov:id="ex:JeMiRi-Winery"/>
<prov:used>
<prov:activity prov:ref="ex:vinification"/>
<prov:entity prov:ref="ex:grapes"/>
</prov:used>
<prov:wasGeneratedBy>
<prov:entity prov:ref="ex:wine"/>
<prov:activity prov:ref="ex:vinification"/>
</prov:wasGeneratedBy>
<prov:wasDerivedFrom>
<prov:generatedEntity prov:ref="ex:wine"/>
<prov:usedEntity prov:ref="ex:grapes"/>
</prov:wasDerivedFrom>
<prov:wasAssociatedWith>
<prov:activity prov:ref="ex:vinification"/>
<prov:agent prov:ref="ex:JeMiRi-Winery"/>
</prov:wasAssociatedWith>
<prov:wasAttributedTo>
<prov:entity prov:ref="ex:wine"/>
<prov:agent prov:ref="ex:JeMiRi-Winery"/>
</prov:wasAttributedTo>
</prov:document>
PROV-O
@prefix : <http://www.example.org#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
:grapes
a prov:Entity .
:jemiri-winery
a prov:Agent .
:vinification
a prov:Activity;
prov:used :grapes;
prov:wasAssociatedWith :jemiri-winery .
:wine
a prov:Entity;
prov:wasGeneratedBy :vinification;
prov:wasDerivedFrom :grapes;
prov:wasAttributedTo :jemiri-winery .
2.4.3 Collection
PROV-N
entity(must, [ prov:type='prov:Collection' ])
hadMember(must, juice)
hadMember(must, pomace)
entity(grapes)
used(pressing, grapes)
wasGeneratedBy(must, pressing)
wasDerivedFrom(must, grapes)
PROV-XML
<?xml version="1.0" encoding="UTF-8"?>
<prov:document xmlns:prov="http://www.w3.org/ns/prov#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ex="http://example.com/ns/ex#"
xsi:schemaLocation="http://www.w3.org/ns/prov#
http://www.w3.org/ns/prov.xsd">
<prov:entity prov:id="ex:juice"/>
<prov:entity prov:id="ex:pomace"/>
<prov:collection prov:id="ex:must"/>
<prov:hadMember>
<prov:collection prov:ref="ex:must"/>
<prov:entity prov:ref="ex:juice"/>
<prov:entity prov:ref="ex:pomace"/>
</prov:hadMember>
<prov:entity prov:id="ex:grapes"/>
<prov:used>
<prov:activity prov:ref="ex:pressing"/>
<prov:entity prov:ref="ex:grapes"/>
</prov:used>
<prov:wasGeneratedBy>
<prov:entity prov:ref="ex:must"/>
<prov:activity prov:ref="ex:pressing"/>
</prov:wasGeneratedBy>
<prov:wasDerivedFrom>
<prov:generatedEntity prov:ref="ex:must"/>
<prov:usedEntity prov:ref="ex:grapes"/>
</prov:wasDerivedFrom>
</prov:document>
PROV-O
@prefix : <http://www.example.org#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
:grapes
a prov:Entity .
:juice
a prov:Entity .
:pomace
a prov:Entity .
:pressing
a prov:Activity;
prov:used :grapes .
:must
a prov:Collection;
prov:hadMember :juice;
prov:hadMember :pomace;
prov:wasGeneratedBy :pressing;
prov:wasDerivedFrom :grapes .
2.4.3 2nd Collection Example
PROV-N
entity(red-grapes)
activity(pressing)
used(pressing, red-grapes)
entity(juice)
entity(pomace)
entity(must, [ prov:type='prov:Collection' ])
hadMember(must, juice)
hadMember(must, pomace)
wasGeneratedBy(must, pressing)
activity(fermentation-red)
used(fermentation-red, must)
entity(red-wine)
wasGeneratedBy(red-wine, fermentation-red)
activity(fermentation-white)
used(fermentation-white, juice)
entity(white-wine)
wasGeneratedBy(white-wine, fermentation-white)
PROV-XML
<?xml version="1.0" encoding="UTF-8"?>
<prov:document xmlns:prov="http://www.w3.org/ns/prov#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ex="http://example.com/ns/ex#"
xsi:schemaLocation="http://www.w3.org/ns/prov#
http://www.w3.org/ns/prov.xsd">
<prov:entity prov:id="ex:red-grapes"/>
<prov:activity prov:id="ex:pressing"/>
<prov:used>
<prov:activity prov:ref="ex:pressing"/>
<prov:entity prov:ref="ex:red-grapes"/>
</prov:used>
<prov:entity prov:id="ex:juice"/>
<prov:entity prov:id="ex:pomace"/>
<prov:collection prov:id="ex:must"/>
<prov:hadMember>
<prov:collection prov:ref="ex:must"/>
<prov:entity prov:ref="ex:juice"/>
<prov:entity prov:ref="ex:pomace"/>
</prov:hadMember>
<prov:wasGeneratedBy>
<prov:entity prov:ref="ex:must"/>
<prov:activity prov:ref="ex:pressing"/>
</prov:wasGeneratedBy>
<prov:activity prov:id="ex:fermentation-red"/>
<prov:used>
<prov:activity prov:ref="ex:fermentation-red"/>
<prov:entity prov:ref="ex:must"/>
</prov:used>
<prov:entity prov:id="ex:red-wine"/>
<prov:wasGeneratedBy>
<prov:entity prov:ref="ex:red-wine"/>
<prov:activity prov:ref="ex:fermentation-red"/>
</prov:wasGeneratedBy>
<prov:activity prov:id="ex:fermentation-white"/>
<prov:used>
<prov:activity prov:ref="ex:fermentation-white"/>
<prov:entity prov:ref="ex:juice"/>
</prov:used>
<prov:entity prov:id="ex:white-wine"/>
<prov:wasGeneratedBy>
<prov:entity prov:ref="ex:white-wine"/>
<prov:activity prov:ref="ex:fermentation-white"/>
</prov:wasGeneratedBy>
</prov:document>
PROV-O
@prefix : <http://www.example.org#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
:red-grapes
a prov:Entity .
:juice
a prov:Entity .
:pomace
a prov:Entity .
:pressing
a prov:Activity;
prov:used :red-grapes .
:must
a prov:Collection;
prov:hadMember :juice;
prov:hadMember :pomace;
prov:wasGeneratedBy :pressing;
prov:wasDerivedFrom :grapes .
:fermentation-red
a prov:Activity;
prov:used :must .
:fermentation-white
a prov:Activity;
prov:used :juice .
:red-wine
a prov:Entity;
prov:wasGeneratedBy :fermentation-red .
:white-wine
a prov:Entity;
prov:wasGeneratedBy :fermentation-white .
2.5.3 Entity
PROV-N
entity(grapes1, [ grape:type='Malbec' ])
entity(grapes2, [ grape:type='Syrah' ])
entity(wine1, [ wine:type='Malbec' ])
entity(wine2, [ wine:type='Syrah' ])
activity(vinification1, [ type='Vinification' ])
activity(vinification2, [ type='Vinification' ])
used(vinification1, grapes1)
used(vinification2, grapes2)
wasGeneratedBy(wine1, vinification1)
wasGeneratedBy(wine2, vinification2)
wasDerivedFrom(wine1, grapes1)
wasDerivedFrom(wine2, grapes2)
PROV-XML
<?xml version="1.0" encoding="UTF-8"?>
<prov:document xmlns:prov="http://www.w3.org/ns/prov#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ex="http://example.com/ns/ex#"
xsi:schemaLocation="http://www.w3.org/ns/prov#
http://www.w3.org/ns/prov.xsd">
<prov:entity prov:id="ex:grapes1">
<ex:grape_type>Malbec</ex:grape_type>
</prov:entity>
<prov:entity prov:id="ex:grapes2">
<ex:grape_type>Syrah</ex:grape_type>
</prov:entity>
<prov:entity prov:id="ex:wine1">
<ex:wine_type>Malbec</ex:wine_type>
</prov:entity>
<prov:entity prov:id="ex:wine2">
<ex:wine_type>Syrah</ex:wine_type>
</prov:entity>
<prov:activity prov:id="ex:vinification1">
<ex:activity_type>vinification</ex:activity_type>
</prov:activity>
<prov:activity prov:id="ex:vinification2">
<ex:activity_type>vinification</ex:activity_type>
</prov:activity>
<prov:used>
<prov:activity prov:ref="ex:vinification1"/>
<prov:entity prov:ref="ex:grapes1"/>
</prov:used>
<prov:used>
<prov:activity prov:ref="ex:vinification2"/>
<prov:entity prov:ref="ex:grapes2"/>
</prov:used>
<prov:wasGeneratedBy>
<prov:entity prov:ref="ex:wine1"/>
<prov:activity prov:ref="ex:vinification1"/>
</prov:wasGeneratedBy>
<prov:wasGeneratedBy>
<prov:entity prov:ref="ex:wine2"/>
<prov:activity prov:ref="ex:vinification2"/>
</prov:wasGeneratedBy>
<prov:wasDerivedFrom>
<prov:generatedEntity prov:ref="ex:wine1"/>
<prov:usedEntity prov:ref="ex:grapes1"/>
</prov:wasDerivedFrom>
<prov:wasDerivedFrom>
<prov:generatedEntity prov:ref="ex:wine2"/>
<prov:usedEntity prov:ref="ex:grapes2"/>
</prov:wasDerivedFrom>
</prov:document>
PROV-O
@prefix : <http://www.example.org#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
:grapes1
a prov:Entity;
:type :Malbec .
:grapes2
a prov:Entity;
:type :Syrah .
:vinification1
a prov:Activity;
prov:used :grapes1 .
:vinification2
a prov:Activity;
prov:used :grapes2 .
:wine1
a prov:Entity;
:type :Malbec;
prov:wasGeneratedBy :vinification1;
prov:wasDerivedFrom :grapes1 .
:wine2
a prov:Entity;
:type :Syrah ;
prov:wasGeneratedBy :vinification2;
prov:wasDerivedFrom :grapes2 .
2.5.2 Process
PROV-N
entity(grapes)
entity(wine)
entity(sparkling-wine)
entity(sugar)
activity(fermentation1, [ type='Fermentation' ])
activity(fermentation2, [ type='Fermentation' ])
used(fermentation1, grapes)
used(fermentation2, wine)
used(fermentation2, sugar)
wasGeneratedBy(wine, fermentation1)
wasGeneratedBy(sparkling-wine, fermentation2)
wasDerivedFrom(wine, grapes)
wasDerivedFrom(sparkling-wine, wine)
PROV-XML
<?xml version="1.0" encoding="UTF-8"?>
<prov:document xmlns:prov="http://www.w3.org/ns/prov#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ex="http://example.com/ns/ex#"
xsi:schemaLocation="http://www.w3.org/ns/prov#
http://www.w3.org/ns/prov.xsd">
<prov:entity prov:id="ex:grapes"/>
<prov:entity prov:id="ex:wine"/>
<prov:entity prov:id="ex:sparkling-wine"/>
<prov:entity prov:id="ex:sugar"/>
<prov:activity prov:id="ex:fermentation1">
<ex:activity_type>fermentation</ex:activity_type>
</prov:activity>
<prov:activity prov:id="ex:fermentation2">
<ex:activity_type>fermentation</ex:activity_type>
</prov:activity>
<prov:used>
<prov:activity prov:ref="ex:fermentation1"/>
<prov:entity prov:ref="ex:grapes"/>
</prov:used>
<prov:used>
<prov:activity prov:ref="ex:fermentation2"/>
<prov:entity prov:ref="ex:wine"/>
</prov:used>
<prov:used>
<prov:activity prov:ref="ex:fermentation2"/>
<prov:entity prov:ref="ex:sugar"/>
</prov:used>
<prov:wasGeneratedBy>
<prov:entity prov:ref="ex:wine"/>
<prov:activity prov:ref="ex:fermentation1"/>
</prov:wasGeneratedBy>
<prov:wasGeneratedBy>
<prov:entity prov:ref="ex:sparkling-wine"/>
<prov:activity prov:ref="ex:fermentation2"/>
</prov:wasGeneratedBy>
<prov:wasDerivedFrom>
<prov:generatedEntity prov:ref="ex:wine"/>
<prov:usedEntity prov:ref="ex:grapes"/>
</prov:wasDerivedFrom>
<prov:wasDerivedFrom>
<prov:generatedEntity prov:ref="ex:sparkling-wine"/>
<prov:usedEntity prov:ref="ex:wine"/>
</prov:wasDerivedFrom>
</prov:document>
PROV-O
@prefix : <http://www.example.org#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
:grapes
a prov:Entity .
:sugar
a prov:Entity .
:fermentation1
a prov:Activity;
:type :fermentation;
prov:used :grapes .
:wine
a prov:Entity;
prov:wasGeneratedBy :fermentation1;
prov:wasDerivedFrom :grapes .
:fermentation2
a prov:Activity;
:type :fermentation;
prov:used :wine;
prov:used :sugar .
:sparkling-wine
a prov:Entity;
prov:wasGeneratedBy :fermentation2;
prov:wasDerivedFrom :grapes;
prov:wasDerivedFrom :wine .
2.5.3 Location
PROV-N
entity(grapes)
entity(champagne)
entity(sparkling-wine)
activity(méthode-champenoise1, [ prov:location="Napa, California" ])
activity(méthode-champenoise2, [ prov:location="Champagne, France" ])
used(méthode-champenoise1, grapes)
used(méthode-champenoise2, grapes)
wasGeneratedBy(sparkling-wine, méthode-champenoise1)
wasGeneratedBy(champagne, méthode-champenoise2)
PROV-XML
<?xml version="1.0" encoding="UTF-8"?>
<prov:document xmlns:prov="http://www.w3.org/ns/prov#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ex="http://example.com/ns/ex#"
xsi:schemaLocation="http://www.w3.org/ns/prov#
http://www.w3.org/ns/prov.xsd">
<prov:entity prov:id="ex:grapes"/>
<prov:entity prov:id="ex:champagne"/>
<prov:entity prov:id="ex:sparkling-wine"/>
<prov:activity prov:id="ex:méthode-champenoise1">
<prov:location>Napa, California</prov:location>
</prov:activity>
<prov:activity prov:id="ex:méthode-champenoise2">
<prov:location>Champagne, France</prov:location>
</prov:activity>
<prov:used>
<prov:activity prov:ref="ex:méthode-champenoise1"/>
<prov:entity prov:ref="ex:grapes"/>
</prov:used>
<prov:used>
<prov:activity prov:ref="ex:méthode-champenoise2"/>
<prov:entity prov:ref="ex:grapes"/>
</prov:used>
<prov:wasGeneratedBy>
<prov:entity prov:ref="ex:sparkling-wine"/>
<prov:activity prov:ref="ex:méthode-champenoise1"/>
</prov:wasGeneratedBy>
<prov:wasGeneratedBy>
<prov:entity prov:ref="ex:champagne"/>
<prov:activity prov:ref="ex:méthode-champenoise2"/>
</prov:wasGeneratedBy>
</prov:document>
PROV-O
@prefix : <http://www.example.org#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
:grapes
a prov:Entity .
:napa_california
a prov:Location .
:champagne_france
a prov:Location .
:méthode-champenoise1
a prov:Activity;
prov:atLocation :napa_california;
prov:used :grapes .
:méthode-champenoise2
a prov:Activity;
prov:atLocation :champagne_france;
prov:used :grapes .
:sparkling-wine
a prov:Entity;
prov:wasGeneratedBy :méthode-champenoise1;
prov:wasDerivedFrom :grapes .
:champagne
a prov:Entity;
prov:wasGeneratedBy :méthode-champenoise2;
prov:wasDerivedFrom :grapes .