From 9f0d2225e14374faa678250a07b1c1acdd561844 Mon Sep 17 00:00:00 2001 From: Tyler Date: Mon, 2 Feb 2026 09:24:32 -0700 Subject: [PATCH] remove manifest-v4 --- src/lineage/models/manifest/manifest_v4.rs | 52 ---------------------- src/lineage/models/manifest/mod.rs | 2 - 2 files changed, 54 deletions(-) delete mode 100644 src/lineage/models/manifest/manifest_v4.rs diff --git a/src/lineage/models/manifest/manifest_v4.rs b/src/lineage/models/manifest/manifest_v4.rs deleted file mode 100644 index 77051fc..0000000 --- a/src/lineage/models/manifest/manifest_v4.rs +++ /dev/null @@ -1,52 +0,0 @@ -use std::collections::HashMap; - -use anyhow::Result; -use serde::{Deserialize, Serialize}; -use serde_json::Value; - -use super::anchor::Anchor; -use crate::lineage::models::{ - graph::Graph, manifest::get_contexts_for_manifest, statements::Statement, -}; - -/// Version 4 of the lineage manifest format -#[derive(Debug, Serialize, Deserialize, utoipa::ToSchema)] -pub struct ManifestV4 { - /// Version string identifying this manifest format - pub version: String, - /// JSON-LD contexts mapping context URLs to their definitions - pub contexts: HashMap, - /// Collection of lineage graphs contained in this manifest - pub graphs: Vec, - /// Binary data blobs referenced by statements, keyed by CID - pub blobs: HashMap, - /// Optional anchor points for statements on external systems - #[serde(skip_serializing_if = "Option::is_none")] - pub anchors: Option>, -} - -/// Generates a version 4 manifest from graphs and blobs -pub async fn generate_manifest_v4( - include_context: bool, - graphs: Vec, - blobs: HashMap, -) -> Result { - let contexts = if include_context { - let graph_statements: Vec = graphs - .iter() - .filter_map(|g| g.statements.clone()) - .flatten() - .collect(); - get_contexts_for_manifest(&graph_statements)? - } else { - HashMap::new() - }; - - Ok(ManifestV4 { - version: String::from("4"), - contexts, - graphs, - blobs, - anchors: None, - }) -} diff --git a/src/lineage/models/manifest/mod.rs b/src/lineage/models/manifest/mod.rs index 124dde4..0d155cc 100644 --- a/src/lineage/models/manifest/mod.rs +++ b/src/lineage/models/manifest/mod.rs @@ -1,7 +1,5 @@ /// Anchor models for recording statements on external systems pub mod anchor; -/// Version 4 manifest format with graph support -pub mod manifest_v4; use std::{ collections::{HashMap, HashSet},