Class Message

    • Constructor Detail

      • 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

        public Message​(Stop stop,
                       String msgUUID,
                       Integer msgType,
                       Integer msgPriority,
                       String msgText)
        Construct Message object from Stop model and set of additional data.
        Parameters:
        stop - Stop model
        msgUUID - Message UUID.
        msgType - Message type.
        msgPriority - Message priority.
        msgText - Message text.
      • Message

        public Message​(List raw)
                throws IOException
        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

        public Message​(List raw,
                       String version)
                throws IOException
        Construct Message object from raw list of attributes parsed from JSON with explicitly specified version.
        Parameters:
        raw - List of attributes from JSON line
        version - API version
        Throws:
        IOException - Thrown on invalid line format.
    • Method Detail

      • getStop

        public Stop getStop()
        Returns:
        The affected stop.
      • getUuid

        public String getUuid()
        Returns:
        Message's unique identifier.
      • getType

        public Integer getType()
        Returns:
        Message type.
      • getPriority

        public Integer getPriority()
        Returns:
        Message priority. Lower value equals higher priority.
      • getText

        public String getText()
        Returns:
        Message text.