Skip to main content

openbim_icdd/
lib.rs

1//! `openbim-icdd` — ISO 21597 Information Container for linked Document Delivery.
2//!
3//! ICDD is a ZIP container holding opaque payload documents plus RDF/XML that
4//! describes those documents and the links between their elements. This crate
5//! owns that container boundary; it deliberately does not parse IFC, PDF, or
6//! any other payload format.
7//!
8//! ZIP and RDF/XML are handled directly by maintained upstream crates (`zip`,
9//! `oxrdfxml`, and `oxrdf`). OpenBIM.rs does not wrap those general formats in
10//! home-grown XML or ZIP codec packages.
11//!
12//! # Implemented
13//!
14//! - deterministic ZIP reading and writing;
15//! - neutral `Index.rdf` and linkset views;
16//! - lazy, bounded payload access, streaming copies, and safe extraction;
17//! - raw RDF graph parse/serialize APIs that preserve unknown RDF semantics;
18//! - conformance diagnostics for the mandatory Part 1 layout.
19
20#![forbid(unsafe_code)]
21
22mod container;
23mod error;
24mod federation;
25mod index;
26mod linkset;
27mod rdfgraph;
28mod writer;
29
30pub mod rdf;
31pub mod read;
32pub mod schema;
33pub mod vocab;
34
35pub use error::IcddError;
36pub use federation::{
37    parse_poing_federation_icdd, write_poing_federation_icdd, FederationIcddPayload,
38    PoingFederationManifest, PoingFederationMember,
39};
40pub use rdf::{parse_rdf_xml, serialize_rdf_xml, RdfXmlOptions};
41pub use read::IcddContainer;
42pub use schema::*;
43pub use writer::IcddArchiveBuilder;
44
45/// Conventional path of the container index inside an ICDD archive.
46pub const INDEX_PATH: &str = "Index.rdf";
47/// Conventional directory holding ontology resources.
48pub const ONTOLOGY_RESOURCES_DIR: &str = container::ONTOLOGY_DIR;
49/// Conventional directory holding payload documents.
50pub const PAYLOAD_DOCUMENTS_DIR: &str = container::PAYLOAD_DOCS_DIR;
51/// Conventional directory holding linkset RDF graphs.
52pub const PAYLOAD_TRIPLES_DIR: &str = container::PAYLOAD_TRIPLES_DIR;