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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
//! `openbim-loin` — ISO 7817-3 / EN 17412-3 Level of Information Need.
//!
//! # What this is
//!
//! A machine-readable statement of *how much* information is required about
//! which objects, for a given purpose, at a given milestone, between a given
//! pair of actors: geometric detail, alphanumeric properties, and
//! documentation.
//!
//! EN 17412-1 defines the concepts in prose; part 3 is the exchange format.
//! Only part 3 is implementable, and it is what this crate targets.
//!
//! # Relationship to ISO 23387
//!
//! The LOIN schema imports the ISO 23387 namespace for its property vocabulary.
//! This crate therefore uses and re-exports `openbim-dt` contracts for GUIDs,
//! multilingual text, references, concept inheritance, and embedded property,
//! quantity, group, document, template, unit, and dimension content.
//!
//! # 🚨 The namespace is not final
//!
//! The draft schema carries, in a comment on line 2:
//!
//! > `Final LOIN Namespace will be specified after the review process`
//!
//! and declares `https://iso.org/2024/LOIN`, while an earlier draft declared
//! `https://iso.org/2022/LOIN`. Namespace migration is therefore a
//! *first-class* concern here, not an afterthought: reading must accept known
//! historical namespaces, and writing must target one explicitly rather than
//! defaulting to whatever was parsed.
//!
//! # Status
//!
//! The DT-backed domain boundary is implemented. XML reading, writing,
//! namespace migration, and ISO schema validation are not yet implemented.
//!
//! The ISO XSD is **not vendored**. Both the ISO/CEN originals and the public
//! committee drafts are unlicensed for redistribution, and the schema is a
//! moving target; it is referenced out of tree instead.
pub use ;
/// Exact ISO 23387 contract version consumed by this LOIN release.
pub use openbim_dt as dt;
/// The namespace declared by the ISO 7817-3 draft schema (2024).
pub const NAMESPACE_2024: &str = "https://iso.org/2024/LOIN";
/// The namespace declared by the earlier EN 17412-3 committee draft (2022).
///
/// Retained because documents using it exist. Reading should accept it;
/// writing should not emit it.
pub const NAMESPACE_2022: &str = "https://iso.org/2022/LOIN";
/// Namespaces this crate recognises as LOIN, newest first.
///
/// Ordered so that a reader trying candidates in sequence prefers the current
/// one, and so that adding the final published namespace is a one-line change
/// at the front of the list.
pub const KNOWN_NAMESPACES: & = &;
/// Whether a namespace URI is a LOIN namespace this crate knows.
///
/// ```
/// use openbim_loin::{is_known_namespace, NAMESPACE_2024};
/// assert!(is_known_namespace(NAMESPACE_2024));
/// assert!(!is_known_namespace("https://example.invalid/LOIN"));
/// ```