lucmoreau / ProvToolbox

Java toolkit to create and convert W3C PROV data model representations, and build provenance-enabled applications in a variety of programming languages (java, python, typescript, javascript)
Other
75 stars 42 forks source link

Provconvert fails when parsing wasGeneratedBy #87

Closed nicholsn closed 10 years ago

nicholsn commented 10 years ago

I've noticed that provconvert fails when a wasGeneratedBy statement does not have a third parameter. So for example, this fails:

document
  prefix ex <http://example.com#>
  entity(ex:e1)  
  activity(ex:a1)
  wasGeneratedBy(ex:e1, ex:a1)
endDocument

But this passes:

document
  prefix ex <http://example.com#>
  entity(ex:e1)  
  activity(ex:a1)
  wasGeneratedBy(ex:e1, ex:a1, -)
endDocument

From the PROV-DM spec it looks like the "-" should be optional.

lucmoreau commented 10 years ago

Hi,

The behaviour is correct and compliant with http://www.w3.org/TR/prov-n/#expression-Generation

Where in prov-dm do you see '-' being optional in generations?

Professor Luc Moreau Electronics and Computer Science University of Southampton Southampton SO17 1BJ United Kingdom

On 7 Apr 2014, at 00:04, "Nolan Nichols" notifications@github.com<mailto:notifications@github.com> wrote:

I've noticed that provconvert fails when a wasGeneratedBy statement does not have a third parameter. So for example, this fails:

document prefix ex http://example.com# entity(ex:e1) activity(ex:a1) wasGeneratedBy(ex:e1, ex:a1) endDocument

But this passes:

document prefix ex http://example.com# entity(ex:e1) activity(ex:a1) wasGeneratedBy(ex:e1, ex:a1, -) endDocument

From the PROV-DM spec it looks like the "-" should be optional.

— Reply to this email directly or view it on GitHubhttps://github.com/lucmoreau/ProvToolbox/issues/87.

nicholsn commented 10 years ago

Thanks, my mistake. When I read that the time marker was optional, I didn't see that it needs a placeholder and thought it could simply be omitted.