Projekt

Obecné

Profil

Stáhnout (2.53 KB) Statistiky
| Větev: | Revize:
1
<?php
2

    
3
namespace App\Repository;
4

    
5
/**
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
interface IOpenDataManager {
10
    /**
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
    public function getCollectionDataByName($name, $date, $hour);
20

    
21
    /**
22
     * Provides all available data sets types.
23
     *
24
     * @return array with avalable datasets names
25
     */
26
    public function getAvailableCollections();
27

    
28
    /**
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
    public function getAvailableCollectionsByDay($date);
36

    
37
    /**
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
    public function isCollectionAvailable($name, $date);
46

    
47
    /**
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
    public function getDatesWithAvailableCollection();
53

    
54
    /**
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
    public function getMaxCollectionNumberAtDay($name, $date);
63

    
64
    /**
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
    public function getDataSourcePositions($name);
72

    
73
    /**
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
    public function getLastAvailableCollections();
79
}
(1-1/2)