Package org.onebusaway.api.model

Examples of org.onebusaway.api.model.TimeBean


    assertEquals(200, response.getCode());
    assertEquals(2, response.getVersion());

    @SuppressWarnings("unchecked")
    EntryWithReferencesBean<TimeBean> entry = (EntryWithReferencesBean<TimeBean>) response.getData();
    TimeBean time = entry.getEntry();
   
    assertNotNull(time);

    long delta = Math.abs(time.getTime() - t);
    assertTrue("check that time delta is within limits: delta=" + delta,
        delta < 100);

    String readableTime = DateLibrary.getTimeAsIso8601String(new Date(
        time.getTime()));
    assertEquals(readableTime, time.getReadableTime());
  }
View Full Code Here


  public DefaultHttpHeaders index() {

    Date date = new Date();
    String readableTime = DateLibrary.getTimeAsIso8601String(date);
    TimeBean bean = new TimeBean(date, readableTime);

    if (isVersion(V1)) {
      return setOkResponse(bean);
    } else if (isVersion(V2)) {
      BeanFactoryV2 factory = getBeanFactoryV2();
View Full Code Here

TOP

Related Classes of org.onebusaway.api.model.TimeBean

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.