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

usage of vargen in template expansion #158

Open
d0rg0ld opened this issue Aug 23, 2018 · 0 comments
Open

usage of vargen in template expansion #158

d0rg0ld opened this issue Aug 23, 2018 · 0 comments

Comments

@d0rg0ld
Copy link

d0rg0ld commented Aug 23, 2018

Using the following simple PROV template

document
        prefix var <http://openprovenance.org/var#>
        prefix vargen <http://openprovenance.org/vargen#>
        prefix ex <http://example.com#>
        bundle ex:b
                agent(var:measuringAgent,[prov:type = 'prov:Person'])
                entity(vargen:measurement, [prov:type="measurement"])
                activity(var:measuringActivity,[prov:location = 'var:tree'])
                wasAssociatedWith(vargen:assocId; var:measuringActivity, var:measuringAgent,-)
                wasGeneratedBy(vargen:measurement,var:measuringActivity,-)
        endBundle
endDocument

with these 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#> .

var:measuringAgent a prov:Entity ;
        tmpl:value_0 ex:forestWorker1 ;
        tmpl:value_1 ex:forestWorker2 .


var:tree a prov:Entity ;
        tmpl:2dvalue_0_0 ex:tree1 ;
        tmpl:2dvalue_1_0 ex:tree2 ;
        tmpl:2dvalue_2_0 ex:tree3 .

var:measuringActivity a prov:Entity ;
        tmpl:value_0 ex:measurement1 ;
        tmpl:value_1 ex:measurement2 ;
        tmpl:value_2 ex:measurement3 .

with provconvert results in the following expansion

document
bundle ex:b
prefix var <http://openprovenance.org/var#>
prefix ex <http://example.com#>
prefix uuid <urn:uuid:>

agent(ex:forestWorker1,[prov:type = 'prov:Person'])
agent(ex:forestWorker2,[prov:type = 'prov:Person'])
entity(uuid:95fc3d3a-f390-4a7d-9e83-ce3713259046,[prov:type = "measurement" %% xsd:string])
activity(ex:measurement1,-,-,[prov:location = 'ex:tree1'])
activity(ex:measurement2,-,-,[prov:location = 'ex:tree2'])
activity(ex:measurement3,-,-,[prov:location = 'ex:tree3'])
wasAssociatedWith(uuid:3aaa7767-be52-4c3b-a1c9-668dac8e2002;ex:measurement1,ex:forestWorker1,-)
wasAssociatedWith(uuid:3aaa7767-be52-4c3b-a1c9-668dac8e2002;ex:measurement2,ex:forestWorker1,-)
wasAssociatedWith(uuid:3aaa7767-be52-4c3b-a1c9-668dac8e2002;ex:measurement3,ex:forestWorker1,-)
wasAssociatedWith(uuid:3aaa7767-be52-4c3b-a1c9-668dac8e2002;ex:measurement1,ex:forestWorker2,-)
wasAssociatedWith(uuid:3aaa7767-be52-4c3b-a1c9-668dac8e2002;ex:measurement2,ex:forestWorker2,-)
wasAssociatedWith(uuid:3aaa7767-be52-4c3b-a1c9-668dac8e2002;ex:measurement3,ex:forestWorker2,-)
wasGeneratedBy(uuid:95fc3d3a-f390-4a7d-9e83-ce3713259046,ex:measurement1,-)
wasGeneratedBy(uuid:95fc3d3a-f390-4a7d-9e83-ce3713259046,ex:measurement2,-)
wasGeneratedBy(uuid:95fc3d3a-f390-4a7d-9e83-ce3713259046,ex:measurement3,-)
endBundle
endDocument

It seems that in both the association and the entity case, vargen creates one UUID per vargen variable, although expansion should - to my understanding - result in one UUID per expanded association/entity instance

Thanks,
Doron

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

No branches or pull requests

1 participant