Skip to main content

ftm_types/generated/
traits.rs

1#![allow(missing_docs)]
2/// Traits representing FTM schema inheritance hierarchy.
3///
4/// These traits enable polymorphic code that works across entity types.
5/// All concrete entity structs implement the traits for their parent schemas.
6///Trait for FTM schema: Analyzable
7pub trait Analyzable {
8    /// Get the entity ID
9    fn id(&self) -> &str;
10    /// Get the schema name
11    fn schema(&self) -> &str;
12    ///Get Detected companies property
13    fn companies_mentioned(&self) -> Option<&[String]>;
14    ///Get Detected country property
15    fn detected_country(&self) -> Option<&[String]>;
16    ///Get Detected language property
17    fn detected_language(&self) -> Option<&[String]>;
18    ///Get Detected e-mail addresses property
19    fn email_mentioned(&self) -> Option<&[String]>;
20    ///Get Detected IBANs property
21    fn iban_mentioned(&self) -> Option<&[String]>;
22    ///Get Detected IP addresses property
23    fn ip_mentioned(&self) -> Option<&[String]>;
24    ///Get Detected locations property
25    fn location_mentioned(&self) -> Option<&[String]>;
26    ///Get Detected names property
27    fn names_mentioned(&self) -> Option<&[String]>;
28    ///Get Detected people property
29    fn people_mentioned(&self) -> Option<&[String]>;
30    ///Get Detected phones property
31    fn phone_mentioned(&self) -> Option<&[String]>;
32}
33///Trait for FTM schema: Interest
34pub trait Interest: Interval {
35    /// Get the entity ID
36    fn id(&self) -> &str;
37    /// Get the schema name
38    fn schema(&self) -> &str;
39    ///Get Role property
40    fn role(&self) -> Option<&[String]>;
41    ///Get Status property
42    fn status(&self) -> Option<&[String]>;
43}
44///Trait for FTM schema: Interval
45pub trait Interval {
46    /// Get the entity ID
47    fn id(&self) -> &str;
48    /// Get the schema name
49    fn schema(&self) -> &str;
50    ///Get Aleph URL property
51    fn aleph_url(&self) -> Option<&[String]>;
52    ///Get Date property
53    fn date(&self) -> Option<&[String]>;
54    ///Get Description property
55    fn description(&self) -> Option<&[String]>;
56    ///Get End date property
57    fn end_date(&self) -> Option<&[String]>;
58    ///Get Index text property
59    fn index_text(&self) -> Option<&[String]>;
60    ///Get Modified on property
61    fn modified_at(&self) -> Option<&[String]>;
62    ///Get Detected names property
63    fn names_mentioned(&self) -> Option<&[String]>;
64    ///Get Source document property
65    fn proof(&self) -> Option<&[String]>;
66    ///Get Publishing source property
67    fn publisher(&self) -> Option<&[String]>;
68    ///Get Publishing source URL property
69    fn publisher_url(&self) -> Option<&[String]>;
70    ///Get Record ID property
71    fn record_id(&self) -> Option<&[String]>;
72    ///Get Retrieved on property
73    fn retrieved_at(&self) -> Option<&[String]>;
74    ///Get Source link property
75    fn source_url(&self) -> Option<&[String]>;
76    ///Get Start date property
77    fn start_date(&self) -> Option<&[String]>;
78    ///Get Summary property
79    fn summary(&self) -> Option<&[String]>;
80}
81///Trait for FTM schema: Thing
82pub trait Thing {
83    /// Get the entity ID
84    fn id(&self) -> &str;
85    /// Get the schema name
86    fn schema(&self) -> &str;
87    ///Get Address property
88    fn address(&self) -> Option<&[String]>;
89    ///Get Address property
90    fn address_entity(&self) -> Option<&[String]>;
91    ///Get Aleph URL property
92    fn aleph_url(&self) -> Option<&[String]>;
93    ///Get Alias property
94    fn alias(&self) -> Option<&[String]>;
95    ///Get Country property
96    fn country(&self) -> Option<&[String]>;
97    ///Get Created at property
98    fn created_at(&self) -> Option<&[String]>;
99    ///Get Description property
100    fn description(&self) -> Option<&[String]>;
101    ///Get Index text property
102    fn index_text(&self) -> Option<&[String]>;
103    ///Get Keywords property
104    fn keywords(&self) -> Option<&[String]>;
105    ///Get Modified on property
106    fn modified_at(&self) -> Option<&[String]>;
107    ///Get Name property
108    fn name(&self) -> Option<&[String]>;
109    ///Get Notes property
110    fn notes(&self) -> Option<&[String]>;
111    ///Get Previous name property
112    fn previous_name(&self) -> Option<&[String]>;
113    ///Get Program property
114    fn program(&self) -> Option<&[String]>;
115    ///Get Program ID property
116    fn program_id(&self) -> Option<&[String]>;
117    ///Get Source document property
118    fn proof(&self) -> Option<&[String]>;
119    ///Get Publishing source property
120    fn publisher(&self) -> Option<&[String]>;
121    ///Get Publishing source URL property
122    fn publisher_url(&self) -> Option<&[String]>;
123    ///Get Retrieved on property
124    fn retrieved_at(&self) -> Option<&[String]>;
125    ///Get Source link property
126    fn source_url(&self) -> Option<&[String]>;
127    ///Get Summary property
128    fn summary(&self) -> Option<&[String]>;
129    ///Get Topics property
130    fn topics(&self) -> Option<&[String]>;
131    ///Get Weak alias property
132    fn weak_alias(&self) -> Option<&[String]>;
133    ///Get Wikidata ID property
134    fn wikidata_id(&self) -> Option<&[String]>;
135    ///Get Wikipedia Article property
136    fn wikipedia_url(&self) -> Option<&[String]>;
137}
138///Trait for FTM schema: Value
139pub trait Value {
140    /// Get the entity ID
141    fn id(&self) -> &str;
142    /// Get the schema name
143    fn schema(&self) -> &str;
144    ///Get Amount property
145    fn amount(&self) -> Option<&[f64]>;
146    ///Get Amount in EUR property
147    fn amount_eur(&self) -> Option<&[f64]>;
148    ///Get Amount in USD property
149    fn amount_usd(&self) -> Option<&[f64]>;
150    ///Get Currency property
151    fn currency(&self) -> Option<&[String]>;
152}