-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from olech2412/19-implement-journeys
19 implement journeys
- Loading branch information
Showing
15 changed files
with
476 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/main/java/de/olech2412/adapter/dbadapter/model/journey/Journey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package de.olech2412.adapter.dbadapter.model.journey; | ||
|
||
import de.olech2412.adapter.dbadapter.model.journey.sub.Leg; | ||
import de.olech2412.adapter.dbadapter.model.journey.sub.Price; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Represents a journey from one location to another. | ||
*/ | ||
@Getter | ||
@Setter | ||
@ToString | ||
public class Journey { | ||
/** | ||
* The type of the journey. | ||
*/ | ||
private String type; | ||
|
||
/** | ||
* The legs of the journey. Each leg represents a part of the journey. | ||
*/ | ||
private List<Leg> legs; | ||
|
||
/** | ||
* The refresh token for the journey. This can be used to update the journey information. | ||
*/ | ||
private String refreshToken; | ||
|
||
/** | ||
* The price of the journey. | ||
*/ | ||
private Price price; | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/de/olech2412/adapter/dbadapter/model/journey/sub/Feature.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package de.olech2412.adapter.dbadapter.model.journey.sub; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
/** | ||
* The Feature class represents a feature in a journey. | ||
* It contains a type, properties and geometry of the feature. | ||
*/ | ||
@Getter | ||
@Setter | ||
@ToString | ||
public class Feature { | ||
// The type of the feature | ||
private String type; | ||
|
||
// The properties of the feature | ||
private Properties properties; | ||
|
||
// The geometry of the feature | ||
private Geometry geometry; | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/de/olech2412/adapter/dbadapter/model/journey/sub/Geometry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package de.olech2412.adapter.dbadapter.model.journey.sub; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* The Geometry class represents the geometric coordinates of a location. | ||
* It contains a type and a list of coordinates. | ||
*/ | ||
@Getter | ||
@Setter | ||
@ToString | ||
public class Geometry { | ||
// The type of the geometry | ||
private String type; | ||
|
||
// The coordinates of the geometry | ||
private List<Double> coordinates; | ||
} |
133 changes: 133 additions & 0 deletions
133
src/main/java/de/olech2412/adapter/dbadapter/model/journey/sub/Leg.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
package de.olech2412.adapter.dbadapter.model.journey.sub; | ||
|
||
import de.olech2412.adapter.dbadapter.model.stop.Stop; | ||
import de.olech2412.adapter.dbadapter.model.stop.sub.Line; | ||
import de.olech2412.adapter.dbadapter.model.trip.sub.Remark; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Represents a leg of a journey. | ||
*/ | ||
@Getter | ||
@Setter | ||
@ToString | ||
public class Leg { | ||
/** | ||
* The origin stop of the leg. | ||
*/ | ||
private Stop origin; | ||
|
||
/** | ||
* The destination stop of the leg. | ||
*/ | ||
private Stop destination; | ||
|
||
/** | ||
* The departure time of the leg. | ||
*/ | ||
private String departure; | ||
|
||
/** | ||
* The planned departure time of the leg. | ||
*/ | ||
private String plannedDeparture; | ||
|
||
/** | ||
* The delay in departure of the leg in minutes. | ||
*/ | ||
private int departureDelay; | ||
|
||
/** | ||
* The arrival time of the leg. | ||
*/ | ||
private String arrival; | ||
|
||
/** | ||
* The planned arrival time of the leg. | ||
*/ | ||
private String plannedArrival; | ||
|
||
/** | ||
* The delay in arrival of the leg in minutes. | ||
*/ | ||
private int arrivalDelay; | ||
|
||
/** | ||
* Indicates if the leg is reachable. | ||
*/ | ||
private boolean reachable; | ||
|
||
/** | ||
* The trip ID of the leg. | ||
*/ | ||
private String tripId; | ||
|
||
/** | ||
* The line of the leg. | ||
*/ | ||
private Line line; | ||
|
||
/** | ||
* The direction of the leg. | ||
*/ | ||
private String direction; | ||
|
||
/** | ||
* The current location of the leg. | ||
*/ | ||
private Location currentLocation; | ||
|
||
/** | ||
* The arrival platform of the leg. | ||
*/ | ||
private String arrivalPlatform; | ||
|
||
/** | ||
* The planned arrival platform of the leg. | ||
*/ | ||
private String plannedArrivalPlatform; | ||
|
||
/** | ||
* The type of arrival prognosis of the leg. | ||
*/ | ||
private String arrivalPrognosisType; | ||
|
||
/** | ||
* The departure platform of the leg. | ||
*/ | ||
private String departurePlatform; | ||
|
||
/** | ||
* The planned departure platform of the leg. | ||
*/ | ||
private String plannedDeparturePlatform; | ||
|
||
/** | ||
* The type of departure prognosis of the leg. | ||
*/ | ||
private String departurePrognosisType; | ||
|
||
/** | ||
* The remarks for the leg. | ||
*/ | ||
private List<Remark> remarks; | ||
|
||
/** | ||
* The load factor of the leg. | ||
*/ | ||
private String loadFactor; | ||
|
||
/** | ||
* The stopovers of the leg. | ||
*/ | ||
private List<Stopover> stopovers; | ||
|
||
/** | ||
* The geometry of the leg. | ||
*/ | ||
private Polyline polyline; | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/de/olech2412/adapter/dbadapter/model/journey/sub/Location.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package de.olech2412.adapter.dbadapter.model.journey.sub; | ||
|
||
/** | ||
* Represents a location in the system. | ||
*/ | ||
public class Location { | ||
/** | ||
* The type of the location. | ||
*/ | ||
private String type; | ||
|
||
/** | ||
* The ID of the location. | ||
*/ | ||
private String id; | ||
|
||
/** | ||
* The latitude of the location. | ||
*/ | ||
private double latitude; | ||
|
||
/** | ||
* The longitude of the location. | ||
*/ | ||
private double longitude; | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/de/olech2412/adapter/dbadapter/model/journey/sub/Polyline.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package de.olech2412.adapter.dbadapter.model.journey.sub; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* The Polyline class represents a polyline in a journey. | ||
* It contains a type and a list of features associated with the polyline. | ||
*/ | ||
@Getter | ||
@Setter | ||
@ToString | ||
public class Polyline { | ||
// The type of the polyline | ||
private String type; | ||
|
||
// A list of features associated with the polyline | ||
private List<Feature> features; | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/de/olech2412/adapter/dbadapter/model/journey/sub/Price.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package de.olech2412.adapter.dbadapter.model.journey.sub; | ||
|
||
/** | ||
* Represents the price of a journey. | ||
*/ | ||
public class Price { | ||
/** | ||
* The amount of the price. | ||
*/ | ||
private double amount; | ||
|
||
/** | ||
* The currency of the price. | ||
*/ | ||
private String currency; | ||
|
||
/** | ||
* A hint related to the price. | ||
*/ | ||
private String hint; | ||
} |
Oops, something went wrong.