Files
visual-semiotic-ai-analysis/data_store/interfaces/annotation_repository_interface.py
T
Brian Bjarke Jensen 0ba860b892
Code Quality Pipeline / code-quality (pull_request) Failing after 1m19s
Test Python Package / test (pull_request) Failing after 50s
added infrastructure code
2025-09-18 12:13:39 +02:00

30 lines
911 B
Python

"""Definition of AnnotationRepositoryInterface."""
from uuid import UUID
from abc import ABC, abstractmethod
from data_store.dto import Annotation
class AnnotationRepositoryInterface(ABC):
"""AnnotationRepository interface."""
@abstractmethod
def get(self, job_id: UUID) -> Annotation | None:
"""Retrieve an Annotation by its associated Job ID."""
raise NotImplementedError()
@abstractmethod
def put(self, annotation: Annotation, job_id: UUID) -> None:
"""Update or create an Annotation."""
raise NotImplementedError()
@abstractmethod
def delete(self, job_id: UUID) -> None:
"""Delete an Annotation by its associated Job ID."""
raise NotImplementedError()
@abstractmethod
def list_all(self) -> list[UUID]:
"""List all Job IDs with associated Annotations in the repository."""
raise NotImplementedError()