# UNTP graph-validation examples

Informative SHACL examples. Not part of the v1.0 specification. Each constraint file is a worked rule (`rdfs:comment` / `sh:message`). A profile is a named union of constraint IRIs, not a rule. Applying these examples is not required for UNTP conformance. Post-1.0 work is to promote a stable subset to normative shape constraints.

Page: [Graph Validation](https://untp.unece.org/docs/design-patterns/GraphValidation) (informative, post 1.0).

| File                              | Role                                                                          |
| --------------------------------- | ----------------------------------------------------------------------------- |
| `<ConstraintName>.ttl`            | One example constraint (`https://vocabulary.uncefact.org/untp/shapes/<Name>`) |
| `resolvedFrom.ttl`                | Helper property imported by `DataCarrierProductMatch`                         |
| `recommended.ttl`                 | Example profile: `owl:imports` of the seven constraints                       |
| `tests/pass/graph.ttl`            | Combined graph that must conform against each constraint and the profile      |
| `tests/fail/<ConstraintName>.ttl` | Graph that must violate that named constraint                                 |
| `validate.mjs`                    | Runs the pass/fail suite (`shacl-engine`)                                     |

Property IRIs follow the v0.8.0 JSON-LD context (`unece:` → `https://test.uncefact.org/vocabulary/`). Remap when the vocabulary migration republishes terms. SPARQL edits bump `owl:versionInfo` on that constraint.

From the repository root:

```bash
yarn validate-shapes
```
