Package de.stklcode.pubtrans.ura.model
Class Message
java.lang.Object
de.stklcode.pubtrans.ura.model.Message
- All Implemented Interfaces:
Serializable
Entity for a message.
- Since:
- 1.3
- Author:
- Stefan Kalscheuer
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct Message object from Stop model and set of additional data.Message(String stopID, String stopName, String stopIndicator, Integer stopState, Double stopLatitude, Double stopLongitude, String msgUUID, Integer msgType, Integer msgPriority, String msgText) Construct Message object from complete set of data.Construct Message object from raw list of attributes parsed from JSON.Construct Message object from raw list of attributes parsed from JSON with explicitly specified version. -
Method Summary
-
Constructor Details
-
Message
public Message(String stopID, String stopName, String stopIndicator, Integer stopState, Double stopLatitude, Double stopLongitude, String msgUUID, Integer msgType, Integer msgPriority, String msgText) Construct Message object from complete set of data.- Parameters:
stopID- Stop ID.stopName- Stop name.stopIndicator- Stop Indicator.stopState- Stop state.stopLatitude- Stop geolocation latitude.stopLongitude- Stop geolocation latitude.msgUUID- Message UUID.msgType- Message type.msgPriority- Message priority.msgText- Message text.
-
Message
Construct Message object from Stop model and set of additional data.- Parameters:
stop- Stop modelmsgUUID- Message UUID.msgType- Message type.msgPriority- Message priority.msgText- Message text.
-
Message
Construct Message object from raw list of attributes parsed from JSON.- Parameters:
raw- List of attributes from JSON line- Throws:
IOException- Thrown on invalid line format.
-
Message
Construct Message object from raw list of attributes parsed from JSON with explicitly specified version.- Parameters:
raw- List of attributes from JSON lineversion- API version- Throws:
IOException- Thrown on invalid line format.
-
-
Method Details
-
getStop
- Returns:
- The affected stop.
-
getUuid
- Returns:
- Message's unique identifier.
-
getType
- Returns:
- Message type.
-
getPriority
- Returns:
- Message priority. Lower value equals higher priority.
-
getText
- Returns:
- Message text.
-