Comments (6)
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.
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.
@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.
@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.
@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.
thanks @trungdong
from prov.
Related Issues (20)
- prov prefix missing from provjson and provn serializers HOT 1
- Issue for PROV-N serializer when destination is specified
- Sphinx docs don't contain prov_to_graph HOT 1
- missing label property in ProvBundle class HOT 3
- More example usages HOT 2
- prefixes from external context HOT 1
- pydot would not work until I installed graphviz on macOS HOT 2
- Raise ValueError for empty string namespace prefix HOT 3
- No type hints for ProvDocument.agent etc. HOT 1
- ProvDocument.set_default_namespace doesn't add to namespaces list HOT 1
- JSON deserialisation/serialisation: objects are duplicated HOT 2
- New ProvRecord objects aren't added to bundles HOT 2
- RecursionError when using .serialize
- Newbie question on how to work with thematic ontologies HOT 3
- Add prov_doc to jena datastore? HOT 1
- serialization takes a long time HOT 3
- failing test when building HOT 1
- Adding a rdfs:label or description to Prov:Activity HOT 3
- ProvRecord.get_attribute behaviour differs from its doc string
- Add convenient assertion methods for revision, quotation, primary source, mention & influence records
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prov.