1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//! `dpp-aas` — Asset Administration Shell (IDTA) projection of a passport.
//!
//! The IDTA AAS metamodel (IDTA-01001-3-0) is the interoperability standard
//! used by EU Industry 4.0 and Catena-X data spaces. Passports published
//! through Odal Node must be expressible as AAS shells + submodels for
//! ecosystem registry interoperability.
//!
//! Pure, stateless crate with no I/O or network dependencies. Compiles to both
//! `std` and `wasm32`.
//!
//! ## Key types
//!
//! - [`AasShell`] — top-level container; holds [`AssetInformation`] (linking the
//! shell to the physical product via GS1 GTIN) and references to its submodels.
//! - [`AasSubmodel`] — one logical grouping of product data, e.g.
//! `ProductIdentification`, `EnvironmentalImpact`, `BatteryTechnicalData`.
//! - [`AasSubmodelElement`] — leaf value ([`AasProperty`]), group
//! ([`AasCollection`]), or external link ([`AasReference`]).
//!
//! ## Primary entry point
//!
//! [`build_aas_from_passport`] maps a typed [`Passport`](dpp_domain::Passport)
//! plus a GS1 GTIN string into a complete `(AasShell, Vec<AasSubmodel>)` ready
//! for serialisation or registry submission. The shell references its submodels
//! by ID following the IDTA AAS Part 2 API pattern — shell and submodels are
//! served from separate endpoints.
//!
//! Always produces five core submodels: `ProductIdentification`,
//! `ManufacturerInformation`, `EnvironmentalImpact`, `MaterialComposition`,
//! `Repairability`. If `passport.sector_data` is `Some`, a sixth
//! sector-specific submodel is appended (`BatteryTechnicalData`,
//! `TextileMaterialDeclaration`, `ElectronicsProductData`, or a generic
//! `SectorData` fallback for sectors without a dedicated template yet).
//!
//! The lower-level [`map_dpp_to_aas_submodel`] remains available as a generic
//! JSON-to-submodel escape hatch.
//!
//! # This crate emits identifiers, not conformance
//!
//! Producing AAS-shaped output is not the same as conforming to an IDTA
//! specification, and nothing here should be described as IDTA-conformant.
//!
//! Every `semanticId` emitted is either in the `urn:odal-node:` namespace — our
//! own concept, honestly named — or carries a provenance record in
//! `semantic_ids/allowlist.json` naming who verified it against the authority's
//! own published source, and when. That rule is enforced by a test, not by a
//! comment, because six identifiers claiming IDTA and ECLASS authority once sat
//! here behind comments asking someone to check them.
//!
//! Split out of [`dpp-digital-link`], which retains the GS1 parser this used to
//! ship alongside.
//!
//! [`dpp-digital-link`]: https://docs.rs/dpp-digital-link
pub use ;
pub use map_dpp_to_aas_submodel;
pub use ;
pub use ;
pub use ;
/// Compile-checks this crate's README examples.
///
/// A README example is a public claim about the API, and nothing else in the
/// build compiles one. Without this, a README can advertise a function that
/// does not exist — which is exactly what happened before this harness landed.
;