The SourceRef type provides source attribution for events.
use spatial_narrative::core::{SourceRef, SourceType};
let source = SourceRef::builder()
.title("The New York Times")
.source_type(SourceType::Article)
.url("https://nytimes.com/article/123")
.author("Jane Reporter")
.date("2024-01-15")
.build();
Type Description
ArticleNews article or blog post
ReportOfficial report or document
WitnessEyewitness account
SensorAutomated sensor data
ArchiveHistorical archive
OtherOther source type
Property Type Description
source_typeSourceTypeCategory of source
titleOption<String>Source title
urlOption<String>URL reference
authorOption<String>Author/creator
dateOption<String>Publication date
notesOption<String>Additional notes
let source = SourceRef::builder()
.source_type(SourceType::Article)
.title("Breaking: Event Occurs")
.url("https://news.example.com/article")
.author("John Journalist")
.date("2024-01-15")
.build();
let source = SourceRef::builder()
.source_type(SourceType::Sensor)
.title("Weather Station #42")
.notes("Automated reading every 5 minutes")
.build();
let source = SourceRef::builder()
.source_type(SourceType::Archive)
.title("National Archives Collection")
.url("https://archives.gov/document/123")
.notes("Declassified 2020")
.build();