raain-model 1.11.4 → 1.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cartesian/CartesianMeasureValue.d.ts +41 -0
- package/{src/cartesian/CartesianMeasureValue.ts → cartesian/CartesianMeasureValue.js} +34 -64
- package/cartesian/CartesianMeasureValue.js.map +1 -0
- package/cartesian/CartesianValue.d.ts +9 -0
- package/cartesian/CartesianValue.js +12 -0
- package/cartesian/CartesianValue.js.map +1 -0
- package/cartesian/ICartesianMeasureValue.d.ts +29 -0
- package/cartesian/ICartesianMeasureValue.js +3 -0
- package/cartesian/ICartesianMeasureValue.js.map +1 -0
- package/cartesian/LatLng.d.ts +12 -0
- package/cartesian/LatLng.js +31 -0
- package/cartesian/LatLng.js.map +1 -0
- package/cartesian/RadarCartesianMeasureValue.d.ts +15 -0
- package/cartesian/RadarCartesianMeasureValue.js +22 -0
- package/cartesian/RadarCartesianMeasureValue.js.map +1 -0
- package/cartesian/RainCartesianMeasureValue.d.ts +17 -0
- package/cartesian/RainCartesianMeasureValue.js +25 -0
- package/cartesian/RainCartesianMeasureValue.js.map +1 -0
- package/gauge/GaugeMeasure.d.ts +20 -0
- package/gauge/GaugeMeasure.js +24 -0
- package/gauge/GaugeMeasure.js.map +1 -0
- package/gauge/GaugeNode.d.ts +24 -0
- package/gauge/GaugeNode.js +31 -0
- package/gauge/GaugeNode.js.map +1 -0
- package/gauge/GaugeNodeMap.d.ts +22 -0
- package/gauge/GaugeNodeMap.js +42 -0
- package/gauge/GaugeNodeMap.js.map +1 -0
- package/{src/index.ts → index.d.ts} +0 -6
- package/index.js +56 -0
- package/index.js.map +1 -0
- package/organization/EventNode.d.ts +22 -0
- package/organization/EventNode.js +30 -0
- package/organization/EventNode.js.map +1 -0
- package/organization/IVersion.js +3 -0
- package/organization/IVersion.js.map +1 -0
- package/organization/Link.d.ts +16 -0
- package/{src/organization/Link.ts → organization/Link.js} +13 -13
- package/organization/Link.js.map +1 -0
- package/organization/Measure.d.ts +20 -0
- package/organization/Measure.js +35 -0
- package/organization/Measure.js.map +1 -0
- package/organization/PeopleNode.d.ts +18 -0
- package/organization/PeopleNode.js +26 -0
- package/organization/PeopleNode.js.map +1 -0
- package/organization/RaainNode.d.ts +23 -0
- package/{src/organization/RaainNode.ts → organization/RaainNode.js} +29 -53
- package/organization/RaainNode.js.map +1 -0
- package/organization/TeamNode.d.ts +22 -0
- package/organization/TeamNode.js +32 -0
- package/organization/TeamNode.js.map +1 -0
- package/package.json +1 -1
- package/polar/AbstractPolarMeasureValue.d.ts +29 -0
- package/{src/polar/AbstractPolarMeasureValue.ts → polar/AbstractPolarMeasureValue.js} +29 -53
- package/polar/AbstractPolarMeasureValue.js.map +1 -0
- package/polar/GaugePolarMeasureValue.d.ts +11 -0
- package/polar/GaugePolarMeasureValue.js +14 -0
- package/polar/GaugePolarMeasureValue.js.map +1 -0
- package/polar/IPolarMeasureValue.d.ts +19 -0
- package/polar/IPolarMeasureValue.js +3 -0
- package/polar/IPolarMeasureValue.js.map +1 -0
- package/polar/MeasureValuePolarContainer.d.ts +11 -0
- package/polar/MeasureValuePolarContainer.js +22 -0
- package/polar/MeasureValuePolarContainer.js.map +1 -0
- package/polar/PolarMeasureValue.d.ts +26 -0
- package/{src/polar/PolarMeasureValue.ts → polar/PolarMeasureValue.js} +27 -46
- package/polar/PolarMeasureValue.js.map +1 -0
- package/polar/PolarValue.d.ts +10 -0
- package/polar/PolarValue.js +12 -0
- package/polar/PolarValue.js.map +1 -0
- package/polar/RadarPolarMeasureValue.d.ts +15 -0
- package/polar/RadarPolarMeasureValue.js +34 -0
- package/polar/RadarPolarMeasureValue.js.map +1 -0
- package/polar/RainPolarMeasureValue.d.ts +18 -0
- package/polar/RainPolarMeasureValue.js +42 -0
- package/polar/RainPolarMeasureValue.js.map +1 -0
- package/quality/QualityPoint.d.ts +35 -0
- package/{src/quality/QualityPoint.ts → quality/QualityPoint.js} +23 -48
- package/quality/QualityPoint.js.map +1 -0
- package/quality/SpeedMatrix.d.ts +83 -0
- package/{src/quality/SpeedMatrix.ts → quality/SpeedMatrix.js} +78 -116
- package/quality/SpeedMatrix.js.map +1 -0
- package/quality/SpeedMatrixContainer.d.ts +80 -0
- package/{src/quality/SpeedMatrixContainer.ts → quality/SpeedMatrixContainer.js} +76 -141
- package/quality/SpeedMatrixContainer.js.map +1 -0
- package/quality/history/CartesianGaugeHistory.d.ts +15 -0
- package/quality/history/CartesianGaugeHistory.js +14 -0
- package/quality/history/CartesianGaugeHistory.js.map +1 -0
- package/quality/history/CartesianRainHistory.d.ts +11 -0
- package/quality/history/CartesianRainHistory.js +12 -0
- package/quality/history/CartesianRainHistory.js.map +1 -0
- package/quality/history/PositionHistory.d.ts +20 -0
- package/quality/history/PositionHistory.js +17 -0
- package/quality/history/PositionHistory.js.map +1 -0
- package/quality/position/Position.d.ts +22 -0
- package/quality/position/Position.js +50 -0
- package/quality/position/Position.js.map +1 -0
- package/quality/position/PositionValue.d.ts +9 -0
- package/quality/position/PositionValue.js +12 -0
- package/quality/position/PositionValue.js.map +1 -0
- package/quality/tools/QualityTools.d.ts +24 -0
- package/{src/quality/tools/QualityTools.ts → quality/tools/QualityTools.js} +49 -82
- package/quality/tools/QualityTools.js.map +1 -0
- package/radar/RadarMeasure.d.ts +17 -0
- package/radar/RadarMeasure.js +18 -0
- package/radar/RadarMeasure.js.map +1 -0
- package/radar/RadarNode.d.ts +24 -0
- package/radar/RadarNode.js +31 -0
- package/radar/RadarNode.js.map +1 -0
- package/radar/RadarNodeMap.d.ts +28 -0
- package/radar/RadarNodeMap.js +46 -0
- package/radar/RadarNodeMap.js.map +1 -0
- package/rain/RainComputation.d.ts +34 -0
- package/rain/RainComputation.js +55 -0
- package/rain/RainComputation.js.map +1 -0
- package/rain/RainComputationAbstract.d.ts +41 -0
- package/rain/RainComputationAbstract.js +102 -0
- package/rain/RainComputationAbstract.js.map +1 -0
- package/rain/RainComputationMap.d.ts +32 -0
- package/rain/RainComputationMap.js +45 -0
- package/rain/RainComputationMap.js.map +1 -0
- package/rain/RainComputationQuality.d.ts +37 -0
- package/{src/rain/RainComputationQuality.ts → rain/RainComputationQuality.js} +20 -56
- package/rain/RainComputationQuality.js.map +1 -0
- package/rain/RainMeasure.d.ts +18 -0
- package/rain/RainMeasure.js +19 -0
- package/rain/RainMeasure.js.map +1 -0
- package/rain/RainNode.d.ts +38 -0
- package/{src/rain/RainNode.ts → rain/RainNode.js} +48 -76
- package/rain/RainNode.js.map +1 -0
- package/.travis.deploy.sh +0 -41
- package/.travis.yml +0 -22
- package/specs/cartesian/Cartesian.spec.ts +0 -56
- package/specs/gauge/Gauge.spec.ts +0 -19
- package/specs/organization/Organization.spec.ts +0 -32
- package/specs/polar/Polar.spec.ts +0 -25
- package/specs/quality/Position.spec.ts +0 -18
- package/specs/quality/QualityTools.spec.ts +0 -120
- package/specs/quality/SpeedMatrix.spec.ts +0 -125
- package/specs/radar/Radar.spec.ts +0 -18
- package/specs/rain/Rain.spec.ts +0 -71
- package/specs/tsconfig.json +0 -12
- package/src/cartesian/CartesianValue.ts +0 -17
- package/src/cartesian/ICartesianMeasureValue.ts +0 -27
- package/src/cartesian/LatLng.ts +0 -39
- package/src/cartesian/RadarCartesianMeasureValue.ts +0 -29
- package/src/cartesian/RainCartesianMeasureValue.ts +0 -33
- package/src/gauge/GaugeMeasure.ts +0 -36
- package/src/gauge/GaugeNode.ts +0 -46
- package/src/gauge/GaugeNodeMap.ts +0 -55
- package/src/organization/EventNode.ts +0 -44
- package/src/organization/Measure.ts +0 -49
- package/src/organization/PeopleNode.ts +0 -36
- package/src/organization/TeamNode.ts +0 -46
- package/src/polar/GaugePolarMeasureValue.ts +0 -15
- package/src/polar/IPolarMeasureValue.ts +0 -21
- package/src/polar/MeasureValuePolarContainer.ts +0 -28
- package/src/polar/PolarValue.ts +0 -16
- package/src/polar/RadarPolarMeasureValue.ts +0 -43
- package/src/polar/RainPolarMeasureValue.ts +0 -57
- package/src/quality/history/CartesianGaugeHistory.ts +0 -23
- package/src/quality/history/CartesianRainHistory.ts +0 -18
- package/src/quality/history/PositionHistory.ts +0 -31
- package/src/quality/position/Position.ts +0 -60
- package/src/quality/position/PositionValue.ts +0 -15
- package/src/radar/RadarMeasure.ts +0 -27
- package/src/radar/RadarNode.ts +0 -46
- package/src/radar/RadarNodeMap.ts +0 -65
- package/src/rain/RainComputation.ts +0 -82
- package/src/rain/RainComputationAbstract.ts +0 -137
- package/src/rain/RainComputationMap.ts +0 -68
- package/src/rain/RainMeasure.ts +0 -27
- package/tsconfig.json +0 -17
- package/tslint.json +0 -79
- /package/{src/organization/IVersion.ts → organization/IVersion.d.ts} +0 -0
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {CartesianValue} from './CartesianValue';
|
|
2
|
-
import {CartesianMeasureValue} from './CartesianMeasureValue';
|
|
3
|
-
|
|
4
|
-
export class RadarCartesianMeasureValue extends CartesianMeasureValue {
|
|
5
|
-
|
|
6
|
-
public angle: number;
|
|
7
|
-
|
|
8
|
-
constructor(json: {
|
|
9
|
-
cartesianValues: string | CartesianValue[],
|
|
10
|
-
cartesianPixelWidth: { lat: number, lng: number },
|
|
11
|
-
angle: number,
|
|
12
|
-
}) {
|
|
13
|
-
|
|
14
|
-
super(json);
|
|
15
|
-
this.angle = json.angle;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
toJSON(stringify = false): JSON {
|
|
19
|
-
const json: any = super.toJSON(stringify);
|
|
20
|
-
json.angle = this.angle;
|
|
21
|
-
return json;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
toJSONWithCartesianValuesStringified(): JSON {
|
|
25
|
-
const json: any = super.toJSONWithCartesianValuesStringified();
|
|
26
|
-
json.angle = this.angle;
|
|
27
|
-
return json;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {IVersion} from '../organization/IVersion';
|
|
2
|
-
import {CartesianValue} from './CartesianValue';
|
|
3
|
-
import {CartesianMeasureValue} from './CartesianMeasureValue';
|
|
4
|
-
|
|
5
|
-
export class RainCartesianMeasureValue extends CartesianMeasureValue implements IVersion {
|
|
6
|
-
|
|
7
|
-
private readonly version: string;
|
|
8
|
-
|
|
9
|
-
constructor(json: {
|
|
10
|
-
cartesianValues: string | CartesianValue[],
|
|
11
|
-
cartesianPixelWidth: { lat: number, lng: number },
|
|
12
|
-
version?: string,
|
|
13
|
-
}) {
|
|
14
|
-
super(json);
|
|
15
|
-
this.version = json.version;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
getVersion(): string {
|
|
19
|
-
return this.version;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
toJSON(stringify = false): JSON {
|
|
23
|
-
const json: any = super.toJSON(stringify);
|
|
24
|
-
json.version = this.getVersion();
|
|
25
|
-
return json;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
toJSONWithCartesianValuesStringified(): JSON {
|
|
29
|
-
const json: any = super.toJSONWithCartesianValuesStringified();
|
|
30
|
-
json.version = this.getVersion();
|
|
31
|
-
return json;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {Measure} from '../organization/Measure';
|
|
2
|
-
import {IPolarMeasureValue} from '../polar/IPolarMeasureValue';
|
|
3
|
-
import {ICartesianMeasureValue} from '../cartesian/ICartesianMeasureValue';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* api/gauges/:id/measures/:id
|
|
7
|
-
*/
|
|
8
|
-
export class GaugeMeasure extends Measure {
|
|
9
|
-
|
|
10
|
-
public static TYPE = 'gauge-measure';
|
|
11
|
-
public timeInSec: number;
|
|
12
|
-
|
|
13
|
-
constructor(json: {
|
|
14
|
-
id: string,
|
|
15
|
-
values: IPolarMeasureValue[] | ICartesianMeasureValue[] | Measure[] | number[],
|
|
16
|
-
date?: Date,
|
|
17
|
-
validity?: number,
|
|
18
|
-
timeInSec?: number,
|
|
19
|
-
configurationAsJSON?: string | any,
|
|
20
|
-
}
|
|
21
|
-
) {
|
|
22
|
-
super(json);
|
|
23
|
-
this.timeInSec = json.timeInSec >= 0 ? json.timeInSec : -1;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
public toJSON(): JSON {
|
|
27
|
-
const json = super.toJSON();
|
|
28
|
-
json['timeInSec'] = this.timeInSec;
|
|
29
|
-
return json;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
protected getLinkType(): string {
|
|
33
|
-
return GaugeMeasure.TYPE;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
package/src/gauge/GaugeNode.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import {RaainNode} from '../organization/RaainNode';
|
|
2
|
-
import {Link} from '../organization/Link';
|
|
3
|
-
import {TeamNode} from '../organization/TeamNode';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* api/gauges/:id
|
|
7
|
-
*/
|
|
8
|
-
export class GaugeNode extends RaainNode {
|
|
9
|
-
|
|
10
|
-
public static TYPE = 'gauge';
|
|
11
|
-
|
|
12
|
-
public name: string;
|
|
13
|
-
public latitude: number;
|
|
14
|
-
public longitude: number;
|
|
15
|
-
public team: TeamNode;
|
|
16
|
-
|
|
17
|
-
constructor(json: {
|
|
18
|
-
id: string,
|
|
19
|
-
latitude: number,
|
|
20
|
-
longitude: number,
|
|
21
|
-
name?: string,
|
|
22
|
-
links?: Link[] | RaainNode[],
|
|
23
|
-
team?: TeamNode,
|
|
24
|
-
version?: string,
|
|
25
|
-
}) {
|
|
26
|
-
super(json);
|
|
27
|
-
this.latitude = json.latitude;
|
|
28
|
-
this.longitude = json.longitude;
|
|
29
|
-
this.name = json.name;
|
|
30
|
-
this.team = json.team;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
public toJSON(): JSON {
|
|
34
|
-
const json = super.toJSON();
|
|
35
|
-
json['latitude'] = this.latitude;
|
|
36
|
-
json['longitude'] = this.longitude;
|
|
37
|
-
json['name'] = this.name;
|
|
38
|
-
json['team'] = this.team?.id || this.team;
|
|
39
|
-
return json;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
protected getLinkType(): string {
|
|
43
|
-
return GaugeNode.TYPE;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import {Link} from '../organization/Link';
|
|
2
|
-
import {GaugeNode} from './GaugeNode';
|
|
3
|
-
import {GaugeMeasure} from './GaugeMeasure';
|
|
4
|
-
import {RaainNode} from '../organization/RaainNode';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* api/gauges/:id?format=map&begin=...
|
|
8
|
-
*/
|
|
9
|
-
export class GaugeNodeMap extends GaugeNode {
|
|
10
|
-
|
|
11
|
-
private map: string; // GaugeMeasure[]; stringified
|
|
12
|
-
|
|
13
|
-
constructor(json: {
|
|
14
|
-
id: string,
|
|
15
|
-
latitude: number,
|
|
16
|
-
longitude: number,
|
|
17
|
-
map?: string,
|
|
18
|
-
name?: string,
|
|
19
|
-
links?: Link[] | RaainNode[],
|
|
20
|
-
version?: string,
|
|
21
|
-
}) {
|
|
22
|
-
super(json);
|
|
23
|
-
this.setMapData(json.map);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
public toJSON(): JSON {
|
|
27
|
-
const json = super.toJSON();
|
|
28
|
-
if (this.map) {
|
|
29
|
-
json['map'] = this.map;
|
|
30
|
-
}
|
|
31
|
-
return json;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
public setMapData(mapData: GaugeMeasure[] | string) {
|
|
35
|
-
if (!mapData) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
let map = mapData;
|
|
40
|
-
try {
|
|
41
|
-
if (typeof (mapData) !== 'string') {
|
|
42
|
-
map = JSON.stringify(mapData);
|
|
43
|
-
}
|
|
44
|
-
} catch (e) {
|
|
45
|
-
}
|
|
46
|
-
this.map = map.toString();
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
public getMapData(): GaugeMeasure[] {
|
|
50
|
-
if (!this.map) {
|
|
51
|
-
return [];
|
|
52
|
-
}
|
|
53
|
-
return JSON.parse(this.map);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* api/notifications/:id
|
|
3
|
-
*/
|
|
4
|
-
export class EventNode {
|
|
5
|
-
public id: string;
|
|
6
|
-
public title: string;
|
|
7
|
-
public status: number;
|
|
8
|
-
public red: boolean;
|
|
9
|
-
public description: string;
|
|
10
|
-
public created: Date;
|
|
11
|
-
public modified: Date;
|
|
12
|
-
|
|
13
|
-
constructor(json: {
|
|
14
|
-
id: string,
|
|
15
|
-
title: string,
|
|
16
|
-
status: number,
|
|
17
|
-
red: boolean,
|
|
18
|
-
description: string,
|
|
19
|
-
created: Date,
|
|
20
|
-
modified: Date
|
|
21
|
-
}
|
|
22
|
-
) {
|
|
23
|
-
this.id = json.id;
|
|
24
|
-
this.title = json.title;
|
|
25
|
-
this.status = json.status;
|
|
26
|
-
this.red = json.red;
|
|
27
|
-
this.description = json.description;
|
|
28
|
-
this.created = json.created;
|
|
29
|
-
this.modified = json.modified;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
public toJSON(): JSON {
|
|
33
|
-
return {
|
|
34
|
-
id: this.id,
|
|
35
|
-
title: this.title,
|
|
36
|
-
status: this.status,
|
|
37
|
-
red: this.red,
|
|
38
|
-
description: this.description,
|
|
39
|
-
created: this.created,
|
|
40
|
-
modified: this.modified,
|
|
41
|
-
} as any;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import {IPolarMeasureValue} from '../polar/IPolarMeasureValue';
|
|
2
|
-
import {RaainNode} from './RaainNode';
|
|
3
|
-
import {ICartesianMeasureValue} from '../cartesian/ICartesianMeasureValue';
|
|
4
|
-
|
|
5
|
-
export class Measure extends RaainNode {
|
|
6
|
-
public date: Date;
|
|
7
|
-
public values: IPolarMeasureValue[] | ICartesianMeasureValue[] | Measure[] | number[];
|
|
8
|
-
// -> why array ? because you can have potential different angle from the Radar
|
|
9
|
-
|
|
10
|
-
public validity: number
|
|
11
|
-
private configurationAsJSON: string;
|
|
12
|
-
|
|
13
|
-
constructor(json: {
|
|
14
|
-
id: string,
|
|
15
|
-
values: IPolarMeasureValue[] | ICartesianMeasureValue[] | Measure[] | number[],
|
|
16
|
-
date?: Date,
|
|
17
|
-
validity?: number,
|
|
18
|
-
configurationAsJSON?: string | any,
|
|
19
|
-
}
|
|
20
|
-
) {
|
|
21
|
-
super(json);
|
|
22
|
-
this.values = json.values ? json.values : [];
|
|
23
|
-
this.date = json.date ? new Date(json.date) : undefined;
|
|
24
|
-
this.validity = json.validity >= 0 ? json.validity : -1;
|
|
25
|
-
this.setConfiguration(json.configurationAsJSON);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
public setConfiguration(configuration: string | any) {
|
|
29
|
-
let conf = configuration;
|
|
30
|
-
try {
|
|
31
|
-
conf = JSON.parse(configuration);
|
|
32
|
-
} catch (ignored) {
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
this.configurationAsJSON = JSON.stringify(conf);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
public toJSON(options: { removeValues?: boolean } = {}): JSON {
|
|
39
|
-
const json = super.toJSON();
|
|
40
|
-
json['date'] = this.date?.toISOString();
|
|
41
|
-
json['validity'] = this.validity;
|
|
42
|
-
json['configurationAsJSON'] = this.configurationAsJSON;
|
|
43
|
-
|
|
44
|
-
if (!options?.removeValues) {
|
|
45
|
-
json['values'] = this.values;
|
|
46
|
-
}
|
|
47
|
-
return json;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* api/teams/:id => contacts
|
|
3
|
-
*/
|
|
4
|
-
export class PeopleNode {
|
|
5
|
-
|
|
6
|
-
public id: string;
|
|
7
|
-
public role: string;
|
|
8
|
-
public email: string;
|
|
9
|
-
public name: string;
|
|
10
|
-
public comments: string; // potential additional info
|
|
11
|
-
|
|
12
|
-
constructor(json: {
|
|
13
|
-
id: string,
|
|
14
|
-
role: string,
|
|
15
|
-
email: string,
|
|
16
|
-
name: string,
|
|
17
|
-
comments: string
|
|
18
|
-
}
|
|
19
|
-
) {
|
|
20
|
-
this.id = json.id;
|
|
21
|
-
this.role = json.role;
|
|
22
|
-
this.email = json.email;
|
|
23
|
-
this.name = json.name;
|
|
24
|
-
this.comments = json.comments;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
public toJSON(): JSON {
|
|
28
|
-
return {
|
|
29
|
-
id: this.id,
|
|
30
|
-
role: this.role,
|
|
31
|
-
email: this.email,
|
|
32
|
-
name: this.name,
|
|
33
|
-
comments: this.comments,
|
|
34
|
-
} as any;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import {PeopleNode} from './PeopleNode';
|
|
2
|
-
import {RaainNode} from './RaainNode';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* api/teams?name=customerTeam
|
|
6
|
-
*/
|
|
7
|
-
export class TeamNode extends RaainNode {
|
|
8
|
-
|
|
9
|
-
public static TYPE = 'team';
|
|
10
|
-
|
|
11
|
-
public id: any | string;
|
|
12
|
-
public name: string;
|
|
13
|
-
public description: string;
|
|
14
|
-
public contracts: string[];
|
|
15
|
-
public contacts: PeopleNode[];
|
|
16
|
-
|
|
17
|
-
constructor(json: {
|
|
18
|
-
id: any | string,
|
|
19
|
-
name?: string,
|
|
20
|
-
description?: string,
|
|
21
|
-
contracts?: string[],
|
|
22
|
-
contacts?: PeopleNode[]
|
|
23
|
-
}) {
|
|
24
|
-
super(json);
|
|
25
|
-
|
|
26
|
-
this.id = json.id;
|
|
27
|
-
this.name = json.name;
|
|
28
|
-
this.description = json.description;
|
|
29
|
-
this.contracts = json.contracts;
|
|
30
|
-
this.contacts = json.contacts;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
public toJSON(): JSON {
|
|
34
|
-
return {
|
|
35
|
-
id: this.id,
|
|
36
|
-
name: this.name,
|
|
37
|
-
description: this.description,
|
|
38
|
-
contracts: this.contracts,
|
|
39
|
-
contacts: this.contacts,
|
|
40
|
-
} as any;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
protected getLinkType(): string {
|
|
44
|
-
return TeamNode.TYPE;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {IPolarMeasureValue} from './IPolarMeasureValue';
|
|
2
|
-
import {AbstractPolarMeasureValue} from './AbstractPolarMeasureValue';
|
|
3
|
-
import {PolarMeasureValue} from './PolarMeasureValue';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Gauge with single polar value container
|
|
7
|
-
*/
|
|
8
|
-
export class GaugePolarMeasureValue extends AbstractPolarMeasureValue implements IPolarMeasureValue {
|
|
9
|
-
|
|
10
|
-
constructor(json: {
|
|
11
|
-
polars: string | PolarMeasureValue | AbstractPolarMeasureValue
|
|
12
|
-
}) {
|
|
13
|
-
super(json);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import {MeasureValuePolarContainer} from './MeasureValuePolarContainer';
|
|
2
|
-
import {PolarValue} from './PolarValue';
|
|
3
|
-
|
|
4
|
-
export interface IPolarMeasureValue {
|
|
5
|
-
|
|
6
|
-
getPolarsStringified(): string;
|
|
7
|
-
|
|
8
|
-
getPolars(): MeasureValuePolarContainer[];
|
|
9
|
-
|
|
10
|
-
setPolarsAsString(s: string): void;
|
|
11
|
-
|
|
12
|
-
setPolarsAsContainer(s: MeasureValuePolarContainer[]): void;
|
|
13
|
-
|
|
14
|
-
toJSON(): JSON;
|
|
15
|
-
|
|
16
|
-
toJSONWithPolarStringified(): JSON;
|
|
17
|
-
|
|
18
|
-
getPolarValue(json: { azimuthIndex: number, edgeIndex: number }): PolarValue;
|
|
19
|
-
|
|
20
|
-
setPolarValue(json: { azimuthIndex: number, edgeIndex: number, value: number }): void;
|
|
21
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export class MeasureValuePolarContainer {
|
|
2
|
-
public azimuth: number;
|
|
3
|
-
public distance: number;
|
|
4
|
-
public polarEdges: number[];
|
|
5
|
-
|
|
6
|
-
constructor(json: {
|
|
7
|
-
azimuth: number,
|
|
8
|
-
distance: number,
|
|
9
|
-
polarEdges: number[]
|
|
10
|
-
}) {
|
|
11
|
-
|
|
12
|
-
if (typeof json?.azimuth === 'undefined') {
|
|
13
|
-
throw new Error('MeasureValuePolarContainer needs a valid Object');
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
this.azimuth = json.azimuth;
|
|
17
|
-
this.distance = json.distance;
|
|
18
|
-
this.polarEdges = json.polarEdges;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
public toJSON(): JSON {
|
|
22
|
-
return {
|
|
23
|
-
azimuth: this.azimuth,
|
|
24
|
-
distance: this.distance,
|
|
25
|
-
polarEdges: this.polarEdges,
|
|
26
|
-
} as any;
|
|
27
|
-
}
|
|
28
|
-
}
|
package/src/polar/PolarValue.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export class PolarValue {
|
|
2
|
-
public value: number;
|
|
3
|
-
public polarAzimuthInDegrees: number;
|
|
4
|
-
public polarDistanceInMeters: number;
|
|
5
|
-
|
|
6
|
-
constructor(json: {
|
|
7
|
-
value: number,
|
|
8
|
-
polarAzimuthInDegrees: number,
|
|
9
|
-
polarDistanceInMeters: number
|
|
10
|
-
}) {
|
|
11
|
-
this.value = json.value;
|
|
12
|
-
this.polarAzimuthInDegrees = json.polarAzimuthInDegrees;
|
|
13
|
-
this.polarDistanceInMeters = json.polarDistanceInMeters;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import {IPolarMeasureValue} from './IPolarMeasureValue';
|
|
2
|
-
import {AbstractPolarMeasureValue} from './AbstractPolarMeasureValue';
|
|
3
|
-
import {PolarMeasureValue} from './PolarMeasureValue';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Radar with polar value containers
|
|
7
|
-
*/
|
|
8
|
-
export class RadarPolarMeasureValue extends AbstractPolarMeasureValue implements IPolarMeasureValue {
|
|
9
|
-
|
|
10
|
-
public angle: number;
|
|
11
|
-
|
|
12
|
-
constructor(json: {
|
|
13
|
-
polars: RadarPolarMeasureValue | PolarMeasureValue | string,
|
|
14
|
-
angle?: number
|
|
15
|
-
}) {
|
|
16
|
-
super(json);
|
|
17
|
-
|
|
18
|
-
if (json.polars instanceof RadarPolarMeasureValue) {
|
|
19
|
-
this.angle = json.polars.angle;
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (typeof json.polars === 'string') {
|
|
24
|
-
const object = JSON.parse(json.polars);
|
|
25
|
-
this.angle = json.angle ? json.angle : object.angle;
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
this.angle = json.angle;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
public toJSON(stringify = false): JSON {
|
|
33
|
-
const json: any = super.toJSON(stringify);
|
|
34
|
-
json.angle = this.angle;
|
|
35
|
-
return json;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
public toJSONWithPolarStringified(): JSON {
|
|
39
|
-
const json: any = super.toJSONWithPolarStringified();
|
|
40
|
-
json.angle = this.angle;
|
|
41
|
-
return json;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import {IPolarMeasureValue} from './IPolarMeasureValue';
|
|
2
|
-
import {IVersion} from '../organization/IVersion';
|
|
3
|
-
import {AbstractPolarMeasureValue} from './AbstractPolarMeasureValue';
|
|
4
|
-
import {PolarMeasureValue} from './PolarMeasureValue';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Computed Rain with polar value containers
|
|
8
|
-
*/
|
|
9
|
-
export class RainPolarMeasureValue extends AbstractPolarMeasureValue implements IPolarMeasureValue, IVersion {
|
|
10
|
-
|
|
11
|
-
private readonly version: string;
|
|
12
|
-
|
|
13
|
-
constructor(json: {
|
|
14
|
-
polars: RainPolarMeasureValue | PolarMeasureValue | string,
|
|
15
|
-
version?: string
|
|
16
|
-
}) {
|
|
17
|
-
super(json);
|
|
18
|
-
|
|
19
|
-
if (json.polars instanceof RainPolarMeasureValue) {
|
|
20
|
-
this.version = json.polars.version;
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
this.version = json.version;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
static From(obj: any): RainPolarMeasureValue {
|
|
28
|
-
let version: string,
|
|
29
|
-
polars: PolarMeasureValue;
|
|
30
|
-
|
|
31
|
-
if (typeof obj.version === 'string') {
|
|
32
|
-
version = obj.version;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
if (typeof obj.polars !== 'undefined') {
|
|
36
|
-
polars = obj.polars;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return new RainPolarMeasureValue({polars, version});
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
public toJSON(stringify = false): JSON {
|
|
43
|
-
const json: any = super.toJSON(stringify);
|
|
44
|
-
json.version = this.version;
|
|
45
|
-
return json;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
public toJSONWithPolarStringified(): JSON {
|
|
49
|
-
const json: any = super.toJSONWithPolarStringified();
|
|
50
|
-
json.version = this.version;
|
|
51
|
-
return json;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
public getVersion(): string {
|
|
55
|
-
return this.version;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import {CartesianValue} from '../../cartesian/CartesianValue';
|
|
2
|
-
|
|
3
|
-
export class CartesianGaugeHistory {
|
|
4
|
-
public gaugeId: string;
|
|
5
|
-
public gaugeLabel: string;
|
|
6
|
-
public date: Date;
|
|
7
|
-
public value: CartesianValue;
|
|
8
|
-
public configurationAsJSON: string;
|
|
9
|
-
|
|
10
|
-
constructor(json: {
|
|
11
|
-
gaugeId: string,
|
|
12
|
-
gaugeLabel: string,
|
|
13
|
-
date: Date,
|
|
14
|
-
value: CartesianValue,
|
|
15
|
-
configurationAsJSON: string,
|
|
16
|
-
}) {
|
|
17
|
-
this.gaugeId = json.gaugeId;
|
|
18
|
-
this.gaugeLabel = json.gaugeLabel;
|
|
19
|
-
this.date = json.date;
|
|
20
|
-
this.value = json.value;
|
|
21
|
-
this.configurationAsJSON = json.configurationAsJSON;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {CartesianValue} from '../../cartesian/CartesianValue';
|
|
2
|
-
|
|
3
|
-
export class CartesianRainHistory {
|
|
4
|
-
|
|
5
|
-
public periodBegin: Date;
|
|
6
|
-
public periodEnd: Date;
|
|
7
|
-
public computedValue: CartesianValue;
|
|
8
|
-
|
|
9
|
-
constructor(json: {
|
|
10
|
-
periodBegin: Date,
|
|
11
|
-
periodEnd: Date,
|
|
12
|
-
computedValue: CartesianValue
|
|
13
|
-
}) {
|
|
14
|
-
this.periodBegin = json.periodBegin;
|
|
15
|
-
this.periodEnd = json.periodEnd;
|
|
16
|
-
this.computedValue = json.computedValue;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import {PositionValue} from '../position/PositionValue';
|
|
2
|
-
|
|
3
|
-
export class PositionHistory extends PositionValue {
|
|
4
|
-
public id: string;
|
|
5
|
-
public label: string;
|
|
6
|
-
public date: Date;
|
|
7
|
-
public valueFromGauge: number;
|
|
8
|
-
public valueFromRain: number;
|
|
9
|
-
public configurationAsJSON: string;
|
|
10
|
-
|
|
11
|
-
constructor(json: {
|
|
12
|
-
id: string,
|
|
13
|
-
label: string,
|
|
14
|
-
date: Date,
|
|
15
|
-
x: number,
|
|
16
|
-
y: number,
|
|
17
|
-
value: number,
|
|
18
|
-
valueFromGauge?: number,
|
|
19
|
-
valueFromRain?: number,
|
|
20
|
-
configurationAsJSON?: string,
|
|
21
|
-
}) {
|
|
22
|
-
super(json);
|
|
23
|
-
|
|
24
|
-
this.id = json.id;
|
|
25
|
-
this.label = json.label;
|
|
26
|
-
this.date = json.date;
|
|
27
|
-
this.valueFromGauge = json.valueFromGauge;
|
|
28
|
-
this.valueFromRain = json.valueFromRain;
|
|
29
|
-
this.configurationAsJSON = json.configurationAsJSON;
|
|
30
|
-
}
|
|
31
|
-
}
|