Examples of ESeverity


Examples of org.onebusaway.transit_data.model.service_alerts.ESeverity

  private void handleOtherFields(PtSituationElementStructure ptSituation,
      ServiceAlert.Builder serviceAlert) {

    SeverityEnumeration severity = ptSituation.getSeverity();
    if (severity != null) {
      ESeverity severityEnum = ESeverity.valueOfTpegCode(severity.value());
      serviceAlert.setSeverity(ServiceAlertLibrary.convertSeverity(severityEnum));
    }

    if (ptSituation.getPublicationWindow() != null) {
      HalfOpenTimestampRangeStructure window = ptSituation.getPublicationWindow();
View Full Code Here

Examples of org.onebusaway.transit_data.model.service_alerts.ESeverity

    bean.setSummary(getBestString(situation.getSummaries()));
    bean.setDescription(getBestString(situation.getDescriptions()));
    bean.setUrl(getBestString(situation.getUrls()));

    ESeverity severity = situation.getSeverity();
    if (severity != null) {
      String[] codes = severity.getTpegCodes();
      bean.setSeverity(codes[0]);
    }

    return bean;
  }
View Full Code Here

Examples of org.onebusaway.transit_data.model.service_alerts.ESeverity

    }
    return unreadServiceAlertCount;
  }

  public String getUnreadServiceAlertsClass() {
    ESeverity severity = getHighestUnreadSeverity();
    if (severity == ESeverity.NO_IMPACT)
      return "unreadServiceAlertsNoImpactSeverity";
    return "unreadServiceAlertsNormalSeverity";
  }
View Full Code Here

Examples of org.onebusaway.transit_data.model.service_alerts.ESeverity

    return (from <= _time && _time <= to);
  }

  private ESeverity getHighestUnreadSeverity() {

    ESeverity maxSeverity = null;

    Map<String, Long> readServiceAlerts = _user.getReadServiceAlerts();
    for (ServiceAlertBean situation : _situations) {

      if (isSituationUnread(readServiceAlerts, situation)) {
        ESeverity s = situation.getSeverity();
        if (s == null)
          s = ESeverity.UNDEFINED;
        if (maxSeverity == null
            || maxSeverity.getNumericValue() < s.getNumericValue())
          maxSeverity = s;
      }
    }
    return maxSeverity;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.