UJG / Editor's Draft /
GitHub
Table of Contents
  • 1Overview
  • 2Normative Artifacts
  • 3Terminology
  • 4Attachment Model
  • 5Ontology
  • 6JSON-LD Context
  • 7Validation
  • 8Minimal Example
W3C Community Group Draft Report

Data

incubating

Status of this Document

This report was published by the User Journal Graph Community Group . It is not a W3C Standard nor is it on the W3C Standards Track. Please note that under the W3C Community Contributor License Agreement (CLA) there is a limited opt-out and other conditions apply. Learn more about W3C Community and Business Groups .

Last Update
2026-06-09
Editors
  • Seva Dolgopolov
Group
User Journal Graph Community Group
Repository
View Source
License
W3C-Software-and-Document

1. Overview

This optional module defines a minimal graph-native vocabulary for attaching data context or binding identity to Graph State and CompositeState nodes.

Without a data primitive, implementations tend to invent incompatible state-management, data-context, and binding conventions inside opaque extensions. This module gives producers a shared place to say which addressable data resource belongs to a state-like node while leaving lifecycle and runtime details for later work.

This first version is intentionally small. It declares that a state-like node has an associated Data resource; it does not define schemas, reactive stores, fetch policies, cache directives, lifecycle status, authentication context, or realtime behavior.

2. Normative Artifacts

This module is published through the following artifacts:

  • data.ttl: ontology, published at https://ujg.specs.openuji.org/ed/ns/data

  • data.context.jsonld: JSON-LD term mappings, published at https://ujg.specs.openuji.org/ed/ns/data.context.jsonld

  • data.shape.ttl: SHACL validation rules, published at https://ujg.specs.openuji.org/ed/ns/data.shape

Examples in this page compose the shared baseline context https://ujg.specs.openuji.org/ed/ns/context.jsonld with the Data context.

3. Terminology

  • Data: An addressable declaration of data context or binding identity for a Graph state-like node.

  • Data attachment: The relation that assigns a state to a data declaration.

4. Attachment Model

The module introduces one canonical interoperable attachment:

  • data:dataRef links a Graph State or CompositeState to Data.

A state without dataRef remains fully valid and traversable. Consumers MAY ignore this module and still process the graph.

5. Ontology

The normative Data ontology is defined below and is published at https://ujg.specs.openuji.org/ed/ns/data.

turtle
@prefix ujg: <https://ujg.specs.openuji.org/ed/ns/core#> .
@prefix ujggraph: <https://ujg.specs.openuji.org/ed/ns/graph#> .
@prefix ujgdata: <https://ujg.specs.openuji.org/ed/ns/data#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix dct: <http://purl.org/dc/terms/> .

<https://ujg.specs.openuji.org/ed/ns/data#> a owl:Ontology ;
  rdfs:label "UJG Data Editor's Draft Vocabulary"@en ;
  dct:description "UJG Data ontology declaration" .

### Classes

ujgdata:Data a owl:Class ;
  rdfs:subClassOf ujg:Node .

### Properties

ujgdata:dataRef a owl:ObjectProperty ;
  rdfs:domain [
    a owl:Class ;
    owl:unionOf ( ujggraph:State ujggraph:CompositeState )
  ] ;
  rdfs:range ujgdata:Data .
@prefix ujg: <https://ujg.specs.openuji.org/ed/ns/core#> .
@prefix ujggraph: <https://ujg.specs.openuji.org/ed/ns/graph#> .
@prefix ujgdata: <https://ujg.specs.openuji.org/ed/ns/data#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix dct: <http://purl.org/dc/terms/> .

<https://ujg.specs.openuji.org/ed/ns/data#> a owl:Ontology ;
  rdfs:label "UJG Data Editor's Draft Vocabulary"@en ;
  dct:description "UJG Data ontology declaration" .

### Classes

ujgdata:Data a owl:Class ;
  rdfs:subClassOf ujg:Node .

### Properties

ujgdata:dataRef a owl:ObjectProperty ;
  rdfs:domain [
    a owl:Class ;
    owl:unionOf ( ujggraph:State ujggraph:CompositeState )
  ] ;
  rdfs:range ujgdata:Data .

6. JSON-LD Context

The normative Data JSON-LD context is defined below and is published at https://ujg.specs.openuji.org/ed/ns/data.context.jsonld.

