W3C home > Mailing lists > Public > public-linked-json@w3.org > May 2013

RE: role syntax and role instance - help needed

From: Marian, Radu <radu.marian@baml.com>
Date: Fri, 17 May 2013 21:33:19 +0000
To: Manu Sporny <msporny@digitalbazaar.com>
Cc: "'Linked JSON'" <public-linked-json@w3.org>
Message-id: <8EB326E198A85A409CDBB4297857CACB01393C59@smtp_mail.bankofamerica.com>
Manu,

Thanks for your valuable and detailed response.  After re-reading it again I can provide the following additional details:

1. Per the ontology (aka data model[1]) a Role cannot exist without corresponding Task(s).  And since you said that "Data model expression can be performed by JSON-LD" - I would like to "express" the instance of Role this way:

{
    "@context": {
        "@vocab": "http://ac.vocab.example.org",
        "BusinessRole": {
            "@id": "http://ac.vocab.example.org#BusinessRole",
            "@type": "@id",
            "enablesExecutionOf": {
                "@id": "http://ac.vocab.example.org#enablesExecutionOf",
                "@type": "@id",
                "Task": {
                    "@id": "http://ac.vocab.example.org#Task",
                    "@type": "@id"
                }
            }
        },
        "name": "http://access.example.org#name"
    },
    "@id": "http://ac.vocab.example/ids/3003",
    "@type": "BusinessRole",
    "name": "Teller",
    "enablesExecutionOf:Task:id": [
        "5005",
        "5025"
    ]
}

I know the following may not follow the spec - "enablesExecutionOf:Task:id" ...  My intent is to make it less verbose... What would be the right way to express it?

[1] https://www.oasis-open.org/committees/download.php/49053/entitlement.ontology.png 

Thank you!
Radu 


-----Original Message-----
From: Manu Sporny [mailto:msporny@digitalbazaar.com] 
Sent: Monday, May 06, 2013 4:19 PM
To: Marian, Radu
Cc: 'Linked JSON'
Subject: Re: role syntax and role instance - help needed

On 05/03/2013 04:38 PM, Marian, Radu wrote:
> I am new to JSON-LD but trying (hard) to make sense out of it.  I have 
> the following ontology model:
> 
> https://www.oasis-open.org/committees/download.php/49053/entitlement.o
> ntology.png

Ok.

> Below is how I represent the syntax of Role - pretty much following 
> Role to Task to Resource and Action relationships.  I may be doing 
> something wrong.... Do I need to use @type instead?  My other question 
> is that I would like to create a Role instance json-ld but struggling 
> how would I express it.... Roles do not have a meaning instead they 
> inherit the meaning from Task (i.e. use Tasks description to provide a 
> Role description).

I think you may be conflating data model validation with data model expression. Data model validation is often performed at the application layer. Data model expression can be performed by JSON-LD.

You seem to be trying to write the context as if it was the thing that is used to validate the Entitlement Ontology that you link to. That is not the purpose of a JSON-LD Context. Here's an explanation of what the JSON-LD Context does:

http://www.w3.org/TR/json-ld/#the-context

I think what you want is something like this for the Context:

{
  "BusinessRole": "http://access.example.org#BusinessRole",
  "name": "http://access.example.org#name",
  "jobFunction": "http://access.example.org#jobFunction"
}

and then this as your data:

{
  "@context": {
    "BusinessRole": "http://access.example.org#BusinessRole",
    "name": "http://access.example.org#name",
    "jobFunction": "http://access.example.org#jobFunction"
  }
  "@id": "http://example.org/ids/3003",
  "@type": "BusinessRole",
  "name": "Physical Site Security",
  "jobFunction": "Ensuring security of physical site..."
}

Whether or not the data above validates against your data model is something that must be written at the application layer. You could use JSON Schema to accomplish something along these lines.

I don't think we'll be able to help you more until you provide the type of data that you're trying to express.

-- manu

--
Manu Sporny (skype: msporny, twitter: manusporny, G+: +Manu Sporny) Founder/CEO - Digital Bazaar, Inc.
blog: Meritora - Web payments commercial launch http://blog.meritora.com/launch/

----------------------------------------------------------------------
This message, and any attachments, is for the intended recipient(s) only, may contain information that is privileged, confidential and/or proprietary and subject to important terms and conditions available at http://www.bankofamerica.com/emaildisclaimer.   If you are not the intended recipient, please delete this message.
Received on Friday, 17 May 2013 21:34:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:53:22 UTC