DS Specifications
Domain SpecificationsListsVocabularies
main
main
  • DS Specifications Overview
  • Domain Specifications
    • DS-V7
      • DS-V7 - Changelog
      • DS-V7 - Developer Notes
      • DS-V7 - Grammar
        • Domain Specification
          • @Context
          • Domain Specification Node
          • Property Node
          • Class Node
          • DataType Node
          • Enumeration Node
        • Verification Report
          • Verification Report Node
          • Error Entry Node
          • Error List for the domain-specific verification
        • DS-Path
      • DS-V7 - Examples
    • DS-V6
    • DS-V5
      • DS-V5 - Grammar
        • VerificationReport
          • Error List for the basic verification
          • Verification of schema.org annotations
          • Error List for the Meta verification of DS (unfinished)
          • Error List for the DS-based verification
        • Grammar and semantics of Domain Specifications
          • Enumeration Node
          • Property Node
          • Domain Specification Node
          • Class Node
          • Terms used in Domain Specifications
          • @Context
          • DataType Node
      • DS-V5 - Examples
    • DS-V4
    • DS-V3
      • DS-V3 - Examples
      • DS-V3 - Grammar
        • VerificationReport
          • Error List for the basic verification
          • Verification of schema.org annotations
          • Error List for the DS-based verification
          • Error List for the Meta verification of DS
        • Grammar and semantics of Domain Specifications
          • SDO Enumeration
          • SDO Property
          • Domain Specification
          • SDO Class
          • SDO Datatype
          • @Context
    • DS-V2
      • DS-V2 - Grammar
        • Grammar and semantics of Domain Specifications
          • Grammar Documentation for node type "RestrictedEnumeration"
          • Grammar Documentation for node type "CustomEnumerationValue"
          • Grammar Documentation for node type "Enumeration"
          • Grammar Documentation for node type "Property"
          • Grammar Documentation for node type "RestrictedProperty"
          • Grammar Documentation for node type "DomainSpecification"
          • Grammar Documentation for node type "RestrictedClass"
          • Grammar Documentation for node type "EnumerationValue"
          • Grammar Documentation for node type "Class"
          • Grammar Documentation for node type "DataType"
        • Numeric Pattern
        • Grammar Documentation for node type "VerificationReport"
          • Grammar Documentation for node type "Error"
          • Error codes for Verification Reports
        • Rules Grammar
          • Grammar Documentation for node type "ComplexRule"
          • Grammar Documentation for node type "DateRule"
          • Grammar Documentation for node type "TextRule"
          • Grammar Documentation for node type "TimeRule"
          • Grammar Documentation for node type "NumberRule"
          • Grammar Documentation for node type "BooleanRule"
          • Grammar Documentation for node type "DateTimeRule"
      • DS-V2 - Examples
    • DS-V1
      • DS-V1 - Examples
      • DS-V1 - Grammar
  • SDO-Verification
  • Lists
    • List-V1
  • Vocabularies
  • DS-Vocabulary
    • Input
      • Vocabulary for Domain Specifications
      • DS-Vocabulary
    • DS-Vocab-V1
Powered by GitBook
On this page
  • JSON Syntax of DS-V1
  • SHACL JSON-LD Syntax of DS-V3
  • Target Annotation structure (JSON-LD)
  1. Domain Specifications
  2. DS-V3
  3. DS-V3 - Grammar
  4. Grammar and semantics of Domain Specifications

SDO Class

JSON Syntax of DS-V1

A dsv:RestrictedClass node specifies the use of a SDO Class (referenced with dsv:baseClass) with a limited amount of properties. Each property is represented by its own dsv:Property node.

{
  "@type": "dsv:RestrictedClass",
  "dsv:baseClass": {
    "@id": "schema:Airport"
  },
  "schema:name": "Airport",
  "dsv:property": [
    {
      "@type": "dsv:Property",
      ...
    },
    ...
  ]
}

SHACL JSON-LD Syntax of DS-V3

Basically a straightforward mapping. If a sh:NodeShape specifies a root node for verification, then sh:targetClass is used instead of sh:class. In SHACL there is supposed to be only one sh:targetClass that links the restriction definition with the target document. The "@ type": "sh:NodeShape" type definition is optional. For sh:class arrays are allowed, these are supposed to represent multi-typed entities (MTE) and our verification tool matches this MTEs only if the target entity has all the listed classes (see the second example). The verification tool is also expected to accept subclasses of the class(es) defined in sh:class.

Example uses @context of context.md

{
  "sh:class": "schema:Airport",
  "sh:node": {
    "@type": "sh:NodeShape",
    "sh:property": [
      {
        "@type": "sh:PropertyShape",
        ...
      },
      ...
    ]
  }
}
,
{
  "sh:class": ["schema:HotelRoom", "schema:Product"],
  "sh:node": {
    "@type": "sh:NodeShape",
    "sh:property": [
      {
        "@type": "sh:PropertyShape",
        ...
      },
      ...
    ]
  }
}

Target Annotation structure (JSON-LD)

{
  "@context": "http://schema.org/",
  "@type": "Airport",
  ...
}

This MTE can have properties of schema:HotelRoom and of schema:Product.

{
  "@context": "http://schema.org/",
  "@type": ["HotelRoom", "Product"],
  ...
}
PreviousDomain SpecificationNextSDO Datatype

Last updated 4 years ago