1 |
3fc08f2d
|
vastja
|
<?php
|
2 |
|
|
|
3 |
ea92a5e5
|
vastja
|
namespace App\Repository;
|
4 |
3fc08f2d
|
vastja
|
|
5 |
70a3df53
|
vastja
|
/**
|
6 |
|
|
* interface for database connection management
|
7 |
|
|
* autowired @see website/config/services.yaml and https://symfony.com/doc/current/service_container/autowiring.html.
|
8 |
|
|
*/
|
9 |
3fc08f2d
|
vastja
|
interface IOpenDataManager {
|
10 |
70a3df53
|
vastja
|
/**
|
11 |
|
|
* Provides specific dataset information i.e. position, number and other informations depending on data type.
|
12 |
|
|
*
|
13 |
|
|
* @param string $name dataset name
|
14 |
|
|
* @param string $date dataset date in format YYYY-mm-dd
|
15 |
|
|
* @param string $hour dataset hour, number between 0 - 23
|
16 |
|
|
*
|
17 |
|
|
* @return array with dataset information
|
18 |
|
|
*/
|
19 |
64bc2934
|
vastja
|
public function getCollectionDataByName($name, $date, $hour);
|
20 |
03c02899
|
vastja
|
|
21 |
70a3df53
|
vastja
|
/**
|
22 |
|
|
* Provides all available data sets types.
|
23 |
|
|
*
|
24 |
|
|
* @return array with avalable datasets names
|
25 |
|
|
*/
|
26 |
03c02899
|
vastja
|
public function getAvailableCollections();
|
27 |
|
|
|
28 |
70a3df53
|
vastja
|
/**
|
29 |
|
|
* Provides available datasets in given date.
|
30 |
|
|
*
|
31 |
|
|
* @param string $date dataset date in format YYYY-mm-dd
|
32 |
|
|
*
|
33 |
|
|
* @return array with available datasets names
|
34 |
|
|
*/
|
35 |
03c02899
|
vastja
|
public function getAvailableCollectionsByDay($date);
|
36 |
91c8fbfb
|
vastja
|
|
37 |
70a3df53
|
vastja
|
/**
|
38 |
|
|
* Check if dataset with given name is available for given date.
|
39 |
|
|
*
|
40 |
|
|
* @param string $name dataset name
|
41 |
|
|
* @param string $date dataset date in format YYYY-mm-dd
|
42 |
|
|
*
|
43 |
|
|
* @return bool true if dataset with given name is available in given date otherwise false
|
44 |
|
|
*/
|
45 |
dfe43218
|
vastja
|
public function isCollectionAvailable($name, $date);
|
46 |
|
|
|
47 |
70a3df53
|
vastja
|
/**
|
48 |
|
|
* Provides dates with at least one available dataset.
|
49 |
|
|
*
|
50 |
|
|
* @return array with dates with at least one available dataset in format YYYY-mm-dd
|
51 |
|
|
*/
|
52 |
d8f6e6f2
|
vastja
|
public function getDatesWithAvailableCollection();
|
53 |
|
|
|
54 |
70a3df53
|
vastja
|
/**
|
55 |
|
|
* Provides max value of all locations (data dources) in dataset with given date on given date.
|
56 |
|
|
*
|
57 |
|
|
* @param string $name dataset name
|
58 |
|
|
* @param string $date dataset date in format YYYY-mm-dd
|
59 |
|
|
*
|
60 |
|
|
* @return number max value of all locations (data dources) in dataset with given date on given date
|
61 |
|
|
*/
|
62 |
dfe43218
|
vastja
|
public function getMaxCollectionNumberAtDay($name, $date);
|
63 |
61ff7718
|
vastja
|
|
64 |
70a3df53
|
vastja
|
/**
|
65 |
|
|
* Provides for dataset with given name all locations.
|
66 |
|
|
*
|
67 |
|
|
* @param string $name dataset name
|
68 |
|
|
*
|
69 |
|
|
* @return array with all locations for dataset with given name as [x => lat, y => lng]
|
70 |
|
|
*/
|
71 |
61ff7718
|
vastja
|
public function getDataSourcePositions($name);
|
72 |
72a438f3
|
vastja
|
|
73 |
70a3df53
|
vastja
|
/**
|
74 |
|
|
* Provides last available date for each available dataset type.
|
75 |
|
|
*
|
76 |
|
|
* @return array with last available date for each available dataset type as [collection-type-name => YYYY-mm-dd]
|
77 |
|
|
*/
|
78 |
72a438f3
|
vastja
|
public function getLastAvailableCollections();
|
79 |
3fc08f2d
|
vastja
|
}
|