Package org.onebusaway.transit_data_federation.services.service_alerts.ServiceAlerts

Examples of org.onebusaway.transit_data_federation.services.service_alerts.ServiceAlerts.TranslatedString


  }

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

    TranslatedString summary = translation(ptSituation.getSummary());
    if (summary != null)
      serviceAlert.setSummary(summary);

    TranslatedString description = translation(ptSituation.getDescription());
    if (description != null)
      serviceAlert.setDescription(description);
  }
View Full Code Here


    assertEquals("path", consequence.getDetourPath());
    assertEquals(1, consequence.getDetourStopIdsCount());
    assertEquals("stop", consequence.getDetourStopIds(0).getId());
    assertEquals(5, builder.getCreationTime());
    assertTrue(builder.hasDescription());
    TranslatedString descs = builder.getDescription();
    assertEquals(1, descs.getTranslationCount());
    Translation desc = descs.getTranslation(0);
    assertEquals("en", desc.getLanguage());
    assertEquals("description", desc.getText());
    assertEquals("ignore_this", builder.getId().getId());
    assertEquals(1, builder.getPublicationWindowCount());
    range = builder.getPublicationWindow(0);
    assertEquals(20L, range.getStart());
    assertEquals(40L, range.getEnd());
    assertEquals(Severity.VERY_SEVERE, builder.getSeverity());
    TranslatedString summaries = builder.getSummary();
    assertEquals(1, summaries.getTranslationCount());
    Translation summary = summaries.getTranslation(0);
    assertEquals("en", summary.getLanguage());
    assertEquals("summary", summary.getText());
    TranslatedString urls = builder.getUrl();
    assertEquals(1, urls.getTranslationCount());
    Translation url = urls.getTranslation(0);
    assertEquals("en", url.getLanguage());
    assertEquals("http://somewhere", url.getText());

    /**
     * Verify that the conversion from the ServiceAlert to ServiceAlertBean
View Full Code Here

TOP

Related Classes of org.onebusaway.transit_data_federation.services.service_alerts.ServiceAlerts.TranslatedString

Copyright © 2018 www.massapicom. 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.