From 4437be97e7f612aaba607265d7f8cd5be12e7f12 Mon Sep 17 00:00:00 2001 From: Markus Hamann <markus.hamann1@tu-dresden.de> Date: Wed, 8 Jan 2025 16:00:54 +0100 Subject: [PATCH] Add example solution --- .../detail/Location_Chemnitz.html | 48 +++++++++++ .../detail/Location_Dresden.html | 50 +++++++++++ .../detail/Location_G\303\266rlitz.html" | 47 ++++++++++ .../detail/Location_Leipzig.html | 48 +++++++++++ .../documentation/detail/RoadNetwork_DC1.html | 44 ++++++++++ .../documentation/detail/RoadNetwork_DG1.html | 44 ++++++++++ .../documentation/detail/RoadNetwork_DL1.html | 44 ++++++++++ .../documentation/detail/RoadNetwork_DL2.html | 44 ++++++++++ .../documentation/detail/RoadNetwork_DL3.html | 44 ++++++++++ .../documentation/detail/RoadNetwork_LC1.html | 44 ++++++++++ .../gen/documentation/detail/Route_R1.html | 48 +++++++++++ .../gen/documentation/detail/Vehicle_V01.html | 41 +++++++++ .../gen/documentation/detail/Vehicle_V02.html | 41 +++++++++ .../gen/documentation/detail/Vehicle_V03.html | 41 +++++++++ .../gen/documentation/overview.html | 12 +-- .../generation.egx | 34 ++++++++ .../scripts/asCard.egl | 2 +- .../scripts/detail_content.egl | 85 +++++++++++++++++++ .../scripts/util.eol | 48 +++++++++++ .../templates/t_detail.egl | 41 +++++++++ 20 files changed, 843 insertions(+), 7 deletions(-) create mode 100644 stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Location_Chemnitz.html create mode 100644 stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Location_Dresden.html create mode 100644 "stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Location_G\303\266rlitz.html" create mode 100644 stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Location_Leipzig.html create mode 100644 stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DC1.html create mode 100644 stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DG1.html create mode 100644 stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DL1.html create mode 100644 stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DL2.html create mode 100644 stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DL3.html create mode 100644 stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_LC1.html create mode 100644 stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Route_R1.html create mode 100644 stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Vehicle_V01.html create mode 100644 stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Vehicle_V02.html create mode 100644 stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Vehicle_V03.html create mode 100644 stgroup.mdsd.transportation_network.textgeneration/scripts/detail_content.egl create mode 100644 stgroup.mdsd.transportation_network.textgeneration/scripts/util.eol create mode 100644 stgroup.mdsd.transportation_network.textgeneration/templates/t_detail.egl diff --git a/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Location_Chemnitz.html b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Location_Chemnitz.html new file mode 100644 index 0000000..8314626 --- /dev/null +++ b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Location_Chemnitz.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Location: Chemnitz</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"/> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script> + </head> + <body> + <header> + <div class="navbar navbar-dark bg-dark box-shadow p-4"> + <h1 class="text-white"> Documentation </h1> + <h2 class="text-white"> Location : Chemnitz </h2> + </div> + </header> + + <div class="container"> + <h2> Detail Information </h2> + <p> Name of the location: Chemnitz</p> + <p> Points of Interest in the Location:</p> + <ul> + <li>CustomerWarehouse OG-01 of Office GmbH</li> + <li>Private House Owner`s Home</li> + </ul> + </div> + + <hr class="solid"> + + <div class="container"> + <h2> Relationships </h2> + <p> Location is directly connected to: </p> + <ul> + <li>Dresden</li> + <li>Leipzig</li> + </ul> + </div> + + <footer class="bg-dark"> + <div class="text-center p-3"> + <a href="../overview.html"><button type="button" class="btn btn-dark btn-lg btn-block">Back to Overview</button></a> + </div> + </footer> + + + </body> +</html> \ No newline at end of file diff --git a/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Location_Dresden.html b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Location_Dresden.html new file mode 100644 index 0000000..7388260 --- /dev/null +++ b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Location_Dresden.html @@ -0,0 +1,50 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Location: Dresden</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"/> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script> + </head> + <body> + <header> + <div class="navbar navbar-dark bg-dark box-shadow p-4"> + <h1 class="text-white"> Documentation </h1> + <h2 class="text-white"> Location : Dresden </h2> + </div> + </header> + + <div class="container"> + <h2> Detail Information </h2> + <p> Name of the location: Dresden</p> + <p> Points of Interest in the Location:</p> + <ul> + <li>RestStop </li> + <li>GasStation with PETROL, DIESEL, ELECTRICITY</li> + <li>CompanyWarehouse A1</li> + </ul> + </div> + + <hr class="solid"> + + <div class="container"> + <h2> Relationships </h2> + <p> Location is directly connected to: </p> + <ul> + <li>Chemnitz</li> + <li>Leipzig</li> + <li>Görlitz</li> + </ul> + </div> + + <footer class="bg-dark"> + <div class="text-center p-3"> + <a href="../overview.html"><button type="button" class="btn btn-dark btn-lg btn-block">Back to Overview</button></a> + </div> + </footer> + + + </body> +</html> \ No newline at end of file diff --git "a/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Location_G\303\266rlitz.html" "b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Location_G\303\266rlitz.html" new file mode 100644 index 0000000..22b86a0 --- /dev/null +++ "b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Location_G\303\266rlitz.html" @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Location: Görlitz</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"/> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script> + </head> + <body> + <header> + <div class="navbar navbar-dark bg-dark box-shadow p-4"> + <h1 class="text-white"> Documentation </h1> + <h2 class="text-white"> Location : Görlitz </h2> + </div> + </header> + + <div class="container"> + <h2> Detail Information </h2> + <p> Name of the location: Görlitz</p> + <p> Points of Interest in the Location:</p> + <ul> + <li>RestStop </li> + <li>GasStation with PETROL, DIESEL</li> + </ul> + </div> + + <hr class="solid"> + + <div class="container"> + <h2> Relationships </h2> + <p> Location is directly connected to: </p> + <ul> + <li>Dresden</li> + </ul> + </div> + + <footer class="bg-dark"> + <div class="text-center p-3"> + <a href="../overview.html"><button type="button" class="btn btn-dark btn-lg btn-block">Back to Overview</button></a> + </div> + </footer> + + + </body> +</html> \ No newline at end of file diff --git a/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Location_Leipzig.html b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Location_Leipzig.html new file mode 100644 index 0000000..9d71ed4 --- /dev/null +++ b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Location_Leipzig.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Location: Leipzig</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"/> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script> + </head> + <body> + <header> + <div class="navbar navbar-dark bg-dark box-shadow p-4"> + <h1 class="text-white"> Documentation </h1> + <h2 class="text-white"> Location : Leipzig </h2> + </div> + </header> + + <div class="container"> + <h2> Detail Information </h2> + <p> Name of the location: Leipzig</p> + <p> Points of Interest in the Location:</p> + <ul> + <li>CustomerWarehouse DA-01 of Delivery AG</li> + <li>RestStop </li> + </ul> + </div> + + <hr class="solid"> + + <div class="container"> + <h2> Relationships </h2> + <p> Location is directly connected to: </p> + <ul> + <li>Dresden</li> + <li>Chemnitz</li> + </ul> + </div> + + <footer class="bg-dark"> + <div class="text-center p-3"> + <a href="../overview.html"><button type="button" class="btn btn-dark btn-lg btn-block">Back to Overview</button></a> + </div> + </footer> + + + </body> +</html> \ No newline at end of file diff --git a/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DC1.html b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DC1.html new file mode 100644 index 0000000..d02f3e9 --- /dev/null +++ b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DC1.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>RoadNetwork: DC/1</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"/> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script> + </head> + <body> + <header> + <div class="navbar navbar-dark bg-dark box-shadow p-4"> + <h1 class="text-white"> Documentation </h1> + <h2 class="text-white"> RoadNetwork : DC/1 </h2> + </div> + </header> + + <div class="container"> + <h2> Detail Information </h2> + <p> Name of the RoadNetwork: DC/1</p> + <p> Length of the RoadNetwork: 44.0 km</p> + <p> Includes the Roads:</p> + <ul> + <li>A4-W over 44.0 km</li> + </ul> + </div> + + <hr class="solid"> + + <div class="container"> + <h2> Relationships </h2> + <p> Roadnetwork connects DL/3, DL/2 with Chemnitz </p> + </div> + + <footer class="bg-dark"> + <div class="text-center p-3"> + <a href="../overview.html"><button type="button" class="btn btn-dark btn-lg btn-block">Back to Overview</button></a> + </div> + </footer> + + + </body> +</html> \ No newline at end of file diff --git a/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DG1.html b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DG1.html new file mode 100644 index 0000000..d00d907 --- /dev/null +++ b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DG1.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>RoadNetwork: DG/1</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"/> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script> + </head> + <body> + <header> + <div class="navbar navbar-dark bg-dark box-shadow p-4"> + <h1 class="text-white"> Documentation </h1> + <h2 class="text-white"> RoadNetwork : DG/1 </h2> + </div> + </header> + + <div class="container"> + <h2> Detail Information </h2> + <p> Name of the RoadNetwork: DG/1</p> + <p> Length of the RoadNetwork: 95.0 km</p> + <p> Includes the Roads:</p> + <ul> + <li>A4-E over 95.0 km</li> + </ul> + </div> + + <hr class="solid"> + + <div class="container"> + <h2> Relationships </h2> + <p> Roadnetwork connects Dresden with Görlitz </p> + </div> + + <footer class="bg-dark"> + <div class="text-center p-3"> + <a href="../overview.html"><button type="button" class="btn btn-dark btn-lg btn-block">Back to Overview</button></a> + </div> + </footer> + + + </body> +</html> \ No newline at end of file diff --git a/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DL1.html b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DL1.html new file mode 100644 index 0000000..488de12 --- /dev/null +++ b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DL1.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>RoadNetwork: DL/1</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"/> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script> + </head> + <body> + <header> + <div class="navbar navbar-dark bg-dark box-shadow p-4"> + <h1 class="text-white"> Documentation </h1> + <h2 class="text-white"> RoadNetwork : DL/1 </h2> + </div> + </header> + + <div class="container"> + <h2> Detail Information </h2> + <p> Name of the RoadNetwork: DL/1</p> + <p> Length of the RoadNetwork: 15.0 km</p> + <p> Includes the Roads:</p> + <ul> + <li>A38 over 15.0 km</li> + </ul> + </div> + + <hr class="solid"> + + <div class="container"> + <h2> Relationships </h2> + <p> Roadnetwork connects DL/2 with Leipzig </p> + </div> + + <footer class="bg-dark"> + <div class="text-center p-3"> + <a href="../overview.html"><button type="button" class="btn btn-dark btn-lg btn-block">Back to Overview</button></a> + </div> + </footer> + + + </body> +</html> \ No newline at end of file diff --git a/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DL2.html b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DL2.html new file mode 100644 index 0000000..aaa8a07 --- /dev/null +++ b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DL2.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>RoadNetwork: DL/2</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"/> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script> + </head> + <body> + <header> + <div class="navbar navbar-dark bg-dark box-shadow p-4"> + <h1 class="text-white"> Documentation </h1> + <h2 class="text-white"> RoadNetwork : DL/2 </h2> + </div> + </header> + + <div class="container"> + <h2> Detail Information </h2> + <p> Name of the RoadNetwork: DL/2</p> + <p> Length of the RoadNetwork: 67.0 km</p> + <p> Includes the Roads:</p> + <ul> + <li>A14 over 67.0 km</li> + </ul> + </div> + + <hr class="solid"> + + <div class="container"> + <h2> Relationships </h2> + <p> Roadnetwork connects DL/3, DC/1 with DL/1 </p> + </div> + + <footer class="bg-dark"> + <div class="text-center p-3"> + <a href="../overview.html"><button type="button" class="btn btn-dark btn-lg btn-block">Back to Overview</button></a> + </div> + </footer> + + + </body> +</html> \ No newline at end of file diff --git a/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DL3.html b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DL3.html new file mode 100644 index 0000000..771f202 --- /dev/null +++ b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_DL3.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>RoadNetwork: DL/3</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"/> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script> + </head> + <body> + <header> + <div class="navbar navbar-dark bg-dark box-shadow p-4"> + <h1 class="text-white"> Documentation </h1> + <h2 class="text-white"> RoadNetwork : DL/3 </h2> + </div> + </header> + + <div class="container"> + <h2> Detail Information </h2> + <p> Name of the RoadNetwork: DL/3</p> + <p> Length of the RoadNetwork: 20.0 km</p> + <p> Includes the Roads:</p> + <ul> + <li>A4-W over 20.0 km</li> + </ul> + </div> + + <hr class="solid"> + + <div class="container"> + <h2> Relationships </h2> + <p> Roadnetwork connects Dresden with DL/2, DC/1 </p> + </div> + + <footer class="bg-dark"> + <div class="text-center p-3"> + <a href="../overview.html"><button type="button" class="btn btn-dark btn-lg btn-block">Back to Overview</button></a> + </div> + </footer> + + + </body> +</html> \ No newline at end of file diff --git a/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_LC1.html b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_LC1.html new file mode 100644 index 0000000..2e92246 --- /dev/null +++ b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/RoadNetwork_LC1.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>RoadNetwork: LC/1</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"/> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script> + </head> + <body> + <header> + <div class="navbar navbar-dark bg-dark box-shadow p-4"> + <h1 class="text-white"> Documentation </h1> + <h2 class="text-white"> RoadNetwork : LC/1 </h2> + </div> + </header> + + <div class="container"> + <h2> Detail Information </h2> + <p> Name of the RoadNetwork: LC/1</p> + <p> Length of the RoadNetwork: 69.0 km</p> + <p> Includes the Roads:</p> + <ul> + <li>A72 over 69.0 km</li> + </ul> + </div> + + <hr class="solid"> + + <div class="container"> + <h2> Relationships </h2> + <p> Roadnetwork connects Leipzig with Chemnitz </p> + </div> + + <footer class="bg-dark"> + <div class="text-center p-3"> + <a href="../overview.html"><button type="button" class="btn btn-dark btn-lg btn-block">Back to Overview</button></a> + </div> + </footer> + + + </body> +</html> \ No newline at end of file diff --git a/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Route_R1.html b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Route_R1.html new file mode 100644 index 0000000..1cdde2a --- /dev/null +++ b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Route_R1.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Route: R1</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"/> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script> + </head> + <body> + <header> + <div class="navbar navbar-dark bg-dark box-shadow p-4"> + <h1 class="text-white"> Documentation </h1> + <h2 class="text-white"> Route : R1 </h2> + </div> + </header> + + <div class="container"> + <h2> Detail Information </h2> + <p> Name of the Route: R1</p> + <p> Follows the RoadNetworks:</p> + <ul> + <li>DL/1 (15.0)</li> + <li>DL/2 (67.0)</li> + <li>DL/3 (20.0)</li> + <li>LC/1 (69.0)</li> + </ul> + <p> for 171.0 km</p> + </div> + + <hr class="solid"> + + <div class="container"> + <h2> Relationships </h2> + <p> Route connects Dresden with Chemnitz. </p> + <p> Route is operated by vehicle V03. </p> + </div> + + <footer class="bg-dark"> + <div class="text-center p-3"> + <a href="../overview.html"><button type="button" class="btn btn-dark btn-lg btn-block">Back to Overview</button></a> + </div> + </footer> + + + </body> +</html> \ No newline at end of file diff --git a/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Vehicle_V01.html b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Vehicle_V01.html new file mode 100644 index 0000000..0436b34 --- /dev/null +++ b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Vehicle_V01.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Vehicle: V01</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"/> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script> + </head> + <body> + <header> + <div class="navbar navbar-dark bg-dark box-shadow p-4"> + <h1 class="text-white"> Documentation </h1> + <h2 class="text-white"> Vehicle : V01 </h2> + </div> + </header> + + <div class="container"> + <h2> Detail Information </h2> + <p> Name of the Vehicle: V01</p> + <p> Model of the Vehicle: eTruck</p> + <p> Fuel: ELECTRICITY for a maximum of 150.0 km</p> + </div> + + <hr class="solid"> + + <div class="container"> + <h2> Relationships </h2> + <p> Vehicle is currently parked in the company car park. </p> + </div> + + <footer class="bg-dark"> + <div class="text-center p-3"> + <a href="../overview.html"><button type="button" class="btn btn-dark btn-lg btn-block">Back to Overview</button></a> + </div> + </footer> + + + </body> +</html> \ No newline at end of file diff --git a/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Vehicle_V02.html b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Vehicle_V02.html new file mode 100644 index 0000000..e57f1fb --- /dev/null +++ b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Vehicle_V02.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Vehicle: V02</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"/> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script> + </head> + <body> + <header> + <div class="navbar navbar-dark bg-dark box-shadow p-4"> + <h1 class="text-white"> Documentation </h1> + <h2 class="text-white"> Vehicle : V02 </h2> + </div> + </header> + + <div class="container"> + <h2> Detail Information </h2> + <p> Name of the Vehicle: V02</p> + <p> Model of the Vehicle: eTruck</p> + <p> Fuel: ELECTRICITY for a maximum of 150.0 km</p> + </div> + + <hr class="solid"> + + <div class="container"> + <h2> Relationships </h2> + <p> Vehicle is currently parked in the company car park. </p> + </div> + + <footer class="bg-dark"> + <div class="text-center p-3"> + <a href="../overview.html"><button type="button" class="btn btn-dark btn-lg btn-block">Back to Overview</button></a> + </div> + </footer> + + + </body> +</html> \ No newline at end of file diff --git a/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Vehicle_V03.html b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Vehicle_V03.html new file mode 100644 index 0000000..3cc991f --- /dev/null +++ b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/detail/Vehicle_V03.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Vehicle: V03</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"/> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script> + </head> + <body> + <header> + <div class="navbar navbar-dark bg-dark box-shadow p-4"> + <h1 class="text-white"> Documentation </h1> + <h2 class="text-white"> Vehicle : V03 </h2> + </div> + </header> + + <div class="container"> + <h2> Detail Information </h2> + <p> Name of the Vehicle: V03</p> + <p> Model of the Vehicle: eTruck</p> + <p> Fuel: ELECTRICITY for a maximum of 150.0 km</p> + </div> + + <hr class="solid"> + + <div class="container"> + <h2> Relationships </h2> + <p> Vehicle is currently in usage for route R1. </p> + </div> + + <footer class="bg-dark"> + <div class="text-center p-3"> + <a href="../overview.html"><button type="button" class="btn btn-dark btn-lg btn-block">Back to Overview</button></a> + </div> + </footer> + + + </body> +</html> \ No newline at end of file diff --git a/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/overview.html b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/overview.html index 9ebae44..48c986a 100644 --- a/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/overview.html +++ b/stgroup.mdsd.transportation_network.textgeneration/gen/documentation/overview.html @@ -74,7 +74,7 @@ <div class="card-body"> <h5 class="card-title">DG/1 (95.0km)</h5> <p class="card-text"> The Road Network includes 1 roads </p> - <a href="./detail/RoadNetwork_DG/1.html" class="card-link">Detail Page</a> + <a href="./detail/RoadNetwork_DG1.html" class="card-link">Detail Page</a> </div> </div> </div> @@ -83,7 +83,7 @@ <div class="card-body"> <h5 class="card-title">DL/3 (20.0km)</h5> <p class="card-text"> The Road Network includes 1 roads </p> - <a href="./detail/RoadNetwork_DL/3.html" class="card-link">Detail Page</a> + <a href="./detail/RoadNetwork_DL3.html" class="card-link">Detail Page</a> </div> </div> </div> @@ -92,7 +92,7 @@ <div class="card-body"> <h5 class="card-title">DL/2 (67.0km)</h5> <p class="card-text"> The Road Network includes 1 roads </p> - <a href="./detail/RoadNetwork_DL/2.html" class="card-link">Detail Page</a> + <a href="./detail/RoadNetwork_DL2.html" class="card-link">Detail Page</a> </div> </div> </div> @@ -101,7 +101,7 @@ <div class="card-body"> <h5 class="card-title">DL/1 (15.0km)</h5> <p class="card-text"> The Road Network includes 1 roads </p> - <a href="./detail/RoadNetwork_DL/1.html" class="card-link">Detail Page</a> + <a href="./detail/RoadNetwork_DL1.html" class="card-link">Detail Page</a> </div> </div> </div> @@ -110,7 +110,7 @@ <div class="card-body"> <h5 class="card-title">DC/1 (44.0km)</h5> <p class="card-text"> The Road Network includes 1 roads </p> - <a href="./detail/RoadNetwork_DC/1.html" class="card-link">Detail Page</a> + <a href="./detail/RoadNetwork_DC1.html" class="card-link">Detail Page</a> </div> </div> </div> @@ -119,7 +119,7 @@ <div class="card-body"> <h5 class="card-title">LC/1 (69.0km)</h5> <p class="card-text"> The Road Network includes 1 roads </p> - <a href="./detail/RoadNetwork_LC/1.html" class="card-link">Detail Page</a> + <a href="./detail/RoadNetwork_LC1.html" class="card-link">Detail Page</a> </div> </div> </div> diff --git a/stgroup.mdsd.transportation_network.textgeneration/generation.egx b/stgroup.mdsd.transportation_network.textgeneration/generation.egx index 1b0a9d0..a396105 100644 --- a/stgroup.mdsd.transportation_network.textgeneration/generation.egx +++ b/stgroup.mdsd.transportation_network.textgeneration/generation.egx @@ -19,4 +19,38 @@ rule ModelToOverview parameters : Map{} target : "./gen/documentation/" + "overview.html" +} + +rule LocationToDetail + transform element : source!Location { + + guard : element.name <> null + + template : "./templates/t_detail.egl" + + target : "./gen/documentation/" + "detail/" + element.type().name + "_" + element.name + ".html" +} + +rule RoadNetworkToDetail + transform element : source!RoadNetwork { + + template : "./templates/t_detail.egl" + + target : "./gen/documentation/" + "detail/" + element.type.name + "_" + element.identifier.replace("/", "") + ".html" +} + +rule RouteToDetail + transform element : source!Route { + + template : "./templates/t_detail.egl" + + target : "./gen/documentation/" + "detail/" + element.type.name + "_" + element.identifier + ".html" +} + +rule VehicleToDetail + transform element : source!Vehicle { + + template : "./templates/t_detail.egl" + + target : "./gen/documentation/" + "detail/" + element.type.name + "_" + element.identifier + ".html" } \ No newline at end of file diff --git a/stgroup.mdsd.transportation_network.textgeneration/scripts/asCard.egl b/stgroup.mdsd.transportation_network.textgeneration/scripts/asCard.egl index 53348be..6f51a3d 100644 --- a/stgroup.mdsd.transportation_network.textgeneration/scripts/asCard.egl +++ b/stgroup.mdsd.transportation_network.textgeneration/scripts/asCard.egl @@ -33,7 +33,7 @@ operation source!RoadNetwork asCard(){%] <div class="card-body"> <h5 class="card-title">[%=self.identifier%] ([%=self.length%]km)</h5> <p class="card-text"> The Road Network includes [%=self.roads.size()%] roads </p> - <a href="./detail/[%=self.type.name%]_[%=self.identifier%].html" class="card-link">Detail Page</a> + <a href="./detail/[%=self.type.name%]_[%=self.identifier.replace("/","")%].html" class="card-link">Detail Page</a> </div> </div> </div> diff --git a/stgroup.mdsd.transportation_network.textgeneration/scripts/detail_content.egl b/stgroup.mdsd.transportation_network.textgeneration/scripts/detail_content.egl new file mode 100644 index 0000000..306a640 --- /dev/null +++ b/stgroup.mdsd.transportation_network.textgeneration/scripts/detail_content.egl @@ -0,0 +1,85 @@ +[%import "./util.eol";%] + +[% @template +operation EObject getDetails() {%] +<p> No detailed information.</p> +[%}%] + +[% @template +operation source!Location getDetails() {%] +<p> Name of the location: [%=self.getId()%]</p> +<p> Points of Interest in the Location:</p> +<ul> + [%for (poi in self.pois) {%] + <li>[%=poi.getInformation()%]</li> + [%}%] +</ul> +[%}%] + +[% @template +operation source!RoadNetwork getDetails() {%] +<p> Name of the RoadNetwork: [%=self.getId()%]</p> +<p> Length of the RoadNetwork: [%=self.length%] km</p> +<p> Includes the Roads:</p> +<ul> + [%for (road in self.roads) {%] + <li>[%=road.identifier%] over [%=road.length%] km</li> + [%}%] +</ul> +[%}%] + +[% @template +operation source!Route getDetails() {%] +<p> Name of the Route: [%=self.getId()%]</p> +<p> Follows the RoadNetworks:</p> +<ul> + [%for (rn in self.networkList) {%] + <li>[%=rn.getId()%] ([%=rn.length%])</li> + [%}%] +</ul> +<p> for [%=self.networkList.collect(rn| rn.length).sum()%] km</p> +[%}%] + +[% @template +operation source!Vehicle getDetails() {%] +<p> Name of the Vehicle: [%=self.getId()%]</p> +<p> Model of the Vehicle: [%=self.`model` %]</p> +<p> Fuel: [%=self.fuelType%] for a maximum of [%=self.fuelCapacity%] km</p> +[%}%] + +[% @template +operation EObject getRelationships() {%] +<p> No relationship information.</p> +[%}%] + +[% @template +operation source!Location getRelationships() {%] +<p> Location is directly connected to: </p> +<ul> + [%for (location in source!Location.all().select(l|l.name <> null)) {%] + [%if (self <> location and self.isConnectedTo(location, 5)) {%] + <li>[%=location.name.firstToUpperCase()%]</li> + [%}%] + [%}%] +</ul> +[%}%] + +[% @template +operation source!RoadNetwork getRelationships() {%] +<p> Roadnetwork connects [%=self.collectSources()%] with [%=self.collectTargets()%] </p> +[%}%] + +[% @template +operation source!Route getRelationships() {%] +<p> Route connects [%=self.start?.getId()%] with [%=self.end?.getId()%]. </p> +<p> Route is operated by vehicle [%=self.vehicle?.getId()%]. </p> +[%}%] + +[% @template +operation source!Vehicle getRelationships() {%] + [%if(self.eContainer().isTypeOf(source!TransportationNetwork)){%] +<p> Vehicle is currently parked in the company car park. </p> + [%}else{%] +<p> Vehicle is currently in usage for route [%=self.eContainer().getId()%]. </p> + [%}%] +[%}%] diff --git a/stgroup.mdsd.transportation_network.textgeneration/scripts/util.eol b/stgroup.mdsd.transportation_network.textgeneration/scripts/util.eol new file mode 100644 index 0000000..1246dff --- /dev/null +++ b/stgroup.mdsd.transportation_network.textgeneration/scripts/util.eol @@ -0,0 +1,48 @@ + +operation source!NamedElement getId() { + return self.name; +} + +operation source!IdentifiableElement getId() { + return self.identifier; +} + +operation source!PointOfInterest getInformation() : String { + return self.type().name + " " + self.name; +} + +operation source!GasStation getInformation() : String { + return self.type().name + " " + self.name + " with " + self.fueltypes.concat(", "); +} + +operation source!Other getInformation() : String { + return self.type + " " + self.name; +} + +operation source!CustomerWarehouse getInformation() : String { + return self.type().name + " " + self.name + " of " + self.customerName; +} + +operation source!Location isConnectedTo( target : source!Location, depth : Integer) : Boolean { + return depth >= 0 and source!RoadNetwork.all().select(rn| rn.source == self or rn.target == self ) + .exists(rn| (rn.source == self and rn.target == target) + or (rn.target == self and rn.source == target) + or (rn.source == self and rn.target.name == null and rn.target.isConnectedTo(target, depth-1)) + or (rn.target == self and rn.source.name == null and rn.source.isConnectedTo(target, depth-1))); +} + +operation source!RoadNetwork collectSources() : String { + if(self.source.name <> null){ + return self.source.name; + }else{ + return source!RoadNetwork.all().excluding(self).select(rn| rn.source == self.source or rn.target == self.source).collect(rn| rn.identifier).concat(", "); + } +} + +operation source!RoadNetwork collectTargets() : String { + if(self.target.name <> null){ + return self.target.name; + }else{ + return source!RoadNetwork.all().excluding(self).select(rn| rn.source == self.target or rn.target == self.target).collect(rn| rn.identifier).concat(", "); + } +} \ No newline at end of file diff --git a/stgroup.mdsd.transportation_network.textgeneration/templates/t_detail.egl b/stgroup.mdsd.transportation_network.textgeneration/templates/t_detail.egl new file mode 100644 index 0000000..4c3fb3c --- /dev/null +++ b/stgroup.mdsd.transportation_network.textgeneration/templates/t_detail.egl @@ -0,0 +1,41 @@ +[%import "../scripts/detail_content.egl";%] +[%("Print detail page for" + element.getId()).println();%] +<!DOCTYPE html> +<html lang="en"> + <head> + <title>[%=element.type.name%]: [%=element.getId().firstToUpperCase()%]</title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"/> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script> + </head> + <body> + <header> + <div class="navbar navbar-dark bg-dark box-shadow p-4"> + <h1 class="text-white"> Documentation </h1> + <h2 class="text-white"> [%=element.type.name%] : [%=element.getId().firstToUpperCase()%] </h2> + </div> + </header> + + <div class="container"> + <h2> Detail Information </h2> + [%=element.getDetails()%] + </div> + + <hr class="solid"> + + <div class="container"> + <h2> Relationships </h2> + [%=element.getRelationships()%] + </div> + + <footer class="bg-dark"> + <div class="text-center p-3"> + <a href="../overview.html"><button type="button" class="btn btn-dark btn-lg btn-block">Back to Overview</button></a> + </div> + </footer> + + + </body> +</html> \ No newline at end of file -- GitLab