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
//! RML-inspired RDF Mapping Language support
//!
//! Maps non-RDF data sources (CSV, JSON, inline values) to RDF triples.
//! Inspired by the W3C RDF Mapping Language (RML) specification:
//! <https://rml.io/specs/rml/>
//!
//! # Example
//!
//! ```rust
//! use oxirs_ttl::mapping::{MappingEngine, MappingRuleBuilder, ObjectSpec};
//!
//! let csv_data = "id,name,age\n1,Alice,30\n2,Bob,25";
//!
//! let rule = MappingRuleBuilder::new("persons")
//! .csv_source(csv_data)
//! .subject_template("http://example.org/person/{id}")
//! .map(
//! "http://xmlns.com/foaf/0.1/name",
//! ObjectSpec::Column("name".to_string()),
//! )
//! .map(
//! "http://xmlns.com/foaf/0.1/age",
//! ObjectSpec::TypedColumn {
//! column: "age".to_string(),
//! datatype: "http://www.w3.org/2001/XMLSchema#integer".to_string(),
//! },
//! )
//! .build();
//!
//! let engine = MappingEngine::new();
//! let triples = engine.execute(&rule).expect("should succeed");
//! assert_eq!(triples.len(), 4); // 2 rows × 2 predicates
//! ```
pub use *;
pub use *;