Skip to content

Examples

Examples illustrate conformant graph patterns. Validate any capsule against the appropriate SHACL file before treating it as normative proof — see Alignment and conformance.

These files are hosted on ontology.commonapproach.org:

File Description Validate with
CIDSBasicZerokitsTestData-SHARED.json Zero Waste Meal Kits — org → outcomes → indicators → reports, plus Address and Population nodes (Essential-related). Nodes also include the SFF context URL for shared hosting Prefer cids.essentialtier.shacl.ttl (or sff.shacl.ttl if treating dual context as SFF-ready). Basic Tier SHACL alone may not cover Address/Population
CIDSBasictestandSFFSampleData.json Same organization plus SFF companion nodes (OrganizationProfile, EDG profiles, FundingStatus, funder org placeholder) sff.shacl.ttl

Public URLs above are authoritative.

Every node object includes @context, @type, and @id. The organization anchors outcomes; outcomes link themes and indicators; reports link indicators.

{
"@context": "https://ontology.commonapproach.org/contexts/cidsContext.jsonld",
"@type": "cids:Organization",
"@id": "https://example.org/Organization/demo",
"hasLegalName": "Demo Organization",
"hasOutcome": ["https://example.org/Outcome/main"],
"hasIndicator": ["https://example.org/Indicator/primary"]
}

A complete minimal capsule adds Outcome, Indicator, IndicatorReport, and Theme nodes with cross-links — see the Zero Waste example for a full working graph (that file also includes Essential-tier nodes beyond this minimal pattern).

Realistic patterns in the Zero Waste capsule

Section titled “Realistic patterns in the Zero Waste capsule”

From CIDSBasicZerokitsTestData-SHARED.json:

  • Stable org namespacehttps://zerowastemealkits.ca/Organization/zerowastemealkits
  • SDG theme IRIshttps://metadata.un.org/sdg/12, /sdg/2 on outcomes via forTheme
  • Many-to-many — multiple indicators per outcome; multiple reports per indicator
  • Address and Population as linked nodes (Essential-related patterns)
  • Dual @context — CIDS + SFF context URLs on each node (even when SFF-specific classes are absent)

CIDSBasictestandSFFSampleData.json adds:

  • Dual @context array (CIDS + SFF contexts)
  • OrganizationProfile with team/board profiles and EDG characteristics
  • FundingStatus with FundingState code list reference
  • Secondary funder Organization placeholder

Validate with sff.shacl.ttl, not Basic Tier SHACL alone.

{
"@context": "https://ontology.commonapproach.org/contexts/cidsContext.jsonld",
"@type": "cids:Outcome",
"hasName": "Reduce waste"
}

Fails: SHACL expects IRIs for entity nodes; importers cannot merge stably.

"forTheme": [{ "hasName": "SDG 12" }]

Fails or degrades interoperability: Prefer https://metadata.un.org/sdg/12 or a documented code list URI.

A capsule may pass sff.shacl.ttl yet lack fields a specific program requires (e.g. optional OrganizationID). See SHACL validation vs. funder requirements.

Terminal window
shacl validate \
-s sff.shacl.ttl \
-d CIDSBasictestandSFFSampleData.json \
> report.ttl

Or use CIDS-validate.sh with --codelists for code-list-aware validation. Hosted validation: Working with capsules.