@studyportals/fawkes 8.6.1 → 8.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +176 -176
- package/dist/src/programmes/SearchIndexabilityManager.js +1 -9
- package/dist/src/programmes/policies/CountryAttendanceDegree.js +1 -1
- package/dist/src/programmes/policies/CountryDurationDegree.js +1 -1
- package/dist/src/programmes/policies/CountryEducationalForm.js +1 -1
- package/dist/src/programmes/policies/DegreeAttendanceTuitionFee.d.ts +1 -1
- package/dist/src/programmes/policies/DegreeAttendanceTuitionFee.js +6 -6
- package/dist/src/programmes/policies/DegreeContinentTuitionFee.d.ts +1 -1
- package/dist/src/programmes/policies/DegreeContinentTuitionFee.js +6 -6
- package/dist/src/programmes/policies/DegreeFormatTuitionFee.js +5 -5
- package/dist/src/programmes/policies/DisciplineCountryEducationalForm.js +1 -1
- package/dist/src/programmes/policies/DisciplineEducationalForm.js +1 -1
- package/dist/src/programmes/policies/TuitionFeeAttendance.d.ts +17 -0
- package/dist/src/programmes/policies/TuitionFeeAttendance.js +51 -0
- package/dist/src/programmes/policies/TuitionFeeAttendanceDiscipline.d.ts +17 -0
- package/dist/src/programmes/policies/TuitionFeeAttendanceDiscipline.js +54 -0
- package/dist/src/programmes/policies/TuitionFeeContinent.d.ts +16 -0
- package/dist/src/programmes/policies/TuitionFeeContinent.js +46 -0
- package/dist/src/programmes/policies/TuitionFeeCountry.d.ts +16 -0
- package/dist/src/programmes/policies/TuitionFeeCountry.js +46 -0
- package/dist/src/programmes/policies/TuitionFeeDiscipline.d.ts +16 -0
- package/dist/src/programmes/policies/TuitionFeeDiscipline.js +46 -0
- package/dist/src/programmes/policies/index.d.ts +5 -5
- package/dist/src/programmes/policies/index.js +5 -5
- package/dist/src/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.js +8 -8
- package/package.json +105 -105
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { TuitionFeeFilterOptionValue } from '@studyportals/search-filters/server-side';
|
|
3
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
4
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
5
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { TuitionFeePresenter } from '../../presenters/TuitionFeePresenter';
|
|
8
|
+
import { AttendancePresenter } from '../../presenters/AttendancePresenter';
|
|
9
|
+
import { OnlineAttendanceRule } from '../../common/rules/OnlineAttendanceRule';
|
|
10
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
11
|
+
export class TuitionFeeAttendance extends ProgrammesBaseIndexabilityPolicy {
|
|
12
|
+
name = 'Tuition Fee Attendance Policy';
|
|
13
|
+
description = 'Determines indexing rules for pages filtered by tuition fee and attendance.';
|
|
14
|
+
filterKeys = [FilterKey.TUITION_FEE, FilterKey.DELIVERY_METHOD];
|
|
15
|
+
rules = [
|
|
16
|
+
new SingleValueSelectedForFilterRule(FilterKey.TUITION_FEE),
|
|
17
|
+
new SingleValueSelectedForFilterRule(FilterKey.DELIVERY_METHOD),
|
|
18
|
+
new OnlyFiltersSelectedRule([FilterKey.TUITION_FEE, FilterKey.DELIVERY_METHOD]),
|
|
19
|
+
new OnlineAttendanceRule(),
|
|
20
|
+
new AffordableTuitionFeeRule()
|
|
21
|
+
];
|
|
22
|
+
constructor(dependencies) {
|
|
23
|
+
super(dependencies);
|
|
24
|
+
this.initateBaseRules();
|
|
25
|
+
}
|
|
26
|
+
async generateUrls() {
|
|
27
|
+
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
28
|
+
const tuitionFeeFragments = TuitionFeePresenter.getInstance().getFragments();
|
|
29
|
+
const paths = [];
|
|
30
|
+
const affordableTuition = tuitionFeeFragments.find(t => t.id === TuitionFeeFilterOptionValue.ZERO_TO_TWO_THOUSAND_FIVE_HUNDRED);
|
|
31
|
+
if (!affordableTuition) {
|
|
32
|
+
return paths;
|
|
33
|
+
}
|
|
34
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
35
|
+
for (const attendance of attendanceFragments) {
|
|
36
|
+
const filterKeyValues = new Map([
|
|
37
|
+
[FilterKey.TUITION_FEE, [affordableTuition.id]],
|
|
38
|
+
[FilterKey.DELIVERY_METHOD, [attendance.id]]
|
|
39
|
+
]);
|
|
40
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
41
|
+
if (result) {
|
|
42
|
+
paths.push(this.getPathWithPageNumber(`${affordableTuition.path}/${attendance.path}`, pageNumber));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return paths;
|
|
47
|
+
}
|
|
48
|
+
get filterCombination() {
|
|
49
|
+
return FilterCombinations.ATTENDANCE_TUITION_FEE;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
6
|
+
import { OnlineAttendanceRule } from '../../common/rules/OnlineAttendanceRule';
|
|
7
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
8
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
9
|
+
export declare class TuitionFeeAttendanceDiscipline extends ProgrammesBaseIndexabilityPolicy {
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly description: string;
|
|
12
|
+
readonly filterKeys: FilterKey[];
|
|
13
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | OnlineAttendanceRule | AffordableTuitionFeeRule)[];
|
|
14
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
15
|
+
protected generateUrls(): Promise<string[]>;
|
|
16
|
+
get filterCombination(): FilterCombinations;
|
|
17
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
6
|
+
import { OnlineAttendanceRule } from '../../common/rules/OnlineAttendanceRule';
|
|
7
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
8
|
+
import { DisciplinePresenter } from '../../presenters/DisciplinePresenter';
|
|
9
|
+
import { AttendancePresenter } from '../../presenters/AttendancePresenter';
|
|
10
|
+
import { TuitionFeePresenter } from '../../presenters/TuitionFeePresenter';
|
|
11
|
+
export class TuitionFeeAttendanceDiscipline extends ProgrammesBaseIndexabilityPolicy {
|
|
12
|
+
name = 'Tuition Fee Attendance Discipline Policy';
|
|
13
|
+
description = 'Determines indexing rules for pages filtered by tuition fee, study format (online, on-campus, etc.), and discipline.';
|
|
14
|
+
filterKeys = [FilterKey.TUITION_FEE, FilterKey.DELIVERY_METHOD, FilterKey.DISCIPLINES];
|
|
15
|
+
rules = [
|
|
16
|
+
new SingleValueSelectedForFilterRule(FilterKey.TUITION_FEE),
|
|
17
|
+
new SingleValueSelectedForFilterRule(FilterKey.DELIVERY_METHOD),
|
|
18
|
+
new SingleValueSelectedForFilterRule(FilterKey.DISCIPLINES),
|
|
19
|
+
new OnlyFiltersSelectedRule([FilterKey.TUITION_FEE, FilterKey.DELIVERY_METHOD, FilterKey.DISCIPLINES]),
|
|
20
|
+
new AffordableTuitionFeeRule(),
|
|
21
|
+
new OnlineAttendanceRule()
|
|
22
|
+
];
|
|
23
|
+
constructor(dependencies) {
|
|
24
|
+
super(dependencies);
|
|
25
|
+
this.initateBaseRules();
|
|
26
|
+
}
|
|
27
|
+
async generateUrls() {
|
|
28
|
+
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
29
|
+
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
30
|
+
const tuitionFeeFragments = TuitionFeePresenter.getInstance().getFragments();
|
|
31
|
+
const paths = [];
|
|
32
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
33
|
+
for (const discipline of disciplineFragments) {
|
|
34
|
+
for (const attendance of attendanceFragments) {
|
|
35
|
+
for (const tuitionFee of tuitionFeeFragments) {
|
|
36
|
+
const filterKeyValues = new Map([
|
|
37
|
+
[FilterKey.TUITION_FEE, [tuitionFee.id]],
|
|
38
|
+
[FilterKey.DELIVERY_METHOD, [attendance.id]],
|
|
39
|
+
[FilterKey.DISCIPLINES, [discipline.id]]
|
|
40
|
+
]);
|
|
41
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
42
|
+
if (result) {
|
|
43
|
+
paths.push(this.getPathWithPageNumber(`${tuitionFee.path}/${attendance.path}/${discipline.path}`, pageNumber));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return paths;
|
|
50
|
+
}
|
|
51
|
+
get filterCombination() {
|
|
52
|
+
return FilterCombinations.DISCIPLINE_TUITION_FEE_ATTENDANCE;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
8
|
+
export declare class TuitionFeeContinent extends ProgrammesBaseIndexabilityPolicy {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly description: string;
|
|
11
|
+
readonly filterKeys: FilterKey[];
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | AffordableTuitionFeeRule)[];
|
|
13
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
14
|
+
protected generateUrls(): Promise<string[]>;
|
|
15
|
+
get filterCombination(): FilterCombinations;
|
|
16
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { ContinentPresenter } from '../../presenters/ContinentPresenter';
|
|
8
|
+
import { TuitionFeePresenter } from '../../presenters/TuitionFeePresenter';
|
|
9
|
+
export class TuitionFeeContinent extends ProgrammesBaseIndexabilityPolicy {
|
|
10
|
+
name = 'Tuition Fee Continent Policy';
|
|
11
|
+
description = 'Determines indexing rules for pages filtered by both tuition fee, and continent, priotizing combinations with affordable tuition fees.';
|
|
12
|
+
filterKeys = [FilterKey.TUITION_FEE, FilterKey.CONTINENT];
|
|
13
|
+
rules = [
|
|
14
|
+
new SingleValueSelectedForFilterRule(FilterKey.TUITION_FEE),
|
|
15
|
+
new SingleValueSelectedForFilterRule(FilterKey.CONTINENT),
|
|
16
|
+
new OnlyFiltersSelectedRule([FilterKey.TUITION_FEE, FilterKey.CONTINENT]),
|
|
17
|
+
new AffordableTuitionFeeRule()
|
|
18
|
+
];
|
|
19
|
+
constructor(dependencies) {
|
|
20
|
+
super(dependencies);
|
|
21
|
+
this.initateBaseRules();
|
|
22
|
+
}
|
|
23
|
+
async generateUrls() {
|
|
24
|
+
const continentFragments = ContinentPresenter.getInstance().getFragments();
|
|
25
|
+
const tuitionFeeFragments = TuitionFeePresenter.getInstance().getFragments();
|
|
26
|
+
const paths = [];
|
|
27
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
28
|
+
for (const continent of continentFragments) {
|
|
29
|
+
for (const tuitionFee of tuitionFeeFragments) {
|
|
30
|
+
const filterKeyValues = new Map([
|
|
31
|
+
[FilterKey.TUITION_FEE, [tuitionFee.id]],
|
|
32
|
+
[FilterKey.CONTINENT, [continent.id]],
|
|
33
|
+
]);
|
|
34
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
35
|
+
if (result) {
|
|
36
|
+
paths.push(this.getPathWithPageNumber(`${tuitionFee.path}/${continent.path}`, pageNumber));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return paths;
|
|
42
|
+
}
|
|
43
|
+
get filterCombination() {
|
|
44
|
+
return FilterCombinations.CONTINENT_TUITION_FEE;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
8
|
+
export declare class TuitionFeeCountry extends ProgrammesBaseIndexabilityPolicy {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly description: string;
|
|
11
|
+
readonly filterKeys: FilterKey[];
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | AffordableTuitionFeeRule)[];
|
|
13
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
14
|
+
protected generateUrls(): Promise<string[]>;
|
|
15
|
+
get filterCombination(): FilterCombinations;
|
|
16
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { CountryPresenter } from '../../presenters/CountryPresenter';
|
|
8
|
+
import { TuitionFeePresenter } from '../../presenters/TuitionFeePresenter';
|
|
9
|
+
export class TuitionFeeCountry extends ProgrammesBaseIndexabilityPolicy {
|
|
10
|
+
name = 'Tuition Fee Country Policy';
|
|
11
|
+
description = 'Determines indexing rules for pages filtered by both tuition fee, and country.';
|
|
12
|
+
filterKeys = [FilterKey.TUITION_FEE, FilterKey.COUNTRY];
|
|
13
|
+
rules = [
|
|
14
|
+
new SingleValueSelectedForFilterRule(FilterKey.TUITION_FEE),
|
|
15
|
+
new SingleValueSelectedForFilterRule(FilterKey.COUNTRY),
|
|
16
|
+
new OnlyFiltersSelectedRule([FilterKey.TUITION_FEE, FilterKey.COUNTRY]),
|
|
17
|
+
new AffordableTuitionFeeRule()
|
|
18
|
+
];
|
|
19
|
+
constructor(dependencies) {
|
|
20
|
+
super(dependencies);
|
|
21
|
+
this.initateBaseRules();
|
|
22
|
+
}
|
|
23
|
+
async generateUrls() {
|
|
24
|
+
const countryFragments = CountryPresenter.getInstance().getFragments();
|
|
25
|
+
const tuitionFeeFragments = TuitionFeePresenter.getInstance().getFragments();
|
|
26
|
+
const paths = [];
|
|
27
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
28
|
+
for (const country of countryFragments) {
|
|
29
|
+
for (const tuitionFee of tuitionFeeFragments) {
|
|
30
|
+
const filterKeyValues = new Map([
|
|
31
|
+
[FilterKey.TUITION_FEE, [tuitionFee.id]],
|
|
32
|
+
[FilterKey.COUNTRY, [country.id]],
|
|
33
|
+
]);
|
|
34
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
35
|
+
if (result) {
|
|
36
|
+
paths.push(this.getPathWithPageNumber(`${tuitionFee.path}/${country.path}`, pageNumber));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return paths;
|
|
42
|
+
}
|
|
43
|
+
get filterCombination() {
|
|
44
|
+
return FilterCombinations.COUNTRY_TUITION_FEE;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
8
|
+
export declare class TuitionFeeDiscipline extends ProgrammesBaseIndexabilityPolicy {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly description: string;
|
|
11
|
+
readonly filterKeys: FilterKey[];
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | AffordableTuitionFeeRule)[];
|
|
13
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
14
|
+
protected generateUrls(): Promise<string[]>;
|
|
15
|
+
get filterCombination(): FilterCombinations;
|
|
16
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { DisciplinePresenter } from '../../presenters/DisciplinePresenter';
|
|
8
|
+
import { TuitionFeePresenter } from '../../presenters/TuitionFeePresenter';
|
|
9
|
+
export class TuitionFeeDiscipline extends ProgrammesBaseIndexabilityPolicy {
|
|
10
|
+
name = 'Tuition Fee Discipline Policy';
|
|
11
|
+
description = 'Determines indexing rules for pages filtered by both tuition fee, and discipline.';
|
|
12
|
+
filterKeys = [FilterKey.TUITION_FEE, FilterKey.DISCIPLINES];
|
|
13
|
+
rules = [
|
|
14
|
+
new SingleValueSelectedForFilterRule(FilterKey.TUITION_FEE),
|
|
15
|
+
new SingleValueSelectedForFilterRule(FilterKey.DISCIPLINES),
|
|
16
|
+
new OnlyFiltersSelectedRule([FilterKey.TUITION_FEE, FilterKey.DISCIPLINES]),
|
|
17
|
+
new AffordableTuitionFeeRule()
|
|
18
|
+
];
|
|
19
|
+
constructor(dependencies) {
|
|
20
|
+
super(dependencies);
|
|
21
|
+
this.initateBaseRules();
|
|
22
|
+
}
|
|
23
|
+
async generateUrls() {
|
|
24
|
+
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
25
|
+
const tuitionFeeFragments = TuitionFeePresenter.getInstance().getFragments();
|
|
26
|
+
const paths = [];
|
|
27
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
28
|
+
for (const discipline of disciplineFragments) {
|
|
29
|
+
for (const tuitionFee of tuitionFeeFragments) {
|
|
30
|
+
const filterKeyValues = new Map([
|
|
31
|
+
[FilterKey.TUITION_FEE, [tuitionFee.id]],
|
|
32
|
+
[FilterKey.DISCIPLINES, [discipline.id]],
|
|
33
|
+
]);
|
|
34
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
35
|
+
if (result) {
|
|
36
|
+
paths.push(this.getPathWithPageNumber(`${tuitionFee.path}/${discipline.path}`, pageNumber));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return paths;
|
|
42
|
+
}
|
|
43
|
+
get filterCombination() {
|
|
44
|
+
return FilterCombinations.DISCIPLINE_TUITION_FEE;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -2,7 +2,7 @@ export * from './Area';
|
|
|
2
2
|
export * from './Attendance';
|
|
3
3
|
export * from './AttendanceDegree';
|
|
4
4
|
export * from './Continent';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './TuitionFeeContinent';
|
|
6
6
|
export * from './Country';
|
|
7
7
|
export * from './CountryAttendance';
|
|
8
8
|
export * from './CountryAttendanceDegree';
|
|
@@ -11,7 +11,7 @@ export * from './CountryDuration';
|
|
|
11
11
|
export * from './CountryDurationDegree';
|
|
12
12
|
export * from './CountryEducationalForm';
|
|
13
13
|
export * from './CountryFormat';
|
|
14
|
-
export * from './
|
|
14
|
+
export * from './TuitionFeeCountry';
|
|
15
15
|
export * from './DegreeAttendanceDiscipline';
|
|
16
16
|
export * from './DegreeCountryAttendance';
|
|
17
17
|
export * from './DegreeCountryDiscipline';
|
|
@@ -26,8 +26,8 @@ export * from './DisciplineDegree';
|
|
|
26
26
|
export * from './DisciplineDuration';
|
|
27
27
|
export * from './DisciplineEducationalForm';
|
|
28
28
|
export * from './DisciplineFormat';
|
|
29
|
-
export * from './
|
|
30
|
-
export * from './
|
|
29
|
+
export * from './TuitionFeeDiscipline';
|
|
30
|
+
export * from './TuitionFeeAttendanceDiscipline';
|
|
31
31
|
export * from './SpecialProgrammes';
|
|
32
32
|
export * from './TuitionFee';
|
|
33
33
|
export * from './Unfiltered';
|
|
@@ -38,7 +38,7 @@ export * from './DegreeArea';
|
|
|
38
38
|
export * from './DegreeTuitionFee';
|
|
39
39
|
export * from './DegreeAttendanceTuitionFee';
|
|
40
40
|
export * from './DegreeContinent';
|
|
41
|
-
export * from './
|
|
41
|
+
export * from './TuitionFeeAttendance';
|
|
42
42
|
export * from './Duration';
|
|
43
43
|
export * from './AttendanceDuration';
|
|
44
44
|
export * from './DegreeAreaTuitionFee';
|
|
@@ -2,7 +2,7 @@ export * from './Area';
|
|
|
2
2
|
export * from './Attendance';
|
|
3
3
|
export * from './AttendanceDegree';
|
|
4
4
|
export * from './Continent';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './TuitionFeeContinent';
|
|
6
6
|
export * from './Country';
|
|
7
7
|
export * from './CountryAttendance';
|
|
8
8
|
export * from './CountryAttendanceDegree';
|
|
@@ -11,7 +11,7 @@ export * from './CountryDuration';
|
|
|
11
11
|
export * from './CountryDurationDegree';
|
|
12
12
|
export * from './CountryEducationalForm';
|
|
13
13
|
export * from './CountryFormat';
|
|
14
|
-
export * from './
|
|
14
|
+
export * from './TuitionFeeCountry';
|
|
15
15
|
export * from './DegreeAttendanceDiscipline';
|
|
16
16
|
export * from './DegreeCountryAttendance';
|
|
17
17
|
export * from './DegreeCountryDiscipline';
|
|
@@ -26,8 +26,8 @@ export * from './DisciplineDegree';
|
|
|
26
26
|
export * from './DisciplineDuration';
|
|
27
27
|
export * from './DisciplineEducationalForm';
|
|
28
28
|
export * from './DisciplineFormat';
|
|
29
|
-
export * from './
|
|
30
|
-
export * from './
|
|
29
|
+
export * from './TuitionFeeDiscipline';
|
|
30
|
+
export * from './TuitionFeeAttendanceDiscipline';
|
|
31
31
|
export * from './SpecialProgrammes';
|
|
32
32
|
export * from './TuitionFee';
|
|
33
33
|
export * from './Unfiltered';
|
|
@@ -38,7 +38,7 @@ export * from './DegreeArea';
|
|
|
38
38
|
export * from './DegreeTuitionFee';
|
|
39
39
|
export * from './DegreeAttendanceTuitionFee';
|
|
40
40
|
export * from './DegreeContinent';
|
|
41
|
-
export * from './
|
|
41
|
+
export * from './TuitionFeeAttendance';
|
|
42
42
|
export * from './Duration';
|
|
43
43
|
export * from './AttendanceDuration';
|
|
44
44
|
export * from './DegreeAreaTuitionFee';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DependencyTypes } from '../enums/DependencyTypes';
|
|
2
2
|
import { BaseSitemapUrlGeneratorManager } from './BaseSitemapUrlGeneratorManager';
|
|
3
|
-
import { Area, Attendance, AttendanceDegree, Continent,
|
|
3
|
+
import { Area, Attendance, AttendanceDegree, Continent, TuitionFeeContinent, Country, CountryAttendance, Discipline, SpecialProgrammes, TuitionFee, Unfiltered, CountryAttendanceDegree, CountryDuration, CountryDurationDegree, CountryEducationalForm, CountryFormat, TuitionFeeCountry, DegreeAttendanceDiscipline, DegreeCountryAttendance, DegreeCountryDiscipline, DegreeCountryTuitionFee, Format, DisciplineAttendance, DisciplineContinent, DisciplineCountry, DisciplineCountryEducationalForm, DisciplineDegree, DisciplineDuration, DisciplineEducationalForm, DisciplineFormat, TuitionFeeDiscipline, TuitionFeeAttendanceDiscipline, CountryDegree, DegreeFormat, DegreeContinent, DegreeTuitionFeeAttendance, DegreeArea, DegreeTuitionFee, TuitionFeeAttendance, Duration, AttendanceDuration, DegreeAreaTuitionFee, DisciplineContinentAttendance, DegreeTuitionFeeContinent, AttendanceFormat, ContinentFormat, AttendanceContinent, DegreeDuration, ContinentSpecialProgrammes, CountrySpecialProgrammes, AttendanceArea, DegreeFormatTuitionFee, ContinentDuration, DegreeAttendanceFormat, DisciplineCountryAttendance, DisciplineCountryFormat, DegreeSpecialProgrammes, Degree, DisciplineSpecialProgrammes, DegreeAttendanceSpecialProgrammes } from '../programmes/policies';
|
|
4
4
|
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
5
5
|
import { AreaPresenter } from '../presenters/AreaPresenter';
|
|
6
6
|
import { AttendancePresenter } from '../presenters/AttendancePresenter';
|
|
@@ -32,7 +32,7 @@ export class ProgrammesSitemapUrlGeneratorManager extends BaseSitemapUrlGenerato
|
|
|
32
32
|
new AttendanceDuration(dependencies),
|
|
33
33
|
new AttendanceContinent(dependencies),
|
|
34
34
|
new Continent(dependencies),
|
|
35
|
-
new
|
|
35
|
+
new TuitionFeeContinent(dependencies),
|
|
36
36
|
new Country(dependencies),
|
|
37
37
|
new CountryAttendance(dependencies),
|
|
38
38
|
new Discipline(dependencies),
|
|
@@ -47,7 +47,7 @@ export class ProgrammesSitemapUrlGeneratorManager extends BaseSitemapUrlGenerato
|
|
|
47
47
|
new CountryDurationDegree(dependencies),
|
|
48
48
|
new CountryEducationalForm(dependencies),
|
|
49
49
|
new CountryFormat(dependencies),
|
|
50
|
-
new
|
|
50
|
+
new TuitionFeeCountry(dependencies),
|
|
51
51
|
new CountrySpecialProgrammes(dependencies),
|
|
52
52
|
new ContinentFormat(dependencies),
|
|
53
53
|
new ContinentSpecialProgrammes(dependencies),
|
|
@@ -58,11 +58,11 @@ export class ProgrammesSitemapUrlGeneratorManager extends BaseSitemapUrlGenerato
|
|
|
58
58
|
new DegreeCountryTuitionFee(dependencies),
|
|
59
59
|
new DegreeFormat(dependencies),
|
|
60
60
|
new DegreeContinent(dependencies),
|
|
61
|
-
new
|
|
61
|
+
new DegreeTuitionFeeAttendance(dependencies),
|
|
62
62
|
new DegreeArea(dependencies),
|
|
63
63
|
new DegreeTuitionFee(dependencies),
|
|
64
64
|
new DegreeAreaTuitionFee(dependencies),
|
|
65
|
-
new
|
|
65
|
+
new DegreeTuitionFeeContinent(dependencies),
|
|
66
66
|
new DegreeDuration(dependencies),
|
|
67
67
|
new DegreeFormatTuitionFee(dependencies),
|
|
68
68
|
new DegreeAttendanceFormat(dependencies),
|
|
@@ -77,13 +77,13 @@ export class ProgrammesSitemapUrlGeneratorManager extends BaseSitemapUrlGenerato
|
|
|
77
77
|
new DisciplineDuration(dependencies),
|
|
78
78
|
new DisciplineEducationalForm(dependencies),
|
|
79
79
|
new DisciplineFormat(dependencies),
|
|
80
|
-
new
|
|
81
|
-
new
|
|
80
|
+
new TuitionFeeDiscipline(dependencies),
|
|
81
|
+
new TuitionFeeAttendanceDiscipline(dependencies),
|
|
82
82
|
new DisciplineContinentAttendance(dependencies),
|
|
83
83
|
new DisciplineCountryAttendance(dependencies),
|
|
84
84
|
new DisciplineCountryFormat(dependencies),
|
|
85
85
|
new DisciplineSpecialProgrammes(dependencies),
|
|
86
|
-
new
|
|
86
|
+
new TuitionFeeAttendance(dependencies),
|
|
87
87
|
new AttendanceFormat(dependencies),
|
|
88
88
|
new AttendanceArea(dependencies)
|
|
89
89
|
];
|