Examples of BlockEntry


Examples of er.woinstaller.io.BlockEntry

  }
 
  private static WebObjectsInstaller wo533Installer() {
    return new WebObjectsInstaller() {
      {
        BlockEntry entry = new BlockEntry();
        entry.offset = 11608064L;
        entry.length = 29672581L;
        blockList.add(entry);
        rawLength = 51252394L;
        woVersion = 53;
View Full Code Here

Examples of er.woinstaller.io.BlockEntry

  }
 
  private static WebObjectsInstaller wo543Installer() {
    return new WebObjectsInstaller() {
      {
        BlockEntry entry = new BlockEntry();
        entry.offset = 58556928L;
        entry.length = 107601091L;
        blockList.add(entry);
        rawLength = 153786259L;
        woVersion = 54;
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.BlockEntry

        _log.warn("no trip found with id=" + trip.getTripId());
      }
     
      return null;
    }
    BlockEntry block = tripEntry.getBlock();
    BlockDescriptor blockDescriptor = new BlockDescriptor();
    blockDescriptor.setBlockEntry(block);
    if (trip.hasStartDate())
      blockDescriptor.setStartDate(trip.getStartDate());
    if (trip.hasStartTime())
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.BlockEntry

  }

  private void applyTripUpdatesToRecord(MonitoredResult result, BlockDescriptor blockDescriptor,
      List<TripUpdate> tripUpdates, VehicleLocationRecord record) {

    BlockEntry block = blockDescriptor.getBlockEntry();
    long t = currentTime();
    long timeFrom = t - 30 * 60 * 1000;
    long timeTo = t + 30 * 60 * 1000;

    List<BlockInstance> instances = _blockCalendarService.getActiveBlocks(
        block.getId(), timeFrom, timeTo);
    if (instances.isEmpty()) {
      instances = _blockCalendarService.getClosestActiveBlocks(block.getId(), t);
    }
    if (instances.isEmpty()) {
      if (result != null) {
        result.addUnmatchedBlockId(block.getId());
      }
      _log.warn("could not find any active schedules instance for the specified block="
          + block.getId() + " tripUpdates=" + tripUpdates);
      return;
    }

    /**
     * TODO: Eventually, use startDate and startTime to distinguish between
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.BlockEntry

    if (blockRef == null || blockRef.getValue() == null)
      return null;

    for (String agencyId : endpointDetails.getDefaultAgencyIds()) {
      AgencyAndId blockId = new AgencyAndId(agencyId, blockRef.getValue());
      BlockEntry blockEntry = _transitGraphDao.getBlockEntryForId(blockId);
      if (blockEntry != null)
        return blockEntry;
    }

    /**
 
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.BlockEntry

        throw new IllegalArgumentException(
            "at least one of blockId or tripId must be specified for VehicleLocationRecord");
      TripEntry tripEntry = _transitGraphDao.getTripEntryForId(tripId);
      if (tripEntry == null)
        throw new IllegalArgumentException("trip not found with id=" + tripId);
      BlockEntry block = tripEntry.getBlock();
      blockId = block.getId();
    }

    if (record.getServiceDate() == 0)
      throw new IllegalArgumentException("you must specify a serviceDate");
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.BlockEntry

  @Override
  public int compare(BlockInstance o1, BlockInstance o2) {

    BlockConfigurationEntry bc1 = o1.getBlock();
    BlockConfigurationEntry bc2 = o2.getBlock();
    BlockEntry b1 = bc1.getBlock();
    BlockEntry b2 = bc2.getBlock();

    AgencyAndId bId1 = b1.getId();
    AgencyAndId bId2 = b2.getId();

    int rc = bId1.compareTo(bId2);

    if (rc != 0)
      return rc;
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.BlockEntry

  }

  @Cacheable
  public BlockBean getBlockForId(AgencyAndId blockId) {

    BlockEntry blockEntry = _graph.getBlockEntryForId(blockId);

    if (blockEntry == null)
      return null;

    BlockBean bean = new BlockBean();

    bean.setId(AgencyAndIdLibrary.convertToString(blockEntry.getId()));

    List<BlockConfigurationBean> configBeans = new ArrayList<BlockConfigurationBean>();
    for (BlockConfigurationEntry blockConfiguration : blockEntry.getConfigurations()) {
      BlockConfigurationBean configBean = getBlockConfigurationAsBean(blockConfiguration);
      configBeans.add(configBean);
    }
    bean.setConfigurations(configBeans);
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.BlockEntry

  }

  @Test
  public void testGetNextServiceDatesForDepartureInterval() {

    BlockEntry blockA = block("blockA");
    blockConfiguration(blockA, serviceIds(lsids("sA"), lsids()));

    List<BlockEntry> blocks = Arrays.asList(blockA);

    Mockito.when(_transitGraphDao.getAllBlocks()).thenReturn(blocks);
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.transit_graph.BlockEntry

  }

  @Test
  public void testGetPreviousServiceDatesForArrivalInterval() {

    BlockEntry blockA = block("blockA");
    blockConfiguration(blockA, serviceIds(lsids("sA"), lsids()));

    List<BlockEntry> blocks = Arrays.asList(blockA);

    Mockito.when(_transitGraphDao.getAllBlocks()).thenReturn(blocks);
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.