-
Notifications
You must be signed in to change notification settings - Fork 5
/
WeatherCoordinateSourceClassDiagram.puml
67 lines (58 loc) · 2.74 KB
/
WeatherCoordinateSourceClassDiagram.puml
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@startuml
note "Assuming all classes to implement \nthe abstract methods of their interfaces\n\n" as generalNotes
abstract class WeatherSource {
- TimeBasedWeatherValueFactory weatherFactory
- Map<Point, IndividualTimeSeries<WeatherValue>> coordinateToTimeSeries
- IdCoordinateSource idCoordinateSource
- {abstract} Map<Point, IndividualTimeSeries<WeatherValue>> getWeather(ClosedInterval<ZonedDateTime>)
- {abstract} Map<Point, IndividualTimeSeries<WeatherValue>> getWeather(ClosedInterval<ZonedDateTime>, Collection<Point>)
- {abstract} Optional<TimeBasedValue<WeatherValue>> getWeather(ZonedDateTime, Point)
}
WeatherSource <|-- CsvWeatherSource
WeatherSource <|-- SqlWeatherSource
WeatherSource <|-- InfluxDbWeatherSource
WeatherSource <|-- CouchbaseWeatherSource
class CsvWeatherSource {
- CsvDataSource dataSource
- CsvWeatherSource(String, String, FileNamingStrategy, IdCoordinateSource, TimeBasedWeatherValueFactory)
}
class SqlWeatherSource {
- SqlDataSource dataSource
- String factoryCoordinateFieldName
- SqlWeatherSource(SqlConnector, IdCoordinateSource, String, String, TimeBasedWeatherValueFactory)
}
class InfluxDbWeatherSource {
- InfluxDbConnector connector
- InfluxDbWeatherSource(InfluxDbConnector, IdCoordinateSource, TimeBasedWeatherValueFactory)
- IndividualTimeSeries<WeatherValue> getWeather(ClosedInterval<ZonedDateTime>, Point)
}
class CouchbaseWeatherSource {
- CouchbaseConnector connector,
- CouchbaseWeatherSource(CouchbaseConnector, IdCoordinateSource, String, TimeBasedWeatherValueFactory, String)
- CouchbaseWeatherSource(CouchbaseConnector, IdCoordinateSource, String, String, TimeBasedWeatherValueFactory, String)
- String generateWeatherKey(ZonedDateTime, Integer)
- String createQueryStringForIntervalAndCoordinate(ClosedInterval<ZonedDateTime>, int)
}
interface IdCoordinateSource {
{abstract} Optional<Point> getCoordinate(int)
{abstract} Collection<Point> getCoordinates(int...)
{abstract} Optional<Integer> getId(Point)
{abstract} Collection<Point> getAllCoordinates()
{abstract} List<CoordinateDistance> getNearestCoordinates(Point, int)
{abstract} List<CoordinateDistance> getClosestCoordinates(Point, int, ComparableQuantity<Length>)
}
IdCoordinateSource <|.. CsvIdCoordinateSource
IdCoordinateSource <|.. SqlIdCoordinateSource
class CsvIdCoordinateSource {
- Map<Integer, Point> idToCoordinate
- Map<Point, Integer> coordinateToId
- CsvDataSource dataSource
- IdCoordinateFactory factory
- CsvIdCoordinateSource(IdCoordinateFactory, CsvDataSource)
}
class SqlIdCoordinateSource {
- SqlDataSource dataSource
- SqlIdCoordinateFactory factory
- SqlIdCoordinateSource(SqlIdCoordinateFactory, String, SqlDataSource)
}
@enduml