Data
incubatingStatus 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 .
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 athttps://ujg.specs.openuji.org/ed/ns/datadata.context.jsonld: JSON-LD term mappings, published athttps://ujg.specs.openuji.org/ed/ns/data.context.jsonlddata.shape.ttl: SHACL validation rules, published athttps://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:dataReflinks a GraphStateorCompositeStatetoData.
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.
@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.
{
"@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.
@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.
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.
Shared data identity: Multiple state-like nodes MAY reference the same
Dataresource when they intentionally share a data context or binding identity.Graph preservation:
dataRefMUST NOT change Graph topology or traversal semantics.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.
Private lifecycle details: Fetch policy, cache behavior, lifecycle status, and reactive-store bindings SHOULD remain in Core
extensionsunless a future optional module defines them as interoperable vocabulary.
8. Minimal Example
{
"@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"
}
]
}