@studyportals/fawkes 8.1.2-2 → 8.1.2-3
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/dist/src/common/IPolicyMetaData.d.ts +6 -0
- package/dist/src/common/rules/BaseFilterKeyValueRule.js +10 -3
- package/dist/src/enums/FilterCombinations.d.ts +26 -1
- package/dist/src/enums/FilterCombinations.js +26 -1
- package/dist/src/organisations/OrganisationsRuleBasedIndexabilityPolicy.d.ts +11 -0
- package/dist/src/organisations/OrganisationsRuleBasedIndexabilityPolicy.js +19 -0
- package/dist/src/organisations/rules/AtLeastTwoRankedResultsRule.d.ts +13 -0
- package/dist/src/organisations/rules/AtLeastTwoRankedResultsRule.js +26 -0
- package/dist/src/organisations/rules/OnlineAttendanceRule.d.ts +6 -0
- package/dist/src/organisations/rules/OnlineAttendanceRule.js +14 -0
- package/dist/src/presenters/AttendancePresenter.js +4 -0
- package/dist/src/presenters/FormatPresenter.js +4 -1
- package/dist/src/presenters/SpecialProgrammesPresenter.js +4 -0
- package/dist/src/programmes/IProgrammeSearchApplicationState.d.ts +4 -0
- package/dist/src/programmes/IProgrammeSearchApplicationState.js +1 -0
- package/dist/src/programmes/IProgrammeSearchDependencies.d.ts +7 -0
- package/dist/src/programmes/IProgrammeSearchDependencies.js +1 -0
- package/dist/src/programmes/IProgrammesSeoDependencies.d.ts +2 -0
- package/dist/src/programmes/IProgrammesSeoDependencies.js +1 -0
- package/dist/src/programmes/SearchIndexabilityManager.js +31 -3
- package/dist/src/programmes/policies/AttendanceArea.d.ts +16 -0
- package/dist/src/programmes/policies/AttendanceArea.js +48 -0
- package/dist/src/programmes/policies/AttendanceContinent.d.ts +16 -0
- package/dist/src/programmes/policies/AttendanceContinent.js +46 -0
- package/dist/src/programmes/policies/AttendanceDegree.d.ts +3 -3
- package/dist/src/programmes/policies/AttendanceDegree.js +4 -4
- package/dist/src/programmes/policies/AttendanceDuration.d.ts +17 -0
- package/dist/src/programmes/policies/AttendanceDuration.js +50 -0
- package/dist/src/programmes/policies/AttendanceFormat.d.ts +16 -0
- package/dist/src/programmes/policies/AttendanceFormat.js +48 -0
- package/dist/src/programmes/policies/AttendanceTuitionFee.d.ts +17 -0
- package/dist/src/programmes/policies/AttendanceTuitionFee.js +51 -0
- package/dist/src/programmes/policies/ContinentDuration.d.ts +16 -0
- package/dist/src/programmes/policies/ContinentDuration.js +48 -0
- package/dist/src/programmes/policies/ContinentFormat.d.ts +16 -0
- package/dist/src/programmes/policies/ContinentFormat.js +48 -0
- package/dist/src/programmes/policies/ContinentSpecialProgrammes.d.ts +16 -0
- package/dist/src/programmes/policies/ContinentSpecialProgrammes.js +48 -0
- package/dist/src/programmes/policies/CountryDuration.d.ts +2 -2
- package/dist/src/programmes/policies/CountryDuration.js +6 -4
- package/dist/src/programmes/policies/CountrySpecialProgrammes.d.ts +16 -0
- package/dist/src/programmes/policies/CountrySpecialProgrammes.js +48 -0
- package/dist/src/programmes/policies/DegreeArea.d.ts +15 -0
- package/dist/src/programmes/policies/DegreeArea.js +46 -0
- package/dist/src/programmes/policies/DegreeAreaTuitionFee.d.ts +16 -0
- package/dist/src/programmes/policies/DegreeAreaTuitionFee.js +54 -0
- package/dist/src/programmes/policies/DegreeAttendanceDiscipline.d.ts +2 -1
- package/dist/src/programmes/policies/DegreeAttendanceDiscipline.js +12 -12
- package/dist/src/programmes/policies/DegreeAttendanceFormat.d.ts +17 -0
- package/dist/src/programmes/policies/DegreeAttendanceFormat.js +56 -0
- package/dist/src/programmes/policies/DegreeAttendanceSpecialProgrammes.d.ts +17 -0
- package/dist/src/programmes/policies/DegreeAttendanceSpecialProgrammes.js +58 -0
- package/dist/src/programmes/policies/DegreeAttendanceTuitionFee.d.ts +18 -0
- package/dist/src/programmes/policies/DegreeAttendanceTuitionFee.js +59 -0
- package/dist/src/programmes/policies/DegreeContinent.d.ts +16 -0
- package/dist/src/programmes/policies/DegreeContinent.js +46 -0
- package/dist/src/programmes/policies/DegreeContinentTuitionFee.d.ts +16 -0
- package/dist/src/programmes/policies/DegreeContinentTuitionFee.js +52 -0
- package/dist/src/programmes/policies/DegreeCountryAttendance.js +3 -3
- package/dist/src/programmes/policies/DegreeCountryTuitionFee.js +2 -2
- package/dist/src/programmes/policies/DegreeDuration.d.ts +17 -0
- package/dist/src/programmes/policies/DegreeDuration.js +50 -0
- package/dist/src/programmes/policies/DegreeFormat.d.ts +16 -0
- package/dist/src/programmes/policies/DegreeFormat.js +48 -0
- package/dist/src/programmes/policies/DegreeFormatTuitionFee.d.ts +18 -0
- package/dist/src/programmes/policies/DegreeFormatTuitionFee.js +56 -0
- package/dist/src/programmes/policies/DegreeSpecialProgrammes.d.ts +17 -0
- package/dist/src/programmes/policies/DegreeSpecialProgrammes.js +52 -0
- package/dist/src/programmes/policies/DegreeTuitionFee.d.ts +16 -0
- package/dist/src/programmes/policies/DegreeTuitionFee.js +49 -0
- package/dist/src/programmes/policies/DisciplineArea.d.ts +1 -1
- package/dist/src/programmes/policies/DisciplineArea.js +1 -1
- package/dist/src/programmes/policies/DisciplineContinentAttendance.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineContinentAttendance.js +54 -0
- package/dist/src/programmes/policies/DisciplineCountryAttendance.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineCountryAttendance.js +54 -0
- package/dist/src/programmes/policies/DisciplineCountryDegree.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineCountryDegree.js +53 -0
- package/dist/src/programmes/policies/DisciplineCountryFormat.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineCountryFormat.js +54 -0
- package/dist/src/programmes/policies/DisciplineDuration.d.ts +2 -2
- package/dist/src/programmes/policies/DisciplineDuration.js +2 -2
- package/dist/src/programmes/policies/DisciplineSpecialProgrammes.d.ts +16 -0
- package/dist/src/programmes/policies/DisciplineSpecialProgrammes.js +48 -0
- package/dist/src/programmes/policies/DisciplineTuitionFee.js +1 -1
- package/dist/src/programmes/policies/Duration.d.ts +16 -0
- package/dist/src/programmes/policies/Duration.js +40 -0
- package/dist/src/programmes/policies/Format.d.ts +15 -0
- package/dist/src/programmes/policies/Format.js +38 -0
- package/dist/src/programmes/policies/SpecialProgrammes.d.ts +1 -2
- package/dist/src/programmes/policies/SpecialProgrammes.js +0 -2
- package/dist/src/programmes/policies/index.d.ts +27 -1
- package/dist/src/programmes/policies/index.js +27 -1
- package/dist/src/programmes/rules/AtLeastSevenResultsRule.d.ts +15 -0
- package/dist/src/programmes/rules/AtLeastSevenResultsRule.js +30 -0
- package/dist/src/programmes/rules/BlendedOrOnlineAttendanceRule.d.ts +6 -0
- package/dist/src/programmes/rules/BlendedOrOnlineAttendanceRule.js +18 -0
- package/dist/src/programmes/rules/DegreeAttendanceSpecificRule.d.ts +10 -0
- package/dist/src/programmes/rules/DegreeAttendanceSpecificRule.js +42 -0
- package/dist/src/programmes/rules/DegreeCountrySpecificRule.d.ts +10 -0
- package/dist/src/programmes/rules/DegreeCountrySpecificRule.js +43 -0
- package/dist/src/programmes/rules/DegreeCountryTuitionFeeRule.d.ts +11 -0
- package/dist/src/programmes/rules/DegreeCountryTuitionFeeRule.js +40 -0
- package/dist/src/programmes/rules/ErasmusOrExecutiveSpecialProgrammeRule.d.ts +6 -0
- package/dist/src/programmes/rules/ErasmusOrExecutiveSpecialProgrammeRule.js +19 -0
- package/dist/src/programmes/rules/ErasmusOrJointSpecialProgrammesRule.js +2 -2
- package/dist/src/programmes/rules/ErasmusSpecialProgrammeRule.d.ts +6 -0
- package/dist/src/programmes/rules/ErasmusSpecialProgrammeRule.js +19 -0
- package/dist/src/programmes/rules/ExecutiveSpecialProgrammeRule.d.ts +6 -0
- package/dist/src/programmes/rules/ExecutiveSpecialProgrammeRule.js +19 -0
- package/dist/src/programmes/rules/MBACountryAttendanceRule.d.ts +11 -0
- package/dist/src/programmes/rules/MBACountryAttendanceRule.js +40 -0
- package/dist/src/programmes/rules/MasterOfArtsDisciplineRule.d.ts +10 -0
- package/dist/src/programmes/rules/MasterOfArtsDisciplineRule.js +41 -0
- package/dist/src/programmes/rules/MasterOfEducationCountryDisciplineRule.d.ts +11 -0
- package/dist/src/programmes/rules/MasterOfEducationCountryDisciplineRule.js +69 -0
- package/dist/src/programmes/rules/MasterOfLawsCountryAttendanceRule.d.ts +12 -0
- package/dist/src/programmes/rules/MasterOfLawsCountryAttendanceRule.js +43 -0
- package/dist/src/programmes/rules/MasterOfLawsCountryTuitionFeeRule.d.ts +12 -0
- package/dist/src/programmes/rules/MasterOfLawsCountryTuitionFeeRule.js +46 -0
- package/dist/src/programmes/rules/MasterOfPhilosophyCountryAttendanceRule.d.ts +12 -0
- package/dist/src/programmes/rules/MasterOfPhilosophyCountryAttendanceRule.js +43 -0
- package/dist/src/programmes/rules/MasterOfScienceDisciplineRule.d.ts +10 -0
- package/dist/src/programmes/rules/MasterOfScienceDisciplineRule.js +41 -0
- package/dist/src/programmes/rules/OneOrTwoYearDurationRule.d.ts +6 -0
- package/dist/src/programmes/rules/OneOrTwoYearDurationRule.js +19 -0
- package/dist/src/programmes/rules/OneYearOnlyRule.d.ts +11 -0
- package/dist/src/programmes/rules/OneYearOnlyRule.js +34 -0
- package/dist/src/programmes/rules/OnlineAttendanceRule.d.ts +6 -0
- package/dist/src/programmes/rules/OnlineAttendanceRule.js +15 -0
- package/dist/src/programmes/rules/TwoYearDurationRule.d.ts +6 -0
- package/dist/src/programmes/rules/TwoYearDurationRule.js +19 -0
- package/dist/src/sitemap-generator/BaseSitemapUrlGeneratorManager.js +0 -1
- package/dist/src/sitemap-generator/IPageNumberProvider.d.ts +3 -0
- package/dist/src/sitemap-generator/IPageNumberProvider.js +1 -0
- package/dist/src/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.js +117 -32
- package/dist/src/structured-data/SearchStructuredDataFactory.d.ts +2 -22
- package/dist/src/structured-data/SearchStructuredDataFactory.js +7 -64
- package/dist/src/structured-data/dto/EntityDTO.d.ts +0 -2
- package/dist/src/structured-data/dto/index.d.ts +0 -1
- package/dist/src/structured-data/dto/index.js +0 -1
- package/package.json +6 -6
- package/dist/src/structured-data/ScholarshipStructuredDataFactory.d.ts +0 -14
- package/dist/src/structured-data/ScholarshipStructuredDataFactory.js +0 -69
- package/dist/src/structured-data/dto/PaywallDTO.d.ts +0 -14
- /package/dist/src/{structured-data/dto/PaywallDTO.js → common/IPolicyMetaData.js} +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
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 { IndexableDegreeRule } from '../rules/IndexableDegreeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { DegreePresenter } from '../../presenters/DegreePresenter';
|
|
8
|
+
import { FormatPresenter } from '../../presenters/FormatPresenter';
|
|
9
|
+
import { TuitionFeePresenter } from '../../presenters/TuitionFeePresenter';
|
|
10
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
11
|
+
import { PartTimeFormatRule } from '../rules/PartTimeFormatRule';
|
|
12
|
+
export class DegreeFormatTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
13
|
+
name = 'Degree Format Tuition Fee Policy';
|
|
14
|
+
description = 'Determines indexing rules for pages filtered by degree type, format and tuition fee.';
|
|
15
|
+
filterKeys = [FilterKey.DEGREE_TYPE, FilterKey.ATTENDANCE, FilterKey.TUITION_FEE];
|
|
16
|
+
rules = [
|
|
17
|
+
new SingleValueSelectedForFilterRule(FilterKey.ATTENDANCE),
|
|
18
|
+
new SingleValueSelectedForFilterRule(FilterKey.DEGREE_TYPE),
|
|
19
|
+
new SingleValueSelectedForFilterRule(FilterKey.TUITION_FEE),
|
|
20
|
+
new OnlyFiltersSelectedRule([FilterKey.ATTENDANCE, FilterKey.DEGREE_TYPE, FilterKey.TUITION_FEE]),
|
|
21
|
+
new IndexableDegreeRule(),
|
|
22
|
+
new AffordableTuitionFeeRule(),
|
|
23
|
+
new PartTimeFormatRule()
|
|
24
|
+
];
|
|
25
|
+
constructor(dependencies) {
|
|
26
|
+
super(dependencies);
|
|
27
|
+
this.initateBaseRules();
|
|
28
|
+
}
|
|
29
|
+
async generateUrls() {
|
|
30
|
+
const formatFragments = FormatPresenter.getInstance().getFragments();
|
|
31
|
+
const degreeFragments = DegreePresenter.getInstance().getFragments();
|
|
32
|
+
const tuitionFeeFragments = TuitionFeePresenter.getInstance().getFragments();
|
|
33
|
+
const paths = [];
|
|
34
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
35
|
+
for (const format of formatFragments) {
|
|
36
|
+
for (const degree of degreeFragments) {
|
|
37
|
+
for (const tuitionFee of tuitionFeeFragments) {
|
|
38
|
+
const filterKeyValues = new Map([
|
|
39
|
+
[FilterKey.ATTENDANCE, [format.id]],
|
|
40
|
+
[FilterKey.DEGREE_TYPE, [degree.id]],
|
|
41
|
+
[FilterKey.TUITION_FEE, [tuitionFee.id]]
|
|
42
|
+
]);
|
|
43
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
44
|
+
if (result) {
|
|
45
|
+
paths.push(this.getPathWithPageNumber(`${degree.path}/${tuitionFee.path}/${format.path}`, pageNumber));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return paths;
|
|
52
|
+
}
|
|
53
|
+
get filterCombination() {
|
|
54
|
+
return FilterCombinations.DEGREE_FORMAT_TUITION_FEE;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -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 { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
+
import { MbaDegreeRule } from '../rules/MbaDegreeRule';
|
|
8
|
+
import { ExecutiveSpecialProgrammeRule } from '../rules/ExecutiveSpecialProgrammeRule';
|
|
9
|
+
export declare class DegreeSpecialProgrammes extends ProgrammesBaseIndexabilityPolicy {
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly description: string;
|
|
12
|
+
readonly filterKeys: FilterKey[];
|
|
13
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | MbaDegreeRule | ExecutiveSpecialProgrammeRule)[];
|
|
14
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
15
|
+
protected generateUrls(): Promise<string[]>;
|
|
16
|
+
get filterCombination(): FilterCombinations;
|
|
17
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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 { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
+
import { DegreePresenter } from '../../presenters/DegreePresenter';
|
|
7
|
+
import { SpecialProgrammesPresenter } from '../../presenters/SpecialProgrammesPresenter';
|
|
8
|
+
import { MbaDegreeRule } from '../rules/MbaDegreeRule';
|
|
9
|
+
import { ExecutiveSpecialProgrammeRule } from '../rules/ExecutiveSpecialProgrammeRule';
|
|
10
|
+
export class DegreeSpecialProgrammes extends ProgrammesBaseIndexabilityPolicy {
|
|
11
|
+
name = 'Special Programmes Degree Policy';
|
|
12
|
+
description = 'Determines indexing rules for pages filtered by special programmes and degree type.';
|
|
13
|
+
filterKeys = [FilterKey.SPECIAL_PROGRAMMES, FilterKey.DEGREE_TYPE];
|
|
14
|
+
rules = [
|
|
15
|
+
new SingleValueSelectedForFilterRule(FilterKey.DEGREE_TYPE),
|
|
16
|
+
new SingleValueSelectedForFilterRule(FilterKey.SPECIAL_PROGRAMMES),
|
|
17
|
+
new OnlyFiltersSelectedRule([FilterKey.DEGREE_TYPE, FilterKey.SPECIAL_PROGRAMMES]),
|
|
18
|
+
new ExecutiveSpecialProgrammeRule(),
|
|
19
|
+
new MbaDegreeRule(),
|
|
20
|
+
];
|
|
21
|
+
constructor(dependencies) {
|
|
22
|
+
super(dependencies);
|
|
23
|
+
this.initateBaseRules();
|
|
24
|
+
}
|
|
25
|
+
async generateUrls() {
|
|
26
|
+
const degreeFragments = DegreePresenter.getInstance().getFragments();
|
|
27
|
+
const specialProgrammesFragments = SpecialProgrammesPresenter.getInstance().getFragments();
|
|
28
|
+
const paths = [];
|
|
29
|
+
const allowedDegreeIds = ["mba"];
|
|
30
|
+
const allowedDegrees = degreeFragments.filter(sp => allowedDegreeIds.includes(sp.id));
|
|
31
|
+
const allowedSpecialProgramIds = ["executive"];
|
|
32
|
+
const allowedSpecialProgrammes = specialProgrammesFragments.filter(sp => allowedSpecialProgramIds.includes(sp.id));
|
|
33
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
34
|
+
for (const degree of allowedDegrees) {
|
|
35
|
+
for (const specialProgramme of allowedSpecialProgrammes) {
|
|
36
|
+
const filterKeyValues = new Map([
|
|
37
|
+
[FilterKey.DEGREE_TYPE, [degree.id]],
|
|
38
|
+
[FilterKey.SPECIAL_PROGRAMMES, [specialProgramme.id]]
|
|
39
|
+
]);
|
|
40
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
41
|
+
if (result) {
|
|
42
|
+
paths.push(this.getPathWithPageNumber(`${degree.path}/${specialProgramme.path}`, pageNumber));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return paths;
|
|
48
|
+
}
|
|
49
|
+
get filterCombination() {
|
|
50
|
+
return FilterCombinations.DEGREE_SPECIAL_PROGRAMMES;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -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 { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
8
|
+
export declare class DegreeTuitionFee 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,49 @@
|
|
|
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 { DegreePresenter } from '../../presenters/DegreePresenter';
|
|
8
|
+
import { TuitionFeePresenter } from '../../presenters/TuitionFeePresenter';
|
|
9
|
+
import { AffordableTuitionFeeRule } from '../rules/AffordableTuitionFeeRule';
|
|
10
|
+
export class DegreeTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
11
|
+
name = 'Tuition Fee Degree Policy';
|
|
12
|
+
description = 'Determines indexing rules for pages filtered by tuition fee and degree type.';
|
|
13
|
+
filterKeys = [FilterKey.TUITION_FEE, FilterKey.DEGREE_TYPE];
|
|
14
|
+
rules = [
|
|
15
|
+
new SingleValueSelectedForFilterRule(FilterKey.DEGREE_TYPE),
|
|
16
|
+
new SingleValueSelectedForFilterRule(FilterKey.TUITION_FEE),
|
|
17
|
+
new OnlyFiltersSelectedRule([FilterKey.DEGREE_TYPE, FilterKey.TUITION_FEE]),
|
|
18
|
+
new AffordableTuitionFeeRule()
|
|
19
|
+
];
|
|
20
|
+
constructor(dependencies) {
|
|
21
|
+
super(dependencies);
|
|
22
|
+
this.initateBaseRules();
|
|
23
|
+
}
|
|
24
|
+
async generateUrls() {
|
|
25
|
+
const degreeFragments = DegreePresenter.getInstance().getFragments();
|
|
26
|
+
const tuitionFeeFragments = TuitionFeePresenter.getInstance().getFragments();
|
|
27
|
+
const paths = [];
|
|
28
|
+
const affordableTuition = tuitionFeeFragments.find(t => t.id === TuitionFeeFilterOptionValue.ZERO_TO_TWO_THOUSAND_FIVE_HUNDRED);
|
|
29
|
+
if (!affordableTuition) {
|
|
30
|
+
return paths;
|
|
31
|
+
}
|
|
32
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
33
|
+
for (const degree of degreeFragments) {
|
|
34
|
+
const filterKeyValues = new Map([
|
|
35
|
+
[FilterKey.DEGREE_TYPE, [degree.id]],
|
|
36
|
+
[FilterKey.TUITION_FEE, [affordableTuition.id]]
|
|
37
|
+
]);
|
|
38
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
39
|
+
if (result) {
|
|
40
|
+
paths.push(this.getPathWithPageNumber(`${degree.path}/${affordableTuition.path}`, pageNumber));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return paths;
|
|
45
|
+
}
|
|
46
|
+
get filterCombination() {
|
|
47
|
+
return FilterCombinations.DEGREE_TUITION_FEE;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters';
|
|
2
2
|
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
3
|
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
4
|
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters';
|
|
2
2
|
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
3
|
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
4
|
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
@@ -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 { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
+
import { OnlineAttendanceRule } from '../../common/rules/OnlineAttendanceRule';
|
|
8
|
+
export declare class DisciplineContinentAttendance extends ProgrammesBaseIndexabilityPolicy {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly description: string;
|
|
11
|
+
readonly filterKeys: FilterKey[];
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | OnlineAttendanceRule)[];
|
|
13
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
14
|
+
protected generateUrls(): Promise<string[]>;
|
|
15
|
+
get filterCombination(): FilterCombinations;
|
|
16
|
+
}
|
|
@@ -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 { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
+
import { DisciplinePresenter } from '../../presenters/DisciplinePresenter';
|
|
7
|
+
import { ContinentPresenter } from '../../presenters/ContinentPresenter';
|
|
8
|
+
import { OnlineAttendanceRule } from '../../common/rules/OnlineAttendanceRule';
|
|
9
|
+
import { AttendancePresenter } from '../../presenters/AttendancePresenter';
|
|
10
|
+
export class DisciplineContinentAttendance extends ProgrammesBaseIndexabilityPolicy {
|
|
11
|
+
name = 'Discipline Continent Attendance Policy';
|
|
12
|
+
description = 'Determines indexing rules for pages filtered by both discipline, continent, and attendance.';
|
|
13
|
+
filterKeys = [FilterKey.DISCIPLINES, FilterKey.CONTINENT, FilterKey.DELIVERY_METHOD];
|
|
14
|
+
rules = [
|
|
15
|
+
new SingleValueSelectedForFilterRule(FilterKey.DISCIPLINES),
|
|
16
|
+
new SingleValueSelectedForFilterRule(FilterKey.CONTINENT),
|
|
17
|
+
new SingleValueSelectedForFilterRule(FilterKey.DELIVERY_METHOD),
|
|
18
|
+
new OnlyFiltersSelectedRule([FilterKey.DISCIPLINES, FilterKey.CONTINENT, FilterKey.DELIVERY_METHOD]),
|
|
19
|
+
new OnlineAttendanceRule()
|
|
20
|
+
];
|
|
21
|
+
constructor(dependencies) {
|
|
22
|
+
super(dependencies);
|
|
23
|
+
this.initateBaseRules();
|
|
24
|
+
}
|
|
25
|
+
async generateUrls() {
|
|
26
|
+
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
27
|
+
const continentFragments = ContinentPresenter.getInstance().getFragments();
|
|
28
|
+
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
29
|
+
const paths = [];
|
|
30
|
+
const allowedAttendanceIds = ["online"];
|
|
31
|
+
const allowedAttendances = attendanceFragments.filter(a => allowedAttendanceIds.includes(a.id));
|
|
32
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
33
|
+
for (const discipline of disciplineFragments) {
|
|
34
|
+
for (const continent of continentFragments) {
|
|
35
|
+
for (const attendance of allowedAttendances) {
|
|
36
|
+
const filterKeyValues = new Map([
|
|
37
|
+
[FilterKey.DISCIPLINES, [discipline.id]],
|
|
38
|
+
[FilterKey.CONTINENT, [continent.id]],
|
|
39
|
+
[FilterKey.DELIVERY_METHOD, [attendance.id]]
|
|
40
|
+
]);
|
|
41
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
42
|
+
if (result) {
|
|
43
|
+
paths.push(this.getPathWithPageNumber(`${attendance.path}/${discipline.path}/${continent.path}`, pageNumber));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return paths;
|
|
50
|
+
}
|
|
51
|
+
get filterCombination() {
|
|
52
|
+
return FilterCombinations.DISCIPLINE_CONTINENT_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 { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
+
import { OnlineAttendanceRule } from '../../common/rules/OnlineAttendanceRule';
|
|
8
|
+
export declare class DisciplineCountryAttendance extends ProgrammesBaseIndexabilityPolicy {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly description: string;
|
|
11
|
+
readonly filterKeys: FilterKey[];
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | OnlineAttendanceRule)[];
|
|
13
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
14
|
+
protected generateUrls(): Promise<string[]>;
|
|
15
|
+
get filterCombination(): FilterCombinations;
|
|
16
|
+
}
|
|
@@ -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 { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
+
import { DisciplinePresenter } from '../../presenters/DisciplinePresenter';
|
|
7
|
+
import { CountryPresenter } from '../../presenters/CountryPresenter';
|
|
8
|
+
import { OnlineAttendanceRule } from '../../common/rules/OnlineAttendanceRule';
|
|
9
|
+
import { AttendancePresenter } from '../../presenters/AttendancePresenter';
|
|
10
|
+
export class DisciplineCountryAttendance extends ProgrammesBaseIndexabilityPolicy {
|
|
11
|
+
name = 'Discipline Country Attendance Policy';
|
|
12
|
+
description = 'Determines indexing rules for pages filtered by both discipline, country, and attendance.';
|
|
13
|
+
filterKeys = [FilterKey.DISCIPLINES, FilterKey.COUNTRY, FilterKey.DELIVERY_METHOD];
|
|
14
|
+
rules = [
|
|
15
|
+
new SingleValueSelectedForFilterRule(FilterKey.DISCIPLINES),
|
|
16
|
+
new SingleValueSelectedForFilterRule(FilterKey.COUNTRY),
|
|
17
|
+
new SingleValueSelectedForFilterRule(FilterKey.DELIVERY_METHOD),
|
|
18
|
+
new OnlyFiltersSelectedRule([FilterKey.DISCIPLINES, FilterKey.COUNTRY, FilterKey.DELIVERY_METHOD]),
|
|
19
|
+
new OnlineAttendanceRule()
|
|
20
|
+
];
|
|
21
|
+
constructor(dependencies) {
|
|
22
|
+
super(dependencies);
|
|
23
|
+
this.initateBaseRules();
|
|
24
|
+
}
|
|
25
|
+
async generateUrls() {
|
|
26
|
+
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
27
|
+
const countryFragments = CountryPresenter.getInstance().getFragments();
|
|
28
|
+
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
29
|
+
const paths = [];
|
|
30
|
+
const allowedAttendanceIds = ['online'];
|
|
31
|
+
const allowedAttendances = attendanceFragments.filter(a => allowedAttendanceIds.includes(a.id));
|
|
32
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
33
|
+
for (const discipline of disciplineFragments) {
|
|
34
|
+
for (const country of countryFragments) {
|
|
35
|
+
for (const attendance of allowedAttendances) {
|
|
36
|
+
const filterKeyValues = new Map([
|
|
37
|
+
[FilterKey.DISCIPLINES, [discipline.id]],
|
|
38
|
+
[FilterKey.COUNTRY, [country.id]],
|
|
39
|
+
[FilterKey.DELIVERY_METHOD, [attendance.id]]
|
|
40
|
+
]);
|
|
41
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
42
|
+
if (result) {
|
|
43
|
+
paths.push(this.getPathWithPageNumber(`${attendance.path}/${discipline.path}/${country.path}`, pageNumber));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return paths;
|
|
50
|
+
}
|
|
51
|
+
get filterCombination() {
|
|
52
|
+
return FilterCombinations.DISCIPLINE_COUNTRY_ATTENDANCE;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { IndexableDegreeRule } from '../rules/IndexableDegreeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
8
|
+
export declare class DisciplineCountryDegree extends ProgrammesBaseIndexabilityPolicy {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly description: string;
|
|
11
|
+
readonly filterKeys: FilterKey[];
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | IndexableDegreeRule)[];
|
|
13
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
14
|
+
protected generateUrls(): Promise<string[]>;
|
|
15
|
+
get filterCombination(): FilterCombinations;
|
|
16
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
+
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
+
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
+
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
+
import { IndexableDegreeRule } from '../rules/IndexableDegreeRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { DisciplinePresenter } from '../../presenters/DisciplinePresenter';
|
|
8
|
+
import { CountryPresenter } from '../../presenters/CountryPresenter';
|
|
9
|
+
import { DegreePresenter } from '../../presenters/DegreePresenter';
|
|
10
|
+
export class DisciplineCountryDegree extends ProgrammesBaseIndexabilityPolicy {
|
|
11
|
+
name = 'Discipline Country Degree Policy';
|
|
12
|
+
description = `Determines indexing rules for pages filtered by discipline,
|
|
13
|
+
country, and degree type.`;
|
|
14
|
+
filterKeys = [FilterKey.DISCIPLINES, FilterKey.COUNTRY, FilterKey.DEGREE_TYPE];
|
|
15
|
+
rules = [
|
|
16
|
+
new SingleValueSelectedForFilterRule(FilterKey.DISCIPLINES),
|
|
17
|
+
new SingleValueSelectedForFilterRule(FilterKey.COUNTRY),
|
|
18
|
+
new SingleValueSelectedForFilterRule(FilterKey.DEGREE_TYPE),
|
|
19
|
+
new OnlyFiltersSelectedRule([FilterKey.DISCIPLINES, FilterKey.COUNTRY, FilterKey.DEGREE_TYPE]),
|
|
20
|
+
new IndexableDegreeRule()
|
|
21
|
+
];
|
|
22
|
+
constructor(dependencies) {
|
|
23
|
+
super(dependencies);
|
|
24
|
+
this.initateBaseRules();
|
|
25
|
+
}
|
|
26
|
+
async generateUrls() {
|
|
27
|
+
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
28
|
+
const countryFragments = CountryPresenter.getInstance().getFragments();
|
|
29
|
+
const degreeFragments = DegreePresenter.getInstance().getFragments();
|
|
30
|
+
const paths = [];
|
|
31
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
32
|
+
for (const discipline of disciplineFragments) {
|
|
33
|
+
for (const country of countryFragments) {
|
|
34
|
+
for (const degree of degreeFragments) {
|
|
35
|
+
const filterKeyValues = new Map([
|
|
36
|
+
[FilterKey.DISCIPLINES, [discipline.id]],
|
|
37
|
+
[FilterKey.COUNTRY, [country.id]],
|
|
38
|
+
[FilterKey.DEGREE_TYPE, [degree.id]]
|
|
39
|
+
]);
|
|
40
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
41
|
+
if (result) {
|
|
42
|
+
paths.push(this.getPathWithPageNumber(`${degree.path}/${discipline.path}/${country.path}`, pageNumber));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return paths;
|
|
49
|
+
}
|
|
50
|
+
get filterCombination() {
|
|
51
|
+
return FilterCombinations.DISCIPLINE_COUNTRY_DEGREE;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -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 { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
+
import { PartTimeFormatRule } from '../rules/PartTimeFormatRule';
|
|
8
|
+
export declare class DisciplineCountryFormat extends ProgrammesBaseIndexabilityPolicy {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly description: string;
|
|
11
|
+
readonly filterKeys: FilterKey[];
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | PartTimeFormatRule)[];
|
|
13
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
14
|
+
protected generateUrls(): Promise<string[]>;
|
|
15
|
+
get filterCombination(): FilterCombinations;
|
|
16
|
+
}
|
|
@@ -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 { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
+
import { DisciplinePresenter } from '../../presenters/DisciplinePresenter';
|
|
7
|
+
import { CountryPresenter } from '../../presenters/CountryPresenter';
|
|
8
|
+
import { FormatPresenter } from '../../presenters/FormatPresenter';
|
|
9
|
+
import { PartTimeFormatRule } from '../rules/PartTimeFormatRule';
|
|
10
|
+
export class DisciplineCountryFormat extends ProgrammesBaseIndexabilityPolicy {
|
|
11
|
+
name = 'Discipline Country Format Policy';
|
|
12
|
+
description = 'Determines indexing rules for pages filtered by both discipline, country, and format.';
|
|
13
|
+
filterKeys = [FilterKey.DISCIPLINES, FilterKey.COUNTRY, FilterKey.ATTENDANCE];
|
|
14
|
+
rules = [
|
|
15
|
+
new SingleValueSelectedForFilterRule(FilterKey.DISCIPLINES),
|
|
16
|
+
new SingleValueSelectedForFilterRule(FilterKey.COUNTRY),
|
|
17
|
+
new SingleValueSelectedForFilterRule(FilterKey.ATTENDANCE),
|
|
18
|
+
new OnlyFiltersSelectedRule([FilterKey.DISCIPLINES, FilterKey.COUNTRY, FilterKey.ATTENDANCE]),
|
|
19
|
+
new PartTimeFormatRule()
|
|
20
|
+
];
|
|
21
|
+
constructor(dependencies) {
|
|
22
|
+
super(dependencies);
|
|
23
|
+
this.initateBaseRules();
|
|
24
|
+
}
|
|
25
|
+
async generateUrls() {
|
|
26
|
+
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
27
|
+
const countryFragments = CountryPresenter.getInstance().getFragments();
|
|
28
|
+
const formatFragments = FormatPresenter.getInstance().getFragments();
|
|
29
|
+
const paths = [];
|
|
30
|
+
const allowedFormatIds = ['parttime'];
|
|
31
|
+
const allowedFormats = formatFragments.filter(a => allowedFormatIds.includes(a.id));
|
|
32
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
33
|
+
for (const discipline of disciplineFragments) {
|
|
34
|
+
for (const country of countryFragments) {
|
|
35
|
+
for (const format of allowedFormats) {
|
|
36
|
+
const filterKeyValues = new Map([
|
|
37
|
+
[FilterKey.DISCIPLINES, [discipline.id]],
|
|
38
|
+
[FilterKey.COUNTRY, [country.id]],
|
|
39
|
+
[FilterKey.ATTENDANCE, [format.id]]
|
|
40
|
+
]);
|
|
41
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
42
|
+
if (result) {
|
|
43
|
+
paths.push(this.getPathWithPageNumber(`${format.path}/${discipline.path}/${country.path}`, pageNumber));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return paths;
|
|
50
|
+
}
|
|
51
|
+
get filterCombination() {
|
|
52
|
+
return FilterCombinations.DISCIPLINE_COUNTRY_ATTENDANCE;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -2,14 +2,14 @@ import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
|
2
2
|
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
3
|
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
4
|
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
-
import { IndexableDurationRule } from '../rules/IndexableDurationRule';
|
|
6
5
|
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
6
|
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
+
import { OneOrTwoYearDurationRule } from '../rules/OneOrTwoYearDurationRule';
|
|
8
8
|
export declare class DisciplineDuration extends ProgrammesBaseIndexabilityPolicy {
|
|
9
9
|
readonly name: string;
|
|
10
10
|
readonly description: string;
|
|
11
11
|
readonly filterKeys: FilterKey[];
|
|
12
|
-
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule |
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | OneOrTwoYearDurationRule)[];
|
|
13
13
|
constructor(dependencies: IProgrammeSeoDependencies);
|
|
14
14
|
protected generateUrls(): Promise<string[]>;
|
|
15
15
|
get filterCombination(): FilterCombinations;
|
|
@@ -2,10 +2,10 @@ import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
|
2
2
|
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
3
|
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
4
|
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
-
import { IndexableDurationRule } from '../rules/IndexableDurationRule';
|
|
6
5
|
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
6
|
import { DisciplinePresenter } from '../../presenters/DisciplinePresenter';
|
|
8
7
|
import { DurationPresenter } from '../../presenters/DurationPresenter';
|
|
8
|
+
import { OneOrTwoYearDurationRule } from '../rules/OneOrTwoYearDurationRule';
|
|
9
9
|
export class DisciplineDuration extends ProgrammesBaseIndexabilityPolicy {
|
|
10
10
|
name = 'Discipline Duration Policy';
|
|
11
11
|
description = 'Determines indexing rules for pages filtered by both discipline, and duration (1 year, 2 years, etc.).';
|
|
@@ -14,7 +14,7 @@ export class DisciplineDuration extends ProgrammesBaseIndexabilityPolicy {
|
|
|
14
14
|
new SingleValueSelectedForFilterRule(FilterKey.DISCIPLINES),
|
|
15
15
|
new SingleValueSelectedForFilterRule(FilterKey.DURATION),
|
|
16
16
|
new OnlyFiltersSelectedRule([FilterKey.DISCIPLINES, FilterKey.DURATION]),
|
|
17
|
-
new
|
|
17
|
+
new OneOrTwoYearDurationRule()
|
|
18
18
|
];
|
|
19
19
|
constructor(dependencies) {
|
|
20
20
|
super(dependencies);
|
|
@@ -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 { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
+
import { ErasmusSpecialProgrammeRule } from '../rules/ErasmusSpecialProgrammeRule';
|
|
8
|
+
export declare class DisciplineSpecialProgrammes extends ProgrammesBaseIndexabilityPolicy {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly description: string;
|
|
11
|
+
readonly filterKeys: FilterKey[];
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | ErasmusSpecialProgrammeRule)[];
|
|
13
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
14
|
+
protected generateUrls(): Promise<string[]>;
|
|
15
|
+
get filterCombination(): FilterCombinations;
|
|
16
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { FilterKey, SpecialProgrammesFilterOptionValue } 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 { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
+
import { DisciplinePresenter } from '../../presenters/DisciplinePresenter';
|
|
7
|
+
import { SpecialProgrammesPresenter } from '../../presenters/SpecialProgrammesPresenter';
|
|
8
|
+
import { ErasmusSpecialProgrammeRule } from '../rules/ErasmusSpecialProgrammeRule';
|
|
9
|
+
export class DisciplineSpecialProgrammes extends ProgrammesBaseIndexabilityPolicy {
|
|
10
|
+
name = 'Discipline Special Programmes Policy';
|
|
11
|
+
description = 'Determines indexing rules for pages filtered by discipline and special programmes (Erasmus Mundus).';
|
|
12
|
+
filterKeys = [FilterKey.DISCIPLINES, FilterKey.SPECIAL_PROGRAMMES];
|
|
13
|
+
rules = [
|
|
14
|
+
new SingleValueSelectedForFilterRule(FilterKey.SPECIAL_PROGRAMMES),
|
|
15
|
+
new SingleValueSelectedForFilterRule(FilterKey.DISCIPLINES),
|
|
16
|
+
new OnlyFiltersSelectedRule([FilterKey.SPECIAL_PROGRAMMES, FilterKey.DISCIPLINES]),
|
|
17
|
+
new ErasmusSpecialProgrammeRule()
|
|
18
|
+
];
|
|
19
|
+
constructor(dependencies) {
|
|
20
|
+
super(dependencies);
|
|
21
|
+
this.initateBaseRules();
|
|
22
|
+
}
|
|
23
|
+
async generateUrls() {
|
|
24
|
+
const specialProgrammesFragments = SpecialProgrammesPresenter.getInstance().getFragments();
|
|
25
|
+
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
26
|
+
const paths = [];
|
|
27
|
+
const validSpecialProgrammesIds = [SpecialProgrammesFilterOptionValue.ERASMUS_MUNDUS];
|
|
28
|
+
const validSpecialProgrammes = specialProgrammesFragments.filter(specialProgramme => validSpecialProgrammesIds.includes(specialProgramme.id));
|
|
29
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
30
|
+
for (const specialProgramme of validSpecialProgrammes) {
|
|
31
|
+
for (const discipline of disciplineFragments) {
|
|
32
|
+
const filterKeyValues = new Map([
|
|
33
|
+
[FilterKey.SPECIAL_PROGRAMMES, [specialProgramme.id]],
|
|
34
|
+
[FilterKey.DISCIPLINES, [discipline.id]]
|
|
35
|
+
]);
|
|
36
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
37
|
+
if (result) {
|
|
38
|
+
paths.push(this.getPathWithPageNumber(`${discipline.path}/${specialProgramme.path}`, pageNumber));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return paths;
|
|
44
|
+
}
|
|
45
|
+
get filterCombination() {
|
|
46
|
+
return FilterCombinations.DISCIPLINE_SPECIAL_PROGRAMMES;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -33,7 +33,7 @@ export class DisciplineTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
|
33
33
|
]);
|
|
34
34
|
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
35
35
|
if (result) {
|
|
36
|
-
paths.push(this.getPathWithPageNumber(`${
|
|
36
|
+
paths.push(this.getPathWithPageNumber(`${discipline.path}/${tuitionFee.path}`, pageNumber));
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -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 { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
+
import { OneOrTwoYearDurationRule } from '../rules/OneOrTwoYearDurationRule';
|
|
8
|
+
export declare class Duration extends ProgrammesBaseIndexabilityPolicy {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly description: string;
|
|
11
|
+
readonly filterKeys: FilterKey[];
|
|
12
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | OneOrTwoYearDurationRule)[];
|
|
13
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
14
|
+
protected generateUrls(): Promise<string[]>;
|
|
15
|
+
get filterCombination(): FilterCombinations;
|
|
16
|
+
}
|