|
|
@@ -1,31 +1,44 @@
|
|
1
|
1
|
package com.partner.pathfinder.api;
|
|
2
|
2
|
|
|
3
|
3
|
import java.io.Serializable;
|
|
|
4
|
+import java.util.Date;
|
|
4
|
5
|
|
|
5
|
6
|
/**
|
|
6
|
|
- * DTO for a leg in an itinerary.
|
|
|
7
|
+ * Represents an edge in a path through a graph,
|
|
|
8
|
+ * describing the route of a cargo.
|
|
|
9
|
+ *
|
|
7
|
10
|
*/
|
|
8
|
11
|
public final class TransitEdge implements Serializable {
|
|
9
|
12
|
|
|
10
|
|
- private final String carrierMovementId;
|
|
|
13
|
+ private final String voyageNumber;
|
|
11
|
14
|
private final String fromUnLocode;
|
|
12
|
15
|
private final String toUnLocode;
|
|
|
16
|
+ private final Date fromDate;
|
|
|
17
|
+ private final Date toDate;
|
|
13
|
18
|
|
|
14
|
19
|
/**
|
|
15
|
20
|
* Constructor.
|
|
16
|
21
|
*
|
|
17
|
|
- * @param carrierMovementId
|
|
|
22
|
+ * @param voyageNumber
|
|
18
|
23
|
* @param fromUnLocode
|
|
19
|
24
|
* @param toUnLocode
|
|
|
25
|
+ * @param fromDate
|
|
|
26
|
+ * @param toDate
|
|
20
|
27
|
*/
|
|
21
|
|
- public TransitEdge(final String carrierMovementId, final String fromUnLocode, final String toUnLocode) {
|
|
22
|
|
- this.carrierMovementId = carrierMovementId;
|
|
|
28
|
+ public TransitEdge(final String voyageNumber,
|
|
|
29
|
+ final String fromUnLocode,
|
|
|
30
|
+ final String toUnLocode,
|
|
|
31
|
+ final Date fromDate,
|
|
|
32
|
+ final Date toDate) {
|
|
|
33
|
+ this.voyageNumber = voyageNumber;
|
|
23
|
34
|
this.fromUnLocode = fromUnLocode;
|
|
24
|
35
|
this.toUnLocode = toUnLocode;
|
|
|
36
|
+ this.fromDate = fromDate;
|
|
|
37
|
+ this.toDate = toDate;
|
|
25
|
38
|
}
|
|
26
|
39
|
|
|
27
|
|
- public String getCarrierMovementId() {
|
|
28
|
|
- return carrierMovementId;
|
|
|
40
|
+ public String getVoyageNumber() {
|
|
|
41
|
+ return voyageNumber;
|
|
29
|
42
|
}
|
|
30
|
43
|
|
|
31
|
44
|
public String getFromUnLocode() {
|
|
|
@@ -36,4 +49,11 @@ public final class TransitEdge implements Serializable {
|
|
36
|
49
|
return toUnLocode;
|
|
37
|
50
|
}
|
|
38
|
51
|
|
|
|
52
|
+ public Date getFromDate() {
|
|
|
53
|
+ return fromDate;
|
|
|
54
|
+ }
|
|
|
55
|
+
|
|
|
56
|
+ public Date getToDate() {
|
|
|
57
|
+ return toDate;
|
|
|
58
|
+ }
|
|
39
|
59
|
}
|