Giter VIP home page Giter VIP logo

Comments (6)

lucmoreau avatar lucmoreau commented on August 25, 2024

Hi Satra

See https://www.w3.org/TR/prov-n/#component4

Also note you shouldn't use xsd:QName but prov:QUALIFIED_NAME

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

On 19 Mar 2016, at 22:13, Satrajit Ghosh <[email protected]mailto:[email protected]> wrote:

@lucmoreauhttps://github.com/lucmoreau and @trungdonghttps://github.com/trungdong - quick clarification question here:

in the example below, i feel the id (ex:bundle1) should remain in the another.orghttp://another.org namespace, even though the content is in example.orghttp://example.org. i couldn't find a clear place in the prov-dm document that clarifies scoping rules of prefixes. if you have a pointer that would be great.

document
prefix foo http://example.org/
prefix ex http://another.org/

entity(foo:bundle1, [prov:type="prov:Bundle" %% xsd:QName])
entity(ex:bundle2, [prov:type="prov:Bundle" %% xsd:QName])
bundle ex:bundle2
prefix ex http://another.org/

used(ex:use2; ex:aa1, ex:ee1, -)
activity(ex:aa1, -, -)
entity(ex:ee1)

endBundle
bundle ex:bundle1
prefix ex http://example.org/

used(ex:use1; ex:a1, ex:e1, -)
activity(ex:a1, -, -)
entity(ex:e1)

endBundle
endDocument

-------- Expected RDF from Web service ---------

@Prefix prov: http://www.w3.org/ns/prov# .
@Prefix xsd: http://www.w3.org/2001/XMLSchema# .
@Prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# .
@Prefix ex: http://another.org/ .
@Prefix rdfs: http://www.w3.org/2000/01/rdf-schema# .
@Prefix foo: http://example.org/ .

{
foo:bundle1 a prov:Entity , "prov:Bundle"^^xsd:QName .
ex:bundle2 a prov:Entity , "prov:Bundle"^^xsd:QName .
}

ex:bundle2 {
ex:use2 a prov:Usage ;
prov:entity ex:ee1 .
ex:aa1 prov:qualifiedUsage ex:use2 ;
a prov:Activity .
ex:ee1 a prov:Entity .
}

foo:bundle1 {
foo:use1 a prov:Usage ;
prov:entity foo:e1 .
foo:a1 prov:qualifiedUsage foo:use1 ;
a prov:Activity .
foo:e1 a prov:Entity .
}


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com//issues/76

from prov.

satra avatar satra commented on August 25, 2024

thanks @lucmoreau - this is the last bit to fix given the test set.

@trungdong - the qname thing is happening within the provn serialization in the prov library. could you please take a look at that? i'm simply reading the json file and calling get_provn on the object.

from prov.

trungdong avatar trungdong commented on August 25, 2024

@satra, you may ran the above example with old code. The current version of PROV should give:
entity(ex:e1, [prov:type='prov:Bundle']) instead.

from prov.

satra avatar satra commented on August 25, 2024

@trungdong - this is with the current version.

In [2]: g = pm.ProvDocument.deserialize('/software/nipy-repo/w3c/prov/prov/tests/json/bundle1.json')
INFO:rdflib:RDFLib Version: 4.2.1

In [3]: print(g.get_provn())
document
  prefix ex <http://example.org/>

  entity(ex:bundle2, [prov:type="prov:Bundle" %% xsd:QName])
  entity(ex:bundle1, [prov:type="prov:Bundle" %% xsd:QName])
  bundle ex:bundle1
    prefix ex <http://example.org/>

    used(ex:use1; ex:a1, ex:e1, -)
    activity(ex:a1, -, -)
    entity(ex:e1)
  endBundle
  bundle ex:bundle2
    prefix ex <http://example.org/>

    used(ex:use2; ex:aa1, ex:ee1, -)
    activity(ex:aa1, -, -)
    entity(ex:ee1)
  endBundle
endDocument

In [4]: import prov

In [5]: prov.__version__
Out[5]: u'1.4.1.dev1'

from prov.

trungdong avatar trungdong commented on August 25, 2024

@satra, these are left-over remnants from a long time ago that have escaped my attention.
They all now updated. Thanks.

Is there anything else with this issue? Should we close it?

from prov.

satra avatar satra commented on August 25, 2024

thanks @trungdong

from prov.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.