UJG / First Editors’ Draft /
GitHub
Table of Contents
  • 1Overview
  • 2Terminology
  • 3Ontology
  • 4JSON-LD Context
    • 4.1Context Composition
      • 4.1.1Composed Context Example
    • 4.2Extensions
    • 4.3Import Resolution
  • 5Validation
  • 6Examples
    • 6.1Minimal Document
    • 6.2Document With Relative Imports
    • 6.3Document With Nodes
W3C Community Group Draft Report

Core

draft

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 .

Status
CG-DRAFT
Version
2026.06
Published
2026-06-10
Last Update
2026-06-10
Editors
  • Seva Dolgopolov
Group
User Journal Graph Community Group
Repository
View Source
License
W3C-Software-and-Document

1. Overview

This module defines the shared Core artifacts for UJG documents.

The Core module is published under https://ujg.specs.openuji.org/tr/2026.06/ns/. Implementations should use these canonical URLs when referencing the Core vocabulary, JSON-LD context, and SHACL validation shape.

The Core module consists of:

  • core.ttl: the ontology for Core classes and properties, published at https://ujg.specs.openuji.org/tr/2026.06/ns/core

  • core.context.jsonld: the JSON-LD context for compact JSON-LD documents, published at https://ujg.specs.openuji.org/tr/2026.06/ns/core.context.jsonld

  • core.shape.ttl: the SHACL shape used for Core validation, published at https://ujg.specs.openuji.org/tr/2026.06/ns/core.shape

2. Terminology

  • UJGDocument: The Core document class for a JSON-LD bundle.

  • Node: The base Core class for addressable objects that may appear in nodes.

3. Ontology

The normative Core ontology is defined in the Turtle document below and is published at https://ujg.specs.openuji.org/tr/2026.06/ns/core. It declares the UJGDocument and Node classes together with the Core properties used by this module.

turtle
@prefix ujg: <https://ujg.specs.openuji.org/tr/2026.06/ns/core#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .


<https://ujg.specs.openuji.org/tr/2026.06/ns/core#> a owl:Ontology ;
  rdfs:label "UJG Core Editor's Draft Vocabulary"@en ;
  dct:description "UJG Ontology declaration" .

### Classes

ujg:UJGDocument a owl:Class .
ujg:Node        a owl:Class .

ujg:documentImports a owl:ObjectProperty ;
  rdfs:domain ujg:UJGDocument ; 
  rdfs:range ujg:UJGDocument .

ujg:documentNodes a owl:ObjectProperty;
  rdfs:domain ujg:UJGDocument ; 
  rdfs:range ujg:Node .

### Properties

ujg:extensions a owl:DatatypeProperty ;
  rdfs:domain ujg:Node ;
  rdfs:range rdf:JSON .
@prefix ujg: <https://ujg.specs.openuji.org/tr/2026.06/ns/core#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .


<https://ujg.specs.openuji.org/tr/2026.06/ns/core#> a owl:Ontology ;
  rdfs:label "UJG Core Editor's Draft Vocabulary"@en ;
  dct:description "UJG Ontology declaration" .

### Classes

ujg:UJGDocument a owl:Class .
ujg:Node        a owl:Class .

ujg:documentImports a owl:ObjectProperty ;
  rdfs:domain ujg:UJGDocument ; 
  rdfs:range ujg:UJGDocument .

ujg:documentNodes a owl:ObjectProperty;
  rdfs:domain ujg:UJGDocument ; 
  rdfs:range ujg:Node .

### Properties

ujg:extensions a owl:DatatypeProperty ;
  rdfs:domain ujg:Node ;
  rdfs:range rdf:JSON .

4. JSON-LD Context

The normative Core JSON-LD context is defined below and is published at https://ujg.specs.openuji.org/tr/2026.06/ns/core.context.jsonld. Examples in this section use the compact terms from this context, including @id, @type, imports, nodes, and extensions.

json-ld
{
  "@context": {
    "@version": 1.1,
    
    "ujg": "https://ujg.specs.openuji.org/tr/2026.06/ns/core#",
    "@vocab": "https://ujg.specs.openuji.org/tr/2026.06/ns/core#",

    "imports": {
      "@id": "ujg:documentImports", "@type": "@id", "@container": "@set"
    },
    "nodes": {
      "@id": "ujg:documentNodes", "@container": "@set"
    },
    "extensions": {
      "@id": "ujg:extensions", "@type": "@json"
    }
  }
}
{
  "@context": {
    "@version": 1.1,
    
    "ujg": "https://ujg.specs.openuji.org/tr/2026.06/ns/core#",
    "@vocab": "https://ujg.specs.openuji.org/tr/2026.06/ns/core#",

    "imports": {
      "@id": "ujg:documentImports", "@type": "@id", "@container": "@set"
    },
    "nodes": {
      "@id": "ujg:documentNodes", "@container": "@set"
    },
    "extensions": {
      "@id": "ujg:extensions", "@type": "@json"
    }
  }
}

4.1. Context Composition

A compact UJG JSON-LD document MUST include the Core JSON-LD context.

A specification that defines compact terms not defined by Core MUST normatively identify the published URL of the JSON-LD context that defines those terms.

A compact UJG JSON-LD document that uses terms not defined by Core MUST compose the Core context with the published contexts that define those terms.

When a compact UJG JSON-LD document uses terms not defined by Core, its @context MUST reference the published URLs of the contexts that define those terms.

Specifications or deployments MAY publish convenience aggregate contexts that compose the Core context with additional contexts, but such aggregate contexts are outside the scope of Core.

A composed context is expressed as a JSON-LD @context array in which the Core context appears together with one or more additional contexts required by the document and published at https://ujg.specs.openuji.org/tr/2026.06/ns/context.jsonld

4.1.1. Composed Context Example

json
{
  "@context": [
    "https://ujg.specs.openuji.org/tr/2026.06/ns/core.context.jsonld",
    "https://ujg.specs.openuji.org/tr/2026.06/ns/graph.context.jsonld",
    "https://ujg.specs.openuji.org/tr/2026.06/ns/runtime.context.jsonld",
    "https://ujg.specs.openuji.org/tr/2026.06/ns/experience.context.jsonld"
  ]
}
{
  "@context": [
    "https://ujg.specs.openuji.org/tr/2026.06/ns/core.context.jsonld",
    "https://ujg.specs.openuji.org/tr/2026.06/ns/graph.context.jsonld",
    "https://ujg.specs.openuji.org/tr/2026.06/ns/runtime.context.jsonld",
    "https://ujg.specs.openuji.org/tr/2026.06/ns/experience.context.jsonld"
  ]
}

4.2. Extensions

extensions MAY appear on any Node.

extensions MUST NOT appear on UJGDocument.

If present, extensions MUST be a JSON object.

Each top-level key in extensions MUST be a namespace string controlled by the extension author. Authors SHOULD use reverse-DNS names or URI-based identifiers.

Each top-level value in extensions MUST be a JSON object.

Consumers MUST preserve unknown extension entries during read-transform-write unless operating in an explicitly lossy mode.

Consumers MUST NOT let unknown extensions affect core identity, import resolution, or reference resolution.

Consumers MAY apply namespace-specific processing for recognized extensions.

Extensions that change core graph meaning SHOULD be standardized as first-class UJG modules rather than hidden inside extensions.

Terms intended to participate in interoperable graph semantics, reference resolution, validation, or RDF querying MUST be defined by published JSON-LD contexts and corresponding module artifacts rather than being hidden inside extensions.

Identifiers that appear only inside extensions MUST NOT be treated as Core or Graph references for standardized UJG processing unless an implementation applies explicit namespace-specific processing outside module conformance.

4.3. Import Resolution

imports values MUST be IRI references.

An imports value MAY be an absolute IRI or a relative IRI reference.

Relative import references MUST be resolved against the location of the importing UJGDocument.

For a document retrieved via HTTP(S), the base for resolution is the document URL. For a document loaded from a file URL, the base for resolution is the file URL of the importing document.

Core does not define a manifest root, package root, or workspace root for import resolution.

If no stable document location is available, relative imports are implementation-specific and may not be portable.

NOTE

JSON-LD defines a base IRI mechanism, including local @base, but Core import resolution is defined by the importing document location. External contexts do not apply @base, and relative references are only reliable when a base is well defined. See [JSON-LD 1.1.].

NOTE

Authors SHOULD prefer relative import references for intra-package documents so the same document set can be moved between local development and deployed environments without changing import values, provided the relative directory layout is preserved.

5. Validation

The normative Core SHACL shape is defined below and is published at https://ujg.specs.openuji.org/tr/2026.06/ns/core.shape. It constrains UJGDocument and Node instances and is the validation artifact for Core semantics.

turtle
@prefix ujg: <https://ujg.specs.openuji.org/tr/2026.06/ns/core#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ujgshape: <https://ujg.specs.openuji.org/tr/2026.06/ns/core.shape#> .


ujgshape:UJGDocumentShape a sh:NodeShape ;
  sh:targetClass ujg:UJGDocument ;
  sh:nodeKind sh:IRI ;

  sh:property [
    sh:path ujg:documentImports ;
    sh:nodeKind sh:IRI ;
    sh:minCount 0 ;
  ] ;

  sh:property [
    sh:path ujg:documentNodes ;
    sh:nodeKind sh:IRI ;
    sh:minCount 0 ;
  ] ;

  sh:property [
    sh:path ujg:extensions ;
    sh:maxCount 0 ;
  ] .

ujgshape:NodeShape a sh:NodeShape ;
  sh:targetClass ujg:Node ;
  sh:targetObjectsOf ujg:documentNodes ;
  sh:nodeKind sh:IRI ;

  sh:property [
    sh:path ujg:extensions ;
    sh:datatype rdf:JSON ;
    sh:maxCount 1 ;
  ] .
@prefix ujg: <https://ujg.specs.openuji.org/tr/2026.06/ns/core#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ujgshape: <https://ujg.specs.openuji.org/tr/2026.06/ns/core.shape#> .


ujgshape:UJGDocumentShape a sh:NodeShape ;
  sh:targetClass ujg:UJGDocument ;
  sh:nodeKind sh:IRI ;

  sh:property [
    sh:path ujg:documentImports ;
    sh:nodeKind sh:IRI ;
    sh:minCount 0 ;
  ] ;

  sh:property [
    sh:path ujg:documentNodes ;
    sh:nodeKind sh:IRI ;
    sh:minCount 0 ;
  ] ;

  sh:property [
    sh:path ujg:extensions ;
    sh:maxCount 0 ;
  ] .

ujgshape:NodeShape a sh:NodeShape ;
  sh:targetClass ujg:Node ;
  sh:targetObjectsOf ujg:documentNodes ;
  sh:nodeKind sh:IRI ;

  sh:property [
    sh:path ujg:extensions ;
    sh:datatype rdf:JSON ;
    sh:maxCount 1 ;
  ] .

6. Examples

The examples below are informative. Each example uses https://ujg.specs.openuji.org/tr/2026.06/ns/core.context.jsonld as its JSON-LD context and stays within the Core vocabulary. extensions appears only on node objects; document-level extensions is invalid in Core. Graph-native optional terms belong in composed module contexts, not inside extensions.

6.1. Minimal Document

json
{
  "@context": "https://ujg.specs.openuji.org/tr/2026.06/ns/core.context.jsonld",
  "@id": "https://example.com/ujg/core/minimal.jsonld",
  "@type": "UJGDocument"
}
{
  "@context": "https://ujg.specs.openuji.org/tr/2026.06/ns/core.context.jsonld",
  "@id": "https://example.com/ujg/core/minimal.jsonld",
  "@type": "UJGDocument"
}

6.2. Document With Relative Imports

json
{
  "@context": "https://ujg.specs.openuji.org/tr/2026.06/ns/core.context.jsonld",
  "@id": "https://example.com/ujg/flows/order/main.jsonld",
  "@type": "UJGDocument",
  "imports": [
    "./shared/states.jsonld",
    "../runtime/events.jsonld",
    "https://example.com/ujg/common/errors.jsonld"
  ]
}
{
  "@context": "https://ujg.specs.openuji.org/tr/2026.06/ns/core.context.jsonld",
  "@id": "https://example.com/ujg/flows/order/main.jsonld",
  "@type": "UJGDocument",
  "imports": [
    "./shared/states.jsonld",
    "../runtime/events.jsonld",
    "https://example.com/ujg/common/errors.jsonld"
  ]
}

Resolved imports:

  • ./shared/states.jsonld → https://example.com/ujg/flows/order/shared/states.jsonld

  • ../runtime/events.jsonld → https://example.com/ujg/flows/runtime/events.jsonld

  • https://example.com/ujg/common/errors.jsonld → unchanged

This follows [RFC3986] relative-reference resolution and the [JSON-LD 1.1.] rule that relative IRI references resolve from the document base IRI.

6.3. Document With Nodes

json
{
  "@context": "https://ujg.specs.openuji.org/tr/2026.06/ns/core.context.jsonld",
  "@id": "https://example.com/ujg/core/nodes.jsonld",
  "@type": "UJGDocument",
  "nodes": [
    {
      "@id": "urn:ujg:node:alpha",
      "@type": "Node"
    },
    {
      "@id": "urn:ujg:node:beta",
      "@type": "Node",
      "extensions": {
        "com.example.audit": {
          "checksum": "sha256:abc123"
        }
      }
    }
  ]
}
{
  "@context": "https://ujg.specs.openuji.org/tr/2026.06/ns/core.context.jsonld",
  "@id": "https://example.com/ujg/core/nodes.jsonld",
  "@type": "UJGDocument",
  "nodes": [
    {
      "@id": "urn:ujg:node:alpha",
      "@type": "Node"
    },
    {
      "@id": "urn:ujg:node:beta",
      "@type": "Node",
      "extensions": {
        "com.example.audit": {
          "checksum": "sha256:abc123"
        }
      }
    }
  ]
}

Copyright © 2026 the Contributors to the ujg/core/2026.06, 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