shapes_converter/
landing_html_template.rs

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
use serde::Serialize;

#[derive(Serialize, Debug, PartialEq, Default)]

pub struct LandingHtmlTemplate {
    pub title: String,
    pub rudof_version: String,
    pub created_time: String,
    pub shapes: Vec<ShapeRef>,
    pub svg_schema: String,
}

#[derive(Serialize, Debug, PartialEq, Default)]

pub struct ShapeRef {
    name: String,
    href: String,
    label: String,
}

impl ShapeRef {
    pub fn new(name: &str, href: &str, label: &str) -> ShapeRef {
        ShapeRef {
            name: name.to_string(),
            href: href.to_string(),
            label: label.to_string(),
        }
    }
}