Package org.onebusaway.transit_data_federation.model.narrative

Examples of org.onebusaway.transit_data_federation.model.narrative.AgencyNarrative


  @Autowired
  private NarrativeService _narrativeService;

  @Cacheable
  public TimeZone getTimeZoneForAgencyId(String agencyId) {
    AgencyNarrative narrative = _narrativeService.getAgencyForId(agencyId);
    if (narrative == null)
      throw new NoSuchAgencyServiceException(agencyId);
    return TimeZone.getTimeZone(narrative.getTimezone());
  }
View Full Code Here


  }

  @Cacheable
  public AgencyBean getAgencyForId(String id) {

    AgencyNarrative agency = _narrativeService.getAgencyForId(id);

    if (agency == null)
      return null;

    AgencyBean bean = new AgencyBean();
    bean.setId(id);
    bean.setLang(agency.getLang());
    bean.setName(agency.getName());
    bean.setPhone(agency.getPhone());
    bean.setTimezone(agency.getTimezone());
    bean.setUrl(agency.getUrl());
    bean.setDisclaimer(agency.getDisclaimer());
    bean.setPrivateService(agency.isPrivateService());

    return bean;
  }
View Full Code Here

    _modifications.setModifications(Arrays.asList(mod));

    _task.generateAgencyNarratives(_provider);

    AgencyNarrative narrative = _provider.getNarrativeForAgencyId("1");
    assertEquals(mod.getValue(), narrative.getDisclaimer());
    assertEquals(agency.getLang(), narrative.getLang());
    assertEquals(agency.getName(), narrative.getName());
    assertEquals(agency.getPhone(), narrative.getPhone());
    assertEquals(agency.getTimezone(), narrative.getTimezone());
    assertEquals(agency.getUrl(), narrative.getUrl());
  }
View Full Code Here

TOP

Related Classes of org.onebusaway.transit_data_federation.model.narrative.AgencyNarrative

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.