Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prov-template: "Non Prov" statements #156

Open
d0rg0ld opened this issue Jun 19, 2018 · 1 comment
Open

prov-template: "Non Prov" statements #156

d0rg0ld opened this issue Jun 19, 2018 · 1 comment

Comments

@d0rg0ld
Copy link

d0rg0ld commented Jun 19, 2018

Hello!

In the book "Provenance: An Introduction to PROV", there is a recipe 4.1.9 "Modeling Sub-Activities" where it is suggested that the DC-terms vocabulary should be used to represent "part of" relationships between activities.

I tried to include that in a PROV template, but such "non prov statements" obviously get ignored during expansion.

My question would therefore be if there is any workaround in this regard, or I simply have to live with being limited to the PROV vocabulary when using PROV-template?

Thanks and best regards,
Doron

@d0rg0ld
Copy link
Author

d0rg0ld commented Aug 13, 2018

I did some more experiments regarding arbitrary namespaces in attribute-value pairs and found out the following:

while it seems possible to include attributes such as dc:partOf in the template, they only appear in the expanded doc when the associated value is not a variable:

the simple template

document
prefix var http://openprovenance.org/var#
prefix ex http://example.com#
prefix tmpl http://openprovenance.org/tmpl#
prefix dc http://purl.org/dc/elements/1.1/
bundle ex:b
entity(var:upperEntity)
entity(var:lowerEntity, [dc:partOf='var:upperEntity'])
endBundle
endDocument

with bindings

prefix prov: http://www.w3.org/ns/prov# .
@Prefix tmpl: http://openprovenance.org/tmpl# .
@Prefix var: http://openprovenance.org/var# .
@Prefix ex: http://example.com# .
@Prefix dc: http://purl.org/dc/elements/1.1/ .
var:upperEntity a prov:Entity ;
tmpl:value_0 ex:someUpperEntityInstance .
var:lowerEntity a prov:Entity ;
tmpl:value_0 ex:someLowerEntityInstance .

expands to

document
bundle ex:b
prefix ex http://example.com#
entity(ex:someUpperEntityInstance)
entity(ex:someLowerEntityInstance)
endBundle
endDocument

ignoring the part of relationship, while explicitly setting the "target" of dc:partOf

document
prefix var http://openprovenance.org/var#
prefix ex http://example.com#
prefix tmpl http://openprovenance.org/tmpl#
prefix dc http://purl.org/dc/elements/1.1/
bundle ex:b
entity(var:upperEntity)
entity(var:lowerEntity, [dc:partOf='ex:someUpperEntityInstance'])
endBundle
endDocument

is being copied to the expanded doc

document
bundle ex:b
prefix dc http://purl.org/dc/elements/1.1/
prefix ex http://example.com#
entity(ex:someUpperEntityInstance)
entity(ex:someLowerEntityInstance,[dc:partOf = 'ex:someUpperEntityInstance'])
endBundle
endDocument

Moreover, as described in the PROV Template Specification at https://provenance.ecs.soton.ac.uk/prov-template-2014-06-07/ it is stated that statement level variables can occur also at attribute position, enabling to declare things like

document
prefix var http://openprovenance.org/var#
prefix ex http://example.com#
prefix tmpl http://openprovenance.org/tmpl#
prefix dc http://purl.org/dc/elements/1.1/
bundle ex:b
entity(var:upperEntity)
entity(var:lowerEntity, [var:attr1='ex:someUpperEntityInstance'])
endBundle
endDocument

and expanding accordingly. The example above, however, gets ignored too during expansion:

document
bundle ex:b
prefix var http://openprovenance.org/var#
prefix ex http://example.com#
entity(ex:someUpperEntityInstance)
entity(ex:someLowerEntityInstance,[var:attr1 = 'ex:someUpperEntityInstance'])
endBundle
endDocument

I think that enabling template declarations such as

entity(var:lowerEntity, [var:attr1='var:value1'])

would be quite helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants