Schema: robos:CertificateOfCompletion

Formal W3C SHACL constraint shape and OSLC JSON-LD specification for robos:CertificateOfCompletion in the learning package store.

Table of contents

  1. Specification Metadata
  2. Upstream Schema Basis (Refers From) & Global Standards Provenance
  3. Entity Relationship & Schema Context
  4. Property Constraints & SHACL Rules
  5. Canonical OSLC JSON-LD Example
  6. Programmatic SHACL Validation

Specification Metadata


Upstream Schema Basis (Refers From) & Global Standards Provenance

This RobOS schema is modeled after and directly aligns with two levels of global standards:


Entity Relationship & Schema Context

Certificate Of Completion robos:CertificateOfCompletion

Governed by W3C SHACL shape urn:robos:shape:CertificateOfCompletionShape within the eLearning Curriculums (robos.learning) (robos.learning) package store.

dcterms:title robos:recipientUser robos:forCourse robos:issueDate robos:scorePercentage

RobOS classification: Learning & assessment. These RobOS-owned codes use Schema.org CategoryCode vocabulary.

Property Constraints & SHACL Rules

Property Path Name Multiplicity Data Type Classification Constraint Rule / Validation Message
dcterms:title Title / Display Name 1..* xsd:string Services & processing, Applications & entry points, Contracts & data models, Data stores & messaging, Libraries & build systems, Infrastructure & delivery, Organization & people, Projects & work items, Source control & artifacts, Agents & MCP, Documentation & decisions, Learning & assessment, Testing & behavior Certificate of Completion must have a title.
robos:recipientUser recipientUser 1..* xsd:string Learning & assessment Certificate of Completion must specify the recipient user.
robos:forCourse forCourse 1..* xsd:string Learning & assessment Certificate of Completion must link to the completed course (robos:forCourse).
robos:issueDate issueDate 1..* xsd:string Learning & assessment Certificate of Completion must declare an issuance date.
robos:scorePercentage scorePercentage 1..* xsd:string Learning & assessment Certificate of Completion must record the final score percentage.

Canonical OSLC JSON-LD Example

{
  "@id": "urn:robos:learning:certificate-of-completion-sample",
  "@type": [
    "robos:CertificateOfCompletion",
    "schema:EducationalOccupationalCredential",
    "oslc:Resource"
  ],
  "dcterms:title": "Sample Certificate Of Completion",
  "dcterms:description": "Canonical reference instance for robos:CertificateOfCompletion.",
  "robos:package": "learning",
  "robos:namespace": "robos.learning",
  "robos:schemaOrgType": "https://schema.org/EducationalOccupationalCredential",
  "robos:domainStandard": "https://schema.org/EducationalOccupationalCredential",
  "robos:refersFrom": "https://schema.org/EducationalOccupationalCredential"
}

Programmatic SHACL Validation

const { SHACLValidator } = require('/usr/local/share/robos/robos-graph/lib/shacl-validator');
const { OSLCGraphParser, OSLC_CONTEXT } = require('/usr/local/share/robos/robos-graph/lib/oslc-parser');

const validator = new SHACLValidator();
const result = validator.validateGraph(new OSLCGraphParser({
  "@context": OSLC_CONTEXT,
  "robos:nodes": [
    {
        "@id": "urn:robos:learning:certificate-of-completion-sample",
        "@type": [
            "robos:CertificateOfCompletion",
            "schema:EducationalOccupationalCredential",
            "oslc:Resource"
        ],
        "dcterms:title": "Sample Certificate Of Completion",
        "dcterms:description": "Canonical reference instance for robos:CertificateOfCompletion.",
        "robos:package": "learning",
        "robos:namespace": "robos.learning",
        "robos:schemaOrgType": "https://schema.org/EducationalOccupationalCredential",
        "robos:domainStandard": "https://schema.org/EducationalOccupationalCredential",
        "robos:refersFrom": "https://schema.org/EducationalOccupationalCredential"
    }
  ],
}));

console.log("Conforms:", result.conforms); // Expected: true