Examples of BlockEntry


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

        if (tripEntry == null) {
          _unmappedTripIdCount++;
          continue;
        }

        BlockEntry block = tripEntry.getBlock();

        TimepointPrediction record = new TimepointPrediction();

        record.setBlockId(block.getId());
        record.setTripId(tripEntry.getId());

        String tripAgencyId = tripEntry.getId().getAgencyId();
        record.setVehicleId(new AgencyAndId(tripAgencyId, data.getString(6)));
        record.setScheduleDeviation(data.getInt(14));
View Full Code Here

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

  @Cacheable(isValueSerializable = false)
  @Override
  public BlockInstance getBlockInstance(AgencyAndId blockId, long serviceDate) {

    BlockEntry block = _transitGraphDao.getBlockEntryForId(blockId);

    if (block == null)
      throw new IllegalArgumentException("unknown block: " + blockId);

    List<BlockConfigurationEntry> configurations = block.getConfigurations();
    int index = 0;

    Date date = new Date(serviceDate);
    InstanceState state = new InstanceState(serviceDate);
View Full Code Here

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

    Date timeAsDate = new Date(time);

    Min<BlockInstance> m = new Min<BlockInstance>();

    BlockEntry blockEntry = _transitGraphDao.getBlockEntryForId(blockId);
    for (BlockConfigurationEntry blockConfig : blockEntry.getConfigurations()) {
      List<Date> serviceDates = _calendarService.getDatesForServiceIdsAsOrderedList(blockConfig.getServiceIds());

      int index = index(Collections.binarySearch(serviceDates, timeAsDate));

      if (index > 0) {
View Full Code Here

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

    TripEntry trip = _transitGraphDao.getTripEntryForId(tripId);

    if (trip == null)
      return null;

    BlockEntry block = trip.getBlock();

    List<File> files = getFilesForBlockId(block.getId());

    CsvEntityReader reader = new CsvEntityReader();
    reader.setTokenizerStrategy(new DelimiterTokenizerStrategy("\t"));

    EntityHandlerImpl handler = new EntityHandlerImpl(tripId);
View Full Code Here

Examples of uk.co.oliwali.HawkEye.entry.BlockEntry

  public void onBlockBreak(BlockBreakEvent event) {
    Block block = event.getBlock();
    if (block.getType() == Material.WALL_SIGN || block.getType() == Material.SIGN_POST)
      DataManager.addEntry(new SignEntry(event.getPlayer(), DataType.SIGN_BREAK, event.getBlock()));
    else
      DataManager.addEntry(new BlockEntry(event.getPlayer(), DataType.BLOCK_BREAK, block));
  }
View Full Code Here

Examples of uk.co.oliwali.HawkEye.entry.BlockEntry

    DataManager.addEntry(new BlockChangeEntry("Environment", DataType.BLOCK_FADE, event.getBlock().getLocation(), event.getBlock().getState(), event.getNewState()));
  }

  @HawkEvent(dataType = DataType.BLOCK_BURN)
  public void onBlockBurn(BlockBurnEvent event) {
    DataManager.addEntry(new BlockEntry("Environment", DataType.BLOCK_BURN, event.getBlock()));
  }
View Full Code Here

Examples of uk.co.oliwali.HawkEye.entry.BlockEntry

  }

  @HawkEvent(dataType = DataType.EXPLOSION)
  public void onEntityExplode(EntityExplodeEvent event) {
    for (Block b : event.blockList().toArray(new Block[0]))
      DataManager.addEntry(new BlockEntry("Environment", DataType.EXPLOSION, b));
  }
View Full Code Here

Examples of uk.co.oliwali.HawkEye.entry.BlockEntry

    // Enderman picking up block
    if (event.getTo() == Material.AIR && Config.isLogged(DataType.ENDERMAN_PICKUP)) {
      if (block.getType() == Material.WALL_SIGN || block.getType() == Material.SIGN_POST)
        DataManager.addEntry(new SignEntry("Environment", DataType.SIGN_BREAK, event.getBlock()));
      DataManager.addEntry(new BlockEntry("Environment", DataType.ENDERMAN_PICKUP, block));
    } else if (Config.isLogged(DataType.ENDERMAN_PLACE)) {
      // Enderman placing block
      Enderman enderman = (Enderman) event.getEntity();
      BlockState newState = block.getState();
      if (enderman.getCarriedMaterial() != null) {
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.