Skip to content

Context file to match approved draft - #5

Open
jgoodell2 wants to merge 2 commits into
stuartasutton:mainfrom
jgoodell2:main
Open

Context file to match approved draft#5
jgoodell2 wants to merge 2 commits into
stuartasutton:mainfrom
jgoodell2:main

Conversation

@jgoodell2

Copy link
Copy Markdown

This new file matches the approved draft terms and ranges... except the property "type" was used in the CompetencyDefinition class so I changed it to competencyType here. (I'll post an issue about this. Maybe we need to fix typo in standard if there is no workaround.)

jgoodell2 added 2 commits May 17, 2023 20:24
This context aligns with the approved draft of 1484.20.3.
@stuartasutton

stuartasutton commented May 18, 2023 via email

Copy link
Copy Markdown
Owner

@stuartasutton stuartasutton left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the function of this file. Is it supposed to be some form of @context?

@jgoodell2

jgoodell2 commented May 19, 2023 via email

Copy link
Copy Markdown
Author

@jgoodell2

Copy link
Copy Markdown
Author

...The file naming convention assumes the context file has this authoritative source: https://opensource.ieee.org/scd/ so the full path to the context would be https://opensource.ieee.org/scd/v2023.json ...but maybe the file ext should be jsonld i.e. https://opensource.ieee.org/scd/v2023.jsonld

@stuartasutton

Copy link
Copy Markdown
Owner

Jim, my point is that the v2023.json file is not a recognizable context file.

@jgoodell2

Copy link
Copy Markdown
Author

Stuart, Ok, I'll move a draft into the gitlab (https://opensource.ieee.org/scd/ ) so I can validate with the JSON-LD Playground since that requires resolvability. And I'll work on fixing it to be a recognizable context file. (Since I don't do this much I have some learning to do in knowing what is recognizable/valid, will use the tool and figure it out.)

@stuartasutton

stuartasutton commented May 20, 2023

Copy link
Copy Markdown
Owner

Jim, my apologies; I shouldn't just say "no"; I should explain why I am saying that the v2023.json document is not a valid context file. The apparent goal of the v2023.json document appears to be to provide JSON (JSONLD) identifying the six classes of the model and the properties associated to each; i.e., the properties associate with the classes via their sdo:domainIncludes statements in the definition tables and in the RDFS schema. While this is perhaps a reasonable goal, it is not the role that a context file plays in JSON-LD.

As grounding for what the context field is actually capable of doing, I point you to the section on context in the JSON-LD 1.1: A JSON-based Serialization for Linked Data and in particular Example 4 in §3.1 The Context:

{
  "@context": {
    "name": "http://schema.org/name",
    ↑ This means that 'name' is shorthand for 'http://schema.org/name'
    "image": {
      "@id": "http://schema.org/image",
      ↑ This means that 'image' is shorthand for 'http://schema.org/image'
      "@type": "@id"
      ↑ This means that a string value associated with 'image'
        should be interpreted as an identifier that is an IRI
    },
    "homepage": {
      "@id": "http://schema.org/url",
      ↑ This means that 'homepage' is shorthand for 'http://schema.org/url'
      "@type": "@id"
      ↑ This means that a string value associated with 'homepage'
        should be interpreted as an identifier that is an IRI 
    }
  }
}

"Simply speaking, a context is used to map terms to IRIs." In Example 4, the @id maps the terms image and homepage to their namespace URI as defined in an RDFS schema. The @type identifies the kind of object defined for the term—i.e., the @id for both image and homepage means that their string value should be interpreted as an identifier that is an IRI. This is ALL the @context does.

It is important that the namespace IRIs to which the terms are mapped exist in an openly accessible RDFS schema in JSON-LD. Failure to resolve to an actual schema via @context terms will make most RDF capable validators fail when there is any attempt to translate the JSON-LD into any other flavor of RDF (e.g., Turtle, N-Triples, RDF/XML etc). Failure to provide an RDF schema for its terms is one reason the current CASE-LD specification fails.

There is a @context file that meets the term mapping goal already done in github at https://github.com/stuartasutton/P1484.20.3/blob/main/scdContext.jsonld. There is also a RDF schema file in JSON-LD that is referenced from the @context file at https://github.com/stuartasutton/P1484.20.3/blob/main/scdSchema.jsonld. Both files need an update review.

Jim, if you actually want to do a machine encoding that explicitly ties properties to classes, I suggest that you run that notion past Phil and that a "default" ShEx and/or SHACL version might meet that need. I think the Dublin Core application profile CSV tool could transform a CSV version of the schema to ShEx and/or SHACL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants