001package org.cpsolver.studentsct.report; 002 003import org.cpsolver.ifs.assignment.Assignment; 004import org.cpsolver.ifs.util.CSVFile; 005import org.cpsolver.ifs.util.DataProperties; 006import org.cpsolver.studentsct.model.Course; 007import org.cpsolver.studentsct.model.Enrollment; 008import org.cpsolver.studentsct.model.Request; 009import org.cpsolver.studentsct.model.Student; 010 011/** 012 * Simple interface for student sectioning reports. 013 * 014 * <br> 015 * <br> 016 * 017 * Usage: new DistanceConflictTable(model),createTable(true, true).save(aFile); 018 * 019 * <br> 020 * <br> 021 * 022 * @author Tomáš Müller 023 * @version StudentSct 1.3 (Student Sectioning)<br> 024 * Copyright (C) 2013 - 2014 Tomáš Müller<br> 025 * <a href="mailto:muller@unitime.org">muller@unitime.org</a><br> 026 * <a href="http://muller.unitime.org">http://muller.unitime.org</a><br> 027 * <br> 028 * This library is free software; you can redistribute it and/or modify 029 * it under the terms of the GNU Lesser General Public License as 030 * published by the Free Software Foundation; either version 3 of the 031 * License, or (at your option) any later version. <br> 032 * <br> 033 * This library is distributed in the hope that it will be useful, but 034 * WITHOUT ANY WARRANTY; without even the implied warranty of 035 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 036 * Lesser General Public License for more details. <br> 037 * <br> 038 * You should have received a copy of the GNU Lesser General Public 039 * License along with this library; if not see 040 * <a href='http://www.gnu.org/licenses/'>http://www.gnu.org/licenses/</a>. 041 */ 042public interface StudentSectioningReport { 043 public CSVFile create(Assignment<Request, Enrollment> assignment, DataProperties properties); 044 045 /** 046 * Report filtering interface 047 */ 048 public interface Filter { 049 /** Returns true if the given request matches the filter. 050 * {@link #matches(Request, Enrollment)} is called with the current assignment. 051 * */ 052 public boolean matches(Request r); 053 /** Returns true if the given request with the given assignment matches the filter. */ 054 public boolean matches(Request r, Enrollment e); 055 /** Returns true if the given student matches the filter. 056 * This means that a student has a request that matches the filter. */ 057 public boolean matches(Student s); 058 /** Returns true if the given course matches the filter. 059 * This means that a student has a request for the course that matches the filter. */ 060 public boolean matches(Course c); 061 } 062}