Giter VIP home page Giter VIP logo

Comments (5)

MFSY avatar MFSY commented on June 26, 2024

There is indeed a prov:qualifiedGeneration property in the W3C PROV-O recommendation. It is used to provide a context about how an entity was generated (generation time, ....). It's range (the type of its value) is prov:Generation for which we already have a schema written.

Now there is a difference between prov:qualifiedUsage and prov:qualifiedGeneration:

  • prov:qualifiedUsage has a prov:Activity as domain and prov:Usage as range
  • prov: qualifiedGeneration has a prov:Entity as domain and prov:Generation as range

So prov: qualifiedGeneration is entity centric whereas prov:qualifiedUsage is activity centric.

We have two options here:

  • Add in the prov:Entity schema a property prov:qualifiedGeneration with prov:Generation as value type. Which means that to know which entity is generated from an activity and how it was generated one has to : 1) read the prov:generated activity property but also look up all generation objects that has the current activity id as prov:activity value; 2) or consistently add a generated entity in the current activity prov:generated list whenever a generation object is created.

  • Become activity centric. Link to an activity all information about what entities was used and how, what entities was generated and how. This can be achieved by introducing a reverseActivityGeneration property which has an prov:Activity as domain and a prov:Generation as range and a reverseQualifiedGeneration which has a proven:Generation as domain and an entity as rang.

"reverseActivityGeneration" : {
      "@reverse" : "http://www.w3.org/ns/prov#activity",
      "@type" : "@id",
      "@container" : "@set"
    },
"reverseQualifiedGeneration" : {
      "@reverse" : "http://www.w3.org/ns/prov#qualifiedGeneration",
      "@type" : "@id"
    }

An activity payload looks like:

{
  "@type": "prov:Activity",
  "@id": "activity_URI",
 "used":[],
 "qualifiedUsage":[],
 "generated":[],
 "reverseActivityGeneration":[
    {
      "@type":"prov:Generation"
      "reverseQualifiedGeneration": "entity_URI",
      "hadRole": "role_URI",
      "atTime":"2016-09-10T06:51:00+02:00"
    }
  ]
}

Thoughts ?

from nexus-bbp-domains.

jdcourcol avatar jdcourcol commented on June 26, 2024

I saw that in:

So this is what I want to express:
'''
:output
a prov:Entity;
prov:wasGeneratedBy :a;
.
:metadata
a prov:Entity;
prov:wasGeneratedBy :a;
.
:a
a prov:Activity;

prov:generated :output;
prov:qualifiedGeneration [
   a prov:Generation;
   prov:qualifiedEntity         :output;
   prov:hadRole            workflow:output;
];

prov:generated :metadata;
prov:qualifiedGeneration [
   a prov:Generation;
   prov:qualifiedEntity         :metadata;
   prov:hadRole            workflow:metadata-of-output-with-log;
];

'''

I sounds that with that approach, If I have an activity, it gives me the list of "prov:qualifiedGeneration" as a list of properties.

from nexus-bbp-domains.

MFSY avatar MFSY commented on June 26, 2024

Can I know the source of the prov:qualifiedEntity property ? I'm not seeing it in the W3C PROV-O specification.

from nexus-bbp-domains.

jdcourcol avatar jdcourcol commented on June 26, 2024

I think they don't have qualifiedEntity anymore

from nexus-bbp-domains.

MFSY avatar MFSY commented on June 26, 2024

I think they don't have it. We use the W3C PROV-O recommendation as reference. Now I see in the example you provided that you adopted both entity and activity centric views :

Entity centric view:

:output
a prov:Entity;
prov:wasGeneratedBy :a.

Activity centric view:

:a a prov:Activity;
prov:generated :output.

I would recommend to choose one view to ease the querying. Otherwise you'll have to check both prov:wasGeneratedBy and prov:generated to know what entities was generated by a given activity.

I propose the two following options:

  1. Activity centric view: from the activity towards the generated entities (how many entities are being generated ?) with the generation context.
{
  "@type": "prov:Activity",
  "@id": "activity_URI",
 "prov used":[],
 "prov qualifiedUsage":[],
 "prov generated":[],
 "qualifiedEntityGeneration":[
    {
      "@type":"prov:Generation"
      "generatedEntity": "entity_URI",
      "prov hadRole": "role_URI",
      "prov atTime":"2016-09-10T06:51:00+02:00"
    }
  ]
}

qualifiedEntityGeneration and generatedEntity respectively define as (in the @context):

"qualifiedEntityGeneration" : {
      "@reverse" : "http://www.w3.org/ns/prov#activity",
      "@type" : "@id",
      "@container" : "@set"
    },
"generatedEntity" : {
      "@reverse" : "http://www.w3.org/ns/prov#qualifiedGeneration",
      "@type" : "@id"
    }
  1. Entity centric view: from an entity towards the generating activity with the generation context
{
  "@type": "prov:Entity",
  "@id": "entity_URI",
 "prov:wasGeneratedBy":"activity_URI",
 "prov:wasDerivedFrom":[],
 "prov:qualifiedGeneration":[
    {
      "@type":"prov:Generation"
      "prov:activity": "activity_URI",
      "prov:hadRole": "role_URI",
      "prov:atTime":"2016-09-10T06:51:00+02:00"
    }
  ]
}

In this second option the entity that was used an how they used are recorded in the activity activity_URI or in other usage objects.

Thoughts ?

from nexus-bbp-domains.

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.