Skip to content

[cco-core] Implement OAI-ORE Data Models via Pydantic #2

@clnsmth

Description

@clnsmth

Description
We need to establish the foundational data structures for the cco-core library. According to ADR-001, we are using Pydantic to enforce the OAI-ORE (Object Reuse and Exchange) specification. These models will serve as the contract between the ingestion logic, the API, and the final JSON-LD output.

Context
The CCO Generator acts as a middleware. It needs internal Python objects that represent the complex citation graph before we serialize them to JSON-LD for export or storage.

Requirements

  • Create a Pydantic model structure that reflects the OAI-ORE standard.
  • The models must support serialization to JSON-LD.
  • The models must support valid citation attributes (e.g., DOI, Title, Author, etc.).

Technical Scope (Suggested)
Based on the architecture document, we need three primary classes:

  1. AggregatedResource: Represents the individual Linked Digital Object (LDO) (e.g., a specific dataset or software DOI).
  2. Aggregation: The central collection object that groups the resources.
  3. ResourceMap: The top-level wrapper document that describes the Aggregation.

Acceptance Criteria

  • Pydantic models are defined for the three classes listed above.
  • A test script exists that instantiates these objects and successfully serializes them into valid JSON-LD.
  • Validation rules are in place (e.g., ensuring an Aggregation has at least one AggregatedResource).

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions