@studyportals/fawkes 6.0.1-9 → 7.0.1-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/presenters/DegreePresenter.d.ts +1 -0
- package/dist/src/presenters/DegreePresenter.js +28 -1
- package/dist/src/presenters/EducationalFormPresenter.js +14 -1
- package/dist/src/programmes/BaseProgrammeFilterKeyValueRule.d.ts +6 -0
- package/dist/src/programmes/BaseProgrammeFilterKeyValueRule.js +6 -0
- package/dist/src/programmes/BaseProgrammeRule.d.ts +10 -0
- package/dist/src/programmes/BaseProgrammeRule.js +5 -0
- package/dist/src/programmes/IProgrammeRule.d.ts +5 -0
- package/dist/src/programmes/IProgrammeRule.js +1 -0
- package/dist/src/programmes/ProgrammesBaseIndexabilityPolicy.d.ts +7 -0
- package/dist/src/programmes/ProgrammesBaseIndexabilityPolicy.js +21 -0
- package/dist/src/programmes/policies/Area.js +10 -8
- package/dist/src/programmes/policies/Attendance.js +7 -5
- package/dist/src/programmes/policies/AttendanceDegree.js +11 -9
- package/dist/src/programmes/policies/Continent.js +7 -5
- package/dist/src/programmes/policies/ContinentTuitionFee.js +11 -9
- package/dist/src/programmes/policies/Country.js +7 -5
- package/dist/src/programmes/policies/CountryAttendance.js +11 -9
- package/dist/src/programmes/policies/CountryAttendanceDegree.js +13 -11
- package/dist/src/programmes/policies/CountryDegree.js +11 -9
- package/dist/src/programmes/policies/CountryDuration.js +11 -9
- package/dist/src/programmes/policies/CountryDurationDegree.js +13 -11
- package/dist/src/programmes/policies/CountryEducationalForm.js +11 -9
- package/dist/src/programmes/policies/CountryFormat.js +11 -9
- package/dist/src/programmes/policies/CountryTuitionFee.js +11 -9
- package/dist/src/programmes/policies/Discipline.js +7 -5
- package/dist/src/programmes/policies/DisciplineArea.js +12 -10
- package/dist/src/programmes/policies/DisciplineAttendance.js +11 -9
- package/dist/src/programmes/policies/DisciplineContinent.js +11 -9
- package/dist/src/programmes/policies/DisciplineCountry.js +11 -9
- package/dist/src/programmes/policies/DisciplineCountryDegree.js +13 -11
- package/dist/src/programmes/policies/DisciplineCountryEducationalForm.js +13 -11
- package/dist/src/programmes/policies/DisciplineDegree.js +11 -9
- package/dist/src/programmes/policies/DisciplineDuration.js +11 -9
- package/dist/src/programmes/policies/DisciplineEducationalForm.js +11 -9
- package/dist/src/programmes/policies/DisciplineFormat.js +11 -9
- package/dist/src/programmes/policies/DisciplineTuitionFee.js +11 -9
- package/dist/src/programmes/policies/DisciplineTuitionFeeAttendance.js +13 -11
- package/dist/src/programmes/policies/SpecialProgrammes.js +7 -5
- package/dist/src/programmes/policies/TuitionFee.js +4 -6
- package/dist/src/programmes/rules/AffordableTuitionFeeRule.d.ts +2 -2
- package/dist/src/programmes/rules/AffordableTuitionFeeRule.js +2 -2
- package/dist/src/programmes/rules/AtLeastSevenResultsRule.d.ts +5 -3
- package/dist/src/programmes/rules/AtLeastSevenResultsRule.js +6 -2
- package/dist/src/programmes/rules/ErasmusOrJointSpecialProgrammesRule.d.ts +2 -2
- package/dist/src/programmes/rules/ErasmusOrJointSpecialProgrammesRule.js +2 -1
- package/dist/src/programmes/rules/IndexableDegreeRule.d.ts +2 -2
- package/dist/src/programmes/rules/IndexableDegreeRule.js +2 -1
- package/dist/src/programmes/rules/IndexableDurationRule.d.ts +2 -2
- package/dist/src/programmes/rules/IndexableDurationRule.js +2 -1
- package/dist/src/programmes/rules/IndexableEducationalFormRule.d.ts +2 -2
- package/dist/src/programmes/rules/IndexableEducationalFormRule.js +2 -1
- package/dist/src/programmes/rules/IndexablePageNumberRule.d.ts +2 -2
- package/dist/src/programmes/rules/IndexablePageNumberRule.js +2 -1
- package/dist/src/programmes/rules/MbaDegreeRule.d.ts +2 -2
- package/dist/src/programmes/rules/MbaDegreeRule.js +2 -2
- package/dist/src/programmes/rules/MbaOrMscDegreeRule.d.ts +2 -2
- package/dist/src/programmes/rules/MbaOrMscDegreeRule.js +2 -1
- package/dist/src/programmes/rules/NotDistanceLearningPortalRule.d.ts +2 -2
- package/dist/src/programmes/rules/NotDistanceLearningPortalRule.js +3 -1
- package/dist/src/programmes/rules/OneYearDurationRule.d.ts +2 -2
- package/dist/src/programmes/rules/OneYearDurationRule.js +2 -2
- package/dist/src/programmes/rules/PartTimeFormatRule.d.ts +2 -2
- package/dist/src/programmes/rules/PartTimeFormatRule.js +2 -2
- package/dist/src/programmes/types/IProgrammeSearchSitemapDependencies.d.ts +0 -2
- package/dist/src/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.d.ts +1 -2
- package/dist/src/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.js +2 -3
- package/package.json +3 -1
|
@@ -7,7 +7,7 @@ export class DegreePresenter {
|
|
|
7
7
|
this.fragments = Object.values(DegreeTypeFilterOptionValue).map((degree) => {
|
|
8
8
|
return {
|
|
9
9
|
id: degree,
|
|
10
|
-
path: degree
|
|
10
|
+
path: this.formatDegreePath(degree)
|
|
11
11
|
};
|
|
12
12
|
});
|
|
13
13
|
}
|
|
@@ -20,4 +20,31 @@ export class DegreePresenter {
|
|
|
20
20
|
getFragments() {
|
|
21
21
|
return this.fragments;
|
|
22
22
|
}
|
|
23
|
+
formatDegreePath(degree) {
|
|
24
|
+
const formattedDegree = degree.toLowerCase().replace(/_/g, '-');
|
|
25
|
+
const pathById = new Map([
|
|
26
|
+
['phd', 'ph-d'],
|
|
27
|
+
['dba', 'dba'],
|
|
28
|
+
['doct', 'doctorate'],
|
|
29
|
+
['msc', 'msc'],
|
|
30
|
+
['ma', 'ma'],
|
|
31
|
+
['mba', 'mba'],
|
|
32
|
+
['llm', 'llm'],
|
|
33
|
+
['mphil', 'mphil'],
|
|
34
|
+
['med', 'med'],
|
|
35
|
+
['meng', 'meng'],
|
|
36
|
+
['postgraddip', 'postgraduate-diploma'],
|
|
37
|
+
['postgradcert', 'postgraduate-certificate'],
|
|
38
|
+
['premaster', 'pre-master'],
|
|
39
|
+
['bsc', 'bsc'],
|
|
40
|
+
['ba', 'ba'],
|
|
41
|
+
['bba', 'bba'],
|
|
42
|
+
['ad', 'associate-degree'],
|
|
43
|
+
['gcertificate', 'graduate-certificate'],
|
|
44
|
+
['gdiploma', 'graduate-diploma'],
|
|
45
|
+
['prebachelor', 'prebachelor'],
|
|
46
|
+
['certificate', 'certificate']
|
|
47
|
+
]);
|
|
48
|
+
return pathById.get(degree) || formattedDegree;
|
|
49
|
+
}
|
|
23
50
|
}
|
|
@@ -24,7 +24,20 @@ export class EducationalFormPresenter {
|
|
|
24
24
|
return EducationalFormPresenter.instance;
|
|
25
25
|
}
|
|
26
26
|
formatEducationalFormPath(form) {
|
|
27
|
-
|
|
27
|
+
switch (form) {
|
|
28
|
+
case EducationalFormFilterOptionValue.ACADEMIC_COURSE:
|
|
29
|
+
return 'academic-course';
|
|
30
|
+
case EducationalFormFilterOptionValue.CONFERENCE_SEMINAR:
|
|
31
|
+
return 'conference';
|
|
32
|
+
case EducationalFormFilterOptionValue.SUMMER_SCHOOL:
|
|
33
|
+
return 'summer-school';
|
|
34
|
+
case EducationalFormFilterOptionValue.WINTER_SCHOOL:
|
|
35
|
+
return 'winter-school';
|
|
36
|
+
case EducationalFormFilterOptionValue.SEMESTER_STUDY_ABROAD:
|
|
37
|
+
return 'semester-abroad';
|
|
38
|
+
case EducationalFormFilterOptionValue.SKILL_PROFESSIONAL_COURSE:
|
|
39
|
+
return 'skill';
|
|
40
|
+
}
|
|
28
41
|
}
|
|
29
42
|
getFragments() {
|
|
30
43
|
return this.fragments;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseFilterKeyValueRule } from '../common/rules/BaseFilterKeyValueRule';
|
|
2
|
+
import { FilterKeyValuesMap } from '../common/FilterKeyValuesMap';
|
|
3
|
+
import { IProgrammeRule } from './IProgrammeRule';
|
|
4
|
+
export declare abstract class BaseProgrammeFilterKeyValueRule extends BaseFilterKeyValueRule implements IProgrammeRule {
|
|
5
|
+
forSitemapGeneratorWithPageNumber(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseFilterKeyValueRule } from '../common/rules/BaseFilterKeyValueRule';
|
|
2
|
+
export class BaseProgrammeFilterKeyValueRule extends BaseFilterKeyValueRule {
|
|
3
|
+
forSitemapGeneratorWithPageNumber(filterKeyValues) {
|
|
4
|
+
return this.forSitemapGenerator(filterKeyValues);
|
|
5
|
+
}
|
|
6
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FilterKeyValuesMap } from '../common/FilterKeyValuesMap';
|
|
2
|
+
import { IProgrammeRule } from './IProgrammeRule';
|
|
3
|
+
import { ISearchDependencies } from '../common/ISearchDependencies';
|
|
4
|
+
export declare abstract class BaseProgrammeRule implements IProgrammeRule {
|
|
5
|
+
forSitemapGeneratorWithPageNumber(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
6
|
+
abstract forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
7
|
+
abstract forSearch(dependencies: ISearchDependencies): Promise<boolean>;
|
|
8
|
+
abstract getName(): string;
|
|
9
|
+
abstract getDescription(): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IRule } from '../common/IRule';
|
|
2
|
+
import { FilterKeyValuesMap } from '../common/FilterKeyValuesMap';
|
|
3
|
+
export interface IProgrammeRule extends IRule {
|
|
4
|
+
forSitemapGeneratorWithPageNumber(filterKeyValues: FilterKeyValuesMap, pageNumber: number): Promise<boolean>;
|
|
5
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,7 +2,14 @@ import { BaseSeoIndexabilityPolicy } from '../common/policies/BaseSeoIndexabilit
|
|
|
2
2
|
import { IProgrammeSeoDependencies } from './types/IProgrammeSeoDependencies';
|
|
3
3
|
import { IProgrammeSitemapUrlGenerator } from './types/IProgrammeSitemapUrlGenerator';
|
|
4
4
|
import { FilterKey } from '@studyportals/search-filters';
|
|
5
|
+
import { FilterKeyValuesMap } from '../../sitemap-generator-seo';
|
|
6
|
+
import { IProgrammeRule } from './IProgrammeRule';
|
|
7
|
+
import { IRule } from '../common/IRule';
|
|
5
8
|
export declare abstract class ProgrammesBaseIndexabilityPolicy extends BaseSeoIndexabilityPolicy<IProgrammeSeoDependencies> implements IProgrammeSitemapUrlGenerator {
|
|
6
9
|
abstract readonly filterKeys: FilterKey[];
|
|
10
|
+
protected readonly indexablePageNumbers: number[];
|
|
11
|
+
protected abstract readonly rules: IProgrammeRule[] | IRule[];
|
|
7
12
|
protected initateBaseRules(): void;
|
|
13
|
+
checkRulesForSitemapWithPageNumber(filterKeyValues: FilterKeyValuesMap, pageNumber: number): Promise<boolean>;
|
|
14
|
+
protected getPathWithPageNumber(path: string, pageNumber: number): string;
|
|
8
15
|
}
|
|
@@ -3,6 +3,7 @@ import { IndexablePageNumberRule } from './rules/IndexablePageNumberRule';
|
|
|
3
3
|
import { NotDistanceLearningPortalRule } from './rules/NotDistanceLearningPortalRule';
|
|
4
4
|
import { BaseSeoIndexabilityPolicy } from '../common/policies/BaseSeoIndexabilityPolicy';
|
|
5
5
|
export class ProgrammesBaseIndexabilityPolicy extends BaseSeoIndexabilityPolicy {
|
|
6
|
+
indexablePageNumbers = [1, 2];
|
|
6
7
|
initateBaseRules() {
|
|
7
8
|
const indexablePageNumberRule = new IndexablePageNumberRule();
|
|
8
9
|
let atLeastSevenResultsRule;
|
|
@@ -18,4 +19,24 @@ export class ProgrammesBaseIndexabilityPolicy extends BaseSeoIndexabilityPolicy
|
|
|
18
19
|
}
|
|
19
20
|
this.rules.push(atLeastSevenResultsRule, notDistanceLearningPortalRule, indexablePageNumberRule);
|
|
20
21
|
}
|
|
22
|
+
async checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber) {
|
|
23
|
+
for (const rule of this.rules) {
|
|
24
|
+
let result;
|
|
25
|
+
if ('forSitemapGeneratorWithPageNumber' in rule) {
|
|
26
|
+
result = await rule.forSitemapGeneratorWithPageNumber(filterKeyValues, pageNumber);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
result = await rule.forSitemapGenerator(filterKeyValues);
|
|
30
|
+
}
|
|
31
|
+
if (!result) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
getPathWithPageNumber(path, pageNumber) {
|
|
38
|
+
if (pageNumber === 2)
|
|
39
|
+
return `${path}/page-${pageNumber}`;
|
|
40
|
+
return path;
|
|
41
|
+
}
|
|
21
42
|
}
|
|
@@ -20,14 +20,16 @@ export class Area extends ProgrammesBaseIndexabilityPolicy {
|
|
|
20
20
|
async generateUrls() {
|
|
21
21
|
const areaFragments = AreaPresenter.getInstance().getFragments();
|
|
22
22
|
const paths = [];
|
|
23
|
-
for (const
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
24
|
+
for (const area of areaFragments) {
|
|
25
|
+
const filterKeyValues = new Map([
|
|
26
|
+
[FilterKey.AREA, [area.id]],
|
|
27
|
+
[FilterKey.COUNTRY, [area.countryId]]
|
|
28
|
+
]);
|
|
29
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
30
|
+
if (result) {
|
|
31
|
+
paths.push(this.getPathWithPageNumber(area.path, pageNumber));
|
|
32
|
+
}
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
return paths;
|
|
@@ -21,11 +21,13 @@ export class Attendance extends ProgrammesBaseIndexabilityPolicy {
|
|
|
21
21
|
async generateUrls() {
|
|
22
22
|
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
23
23
|
const paths = [];
|
|
24
|
-
for (const
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
25
|
+
for (const attendance of attendanceFragments) {
|
|
26
|
+
const filterKeyValues = new Map([[FilterKey.DELIVERY_METHOD, [attendance.id]]]);
|
|
27
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
28
|
+
if (result) {
|
|
29
|
+
paths.push(this.getPathWithPageNumber(attendance.path, pageNumber));
|
|
30
|
+
}
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
33
|
return paths;
|
|
@@ -26,15 +26,17 @@ export class AttendanceDegree extends ProgrammesBaseIndexabilityPolicy {
|
|
|
26
26
|
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
27
27
|
const degreeFragments = DegreePresenter.getInstance().getFragments();
|
|
28
28
|
const paths = [];
|
|
29
|
-
for (const
|
|
30
|
-
for (const
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
30
|
+
for (const attendance of attendanceFragments) {
|
|
31
|
+
for (const degree of degreeFragments) {
|
|
32
|
+
const filterKeyValues = new Map([
|
|
33
|
+
[FilterKey.DELIVERY_METHOD, [attendance.id]],
|
|
34
|
+
[FilterKey.DEGREE_TYPE, [degree.id]]
|
|
35
|
+
]);
|
|
36
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
37
|
+
if (result) {
|
|
38
|
+
paths.push(this.getPathWithPageNumber(`${degree.path}/${attendance.path}`, pageNumber));
|
|
39
|
+
}
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
}
|
|
@@ -19,11 +19,13 @@ export class Continent extends ProgrammesBaseIndexabilityPolicy {
|
|
|
19
19
|
async generateUrls() {
|
|
20
20
|
const continentFragments = ContinentPresenter.getInstance().getFragments();
|
|
21
21
|
const paths = [];
|
|
22
|
-
for (const
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
23
|
+
for (const continent of continentFragments) {
|
|
24
|
+
const filterKeyValues = new Map([[FilterKey.CONTINENT, [continent.id]]]);
|
|
25
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
26
|
+
if (result) {
|
|
27
|
+
paths.push(this.getPathWithPageNumber(continent.path, pageNumber));
|
|
28
|
+
}
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
return paths;
|
|
@@ -24,15 +24,17 @@ export class ContinentTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
|
24
24
|
const continentFragments = ContinentPresenter.getInstance().getFragments();
|
|
25
25
|
const tuitionFeeFragments = TuitionFeePresenter.getInstance().getFragments();
|
|
26
26
|
const paths = [];
|
|
27
|
-
for (const
|
|
28
|
-
for (const
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
28
|
+
for (const continent of continentFragments) {
|
|
29
|
+
for (const tuitionFee of tuitionFeeFragments) {
|
|
30
|
+
const filterKeyValues = new Map([
|
|
31
|
+
[FilterKey.CONTINENT, [continent.id]],
|
|
32
|
+
[FilterKey.TUITION_FEE, [tuitionFee.id]]
|
|
33
|
+
]);
|
|
34
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
35
|
+
if (result) {
|
|
36
|
+
paths.push(this.getPathWithPageNumber(`${tuitionFee.path}/${continent.path}`, pageNumber));
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
}
|
|
@@ -16,11 +16,13 @@ export class Country extends ProgrammesBaseIndexabilityPolicy {
|
|
|
16
16
|
async generateUrls() {
|
|
17
17
|
const countryFragments = CountryPresenter.getInstance().getFragments();
|
|
18
18
|
const paths = [];
|
|
19
|
-
for (const
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
20
|
+
for (const country of countryFragments) {
|
|
21
|
+
const filterKeyValues = new Map([[FilterKey.COUNTRY, [country.id]]]);
|
|
22
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
23
|
+
if (result) {
|
|
24
|
+
paths.push(this.getPathWithPageNumber(country.path, pageNumber));
|
|
25
|
+
}
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
return paths;
|
|
@@ -24,15 +24,17 @@ export class CountryAttendance extends ProgrammesBaseIndexabilityPolicy {
|
|
|
24
24
|
const countryFragments = CountryPresenter.getInstance().getFragments();
|
|
25
25
|
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
26
26
|
const paths = [];
|
|
27
|
-
for (const
|
|
28
|
-
for (const
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
28
|
+
for (const country of countryFragments) {
|
|
29
|
+
for (const attendance of attendanceFragments) {
|
|
30
|
+
const filterKeyValues = new Map([
|
|
31
|
+
[FilterKey.COUNTRY, [country.id]],
|
|
32
|
+
[FilterKey.DELIVERY_METHOD, [attendance.id]]
|
|
33
|
+
]);
|
|
34
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
35
|
+
if (result) {
|
|
36
|
+
paths.push(this.getPathWithPageNumber(`${attendance.path}/${country.path}`, pageNumber));
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
}
|
|
@@ -30,17 +30,19 @@ export class CountryAttendanceDegree extends ProgrammesBaseIndexabilityPolicy {
|
|
|
30
30
|
const attendanceFragments = AttendancePresenter.getInstance().getFragments();
|
|
31
31
|
const degreeFragments = DegreePresenter.getInstance().getFragments();
|
|
32
32
|
const paths = [];
|
|
33
|
-
for (const
|
|
34
|
-
for (const
|
|
35
|
-
for (const
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
34
|
+
for (const country of countryFragments) {
|
|
35
|
+
for (const attendance of attendanceFragments) {
|
|
36
|
+
for (const degree of degreeFragments) {
|
|
37
|
+
const filterKeyValues = new Map([
|
|
38
|
+
[FilterKey.COUNTRY, [country.id]],
|
|
39
|
+
[FilterKey.DELIVERY_METHOD, [attendance.id]],
|
|
40
|
+
[FilterKey.DEGREE_TYPE, [degree.id]]
|
|
41
|
+
]);
|
|
42
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
43
|
+
if (result) {
|
|
44
|
+
paths.push(this.getPathWithPageNumber(`${degree.path}/${attendance.path}/${country.path}`, pageNumber));
|
|
45
|
+
}
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
48
|
}
|
|
@@ -24,15 +24,17 @@ export class CountryDegree extends ProgrammesBaseIndexabilityPolicy {
|
|
|
24
24
|
const countryFragments = CountryPresenter.getInstance().getFragments();
|
|
25
25
|
const degreeFragments = DegreePresenter.getInstance().getFragments();
|
|
26
26
|
const paths = [];
|
|
27
|
-
for (const
|
|
28
|
-
for (const
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
28
|
+
for (const country of countryFragments) {
|
|
29
|
+
for (const degree of degreeFragments) {
|
|
30
|
+
const filterKeyValues = new Map([
|
|
31
|
+
[FilterKey.COUNTRY, [country.id]],
|
|
32
|
+
[FilterKey.DEGREE_TYPE, [degree.id]]
|
|
33
|
+
]);
|
|
34
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
35
|
+
if (result) {
|
|
36
|
+
paths.push(this.getPathWithPageNumber(`${degree.path}/${country.path}`, pageNumber));
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
}
|
|
@@ -24,15 +24,17 @@ export class CountryDuration extends ProgrammesBaseIndexabilityPolicy {
|
|
|
24
24
|
const countryFragments = CountryPresenter.getInstance().getFragments();
|
|
25
25
|
const durationFragments = DurationPresenter.getInstance().getFragments();
|
|
26
26
|
const paths = [];
|
|
27
|
-
for (const
|
|
28
|
-
for (const
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
28
|
+
for (const country of countryFragments) {
|
|
29
|
+
for (const duration of durationFragments) {
|
|
30
|
+
const filterKeyValues = new Map([
|
|
31
|
+
[FilterKey.COUNTRY, [country.id]],
|
|
32
|
+
[FilterKey.DURATION, [duration.id]]
|
|
33
|
+
]);
|
|
34
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
35
|
+
if (result) {
|
|
36
|
+
paths.push(this.getPathWithPageNumber(`${duration.path}/${country.path}`, pageNumber));
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
}
|
|
@@ -30,17 +30,19 @@ export class CountryDurationDegree extends ProgrammesBaseIndexabilityPolicy {
|
|
|
30
30
|
const degreeFragments = DegreePresenter.getInstance().getFragments();
|
|
31
31
|
const durationFragments = DurationPresenter.getInstance().getFragments();
|
|
32
32
|
const paths = [];
|
|
33
|
-
for (const
|
|
34
|
-
for (const
|
|
35
|
-
for (const
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
34
|
+
for (const country of countryFragments) {
|
|
35
|
+
for (const duration of durationFragments) {
|
|
36
|
+
for (const degree of degreeFragments) {
|
|
37
|
+
const filterKeyValues = new Map([
|
|
38
|
+
[FilterKey.COUNTRY, [country.id]],
|
|
39
|
+
[FilterKey.DURATION, [duration.id]],
|
|
40
|
+
[FilterKey.DEGREE_TYPE, [degree.id]]
|
|
41
|
+
]);
|
|
42
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
43
|
+
if (result) {
|
|
44
|
+
paths.push(this.getPathWithPageNumber(`${degree.path}/${duration.path}/${country.path}`, pageNumber));
|
|
45
|
+
}
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
48
|
}
|
|
@@ -25,15 +25,17 @@ export class CountryEducationalForm extends ProgrammesBaseIndexabilityPolicy {
|
|
|
25
25
|
const countryFragments = CountryPresenter.getInstance().getFragments();
|
|
26
26
|
const educationalFormFragments = EducationalFormPresenter.getInstance().getFragments();
|
|
27
27
|
const paths = [];
|
|
28
|
-
for (const
|
|
29
|
-
for (const
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
29
|
+
for (const country of countryFragments) {
|
|
30
|
+
for (const form of educationalFormFragments) {
|
|
31
|
+
const filterKeyValues = new Map([
|
|
32
|
+
[FilterKey.COUNTRY, [country.id]],
|
|
33
|
+
[FilterKey.EDUCATIONAL_FORM, [form.id]]
|
|
34
|
+
]);
|
|
35
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
36
|
+
if (result) {
|
|
37
|
+
paths.push(this.getPathWithPageNumber(`${country.path}/${form.path}`, pageNumber));
|
|
38
|
+
}
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
41
|
}
|
|
@@ -24,15 +24,17 @@ export class CountryFormat extends ProgrammesBaseIndexabilityPolicy {
|
|
|
24
24
|
const countryFragments = CountryPresenter.getInstance().getFragments();
|
|
25
25
|
const formatFragments = FormatPresenter.getInstance().getFragments();
|
|
26
26
|
const paths = [];
|
|
27
|
-
for (const
|
|
28
|
-
for (const
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
28
|
+
for (const country of countryFragments) {
|
|
29
|
+
for (const format of formatFragments) {
|
|
30
|
+
const filterKeyValues = new Map([
|
|
31
|
+
[FilterKey.COUNTRY, [country.id]],
|
|
32
|
+
[FilterKey.ATTENDANCE, [format.id]]
|
|
33
|
+
]);
|
|
34
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
35
|
+
if (result) {
|
|
36
|
+
paths.push(this.getPathWithPageNumber(`${country.path}/${format.path}`, pageNumber));
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
}
|
|
@@ -24,15 +24,17 @@ export class CountryTuitionFee extends ProgrammesBaseIndexabilityPolicy {
|
|
|
24
24
|
const countryFragments = CountryPresenter.getInstance().getFragments();
|
|
25
25
|
const tuitionFeeFragments = TuitionFeePresenter.getInstance().getFragments();
|
|
26
26
|
const paths = [];
|
|
27
|
-
for (const
|
|
28
|
-
for (const
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
28
|
+
for (const country of countryFragments) {
|
|
29
|
+
for (const tuitionFee of tuitionFeeFragments) {
|
|
30
|
+
const filterKeyValues = new Map([
|
|
31
|
+
[FilterKey.COUNTRY, [country.id]],
|
|
32
|
+
[FilterKey.TUITION_FEE, [tuitionFee.id]]
|
|
33
|
+
]);
|
|
34
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
35
|
+
if (result) {
|
|
36
|
+
paths.push(this.getPathWithPageNumber(`${tuitionFee.path}/${country.path}`, pageNumber));
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
}
|
|
@@ -19,11 +19,13 @@ export class Discipline extends ProgrammesBaseIndexabilityPolicy {
|
|
|
19
19
|
async generateUrls() {
|
|
20
20
|
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
21
21
|
const paths = [];
|
|
22
|
-
for (const
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
23
|
+
for (const discipline of disciplineFragments) {
|
|
24
|
+
const filterKeyValues = new Map([[FilterKey.DISCIPLINES, [discipline.id]]]);
|
|
25
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
26
|
+
if (result) {
|
|
27
|
+
paths.push(this.getPathWithPageNumber(discipline.path, pageNumber));
|
|
28
|
+
}
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
return paths;
|
|
@@ -23,16 +23,18 @@ export class DisciplineArea extends ProgrammesBaseIndexabilityPolicy {
|
|
|
23
23
|
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
24
24
|
const areaFragments = AreaPresenter.getInstance().getFragments();
|
|
25
25
|
const paths = [];
|
|
26
|
-
for (const
|
|
27
|
-
for (const
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
for (const pageNumber of this.indexablePageNumbers) {
|
|
27
|
+
for (const discipline of disciplineFragments) {
|
|
28
|
+
for (const area of areaFragments) {
|
|
29
|
+
const filterKeyValues = new Map([
|
|
30
|
+
[FilterKey.DISCIPLINES, [discipline.id]],
|
|
31
|
+
[FilterKey.AREA, [area.id]],
|
|
32
|
+
[FilterKey.COUNTRY, [area.countryId]]
|
|
33
|
+
]);
|
|
34
|
+
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
35
|
+
if (result) {
|
|
36
|
+
paths.push(this.getPathWithPageNumber(`${discipline.path}/${area.path}`, pageNumber));
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
}
|