Skip to content
Snippets Groups Projects
Commit 2ddec7bf authored by Hallvard Trætteberg's avatar Hallvard Trætteberg
Browse files

More documentation.

parent e01e4f1d
No related branches found
No related tags found
No related merge requests found
Showing with 49 additions and 0 deletions
......@@ -10,3 +10,9 @@ This project is about managing sets of geo-locations, like tracks from hiking og
* a JavaFX app for visualising, analysing and editing sets of geo-locations
* web server with a REST API for managing sets of geo-locations, primarily for collecting the geo-locations from apps, but also as persistence layer for the JavaFX app
The project is organized as a hierarchical maven project, with the follow sub-modules (contained in the root/aggregator project):
* [tdt4140.gr1800.app.core](app.core/README.md) (in app.core folder): Common domain classes and persistence support.
* [tdt4140.gr1800.app.ui](app.ui/README.md) (in app.ui folder): JavaFX app.
* [tdt4140.gr1800.web.server](web.server/README.md) (in web.server folder): Web server providing a REST API to domain data.
There is no web client project, yet, since that is outside the scope of the course. We may add this later for completeness, and to illustrate the REST API.
# app.core module - domain classes for example project
* [Domain model](doc/domain-model.md)
* [DB-based persistence](doc/db-persistence.md)
* [JSON-based serialization](doc/json-persistence.md)
* [Location-based storage](doc/location-based-storage.md)
# DB-based persistence of domain data
A class diagram of the main classes related to db-based persistence is shown below.
<img src="db-persistence-classes.png" alt="DB-based persistence" style="width: 800px;"/>
tdt4140-gr1800/app.core/doc/db-persistence.png

151 KiB

tdt4140-gr1800/app.core/doc/domain-classes.png

210 KiB

# Domain model for app and REST API
The project is about managing sets of geo-locations, so the domain model includes classes for representing geo-locations, sets of these and owners of such sets. A class diagram of the core model is shown below.
Main types related to geo-locations:
* **LatLong**: Value class representing a geo-location, i.e. latitude, longitude pair. Includes methods for distance calculations.
* **GeoLocated**: Interface for geo-located data, i.e. classes that can return a corresponding **LatLong** object.
* **GeoLocation**: Main implementation of **GeoLocated**. Combines a **LatLong** and *elevation* with generic values like name, description, time (implements **Timed**) and tags (implements **Tagged**).
* **GeoLocations** (unfortunate name): Container for **GeoLocated** objects. Includes a flag indicating of the geo-locations represents a *path* or not. Implements **Timed** and **Tagged**.
* **GeoLocationsOwner**: Container for **GeoLocations** objects. Meant as an abstract class, but is not since it is useful on its own.
* **Person**: Main subclass of **GeoLocationsOwner**. Includes *name* and *email* values.
Generally useful types
* **Timed**: Interface for time-related data, including *date*, *time* of day and time *zone*. The idea is that elements left out are filled in with (default) values from the container.
* **TimedImpl**: Main implementation of **Timed**.
* **Tagged**: Interface for tags, i.e. sets of string labels. Includes methods for checking, getting, setting, adding and removing tags.
* **Tags**: Main implementation of **Tagged**.
* **TimedTaggedImpl**: Implementation of both **Timed** and **Tagged**, among others used as superclass for **GeoLocation** and **GeoLocations**.
<img src="domain-classes.png" alt="Domain classes" style="width: 800px;"/>
tdt4140-gr1800/app.core/doc/json-persistence-classes.png

146 KiB

# JSON-based persistence of domain data
A class diagram of the main classes related to JSON-based persistence is shown below.
<img src="json-persistence-classes.png" alt="JSON-based persistence" style="width: 800px;"/>
# Location-based storage of domain data
A class diagram of the main classes related to location-based storage is shown below.
<img src="location-based-storage.png" alt="Location-based persistence" style="width: 800px;"/>
tdt4140-gr1800/app.core/doc/location-based-storage.png

87.8 KiB

# app.ui module - JavaFX app for example project
# web.server module - Web server providing a REST API to domain data
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment