Skip to content

Cross-Domain-Interoperability-Framework/core

Repository files navigation

CDIF Core

Core interoperability specification for CDIF (Cross-Domain Interoperability Framework). The CDIF Core profile defines the mandatory and optional base properties for any CDIF metadata record, implemented using the schema.org vocabulary.

Specification

Required properties

Every valid CDIF Core instance must include:

  • @id — Resource identifier (IRI)
  • @type — Must include schema:Dataset
  • @context — JSON-LD context with schema, dcterms, dcat, prov prefixes
  • schema:name — Descriptive name
  • schema:identifier — Primary identifier (string or PropertyValue)
  • schema:dateModified — Last update date (ISO 8601)
  • schema:license OR schema:conditionsOfAccess — Rights/access information
  • schema:url OR schema:distribution — Access to the resource
  • schema:subjectOf — CatalogRecord with dcterms:conformsTo including https://w3id.org/cdif/core/1.0

Examples

The examples/ directory contains 40+ validated JSON-LD dataset examples that conform to the CDIF Core profile. These are records that do NOT use Discovery-level properties (spatialCoverage, temporalCoverage, variableMeasured) — records with those properties are in the Discovery repository.

Sources include:

Source Count Description
CDIF/ESIP/ODIS 9 Minimal, simple, and template examples
ADA 10 Core-stripped records from ADA test corpus
Kaggle 10 Iris, Netflix, Titanic, etc. — harvested from landing page JSON-LD
Dataverse 7 Harvard, Borealis, DANS, JHU — via Dataverse schema.org export API
PSDI DCAT 5 CSD, ChASe, AFLOW, etc. — converted from DCAT via DCAT/dcat_to_cdif.py
FEDEO 1 Satellite data collection with WebAPI distribution (OpenSearch)

All examples pass cdifCore JSON Schema validation.

JSON-LD Framing and Validation

FrameAndValidate.py frames a JSON-LD document against the CDIF Core schema and optionally validates it:

# Frame and validate
python FrameAndValidate.py examples/exampleCdifCoreMinimal.json --validate

# Frame and save output
python FrameAndValidate.py examples/exampleCdifCoreMinimal.json -o framed.json

# Use a different schema
python FrameAndValidate.py input.jsonld --validate --schema my-schema.json

The script uses cdifCore-frame.jsonld to frame JSON-LD documents into the expected property structure. Context prefixes from the input document are automatically merged into the frame, so domain-specific prefixes (e.g. ada:, xas:) work without being pre-declared in the frame.

Requirements: pyld, jsonschema (pip install pyld jsonschema)

SHACL Validation

coreRules.shacl contains SHACL shapes for validating CDIF Core instances. This file is copied from metadataBuildingBlocks/_sources/cdifProperties/cdifCore/rules.shacl and should be updated whenever the source changes.

Repository structure

├── CDIFCoreImplementationGuide.md  Classes and properties documentation
├── cdifCoreStructuredSchema.json    JSON Schema for validation
├── cdifCore-frame.jsonld           JSON-LD frame for document framing
├── FrameAndValidate.py             JSON-LD framing and JSON Schema validation
├── coreRules.shacl                 SHACL validation shapes (synced from metadataBuildingBlocks)
├── examples/                       40+ validated Core-only JSON-LD examples
├── ODIS/                           Archived ODIS type-specific templates and examples
└── LICENSE

Relationship to other CDIF repositories

  • Discovery — Extends Core with spatialCoverage, temporalCoverage, variableMeasured, measurementTechnique, quality
  • metadataBuildingBlocks — Source building block schemas, SHACL rules, and profile definitions
  • validation — Framing, batch validation, conformance checking, harvesting, and DCAT conversion tools

License

See LICENSE.

About

A repository to host the core interoperability specifications for CDIF

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages