C# Класс Rozvrh.Models.OneXMLTimetable

Наследование: IXMLTimetable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Copy ( OneXMLTimetable src ) : void

Copy properties (data) from one instance to this.

FilterClassroomsByBuildings ( List buildingIds ) : List

Method filtering classrooms by given buildings. Result held in 'Classrooms' property of Model.

FilterGroupsBySpecializations ( List specializationIds ) : List

Method filtering groups (kruhy) by given specializations (zaměření). Groups are visible when just one degreeYear is selected. Result held in 'Groups' property of Model.

FilterLecturersByDepartments ( List departmentIds ) : List

Method filtering lecturers by given departments, where employed. Result held in 'Lecturers' property of Model.

FilterSpecializationsByDegreeYears ( List degreeYearIds ) : List

Method filtering specializations (zaměření) by given degreeYears. Specializations are visible just only one degreeYear is selected.

FilterTimetableFieldsByAll ( List degreeYearIds, List specializationIds, List groupIds, List departmentIds, List lecturerIds, List buildingIds, List classroomIds, List dayIds, List timeIds, string searchedString ) : List

Method filtering lessons (vyučovací hodiny) by given degreeYears, specializations zaměření, groups (kruhy), departments (dep. of the course), lecturers, classrooms, days and times. Result held in 'TimetableFields' property of Model.

Load ( string xmlPath ) : bool

Reloads xml file, parses and initializes properties which holds base data of the application. This method should be used for refreshing the model after updating thxml with timetable.

Приватные методы

Метод Описание
LoadOneXMLTimetableFromFile ( string xmlPath ) : bool

Method which open and parse the xml file.

ParseData ( ) : bool

Init class properties by xml data.

RemoveDiacriticsAndLower ( string s ) : string

Removes diacritics and gets the characters to lower case.

RemoveFirstTwoDigits ( string s ) : string

Removes first two digits of the given string.

anyId ( List ids ) : bool

Return true when there is any id, false for empty list.

filterLessonsByBuildings ( List buildingIds, ICollection lessonsFromAllFilters ) : void

Method filtering lessons by given buildings, used only when no classroom is selected.

filterLessonsByClassrooms ( List classroomIds, ICollection lessonsFromAllFilters ) : void

Method filtering lessons by given classrooms.

filterLessonsByCourses ( List courseIds, ICollection lessonsFromAllFilters ) : void

Method filtering lessons by given courses.

filterLessonsByDays ( List dayIds, ICollection lessonsFromAllFilters ) : void

Method filtering lessons by given days.

filterLessonsByDegreeYears ( List degreeYearIds, ICollection lessonsFromAllFilters ) : void

Method filtering lessons by given degreeYear.

filterLessonsByDepartments ( List departmentIds, ICollection lessonsFromAllFilters ) : void

Method filtering lessons by given departments.

filterLessonsByGroups ( List groupIds, ICollection lessonsFromAllFilters ) : void

Method filtering lessons by given groups.

filterLessonsByLecturers ( List lecturerIds, ICollection lessonsFromAllFilters ) : void

Method filtering lessons by given lecturers.

filterLessonsByLectures ( List lectureIds, ICollection lessonsFromAllFilters ) : void

Method filtering lessons by given lectures.

filterLessonsBySearchString ( string searchString, ICollection lessonsFromAllFilters ) : void

Method filtering lessons by given search string representing acronym or name of a course.

filterLessonsBySpecializations ( List specializationIds, ICollection lessonsFromAllFilters ) : void

Method filtering lessons by given specializations.

filterLessonsByTimes ( List timeIds, ICollection lessonsFromAllFilters ) : void

Method filtering lessons by given times.

intersect ( IEnumerable lessonsFromAllFilters ) : IEnumerable

Makes set intersection of the given lists of lessons.

Описание методов

Copy() публичный Метод

Copy properties (data) from one instance to this.
public Copy ( OneXMLTimetable src ) : void
src OneXMLTimetable Source instance.
Результат void

FilterClassroomsByBuildings() публичный Метод

Method filtering classrooms by given buildings. Result held in 'Classrooms' property of Model.
public FilterClassroomsByBuildings ( List buildingIds ) : List
buildingIds List Ids of the given buildings
Результат List

FilterGroupsBySpecializations() публичный Метод

Method filtering groups (kruhy) by given specializations (zaměření). Groups are visible when just one degreeYear is selected. Result held in 'Groups' property of Model.
public FilterGroupsBySpecializations ( List specializationIds ) : List
specializationIds List
Результат List

FilterLecturersByDepartments() публичный Метод

Method filtering lecturers by given departments, where employed. Result held in 'Lecturers' property of Model.
public FilterLecturersByDepartments ( List departmentIds ) : List
departmentIds List Ids of the given departments
Результат List

FilterSpecializationsByDegreeYears() публичный Метод

Method filtering specializations (zaměření) by given degreeYears. Specializations are visible just only one degreeYear is selected.
public FilterSpecializationsByDegreeYears ( List degreeYearIds ) : List
degreeYearIds List
Результат List

FilterTimetableFieldsByAll() публичный Метод

Method filtering lessons (vyučovací hodiny) by given degreeYears, specializations zaměření, groups (kruhy), departments (dep. of the course), lecturers, classrooms, days and times. Result held in 'TimetableFields' property of Model.
public FilterTimetableFieldsByAll ( List degreeYearIds, List specializationIds, List groupIds, List departmentIds, List lecturerIds, List buildingIds, List classroomIds, List dayIds, List timeIds, string searchedString ) : List
degreeYearIds List Ids of the given degreeYear.
specializationIds List Ids of the given specialization.
groupIds List Ids of the given groups.
departmentIds List Ids of the given departments.
lecturerIds List Ids of the given lecturers.
buildingIds List Ids of the given buildings.
classroomIds List Ids of the given classrooms.
dayIds List Ids of the given days.
timeIds List Ids of the given times.
searchedString string
Результат List

Load() публичный Метод

Reloads xml file, parses and initializes properties which holds base data of the application. This method should be used for refreshing the model after updating thxml with timetable.
public Load ( string xmlPath ) : bool
xmlPath string Path to the source xml file.
Результат bool