Warning:
This wiki has been archived and is now read-only.
ProvenanceAccessScenarioUsingPAQ
From Provenance WG Wiki
Walk through of how the Provenance Access Scenario is satisfied using the Provenance Access and Query (W3C Editor's Draft 17 August 2011) proposal.
Contents
- 1 Online HTML Documents D1 and D2 (Resource provider aware of provenance)
- 2 Online Image Document D3 (Resource provider aware of provenance)
- 3 HTML Document D5 as Email attachment
- 4 HTML Document D7 in the File System (Using provenance service)
- 5 Online Image Document D4 (Using provenance service)
- 6 Image Documents D6 and D8 as Email attachment or in File System
Online HTML Documents D1 and D2 (Resource provider aware of provenance)
- Obtaining the document D
Using anchor parameter
GET https://github.com/timrdf/vsr/raw/master/data/source/tim-lebo/london-crime/version/2011-Jul-07/manual/crime.html HTTP/1.1 ... HTTP/1.1 200 OK ... Link: http://example.com/provenance/d1.prov; rel="provenance"; anchor="https://github.com/timrdf/vsr/raw/master/data/source/tim-lebo/london-crime/version/2011-Jul-07/manual/crime.html"
GET http://lists.w3.org/Archives/Public/public-prov-wg/2011Jul/att-0031/crime.html HTTP/1.1 ... HTTP/1.1 200 OK ... Link: http://example.com/provenance/d2.prov; rel="provenance"; anchor="http://lists.w3.org/Archives/Public/public-prov-wg/2011Jul/att-0031/crime.html"
Using anchor relation
GET https://github.com/timrdf/vsr/raw/master/data/source/tim-lebo/london-crime/version/2011-Jul-07/manual/crime.html HTTP/1.1 ... HTTP/1.1 200 OK ... Link: http://example.com/provenance/d1.prov; rel="provenance"; Link: https://github.com/timrdf/vsr/raw/master/data/source/tim-lebo/london-crime/version/2011-Jul-07/manual/crime.html; rel="anchor"
GET http://lists.w3.org/Archives/Public/public-prov-wg/2011Jul/att-0031/crime.html HTTP/1.1 ... HTTP/1.1 200 OK ... Link: http://example.com/provenance/d2.prov; rel="provenance"; Link: http://lists.w3.org/Archives/Public/public-prov-wg/2011Jul/att-0031/crime.html; rel="anchor"
- Enacting the "Oh yeah?" feature
- A user requests a web browser (W) used to obtain the web documents (D1-2) to enact the "Oh yeah?" feature on the whole documents
- The web browser examines the HTTP response headers of the web documents to identify Link: headers and selects those that contain the relations, provenance or anchor.
- The browser extracts the provenance-uri information, I_P, from the provenance relation header. In the above example, I_P is http://example.com/provenance/d1.prov for D1 and http://example.com/provenance/d2.prov for D2.
- The browser also extracts the context-uri information, I_C, from the headers if the anchor parameter or relation were present. Otherwise, it uses the URL to the documents D1 and D2 that was used to access them as the value of I_C. In the above example, the anchor parameter or relation was present and the value of I_C is https://github.com/timrdf/vsr/raw/master/data/source/tim-lebo/london-crime/version/2011-Jul-07/manual/crime.html and http://lists.w3.org/Archives/Public/public-prov-wg/2011Jul/att-0031/crime.html for D1 and D2 respectively.
- Accessing the provenance
- What information (I) does the clients (W) need in order to access and retrieve the provenance for the documents D1-2?
- The browser uses the default mechanism for dereferencing the provenance-uris I_P for the two documents, which in our example is using a HTTP GET to retrieve the provenance document P.
- The browser examines the retrieved provenance document P to locate the "section" that corresponds to the context-uri I_C that is relevant for the documents D1 and D2.
Online Image Document D3 (Resource provider aware of provenance)
This case is similar to the previous in all respects. The fact that the document D3 is an image and not a HTML document makes no difference. The HTTP GET request and response are shown as example. The means for enacting the "Oh yeah?" button and accessing the provenance are the same as before.
Using anchor parameter
GET https://github.com/timrdf/vsr/raw/11e4a2ab0315ba7808a393e2a0b5f69f952b7235/data/source/tim-lebo/london-crime/version/2011-Jul-07/manual/crime.png HTTP/1.1 ... HTTP/1.1 200 OK ... Link: http://example.com/provenance/d3.prov; rel="provenance"; anchor="https://github.com/timrdf/vsr/raw/11e4a2ab0315ba7808a393e2a0b5f69f952b7235/data/source/tim-lebo/london-crime/version/2011-Jul-07/manual/crime.png"
Using anchor relation
GET https://github.com/timrdf/vsr/raw/11e4a2ab0315ba7808a393e2a0b5f69f952b7235/data/source/tim-lebo/london-crime/version/2011-Jul-07/manual/crime.png HTTP/1.1 ... HTTP/1.1 200 OK ... Link: http://example.com/provenance/d3.prov; rel="provenance"; Link: https://github.com/timrdf/vsr/raw/11e4a2ab0315ba7808a393e2a0b5f69f952b7235/data/source/tim-lebo/london-crime/version/2011-Jul-07/manual/crime.png; rel="anchor"
HTML Document D5 as Email attachment
- Obtaining the document D
- HTML document D5 arrived as an attachment to the email http://lists.w3.org/Archives/Public/public-prov-wg/2011Jul/0031.html. The contents of the document is accessible locally to the email client.
- The HTML document has link elements embedded under in their HTML HEAD section that contain the provenance-uri and context-uri.
<html> <head> <link rel="provenance" href="http://example.com/provenance/d5.prov"> <link rel="anchor" href="urn:uuid:2d26db96-7174-4c26-9353-cbbf9b5991d2"> </head> <body> <p>There was a lot of crime in London last month.</p> </body> </html>
- Enacting the "Oh yeah?" feature
- A user requests the email client (E) used to obtain the HTML document attachment (D5) to enact the "Oh yeah?" feature on the whole document
- The email client examine the HTML document D5 to identify the link elements present under in the HTML HEAD section.
- The client extracts the provenance-uri information, I_P, from the href attribute of the provenance relation link element. In the above example, the value of I_P is http://example.com/provenance/d5.prov for D5.
- The client also extract the context-uri information, I_C, from the href attribute of the anchor relation link element. In the above example, the value of I_C is urn:uuid:2d26db96-7174-4c26-9353-cbbf9b5991d2 for D5.
- Accessing the provenance
- What information (I) does the client (E) need in order to access and retrieve the provenance for the documents D5?
- The email clients uses the default mechanism for dereferencing the provenance-uri I_P (http://example.com/provenance/d5.prov) for the document D5, which in our example is by using a HTTP GET to retrieve the provenance document P.
- The client examines the retrieved provenance document P to locate the "section" that corresponds to the context-uri I_C (urn:uuid:2d26db96-7174-4c26-9353-cbbf9b5991d2) that is the relevant provenance information for the document D5.
HTML Document D7 in the File System (Using provenance service)
- Obtaining the document D
- HTML document D7 is present in the file system at //acme/downloads/crime.html. The contents of this document is accessible to the local shell client.
- The HTML document has link elements embedded under in their HTML HEAD section that contain the provenance-service-uri and the context-uri
<html> <head> <link rel="provenance-service" href="http://tempuri.org/provenance_service"> <link rel="anchor" href="urn:uuid:1ed726e0-c99d-11e0-9572-0800200c9a66"> </head> <body> <p>There was a lot of crime in London last month.</p> </body> </html>
- Enacting the "Oh yeah?" feature
- A user requests a command shell (S) used to obtain the HTML document (D7) to enact the "Oh yeah?" feature on the whole document
- The shell client examines the HTML document D7 to identify the link elements present under in the HTML HEAD section.
- The client extracts the provenance-service-uri information, I_S, from the href attribute of the provenance-service relation link element. In the above example, the value of I_S is http://tempuri.org/provenance_service for D7.
- The client also extracts the context-uri information, I_C, from the href attribute of the anchor relation link element. In the above example, the value of I_C is urn:uuid:1ed726e0-c99d-11e0-9572-0800200c9a66 for D7.
- Accessing the provenance
- What information (I) do the clients (E, S) need in order to access and retrieve the provenance for the documents D5, D7?
- The shell client uses the provenance-service-uri I_S and the context-uri I_C to retrieve the provenance information.
- It uses the default mechanism for dereferencing the provenance-service-uri (http://tempuri.org/provenance_service), which in our example is by using a HTTP GET to retrieve the provenance service description document S. An example of this document in JSON format is shown below:
GET http://tempuri.org/provenance_service HTTP/1.1 ... HTTP/1.1 200 OK Content-Type: application/json ... { "provenance_service_uri": "http://tempuri.org/provenance_service", "location_template": "http://tempuri.org/provenance_service/location/?uri={uri}", "provenance_template": "http://tempuri.org/provenance_service/provenance/?uri={uri}", }
- The shell client then uses the provenance_template along with the context-uri I_C to construct the provenance-uri I_P for the document D7:
http://tempuri.org/provenance_service/provenance/?uri={urn%3Auuid%3A1ed726e0-c99d-11e0-9572-0800200c9a66}
- The client uses the default mechanism for dereferencing the provenance-uri I_P, which in our example is by using a HTTP GET to retrieve the provenance document P.
- The client examines the retrieved provenance document P to locate the "section" that corresponds to the context-uri I_C (urn:uuid:1ed726e0-c99d-11e0-9572-0800200c9a66) that is the relevant provenance information for the document D7.
Online Image Document D4 (Using provenance service)
- NOTE: This section is pending while the provenance-service relation is added to the HTTP Link section in the PAQ. The general approach will be similar to #HTML Document D7 in the File System (Using_provenance_service), with the provenance-service-uri being provided by the Link: HTTP response headers rather than the link HTML element.
Image Documents D6 and D8 as Email attachment or in File System
- NOTE: There is prescribed way to support an image attachment (D6) sent to public-prov-wg@w3.org or an image file e:\usbShare\crime.png (D8) present in the file system. The suggestion is to encode the provenance-uri or provenance-service'uri, along with the context-uri in the MIME headers of the email message, metadata of the image file or the metadata/attributes of the file in the file system.