spreadsheet.setHeader(weekDayString + " " + (hour + 8) + ":00");
spreadsheet.setHeader(weekDayString + " " + (hour + 8) + ":30");
}
}
for (final Entry<Space, boolean[][]> entry : occupationMap.entrySet()) {
final Space space = entry.getKey();
final String identification = space.getName();
final Space building = SpaceUtils.getSpaceBuilding(space);
final String buildingName = building == null ? "" : building.getPresentationName();
final boolean[][] slots = entry.getValue();
final Row row = spreadsheet.addRow();
row.setCell(buildingName);
row.setCell(identification == null ? " " : identification);
final String blueprintNumber = findClosestBlueprintNumber(space);
row.setCell(blueprintNumber);
if (SpaceUtils.isRoom(space)) {
Optional<String> doorNumber = space.getMetadata("doorNumber");
Optional<String> description = space.getMetadata("description");
row.setCell(doorNumber.isPresent() ? doorNumber.get() : " ");
row.setCell(description.isPresent() ? description.get() : " ");
} else if (SpaceUtils.isRoomSubdivision(space)) {
final Space room = findSurroundingRoom(space);
if (room == null) {
row.setCell(" ");
row.setCell(" ");
} else {
Optional<String> doorNumber = space.getMetadata("doorNumber");