json-ld
{
  "@context": {
    "@version": 1.1,

    "ujgdata": "https://ujg.specs.openuji.org/ed/ns/data#",
    "data": "https://ujg.specs.openuji.org/ed/ns/data#",

    "Data": "ujgdata:Data",

    "dataRef": {
      "@id": "ujgdata:dataRef",
      "@type": "@id"
    }
  }
}
{
  "@context": {
    "@version": 1.1,

    "ujgdata": "https://ujg.specs.openuji.org/ed/ns/data#",
    "data": "https://ujg.specs.openuji.org/ed/ns/data#",

    "Data": "ujgdata:Data",

    "dataRef": {
      "@id": "ujgdata:dataRef",
      "@type": "@id"
    }
  }
}

7. Validation

The normative Data SHACL shape is defined below and is published at https://ujg.specs.openuji.org/ed/ns/data.shape.

turtle
@prefix ujggraph: <https://ujg.specs.openuji.org/ed/ns/graph#> .
@prefix ujgdata: <https://ujg.specs.openuji.org/ed/ns/data#> .
@prefix ujgdatashape: <https://ujg.specs.openuji.org/ed/ns/data.shape#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

ujgdatashape:StateDataShape a sh:NodeShape ;
  sh:targetClass ujggraph:State, ujggraph:CompositeState ;
  sh:nodeKind sh:IRI ;

  sh:property [
    sh:path ujgdata:dataRef ;
    sh:class ujgdata:Data ;
    sh:nodeKind sh:IRI ;
    sh:maxCount 1 ;
  ] .

ujgdatashape:DataShape a sh:NodeShape ;
  sh:targetClass ujgdata:Data ;
  sh:nodeKind sh:IRI .
@prefix ujggraph: <https://ujg.specs.openuji.org/ed/ns/graph#> .
@prefix ujgdata: <https://ujg.specs.openuji.org/ed/ns/data#> .
@prefix ujgdatashape: <https://ujg.specs.openuji.org/ed/ns/data.shape#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

ujgdatashape:StateDataShape a sh:NodeShape ;
  sh:targetClass ujggraph:State, ujggraph:CompositeState ;
  sh:nodeKind sh:IRI ;

  sh:property [
    sh:path ujgdata:dataRef ;
    sh:class ujgdata:Data ;
    sh:nodeKind sh:IRI ;
    sh:maxCount 1 ;
  ] .

ujgdatashape:DataShape a sh:NodeShape ;
  sh:targetClass ujgdata:Data ;
  sh:nodeKind sh:IRI .

The rules below define the remaining module semantics beyond the structural constraints captured by the SHACL shape.

  1. Declaration only: Data describes that a state-like node has associated data identity; it does not define how the data is loaded, updated, cached, or observed.

  2. Shared data identity: Multiple state-like nodes MAY reference the same Data resource when they intentionally share a data context or binding identity.

  3. Graph preservation: dataRef MUST NOT change Graph topology or traversal semantics.

  4. Graceful degradation: Consumers that do not implement this module MAY ignore Data semantics, but SHOULD preserve recognized JSON-LD data during read-transform-write when possible.

  5. Private lifecycle details: Fetch policy, cache behavior, lifecycle status, and reactive-store bindings SHOULD remain in Core extensions unless a future optional module defines them as interoperable vocabulary.

8. Minimal Example

json
{
  "@context": [
    "https://ujg.specs.openuji.org/ed/ns/context.jsonld",
    "https://ujg.specs.openuji.org/ed/ns/data.context.jsonld"
  ],
  "@id": "https://example.com/ujg/data/checkout.jsonld",
  "@type": "UJGDocument",
  "nodes": [
    {
      "@id": "urn:state:payment",
      "@type": "State",
      "label": "Payment",
      "dataRef": "urn:data:checkout-draft"
    },
    {
      "@id": "urn:data:checkout-draft",
      "@type": "Data"
    }
  ]
}
{
  "@context": [
    "https://ujg.specs.openuji.org/ed/ns/context.jsonld",
    "https://ujg.specs.openuji.org/ed/ns/data.context.jsonld"
  ],
  "@id": "https://example.com/ujg/data/checkout.jsonld",
  "@type": "UJGDocument",
  "nodes": [
    {
      "@id": "urn:state:payment",
      "@type": "State",
      "label": "Payment",
      "dataRef": "urn:data:checkout-draft"
    },
    {
      "@id": "urn:data:checkout-draft",
      "@type": "Data"
    }
  ]
}

Copyright © 2026 the Contributors to the ujg/modules/data, published by the User Journal Graph Community Group under the W3C Community Contributor License Agreement (CLA) . A human-readable summary is available.

generated by Speculator