@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
|
@@ -16,11 +16,18 @@ export class BaseFilterKeyValueRule {
|
|
|
16
16
|
forSitemapGenerator(filterKeyValues) {
|
|
17
17
|
for (const [key, values] of this.expectedFilterKeyValues) {
|
|
18
18
|
const filterValues = filterKeyValues.get(key);
|
|
19
|
-
if (!filterValues || filterValues.length
|
|
19
|
+
if (!filterValues || filterValues.length === 0) {
|
|
20
20
|
return Promise.resolve(false);
|
|
21
21
|
}
|
|
22
|
-
if (
|
|
23
|
-
|
|
22
|
+
if (values.length === 1) {
|
|
23
|
+
if (filterValues.length !== 1 || filterValues[0] !== values[0]) {
|
|
24
|
+
return Promise.resolve(false);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
if (!values.some((value) => filterValues.includes(value))) {
|
|
29
|
+
return Promise.resolve(false);
|
|
30
|
+
}
|
|
24
31
|
}
|
|
25
32
|
}
|
|
26
33
|
return Promise.resolve(true);
|
|
@@ -4,6 +4,8 @@ export declare enum FilterCombinations {
|
|
|
4
4
|
AREA_DISCIPLINE = "areaDiscipline",
|
|
5
5
|
COUNTRY = "country",
|
|
6
6
|
DEGREE = "degree",
|
|
7
|
+
DURATION = "duration",
|
|
8
|
+
FORMAT = "format",
|
|
7
9
|
COUNTRY_DEGREE = "countryDegree",
|
|
8
10
|
COUNTRY_DURATION = "countryDuration",
|
|
9
11
|
COUNTRY_FORMAT = "countryFormat",
|
|
@@ -11,6 +13,10 @@ export declare enum FilterCombinations {
|
|
|
11
13
|
COUNTRY_EDUCATIONAL_FORM = "countryEducationalForm",
|
|
12
14
|
COUNTRY_ATTENDANCE_DEGREE = "countryAttendanceDegree",
|
|
13
15
|
COUNTRY_DURATION_DEGREE = "countryDurationDegree",
|
|
16
|
+
COUNTRY_SPECIAL_PROGRAMMES = "countrySpecialProgrammes",
|
|
17
|
+
CONTINENT_FORMAT = "continentFormat",
|
|
18
|
+
CONTINENT_DURATION = "continentDuration",
|
|
19
|
+
CONTINENT_SPECIAL_PROGRAMMES = "continentSpecialProgrammes",
|
|
14
20
|
DISCIPLINE_AREA = "disciplineArea",
|
|
15
21
|
DISCIPLINE_ATTENDANCE = "disciplineAttendance",
|
|
16
22
|
DISCIPLINE_COUNTRY = "disciplineCountry",
|
|
@@ -22,16 +28,35 @@ export declare enum FilterCombinations {
|
|
|
22
28
|
DISCIPLINE_EDUCATIONAL_FORM = "disciplineEducationalForm",
|
|
23
29
|
DISCIPLINE_TUITION_FEE_ATTENDANCE = "disciplineTuitionFeeAttendance",
|
|
24
30
|
DISCIPLINE_COUNTRY_EDUCATIONAL_FORM = "disciplineCountryEducationalForm",
|
|
31
|
+
DISCIPLINE_CONTINENT_ATTENDANCE = "disciplineContinentAttendance",
|
|
32
|
+
DISCIPLINE_SPECIAL_PROGRAMMES = "disciplineSpecialProgrammes",
|
|
33
|
+
DISCIPLINE_COUNTRY_ATTENDANCE = "disciplineCountryAttendance",
|
|
25
34
|
DEGREE_COUNTRY_DISCIPLINE = "degreeCountryDiscipline",
|
|
26
35
|
DEGREE_ATTENDANCE_DISCIPLINE = "degreeAttendanceDiscipline",
|
|
27
36
|
DEGREE_COUNTRY_TUITION_FEE = "degreeCountryTuitionFee",
|
|
28
37
|
DEGREE_COUNTRY_ATTENDANCE = "degreeCountryAttendance",
|
|
38
|
+
DEGREE_TUITION_FEE = "degreeTuitionFee",
|
|
39
|
+
DEGREE_ATTENDANCE_TUITION_FEE = "degreeAttendanceTuitionFee",
|
|
40
|
+
DEGREE_ATTENDANCE_FORMAT = "degreeAttendanceFormat",
|
|
41
|
+
DEGREE_AREA = "degreeArea",
|
|
42
|
+
DEGREE_FORMAT = "degreeFormat",
|
|
43
|
+
DEGREE_CONTINENT = "degreeContinent",
|
|
44
|
+
DEGREE_AREA_TUITION_FEE = "degreeAreaTuitionFee",
|
|
45
|
+
DEGREE_CONTINENT_TUITION_FEE = "degreeContinentTuitionFee",
|
|
46
|
+
DEGREE_DURATION = "degreeDuration",
|
|
47
|
+
DEGREE_FORMAT_TUITION_FEE = "degreeFormatTuitionFee",
|
|
48
|
+
DEGREE_SPECIAL_PROGRAMMES = "degreeSpecialProgrammes",
|
|
49
|
+
DEGREE_ATTENDANCE_SPECIAL_PROGRAMMES = "degreeAttendanceSpecialProgrammes",
|
|
29
50
|
DISCIPLINE = "discipline",
|
|
30
51
|
UNFILTERED = "unfiltered",
|
|
31
52
|
UNIVERSITY_COUNTRY = "universityCountry",
|
|
32
53
|
ATTENDANCE_DISCIPLINE = "attendancedDiscipline",
|
|
33
54
|
ATTENDANCE_DEGREE = "attendanceDegree",
|
|
34
|
-
|
|
55
|
+
ATTENDANCE_TUITION_FEE = "attendanceTuitionFee",
|
|
56
|
+
ATTENDANCE_DURATION = "attendanceDuration",
|
|
57
|
+
ATTENDANCE_FORMAT = "attendanceFormat",
|
|
58
|
+
ATTENDANCE_AREA = "attendanceArea",
|
|
59
|
+
ATTENDANCE_CONTINENT = "attendanceContinent",
|
|
35
60
|
COUNTRY_ATTENDANCE = "countryAttendance",
|
|
36
61
|
ATTENDANCE = "attendance",
|
|
37
62
|
CONTINENT = "continent",
|
|
@@ -5,6 +5,8 @@ export var FilterCombinations;
|
|
|
5
5
|
FilterCombinations["AREA_DISCIPLINE"] = "areaDiscipline";
|
|
6
6
|
FilterCombinations["COUNTRY"] = "country";
|
|
7
7
|
FilterCombinations["DEGREE"] = "degree";
|
|
8
|
+
FilterCombinations["DURATION"] = "duration";
|
|
9
|
+
FilterCombinations["FORMAT"] = "format";
|
|
8
10
|
FilterCombinations["COUNTRY_DEGREE"] = "countryDegree";
|
|
9
11
|
FilterCombinations["COUNTRY_DURATION"] = "countryDuration";
|
|
10
12
|
FilterCombinations["COUNTRY_FORMAT"] = "countryFormat";
|
|
@@ -12,6 +14,10 @@ export var FilterCombinations;
|
|
|
12
14
|
FilterCombinations["COUNTRY_EDUCATIONAL_FORM"] = "countryEducationalForm";
|
|
13
15
|
FilterCombinations["COUNTRY_ATTENDANCE_DEGREE"] = "countryAttendanceDegree";
|
|
14
16
|
FilterCombinations["COUNTRY_DURATION_DEGREE"] = "countryDurationDegree";
|
|
17
|
+
FilterCombinations["COUNTRY_SPECIAL_PROGRAMMES"] = "countrySpecialProgrammes";
|
|
18
|
+
FilterCombinations["CONTINENT_FORMAT"] = "continentFormat";
|
|
19
|
+
FilterCombinations["CONTINENT_DURATION"] = "continentDuration";
|
|
20
|
+
FilterCombinations["CONTINENT_SPECIAL_PROGRAMMES"] = "continentSpecialProgrammes";
|
|
15
21
|
FilterCombinations["DISCIPLINE_AREA"] = "disciplineArea";
|
|
16
22
|
FilterCombinations["DISCIPLINE_ATTENDANCE"] = "disciplineAttendance";
|
|
17
23
|
FilterCombinations["DISCIPLINE_COUNTRY"] = "disciplineCountry";
|
|
@@ -23,16 +29,35 @@ export var FilterCombinations;
|
|
|
23
29
|
FilterCombinations["DISCIPLINE_EDUCATIONAL_FORM"] = "disciplineEducationalForm";
|
|
24
30
|
FilterCombinations["DISCIPLINE_TUITION_FEE_ATTENDANCE"] = "disciplineTuitionFeeAttendance";
|
|
25
31
|
FilterCombinations["DISCIPLINE_COUNTRY_EDUCATIONAL_FORM"] = "disciplineCountryEducationalForm";
|
|
32
|
+
FilterCombinations["DISCIPLINE_CONTINENT_ATTENDANCE"] = "disciplineContinentAttendance";
|
|
33
|
+
FilterCombinations["DISCIPLINE_SPECIAL_PROGRAMMES"] = "disciplineSpecialProgrammes";
|
|
34
|
+
FilterCombinations["DISCIPLINE_COUNTRY_ATTENDANCE"] = "disciplineCountryAttendance";
|
|
26
35
|
FilterCombinations["DEGREE_COUNTRY_DISCIPLINE"] = "degreeCountryDiscipline";
|
|
27
36
|
FilterCombinations["DEGREE_ATTENDANCE_DISCIPLINE"] = "degreeAttendanceDiscipline";
|
|
28
37
|
FilterCombinations["DEGREE_COUNTRY_TUITION_FEE"] = "degreeCountryTuitionFee";
|
|
29
38
|
FilterCombinations["DEGREE_COUNTRY_ATTENDANCE"] = "degreeCountryAttendance";
|
|
39
|
+
FilterCombinations["DEGREE_TUITION_FEE"] = "degreeTuitionFee";
|
|
40
|
+
FilterCombinations["DEGREE_ATTENDANCE_TUITION_FEE"] = "degreeAttendanceTuitionFee";
|
|
41
|
+
FilterCombinations["DEGREE_ATTENDANCE_FORMAT"] = "degreeAttendanceFormat";
|
|
42
|
+
FilterCombinations["DEGREE_AREA"] = "degreeArea";
|
|
43
|
+
FilterCombinations["DEGREE_FORMAT"] = "degreeFormat";
|
|
44
|
+
FilterCombinations["DEGREE_CONTINENT"] = "degreeContinent";
|
|
45
|
+
FilterCombinations["DEGREE_AREA_TUITION_FEE"] = "degreeAreaTuitionFee";
|
|
46
|
+
FilterCombinations["DEGREE_CONTINENT_TUITION_FEE"] = "degreeContinentTuitionFee";
|
|
47
|
+
FilterCombinations["DEGREE_DURATION"] = "degreeDuration";
|
|
48
|
+
FilterCombinations["DEGREE_FORMAT_TUITION_FEE"] = "degreeFormatTuitionFee";
|
|
49
|
+
FilterCombinations["DEGREE_SPECIAL_PROGRAMMES"] = "degreeSpecialProgrammes";
|
|
50
|
+
FilterCombinations["DEGREE_ATTENDANCE_SPECIAL_PROGRAMMES"] = "degreeAttendanceSpecialProgrammes";
|
|
30
51
|
FilterCombinations["DISCIPLINE"] = "discipline";
|
|
31
52
|
FilterCombinations["UNFILTERED"] = "unfiltered";
|
|
32
53
|
FilterCombinations["UNIVERSITY_COUNTRY"] = "universityCountry";
|
|
33
54
|
FilterCombinations["ATTENDANCE_DISCIPLINE"] = "attendancedDiscipline";
|
|
34
55
|
FilterCombinations["ATTENDANCE_DEGREE"] = "attendanceDegree";
|
|
35
|
-
FilterCombinations["
|
|
56
|
+
FilterCombinations["ATTENDANCE_TUITION_FEE"] = "attendanceTuitionFee";
|
|
57
|
+
FilterCombinations["ATTENDANCE_DURATION"] = "attendanceDuration";
|
|
58
|
+
FilterCombinations["ATTENDANCE_FORMAT"] = "attendanceFormat";
|
|
59
|
+
FilterCombinations["ATTENDANCE_AREA"] = "attendanceArea";
|
|
60
|
+
FilterCombinations["ATTENDANCE_CONTINENT"] = "attendanceContinent";
|
|
36
61
|
FilterCombinations["COUNTRY_ATTENDANCE"] = "countryAttendance";
|
|
37
62
|
FilterCombinations["ATTENDANCE"] = "attendance";
|
|
38
63
|
FilterCombinations["CONTINENT"] = "continent";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PortalType } from '@studyportals/domain-client';
|
|
2
|
+
import { IOrganisationsSeoDependencies } from './types/IOrganisationsSeoDependencies';
|
|
3
|
+
import { SortingOptions } from '../enums/SortingOptions';
|
|
4
|
+
import { BaseSeoIndexabilityPolicy } from '../common/policies/BaseSeoIndexabilityPolicy';
|
|
5
|
+
export declare abstract class OrganisationsRuleBasedIndexabilityPolicy extends BaseSeoIndexabilityPolicy<IOrganisationsSeoDependencies> {
|
|
6
|
+
protected readonly indexablePortalTypes: PortalType[];
|
|
7
|
+
protected abstract readonly sortingOption: SortingOptions;
|
|
8
|
+
constructor(dependencies: IOrganisationsSeoDependencies);
|
|
9
|
+
protected isIndexable(): Promise<boolean>;
|
|
10
|
+
private matchesSortingOption;
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PortalType } from '@studyportals/domain-client';
|
|
2
|
+
import { BaseSeoIndexabilityPolicy } from '../common/policies/BaseSeoIndexabilityPolicy';
|
|
3
|
+
export class OrganisationsRuleBasedIndexabilityPolicy extends BaseSeoIndexabilityPolicy {
|
|
4
|
+
indexablePortalTypes = [PortalType.MASTER];
|
|
5
|
+
constructor(dependencies) {
|
|
6
|
+
super(dependencies);
|
|
7
|
+
}
|
|
8
|
+
async isIndexable() {
|
|
9
|
+
const isIndexable = await super.isIndexable();
|
|
10
|
+
if (!isIndexable) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
return this.indexablePortalTypes.includes(this.dependencies.portalType) && this.matchesSortingOption();
|
|
14
|
+
}
|
|
15
|
+
matchesSortingOption() {
|
|
16
|
+
const dependencies = this.dependencies;
|
|
17
|
+
return dependencies.sortingState.getSelectedOption() === this.sortingOption;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IRule } from '../../common/IRule';
|
|
2
|
+
import { IOrganisationSearchDependencies } from '../types/IOrganisationSearchDependencies';
|
|
3
|
+
import { FilterKeyValuesMap } from '../../common/FilterKeyValuesMap';
|
|
4
|
+
import { IRankingApiClient } from '../../sitemap-generator/IRankingApiClient';
|
|
5
|
+
export declare class AtLeastTwoRankedResultsRule implements IRule {
|
|
6
|
+
private readonly minimumRankedResultsCount;
|
|
7
|
+
private readonly rankingApiClient?;
|
|
8
|
+
constructor(rankingApiClient?: IRankingApiClient);
|
|
9
|
+
forSearch(dependencies: IOrganisationSearchDependencies): Promise<boolean>;
|
|
10
|
+
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
11
|
+
getName(): string;
|
|
12
|
+
getDescription(): string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DependencyMissingError } from '../../errors/DependencyMissingError';
|
|
2
|
+
export class AtLeastTwoRankedResultsRule {
|
|
3
|
+
minimumRankedResultsCount = 2;
|
|
4
|
+
rankingApiClient;
|
|
5
|
+
constructor(rankingApiClient) {
|
|
6
|
+
this.rankingApiClient = rankingApiClient;
|
|
7
|
+
}
|
|
8
|
+
forSearch(dependencies) {
|
|
9
|
+
const { applicationState } = dependencies;
|
|
10
|
+
const rankedResultsCount = applicationState.getRankedResultsCount();
|
|
11
|
+
return Promise.resolve(rankedResultsCount >= this.minimumRankedResultsCount);
|
|
12
|
+
}
|
|
13
|
+
async forSitemapGenerator(filterKeyValues) {
|
|
14
|
+
if (!this.rankingApiClient) {
|
|
15
|
+
throw new DependencyMissingError('RankingApiClient');
|
|
16
|
+
}
|
|
17
|
+
const rankedResultsCount = await this.rankingApiClient.getRankedOrganisationCount(filterKeyValues);
|
|
18
|
+
return rankedResultsCount >= this.minimumRankedResultsCount;
|
|
19
|
+
}
|
|
20
|
+
getName() {
|
|
21
|
+
return 'AtLeastTwoRankedResultsRule';
|
|
22
|
+
}
|
|
23
|
+
getDescription() {
|
|
24
|
+
return `At least ${this.minimumRankedResultsCount} ranked results are available`;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
+
import { BaseFilterKeyValueRule } from '../../common/rules/BaseFilterKeyValueRule';
|
|
3
|
+
export class OnlineAttendanceRule extends BaseFilterKeyValueRule {
|
|
4
|
+
constructor() {
|
|
5
|
+
const filterKeyValues = new Map([[FilterKey.DELIVERY_METHOD, ['online']]]);
|
|
6
|
+
super(filterKeyValues);
|
|
7
|
+
}
|
|
8
|
+
getName() {
|
|
9
|
+
return 'OnlineAttendanceRule';
|
|
10
|
+
}
|
|
11
|
+
getDescription() {
|
|
12
|
+
return 'Indexable if attendance is online';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -4,11 +4,14 @@ export class FormatPresenter {
|
|
|
4
4
|
static instance;
|
|
5
5
|
fragments;
|
|
6
6
|
constructor() {
|
|
7
|
-
// Part-time is the only indexable format according to PartTimeFormatRule
|
|
8
7
|
this.fragments = [
|
|
9
8
|
{
|
|
10
9
|
id: FormatFilterOptionValue.PART_TIME,
|
|
11
10
|
path: 'part-time'
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: FormatFilterOptionValue.FULL_TIME,
|
|
14
|
+
path: 'full-time'
|
|
12
15
|
}
|
|
13
16
|
];
|
|
14
17
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ISearchDependencies } from '../common/ISearchDependencies';
|
|
2
|
+
import { IProgrammeSearchApplicationState } from './IProgrammeSearchApplicationState';
|
|
3
|
+
import { PortalType } from '@studyportals/domain-client';
|
|
4
|
+
export interface IProgrammeSearchDependencies extends ISearchDependencies {
|
|
5
|
+
portalType: PortalType;
|
|
6
|
+
applicationState: IProgrammeSearchApplicationState;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { Area, Attendance, AttendanceDegree, Continent, ContinentTuitionFee, Country, CountryAttendance, CountryAttendanceDegree, CountryDegree, CountryDuration, CountryDurationDegree, CountryEducationalForm, CountryFormat, CountryTuitionFee, DegreeAttendanceDiscipline, DegreeCountryAttendance, DegreeCountryDiscipline, DegreeCountryTuitionFee, Discipline,
|
|
1
|
+
import { Area, Attendance, AttendanceDegree, Continent, ContinentTuitionFee, Country, CountryAttendance, CountryAttendanceDegree, CountryDegree, CountryDuration, CountryDurationDegree, CountryEducationalForm, CountryFormat, CountryTuitionFee, DegreeAttendanceDiscipline, DegreeCountryAttendance, DegreeCountryDiscipline, DegreeCountryTuitionFee, Discipline, DisciplineAttendance, DisciplineContinent, DisciplineCountry, DisciplineCountryEducationalForm, DisciplineDegree, DisciplineDuration, DisciplineEducationalForm, DisciplineFormat, DisciplineTuitionFee, DisciplineTuitionFeeAttendance, SpecialProgrammes, TuitionFee, Unfiltered, AttendanceArea, AttendanceContinent, AttendanceDuration, AttendanceFormat, AttendanceTuitionFee, ContinentDuration, ContinentFormat, ContinentSpecialProgrammes, CountrySpecialProgrammes, DegreeArea, DegreeAreaTuitionFee, DegreeAttendanceFormat, DegreeAttendanceTuitionFee, DegreeContinent, DegreeContinentTuitionFee, DegreeDuration, DegreeFormat, DegreeFormatTuitionFee, DegreeSpecialProgrammes, DegreeTuitionFee, DisciplineContinentAttendance, DisciplineCountryAttendance, DisciplineCountryFormat, Duration, Format } from './policies';
|
|
2
2
|
import { DependencyTypes } from '../enums/DependencyTypes';
|
|
3
3
|
import { Degree } from './policies/Degree';
|
|
4
|
+
import { DisciplineSpecialProgrammes } from './policies/DisciplineSpecialProgrammes';
|
|
5
|
+
import { DegreeAttendanceSpecialProgrammes } from './policies/DegreeAttendanceSpecialProgrammes';
|
|
4
6
|
export class SearchIndexabilityManager {
|
|
5
7
|
policies;
|
|
6
8
|
constructor(portalType, seoInfoBase, filterState, applicationState) {
|
|
@@ -31,8 +33,8 @@ export class SearchIndexabilityManager {
|
|
|
31
33
|
new DegreeCountryAttendance(dependencies),
|
|
32
34
|
new DegreeCountryDiscipline(dependencies),
|
|
33
35
|
new DegreeCountryTuitionFee(dependencies),
|
|
36
|
+
new DegreeAttendanceSpecialProgrammes(dependencies),
|
|
34
37
|
new Discipline(dependencies),
|
|
35
|
-
new DisciplineArea(dependencies),
|
|
36
38
|
new DisciplineAttendance(dependencies),
|
|
37
39
|
new DisciplineContinent(dependencies),
|
|
38
40
|
new DisciplineCountry(dependencies),
|
|
@@ -44,8 +46,34 @@ export class SearchIndexabilityManager {
|
|
|
44
46
|
new DisciplineTuitionFee(dependencies),
|
|
45
47
|
new DisciplineTuitionFeeAttendance(dependencies),
|
|
46
48
|
new SpecialProgrammes(dependencies),
|
|
49
|
+
new DisciplineSpecialProgrammes(dependencies),
|
|
47
50
|
new TuitionFee(dependencies),
|
|
48
|
-
new Unfiltered(dependencies)
|
|
51
|
+
new Unfiltered(dependencies),
|
|
52
|
+
new CountrySpecialProgrammes(dependencies),
|
|
53
|
+
new DegreeArea(dependencies),
|
|
54
|
+
new DegreeAreaTuitionFee(dependencies),
|
|
55
|
+
new DegreeAttendanceFormat(dependencies),
|
|
56
|
+
new DegreeAttendanceTuitionFee(dependencies),
|
|
57
|
+
new DegreeContinent(dependencies),
|
|
58
|
+
new DegreeContinentTuitionFee(dependencies),
|
|
59
|
+
new DegreeDuration(dependencies),
|
|
60
|
+
new DegreeFormat(dependencies),
|
|
61
|
+
new DegreeFormatTuitionFee(dependencies),
|
|
62
|
+
new DegreeSpecialProgrammes(dependencies),
|
|
63
|
+
new DegreeTuitionFee(dependencies),
|
|
64
|
+
new DisciplineContinentAttendance(dependencies),
|
|
65
|
+
new DisciplineCountryAttendance(dependencies),
|
|
66
|
+
new DisciplineCountryFormat(dependencies),
|
|
67
|
+
new Duration(dependencies),
|
|
68
|
+
new Format(dependencies),
|
|
69
|
+
new AttendanceArea(dependencies),
|
|
70
|
+
new AttendanceContinent(dependencies),
|
|
71
|
+
new AttendanceDuration(dependencies),
|
|
72
|
+
new AttendanceFormat(dependencies),
|
|
73
|
+
new AttendanceTuitionFee(dependencies),
|
|
74
|
+
new ContinentDuration(dependencies),
|
|
75
|
+
new ContinentFormat(dependencies),
|
|
76
|
+
new ContinentSpecialProgrammes(dependencies),
|
|
49
77
|
];
|
|
50
78
|
}
|
|
51
79
|
getPolicies() {
|
|
@@ -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 AttendanceArea 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,48 @@
|
|
|
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 { AreaPresenter } from '../../presenters/AreaPresenter';
|
|
7
|
+
import { AttendancePresenter } from '../../presenters/AttendancePresenter';
|
|
8
|
+
import { OnlineAttendanceRule } from '../../common/rules/OnlineAttendanceRule';
|
|
9
|
+
export class AttendanceArea extends ProgrammesBaseIndexabilityPolicy {
|
|
10
|
+
name = 'Attendance Area Policy';
|
|
11
|
+
description = 'Controls indexing of pages filtered by geographic areas and attendance type. (Online)';
|
|
12
|
+
filterKeys = [FilterKey.DELIVERY_METHOD, FilterKey.AREA];
|
|
13
|
+
rules = [
|
|
14
|
+
new SingleValueSelectedForFilterRule(FilterKey.AREA),
|
|
15
|
+
new SingleValueSelectedForFilterRule(FilterKey.COUNTRY),
|
|
16
|
+
new SingleValueSelectedForFilterRule(FilterKey.DELIVERY_METHOD),
|
|
17
|
+
new OnlyFiltersSelectedRule([FilterKey.AREA, FilterKey.COUNTRY, FilterKey.DELIVERY_METHOD]),
|
|
18
|
+
new OnlineAttendanceRule()
|
|
19
|
+
];
|
|
20
|
+
constructor(dependencies) {
|
|
21
|
+
super(dependencies);
|
|
22
|
+
this.initateBaseRules();
|
|
23
|
+
}
|
|
24
|
+
async generateUrls() {
|
|
25
|
+
const areaFragments = AreaPresenter.getInstance().getFragments();
|
|
26
|
+
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
27
|
+
const paths = [];
|
|
28
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
29
|
+
for (const attendance of attendanceFragments) {
|
|
30
|
+
for (const area of areaFragments) {
|
|
31
|
+
const filterKeyValues = new Map([
|
|
32
|
+
[FilterKey.AREA, [area.id]],
|
|
33
|
+
[FilterKey.COUNTRY, [area.countryId]],
|
|
34
|
+
[FilterKey.DELIVERY_METHOD, [attendance.id]]
|
|
35
|
+
]);
|
|
36
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
37
|
+
if (result) {
|
|
38
|
+
paths.push(this.getPathWithPageNumber(`${attendance.path}/${area.path}`, pageNumber));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return paths;
|
|
44
|
+
}
|
|
45
|
+
get filterCombination() {
|
|
46
|
+
return FilterCombinations.ATTENDANCE_AREA;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -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 AttendanceContinent 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,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 { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
+
import { ContinentPresenter } from '../../presenters/ContinentPresenter';
|
|
7
|
+
import { AttendancePresenter } from '../../presenters/AttendancePresenter';
|
|
8
|
+
import { OnlineAttendanceRule } from '../../common/rules/OnlineAttendanceRule';
|
|
9
|
+
export class AttendanceContinent extends ProgrammesBaseIndexabilityPolicy {
|
|
10
|
+
name = 'Attendance Continent Policy';
|
|
11
|
+
description = 'Determines indexing rules for pages filtered by tuition fee and attendance.';
|
|
12
|
+
filterKeys = [FilterKey.CONTINENT, FilterKey.DELIVERY_METHOD];
|
|
13
|
+
rules = [
|
|
14
|
+
new SingleValueSelectedForFilterRule(FilterKey.DELIVERY_METHOD),
|
|
15
|
+
new SingleValueSelectedForFilterRule(FilterKey.CONTINENT),
|
|
16
|
+
new OnlyFiltersSelectedRule([FilterKey.DELIVERY_METHOD, FilterKey.CONTINENT]),
|
|
17
|
+
new OnlineAttendanceRule()
|
|
18
|
+
];
|
|
19
|
+
constructor(dependencies) {
|
|
20
|
+
super(dependencies);
|
|
21
|
+
this.initateBaseRules();
|
|
22
|
+
}
|
|
23
|
+
async generateUrls() {
|
|
24
|
+
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
25
|
+
const continentFragments = ContinentPresenter.getInstance().getFragments();
|
|
26
|
+
const paths = [];
|
|
27
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
28
|
+
for (const attendance of attendanceFragments) {
|
|
29
|
+
for (const continent of continentFragments) {
|
|
30
|
+
const filterKeyValues = new Map([
|
|
31
|
+
[FilterKey.DELIVERY_METHOD, [attendance.id]],
|
|
32
|
+
[FilterKey.CONTINENT, [continent.id]]
|
|
33
|
+
]);
|
|
34
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
35
|
+
if (result) {
|
|
36
|
+
paths.push(this.getPathWithPageNumber(`${attendance.path}/${continent.path}`, pageNumber));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return paths;
|
|
42
|
+
}
|
|
43
|
+
get filterCombination() {
|
|
44
|
+
return FilterCombinations.ATTENDANCE_CONTINENT;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -2,15 +2,15 @@ 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 { OnlineAttendanceRule } from '../../common/rules/OnlineAttendanceRule';
|
|
6
|
-
import { IndexableDegreeRule } from '../rules/IndexableDegreeRule';
|
|
7
5
|
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
8
6
|
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
+
import { IndexableDegreeRule } from '../rules/IndexableDegreeRule';
|
|
8
|
+
import { BlendedOrOnlineAttendanceRule } from '../rules/BlendedOrOnlineAttendanceRule';
|
|
9
9
|
export declare class AttendanceDegree extends ProgrammesBaseIndexabilityPolicy {
|
|
10
10
|
readonly name: string;
|
|
11
11
|
readonly description: string;
|
|
12
12
|
readonly filterKeys: FilterKey[];
|
|
13
|
-
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule |
|
|
13
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | IndexableDegreeRule | BlendedOrOnlineAttendanceRule)[];
|
|
14
14
|
constructor(dependencies: IProgrammeSeoDependencies);
|
|
15
15
|
protected generateUrls(): Promise<string[]>;
|
|
16
16
|
get filterCombination(): FilterCombinations;
|
|
@@ -2,21 +2,21 @@ 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 { OnlineAttendanceRule } from '../../common/rules/OnlineAttendanceRule';
|
|
6
|
-
import { IndexableDegreeRule } from '../rules/IndexableDegreeRule';
|
|
7
5
|
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
8
6
|
import { AttendancePresenter } from '../../presenters/AttendancePresenter';
|
|
9
7
|
import { DegreePresenter } from '../../presenters/DegreePresenter';
|
|
8
|
+
import { IndexableDegreeRule } from '../rules/IndexableDegreeRule';
|
|
9
|
+
import { BlendedOrOnlineAttendanceRule } from '../rules/BlendedOrOnlineAttendanceRule';
|
|
10
10
|
export class AttendanceDegree extends ProgrammesBaseIndexabilityPolicy {
|
|
11
11
|
name = 'Attendance Degree Type Policy';
|
|
12
|
-
description = 'Determines indexing rules for pages filtered by both study format (online, on-campus, etc.), and degree type prioritizing degrees and formats with demonstrated search demand.';
|
|
12
|
+
description = 'Determines indexing rules for pages filtered by both study format (online, blended, on-campus, etc.), and degree type prioritizing degrees and formats with demonstrated search demand.';
|
|
13
13
|
filterKeys = [FilterKey.DELIVERY_METHOD, FilterKey.DEGREE_TYPE];
|
|
14
14
|
rules = [
|
|
15
15
|
new SingleValueSelectedForFilterRule(FilterKey.DELIVERY_METHOD),
|
|
16
16
|
new SingleValueSelectedForFilterRule(FilterKey.DEGREE_TYPE),
|
|
17
17
|
new OnlyFiltersSelectedRule([FilterKey.DELIVERY_METHOD, FilterKey.DEGREE_TYPE]),
|
|
18
18
|
new IndexableDegreeRule(),
|
|
19
|
-
new
|
|
19
|
+
new BlendedOrOnlineAttendanceRule()
|
|
20
20
|
];
|
|
21
21
|
constructor(dependencies) {
|
|
22
22
|
super(dependencies);
|
|
@@ -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 { OnlineAttendanceRule } from '../../common/rules/OnlineAttendanceRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
8
|
+
import { OneYearDurationRule } from '../../programmes/rules/OneYearDurationRule';
|
|
9
|
+
export declare class AttendanceDuration extends ProgrammesBaseIndexabilityPolicy {
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly description: string;
|
|
12
|
+
readonly filterKeys: FilterKey[];
|
|
13
|
+
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule | OnlineAttendanceRule | OneYearDurationRule)[];
|
|
14
|
+
constructor(dependencies: IProgrammeSeoDependencies);
|
|
15
|
+
protected generateUrls(): Promise<string[]>;
|
|
16
|
+
get filterCombination(): FilterCombinations;
|
|
17
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 { OnlineAttendanceRule } from '../../common/rules/OnlineAttendanceRule';
|
|
6
|
+
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
7
|
+
import { AttendancePresenter } from '../../presenters/AttendancePresenter';
|
|
8
|
+
import { DurationPresenter } from '../../presenters/DurationPresenter';
|
|
9
|
+
import { OneYearDurationRule } from '../../programmes/rules/OneYearDurationRule';
|
|
10
|
+
export class AttendanceDuration extends ProgrammesBaseIndexabilityPolicy {
|
|
11
|
+
name = 'Attendance Duration Type Policy';
|
|
12
|
+
description = 'Determines indexing rules for pages filtered by both study format (online, on-campus, etc.), and duration prioritizing durations and formats with demonstrated search demand.';
|
|
13
|
+
filterKeys = [FilterKey.DELIVERY_METHOD, FilterKey.DURATION];
|
|
14
|
+
rules = [
|
|
15
|
+
new SingleValueSelectedForFilterRule(FilterKey.DELIVERY_METHOD),
|
|
16
|
+
new SingleValueSelectedForFilterRule(FilterKey.DURATION),
|
|
17
|
+
new OnlyFiltersSelectedRule([FilterKey.DELIVERY_METHOD, FilterKey.DURATION]),
|
|
18
|
+
new OnlineAttendanceRule(),
|
|
19
|
+
new OneYearDurationRule()
|
|
20
|
+
];
|
|
21
|
+
constructor(dependencies) {
|
|
22
|
+
super(dependencies);
|
|
23
|
+
this.initateBaseRules();
|
|
24
|
+
}
|
|
25
|
+
async generateUrls() {
|
|
26
|
+
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
27
|
+
const durationFragments = DurationPresenter.getInstance().getFragments();
|
|
28
|
+
const paths = [];
|
|
29
|
+
const allowedDurationIds = ["[360,360]"];
|
|
30
|
+
const allowedDurations = durationFragments.filter(duration => allowedDurationIds.includes(duration.id));
|
|
31
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
32
|
+
for (const attendance of attendanceFragments) {
|
|
33
|
+
for (const duration of allowedDurations) {
|
|
34
|
+
const filterKeyValues = new Map([
|
|
35
|
+
[FilterKey.DELIVERY_METHOD, [attendance.id]],
|
|
36
|
+
[FilterKey.DURATION, [duration.id]]
|
|
37
|
+
]);
|
|
38
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
39
|
+
if (result) {
|
|
40
|
+
paths.push(this.getPathWithPageNumber(`${attendance.path}/${duration.path}`, pageNumber));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return paths;
|
|
46
|
+
}
|
|
47
|
+
get filterCombination() {
|
|
48
|
+
return FilterCombinations.ATTENDANCE_DURATION;
|
|
49
|
+
}
|
|
50
|
+
}
|