Package org.fenixedu.spaces.domain

Examples of org.fenixedu.spaces.domain.Space


                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");
View Full Code Here


        return space.getBlueprintNumber().isPresent() ? space.getBlueprintNumber().get() : findClosestBlueprintNumber(space
                .getParent());
    }

    private Space findSurroundingRoom(final Space space) {
        final Space suroundingSpace = space.getParent();
        return suroundingSpace == null ? null : SpaceUtils.isRoom(space) ? suroundingSpace : findSurroundingRoom(suroundingSpace);
    }
View Full Code Here

    public Set<Space> getAllRooms() {
        Set<Space> result = new HashSet<Space>();
        Set<Lesson> lessons = getLessons();
        for (Lesson lesson : lessons) {
            Space room = lesson.getSala();
            if (room != null) {
                result.add(room);
            }
        }
        return result;
View Full Code Here

        SortedSet<YearMonthDay> result = new TreeSet<YearMonthDay>();
        startDateToSearch = startDateToSearch != null ? getValidBeginDate(startDateToSearch) : null;

        if (!wasFinished() && startDateToSearch != null && endDateToSearch != null && !startDateToSearch.isAfter(endDateToSearch)) {
            Space lessonCampus = getLessonCampus();
            final int dayIncrement =
                    getFrequency() == FrequencyType.BIWEEKLY ? FrequencyType.WEEKLY.getNumberOfDays() : getFrequency()
                            .getNumberOfDays();
            boolean shouldAdd = true;
            while (true) {
View Full Code Here

    @Override
    public Object provide(Object source, Object currentValue) {

        Set<Space> result = new HashSet<Space>();
        FindSpacesBean bean = (FindSpacesBean) source;
        Space campus = bean.getCampus();

        SpaceClassification building = SpaceClassification.getByName("Building");

        if (campus != null) {
            for (Space child : campus.getChildren()) {
                if (child.getClassification().equals(building)) {
                    result.add(child);
                }
            }
        }
View Full Code Here

        if (isExtraLesson()) {
            StringBuilder builder = new StringBuilder();
            builder.append(getDate().toDateTimeAtMidnight().toString("E")).append(" (");
            builder.append(getTime().toString("HH:mm")).append(")");
            Space room = getRoom();
            if (room != null) {
                builder.append(" ").append(room.getName());
            }
            return builder.toString();
        }

        Lesson lesson = getLesson();
View Full Code Here

    final public String getPresentationName(final ExecutionYear executionYear) {
        return getDegreeCurricularPlan().getPresentationName(executionYear);
    }

    final public Space getCurrentCampus() {
        final Space currentCampus = getDegreeCurricularPlan().getCurrentCampus();
        return currentCampus == null ? getLastCampus() : currentCampus;
    }
View Full Code Here

        final Space currentCampus = getDegreeCurricularPlan().getCurrentCampus();
        return currentCampus == null ? getLastCampus() : currentCampus;
    }

    final public Space getCampus(final ExecutionYear executionYear) {
        final Space result = getDegreeCurricularPlan().getCampus(executionYear);
        return result == null ? getLastCampus() : result;
    }
View Full Code Here

        final Space result = getDegreeCurricularPlan().getCampus(executionYear);
        return result == null ? getLastCampus() : result;
    }

    final public Space getLastCampus() {
        final Space lastScpCampus = getDegreeCurricularPlan().getCampus(getLastExecutionYear());
        return lastScpCampus == null ? getDegreeCurricularPlan().getLastCampus() : lastScpCampus;
    }
View Full Code Here

    }

    private List<Space> getRooms(String[] roomsToAssociate) {
        List<Space> rooms = new ArrayList<Space>();
        for (String roomId : roomsToAssociate) {
            Space space = (Space) FenixFramework.getDomainObject(roomId);
            if (space == null) {
                throw new IllegalArgumentException();
            }
            rooms.add(space);
        }
View Full Code Here

TOP

Related Classes of org.fenixedu.spaces.domain.Space

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.