feat: add certification thing

This commit is contained in:
Thea Schöbl
2023-05-15 13:38:11 +00:00
parent b21dc75964
commit fd63fb764f
68 changed files with 6776 additions and 24439 deletions

View File

@@ -18,7 +18,7 @@ import {LightweightProject} from '@openstapps/core-tools/lib/easy-ast/types/ligh
import {expect} from 'chai';
import {reduce} from 'lodash';
process.on('unhandledRejection', (err) => {
process.on('unhandledRejection', err => {
throw err;
});
@@ -33,12 +33,21 @@ describe('Mapping Compatibility', () => {
});
it('non-exported definitions should not have duplicate names across files', () => {
reduce(project, (result, file) => reduce(file, (result2, _, key) => {
expect(result2[key]).to.be.undefined;
return {
[key]: true,
...result2,
};
}, result), {} as Record<string, boolean>);
reduce(
project,
(result, file) =>
reduce(
file,
(result2, _, key) => {
expect(result2[key]).to.be.undefined;
return {
[key]: true,
...result2,
};
},
result,
),
{} as Record<string, boolean>,
);
});
});

View File

@@ -12,7 +12,11 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {isLightweightClass, isLightweightEnum, isUnionType} from '@openstapps/core-tools/lib/easy-ast/ast-util';
import {
isLightweightClass,
isLightweightEnum,
isUnionType,
} from '@openstapps/core-tools/lib/easy-ast/ast-util';
import {LightweightAliasDefinition} from '@openstapps/core-tools/lib/easy-ast/types/lightweight-alias-definition';
import {LightweightProjectWithIndex} from '@openstapps/core-tools/lib/easy-ast/types/lightweight-project';
import {LightweightType} from '@openstapps/core-tools/lib/easy-ast/types/lightweight-type';
@@ -22,7 +26,7 @@ import {LightweightProperty} from '@openstapps/core-tools/src/easy-ast/types/lig
import {expect} from 'chai';
import {assign, chain, clone, flatMap, isNil, reduce, reject, some} from 'lodash';
process.on('unhandledRejection', (err) => {
process.on('unhandledRejection', err => {
throw err;
});
@@ -47,28 +51,27 @@ describe('Features', () => {
referenceName: 'SCDiff',
});
expect(thingsReflection.type?.specificationTypes?.every(it => typeof it.referenceName !== 'undefined')).to.be.true;
expect(
thingsReflection.type?.specificationTypes?.every(it => typeof it.referenceName !== 'undefined'),
).to.be.true;
thingNames = thingsReflection.type?.specificationTypes?.map(type => type.referenceName!) ?? [];
things = thingNames
.map(it => project.definitions[it])
.filter(isLightweightClass);
things = thingNames.map(it => project.definitions[it]).filter(isLightweightClass);
thingsWithoutReferences = thingNames
.map(it => project.definitions[`${it}WithoutReferences`])
.filter(isLightweightClass);
});
const inheritedProperties = function (classLike: LightweightClassDefinition):
Record<string, LightweightProperty> | undefined {
const inheritedProperties = function (
classLike: LightweightClassDefinition,
): Record<string, LightweightProperty> | undefined {
return reduce(
[...(classLike.implementedDefinitions ?? []), ...(classLike.extendedDefinitions ?? [])],
(obj, extension) => {
const object = project.definitions[extension.referenceName ?? ''];
return assign(obj, isLightweightClass(object)
? inheritedProperties(object)
: obj);
return assign(obj, isLightweightClass(object) ? inheritedProperties(object) : obj);
},
clone(classLike.properties)
clone(classLike.properties),
);
};
@@ -79,33 +82,45 @@ describe('Features', () => {
});
it('should not have duplicate names', () => {
reduce(project.files, (fileResult, file) =>
reduce(file, (definitionResult, definition: LightweightDefinition) => {
expect(definitionResult[definition.name]).to.be.undefined;
definitionResult[definition.name] = true; // something that's not undefined
reduce(
project.files,
(fileResult, file) =>
reduce(
file,
(definitionResult, definition: LightweightDefinition) => {
expect(definitionResult[definition.name]).to.be.undefined;
definitionResult[definition.name] = true; // something that's not undefined
return definitionResult;
}, fileResult), {} as Record<string, true>);
return definitionResult;
},
fileResult,
),
{} as Record<string, true>,
);
});
it('should not have properties referencing SCThing', () => {
const allPropertyReferenceNames: (property: LightweightProperty) => string[] = property => reject([
property.type.referenceName!,
...flatMap(property.properties, allPropertyReferenceNames),
], isNil);
const allPropertyReferenceNames: (property: LightweightProperty) => string[] = property =>
reject(
[property.type.referenceName!, ...flatMap(property.properties, allPropertyReferenceNames)],
isNil,
);
const typeHasSCThingReferences: (type?: LightweightType) => boolean = type => type?.referenceName
? hasSCThingReferences(project.definitions[type.referenceName])
: some(type?.specificationTypes, typeHasSCThingReferences);
const typeHasSCThingReferences: (type?: LightweightType) => boolean = type =>
type?.referenceName
? hasSCThingReferences(project.definitions[type.referenceName])
: some(type?.specificationTypes, typeHasSCThingReferences);
const hasSCThingReferences: (definition?: LightweightDefinition) => boolean = definition =>
isLightweightClass(definition)
? chain(inheritedProperties(definition))
.flatMap(it => flatMap(it.properties, allPropertyReferenceNames))
.map(it => project.definitions[it] as LightweightDefinition)
.some(it => it.name === 'SCThing' || hasSCThingReferences(it))
.value()
: definition ? typeHasSCThingReferences(definition.type) : false;
.flatMap(it => flatMap(it.properties, allPropertyReferenceNames))
.map(it => project.definitions[it] as LightweightDefinition)
.some(it => it.name === 'SCThing' || hasSCThingReferences(it))
.value()
: definition
? typeHasSCThingReferences(definition.type)
: false;
for (const thing of things) {
expect(hasSCThingReferences(thing)).to.be.false;
@@ -115,13 +130,13 @@ describe('Features', () => {
function extendsSCThing(definition?: LightweightDefinition): boolean {
return isLightweightClass(definition)
? chain([
...(definition as LightweightClassDefinition).extendedDefinitions ?? [],
...(definition as LightweightClassDefinition).implementedDefinitions ?? [],
])
.map(it => it.referenceName)
.reject(isNil)
.some(it => it === 'SCThing' || extendsSCThing(project.definitions[it!]))
.value()
...((definition as LightweightClassDefinition).extendedDefinitions ?? []),
...((definition as LightweightClassDefinition).implementedDefinitions ?? []),
])
.map(it => it.referenceName)
.reject(isNil)
.some(it => it === 'SCThing' || extendsSCThing(project.definitions[it!]))
.value()
: false;
}

View File

@@ -12,13 +12,8 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {expect} from 'chai';
import {slow, suite, test, timeout} from '@testdeck/mocha';
import {SCBulkResponse} from '../src/protocol/routes/bulk-request';
import {SCMultiSearchResponse} from '../src/protocol/routes/search-multi';
import {SCSearchResponse} from '../src/protocol/routes/search';
import {SCThingOriginType, SCThingType} from '../src/things/abstract/thing';
import {SCDish} from '../src/things/dish';
import {expect} from 'chai';
import {
isBulkResponse,
isMultiSearchResponse,
@@ -26,10 +21,14 @@ import {
isThing,
isThingWithTranslations,
} from '../src/guards';
import {SCBulkResponse} from '../src/protocol/routes/bulk-request';
import {SCSearchResponse} from '../src/protocol/routes/search';
import {SCMultiSearchResponse} from '../src/protocol/routes/search-multi';
import {SCThingOriginType, SCThingType} from '../src/things/abstract/thing';
import {SCDish} from '../src/things/dish';
@suite(timeout(10000), slow(5000))
export class GuardsSpec {
static bulkResponse: SCBulkResponse = {
expiration: '2009-06-30T18:30:00+02:00 ',
source: 'bar',
@@ -39,9 +38,7 @@ export class GuardsSpec {
};
static dishWithTranslation: SCDish = {
categories: [
'appetizer',
],
categories: ['appetizer'],
name: 'foo',
origin: {
created: '',
@@ -57,9 +54,7 @@ export class GuardsSpec {
};
static notADish = {
categories: [
'appetizer',
],
categories: ['appetizer'],
name: 'foo',
origin: {
created: '',
@@ -70,18 +65,16 @@ export class GuardsSpec {
};
static searchResponse: SCSearchResponse = {
data: [
GuardsSpec.dishWithTranslation,
],
data: [GuardsSpec.dishWithTranslation],
facets: [
{
buckets: [
{
count: 1,
key: 'key',
},
buckets: [
{
count: 1,
key: 'key',
},
],
field: 'field',
field: 'field',
},
],
pagination: {

View File

@@ -8,9 +8,7 @@
"status": "ongoing",
"uid": "681a59a1-23c2-5d78-861a-8c86a3abf404",
"name": "Introductory courses extreme math",
"categories": [
"university assessment"
],
"categories": ["university assessment"],
"courseOfStudy": {
"academicDegree": "bachelor",
"academicDegreewithField": "Bachelor of Arts",

View File

@@ -8,9 +8,7 @@
"status": "passed",
"uid": "681a59a1-23c2-5d78-861a-8c86a3abf303",
"name": "Mathe 9001",
"categories": [
"university assessment"
],
"categories": ["university assessment"],
"superAssessments": [
{
"attempt": 1,
@@ -20,9 +18,7 @@
"status": "ongoing",
"uid": "681a59a1-23c2-5d78-861a-8c86a3abf404",
"name": "Introductory courses extreme math",
"categories": [
"university assessment"
],
"categories": ["university assessment"],
"type": "assessment"
}
],

View File

@@ -18,12 +18,8 @@
"name": "Name One",
"type": "message",
"messageBody": "Message",
"audiences": [
"students"
],
"categories": [
"news"
],
"audiences": ["students"],
"categories": ["news"],
"sequenceIndex": 1010,
"origin": {
"indexed": "2018-09-11T12:30:00Z",

View File

@@ -18,12 +18,8 @@
"name": "Name One",
"type": "message",
"messageBody": "Message",
"audiences": [
"students"
],
"categories": [
"news"
],
"audiences": ["students"],
"categories": ["news"],
"sequenceIndex": 1020,
"origin": {
"indexed": "2018-09-11T12:30:00Z",

View File

@@ -9,18 +9,14 @@
"description": "Fortsetzung der Algebra I: Galoistheorie mit Anwendungen, ausgewählte Spezialthemen.",
"uid": "681a59a1-23c2-5d78-861a-8c86a3abf2b9",
"name": "Algebra II",
"categories": [
"lecture"
],
"categories": ["lecture"],
"academicTerms": [
{
"uid": "aacd5611-b5be-54ce-b39f-c52f7e9a631d",
"type": "semester",
"name": "Sommersemester 2018",
"acronym": "SS 2018",
"alternateNames": [
"SoSe 2018"
],
"alternateNames": ["SoSe 2018"],
"startDate": "2018-04-01",
"endDate": "2018-09-30",
"eventsStartDate": "2018-04-09",

View File

@@ -15,9 +15,7 @@
"type": "string"
}
},
"required": [
"query"
],
"required": ["query"],
"additionalProperties": false,
"description": "User query"
}
@@ -28,9 +26,7 @@
"type": "string"
}
},
"required": [
"query"
],
"required": ["query"],
"additionalProperties": false,
"description": "User query",
"$id": "https://core.stapps.tu-berlin.de/v0.18.0/lib/schema/SCFooPluginRequest.json"
@@ -46,9 +42,7 @@
"items": {}
}
},
"required": [
"result"
],
"required": ["result"],
"additionalProperties": false,
"description": "A response to a query"
}
@@ -60,9 +54,7 @@
"items": {}
}
},
"required": [
"result"
],
"required": ["result"],
"additionalProperties": false,
"description": "A response to a query",
"$id": "https://core.stapps.tu-berlin.de/v0.18.0/lib/schema/SCFooPluginResponse.json"

View File

@@ -1,17 +1,11 @@
{
"errorNames": [],
"instance": {
"categories": [
"privacy"
],
"categories": ["privacy"],
"description": "This is a Description",
"defaultValue": "student",
"inputType": "single choice",
"values": [
"student",
"employee",
"guest"
],
"values": ["student", "employee", "guest"],
"name": "group",
"order": 0,
"origin": {

View File

@@ -1,22 +1,11 @@
{
"errorNames": [],
"instance": {
"categories": [
"privacy"
],
"categories": ["privacy"],
"description": "This is a Description",
"defaultValue": [],
"inputType": "multiple choice",
"values": [
1,
2,
3,
4,
5,
6,
7,
8
],
"values": [1, 2, 3, 4, 5, 6, 7, 8],
"name": "numbers",
"order": 1,
"origin": {

View File

@@ -1,9 +1,7 @@
{
"errorNames": [],
"instance": {
"categories": [
"profile"
],
"categories": ["profile"],
"defaultValue": "en",
"description": "The language this app is going to use.",
"inputType": "single choice",
@@ -18,25 +16,16 @@
"de": {
"description": "Die Sprache in der die App angezeigt wird.",
"name": "Sprache",
"values": [
"English",
"German"
]
"values": ["English", "German"]
},
"en": {
"description": "The language this app is going to use.",
"name": "Language",
"values": [
"english",
"german"
]
"values": ["english", "german"]
}
},
"type": "setting",
"values": [
"en",
"de"
],
"values": ["en", "de"],
"uid": "184b717a-d020-46f5-995c-03023670cc62"
},
"schema": "SCSetting"

View File

@@ -5,18 +5,14 @@
"description": "Fortsetzung der Algebra I: Galoistheorie mit Anwendungen, ausgewählte Spezialthemen.",
"uid": "681a59a1-23c2-5d78-861a-8c86a3abf2b9",
"name": "Algebra II",
"categories": [
"lecture"
],
"categories": ["lecture"],
"academicTerms": [
{
"uid": "aacd5611-b5be-54ce-b39f-c52f7e9a631d",
"type": "semester",
"name": "Sommersemester 2018",
"acronym": "SS 2018",
"alternateNames": [
"SoSe 2018"
],
"alternateNames": ["SoSe 2018"],
"startDate": "2018-04-01",
"endDate": "2018-09-30",
"eventsStartDate": "2018-04-09",

View File

@@ -5,18 +5,14 @@
"description": "Grundlagen, algebraische Grundbegriffe, Vektorräume, lineare Abbildungen und Gleichungen, Determinanten",
"uid": "b17eb963-42b5-5861-adce-2b7b2607ef0a",
"name": "Lineare Algebra I für Mathematiker",
"categories": [
"lecture"
],
"categories": ["lecture"],
"academicTerms": [
{
"uid": "aacd5611-b5be-54ce-b39f-c52f7e9a631d",
"type": "semester",
"name": "Sommersemester 2018",
"acronym": "SS 2018",
"alternateNames": [
"SoSe 2018"
],
"alternateNames": ["SoSe 2018"],
"startDate": "2018-04-01",
"endDate": "2018-09-30",
"eventsStartDate": "2018-04-09",
@@ -40,17 +36,11 @@
"type": "catalog",
"level": 3,
"description": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.",
"categories": [
"university events"
],
"categories": ["university events"],
"name": "Mathematik: Lehrveranstaltungen für andere Fachrichtungen (Service)"
}
],
"majors": [
"Wirtschaftsmathematik BSc",
"Technomathematik BSc",
"Mathematik BSc"
],
"majors": ["Wirtschaftsmathematik BSc", "Technomathematik BSc", "Mathematik BSc"],
"origin": {
"indexed": "2018-09-11T12:30:00Z",
"name": "Dummy",

View File

@@ -5,18 +5,14 @@
"description": "Die Übung hat 2 SWS und wird auf 2 Gruppen verteilt.",
"uid": "7e2b64b0-925d-5f63-b464-a6e3e9492411",
"name": "Algebra II",
"categories": [
"tutorial"
],
"categories": ["tutorial"],
"academicTerms": [
{
"uid": "aacd5611-b5be-54ce-b39f-c52f7e9a631d",
"type": "semester",
"name": "Sommersemester 2018",
"acronym": "SS 2018",
"alternateNames": [
"SoSe 2018"
],
"alternateNames": ["SoSe 2018"],
"startDate": "2018-04-01",
"endDate": "2018-09-30",
"eventsStartDate": "2018-04-09",
@@ -46,9 +42,7 @@
"uid": "6c259ad8-99af-5ea2-8aae-a3c9027d26e2",
"type": "catalog",
"level": 3,
"categories": [
"university events"
],
"categories": ["university events"],
"name": "Mathematik: Grundstudiums-Veranstaltungen (Diplom, Bachelor)"
},
{
@@ -56,9 +50,7 @@
"type": "catalog",
"level": 3,
"description": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.",
"categories": [
"university events"
],
"categories": ["university events"],
"name": "Mathematik: Lehrveranstaltungen für andere Fachrichtungen (Service)"
}
],

View File

@@ -3,23 +3,15 @@
"instance": {
"uid": "8d8bd89c-8429-5f81-b754-15a5be55e593",
"type": "article",
"categories": [
"unipedia"
],
"categories": ["unipedia"],
"sameAs": "https://www.mydesk.tu-berlin.de/wiki/abk%C3%BCrzungen",
"name": "Abkürzungen",
"keywords": [
"Abkürzungen",
"Studium"
],
"keywords": ["Abkürzungen", "Studium"],
"articleBody": "Siehe [c.t.](#/b-tu/data/detail/Article/tub-unipedia-384edcfd026dab697ff9f8adda0d19a6959d4e29) (lat. cum tempore)\n\n### S\n\n**SWS** ist eine Semesterwochenstunde. Ein SWS beträgt 45 MInuten.",
"translations": {
"en": {
"name": "Abbreviations",
"keywords": [
"Abbreviations",
"Studies"
]
"keywords": ["Abbreviations", "Studies"]
}
},
"origin": {

View File

@@ -3,9 +3,7 @@
"instance": {
"uid": "4f772b29-0b28-53a4-a8b9-206d9b425962",
"type": "article",
"categories": [
"unipedia"
],
"categories": ["unipedia"],
"sameAs": "https://www.mydesk.tu-berlin.de/wiki/ag_ziethen",
"name": "AG Ziethen",
"keywords": [

View File

@@ -5,9 +5,7 @@
"uid": "d541eda5-1542-59b2-969e-7dbbee0bd2a8",
"name": "Mozart und Frankfurt am Main : drei Generationen Mozart in Frankfurt am Main",
"description": "Ill.",
"categories": [
"article"
],
"categories": ["article"],
"authors": [
{
"type": "person",

View File

@@ -5,9 +5,7 @@
"uid": "554a4a89-df73-5197-ac85-c8a5a3a9c5b0",
"name": "Ursula Janik : [Markthändlerin]",
"description": "Ill.",
"categories": [
"article"
],
"categories": ["article"],
"authors": [
{
"type": "person",

View File

@@ -23,13 +23,9 @@
],
"inLanguage": "de",
"edition": "2., überarb. u. erw. Aufl.",
"ISBNs": [
"3936608776"
],
"ISBNs": ["3936608776"],
"numberOfPages": 537,
"categories": [
"book"
],
"categories": ["book"],
"origin": {
"indexed": "2018-09-11T12:30:00Z",
"name": "Dummy",

View File

@@ -4,9 +4,7 @@
"type": "book",
"uid": "db47f7f4-7699-5a37-afcc-24beaa998d36",
"name": "Minimal Book",
"categories": [
"ebook"
],
"categories": ["ebook"],
"authors": [
{
"type": "person",
@@ -17,9 +15,7 @@
}
],
"datePublished": "2007-08-01",
"ISBNs": [
"3936608776"
],
"ISBNs": ["3936608776"],
"origin": {
"indexed": "2018-09-11T12:30:00Z",
"name": "Dummy",

View File

@@ -5,9 +5,7 @@
"uid": "188cb2bd-724d-543d-97ac-9aa1dda68cb7",
"name": "Frauen im Ingenieurberuf : FIB ; 1. Gesamtdeutsches Symposium VDI-FIB 17. - 18. November 1990, Bad Homburg ; 1. überregionales Treffen VDI-FIB 11. - 12. November 1989, Düsseldorf",
"description": "47 S. : Ill., Kt.",
"categories": [
"book"
],
"categories": ["book"],
"authors": [
{
"uid": "a276588c-ecee-5d2e-8b9c-73cb902bc165",
@@ -21,9 +19,7 @@
{
"uid": "603a6574-8910-588a-9e83-cd26e6988c74",
"type": "publication event",
"locations": [
"Frankfurt/M"
],
"locations": ["Frankfurt/M"],
"publisher": "VDI",
"name": "VDI"
}

View File

@@ -5,9 +5,7 @@
"uid": "f6ee5744-a441-595d-9dae-a9f579c0660f",
"name": "Kant",
"description": "176 S.",
"categories": [
"book"
],
"categories": ["book"],
"authors": [
{
"uid": "7e198ecf-966a-5f99-8a45-266243583023",
@@ -20,17 +18,13 @@
{
"uid": "6333427c-0725-5398-9a04-11604680dae3",
"type": "publication event",
"locations": [
"Paris"
],
"locations": ["Paris"],
"publisher": "Belles Lettres",
"name": "Belles Lettres"
}
],
"sameAs": "https://ubffm.hds.hebis.de/Record/HEB102248788",
"ISBNs": [
"2251760385"
],
"ISBNs": ["2251760385"],
"origin": {
"indexed": "2018-09-11T12:30:00Z",
"name": "HeBIS HDS",

View File

@@ -4,156 +4,53 @@
"geo": {
"point": {
"type": "Point",
"coordinates": [
13.32577,
52.51398
]
"coordinates": [13.32577, 52.51398]
},
"polygon": {
"type": "Polygon",
"coordinates": [
[
[
13.3259988,
52.5141108
],
[
13.3259718,
52.5143107
],
[
13.3262958,
52.5143236
],
[
13.3263291,
52.5143052
],
[
13.3263688,
52.5140098
],
[
13.3264324,
52.5139643
],
[
13.3264849,
52.5139415
],
[
13.3265148,
52.5139004
],
[
13.3265336,
52.5138571
],
[
13.3265411,
52.5137933
],
[
13.3265336,
52.5137546
],
[
13.3264961,
52.5137044
],
[
13.3264399,
52.5136725
],
[
13.3263875,
52.5136497
],
[
13.3263351,
52.5136429
],
[
13.3263613,
52.5134286
],
[
13.3262564,
52.5133603
],
[
13.3260767,
52.5133671
],
[
13.3259418,
52.5134286
],
[
13.3258744,
52.5135061
],
[
13.3258444,
52.5135677
],
[
13.3261366,
52.5135836
],
[
13.3261066,
52.513807
],
[
13.3260579,
52.5138047
],
[
13.3260317,
52.5139096
],
[
13.3254137,
52.5138708
],
[
13.3254287,
52.5137819
],
[
13.3250879,
52.513766
],
[
13.3250018,
52.5142697
],
[
13.3253613,
52.5142902
],
[
13.3253838,
52.5140747
],
[
13.3259988,
52.5141108
]
[13.3259988, 52.5141108],
[13.3259718, 52.5143107],
[13.3262958, 52.5143236],
[13.3263291, 52.5143052],
[13.3263688, 52.5140098],
[13.3264324, 52.5139643],
[13.3264849, 52.5139415],
[13.3265148, 52.5139004],
[13.3265336, 52.5138571],
[13.3265411, 52.5137933],
[13.3265336, 52.5137546],
[13.3264961, 52.5137044],
[13.3264399, 52.5136725],
[13.3263875, 52.5136497],
[13.3263351, 52.5136429],
[13.3263613, 52.5134286],
[13.3262564, 52.5133603],
[13.3260767, 52.5133671],
[13.3259418, 52.5134286],
[13.3258744, 52.5135061],
[13.3258444, 52.5135677],
[13.3261366, 52.5135836],
[13.3261066, 52.513807],
[13.3260579, 52.5138047],
[13.3260317, 52.5139096],
[13.3254137, 52.5138708],
[13.3254287, 52.5137819],
[13.3250879, 52.513766],
[13.3250018, 52.5142697],
[13.3253613, 52.5142902],
[13.3253838, 52.5140747],
[13.3259988, 52.5141108]
]
]
}
},
"type": "building",
"name": "Mathematikgebäude",
"alternateNames": [
"MA"
],
"alternateNames": ["MA"],
"uid": "edfaba58-254f-5da0-82d6-3b46a76c48ce",
"categories": [
"education"
],
"categories": ["education"],
"address": {
"addressCountry": "Germany",
"addressLocality": "Berlin",

View File

@@ -4,27 +4,21 @@
"uid": "c8dc1f7f-9e3e-5b1f-8c38-084f46413b87",
"type": "catalog",
"level": 1,
"categories": [
"university events"
],
"categories": ["university events"],
"name": "Lehrveranstaltungen des Fachbereichs 3 - Gesellschaftswissenschaften",
"academicTerm": {
"uid": "b621f5b5-dd5d-5730-9e2e-e4ba52011388",
"type": "semester",
"acronym": "WS 2017/18",
"name": "Wintersemester 2017/2018",
"alternateNames": [
"WiSe 2017/18"
],
"alternateNames": ["WiSe 2017/18"],
"startDate": "2017-10-01",
"endDate": "2018-03-31"
},
"superCatalog": {
"type": "catalog",
"level": 0,
"categories": [
"university events"
],
"categories": ["university events"],
"uid": "a7404d36-282d-546e-bfa5-6c7b25ba7838",
"name": "Vorlesungsverzeichnis WS 2017/18"
},
@@ -32,9 +26,7 @@
{
"type": "catalog",
"level": 0,
"categories": [
"university events"
],
"categories": ["university events"],
"uid": "a7404d36-282d-546e-bfa5-6c7b25ba7838",
"name": "Vorlesungsverzeichnis WS 2017/18"
}

View File

@@ -5,18 +5,14 @@
"type": "catalog",
"level": 3,
"description": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.",
"categories": [
"university events"
],
"categories": ["university events"],
"name": "Mathematik: Lehrveranstaltungen für andere Fachrichtungen (Service)",
"academicTerm": {
"uid": "b621f5b5-dd5d-5730-9e2e-e4ba52011388",
"type": "semester",
"acronym": "WS 2017/18",
"name": "Wintersemester 2017/2018",
"alternateNames": [
"WiSe 2017/18"
],
"alternateNames": ["WiSe 2017/18"],
"startDate": "2017-10-01",
"endDate": "2018-03-31"
},
@@ -24,18 +20,14 @@
"uid": "2fdcccce-1948-5f5a-8938-3711b7e65e8a",
"type": "catalog",
"level": 2,
"categories": [
"university events"
],
"categories": ["university events"],
"name": "Mathematik"
},
"superCatalogs": [
{
"type": "catalog",
"level": 0,
"categories": [
"university events"
],
"categories": ["university events"],
"uid": "a7404d36-282d-546e-bfa5-6c7b25ba7838",
"name": "Vorlesungsverzeichnis WS 2017"
},
@@ -43,18 +35,14 @@
"uid": "0718211b-d0c2-50fb-bc78-b968f20fd95b",
"type": "catalog",
"level": 1,
"categories": [
"university events"
],
"categories": ["university events"],
"name": "Fakultät II Mathematik und Naturwissenschaften"
},
{
"uid": "2fdcccce-1948-5f5a-8938-3711b7e65e8a",
"type": "catalog",
"level": 2,
"categories": [
"university events"
],
"categories": ["university events"],
"name": "Mathematik"
}
],

View File

@@ -5,20 +5,13 @@
"name": "Dienstadresse",
"areaServed": {
"type": "room",
"categories": [
"education"
],
"categories": ["education"],
"uid": "39c1a574-04ef-5157-9c6f-e271d93eb273",
"name": "3.G 121",
"alternateNames": [
"Dienstzimmer"
],
"alternateNames": ["Dienstzimmer"],
"geo": {
"point": {
"coordinates": [
8.66919,
50.12834
],
"coordinates": [8.66919, 50.12834],
"type": "Point"
}
}

View File

@@ -7,36 +7,24 @@
"duration": "PT2H",
"inPlace": {
"type": "room",
"categories": [
"education"
],
"categories": ["education"],
"uid": "5a4bbced-8e1f-5f29-a1d1-336e455ce7f9",
"name": "H 0105",
"geo": {
"point": {
"type": "Point",
"coordinates": [
13.32687,
52.51211
]
"coordinates": [13.32687, 52.51211]
}
}
},
"repeatFrequency": "P1W",
"dates": [
"2016-04-15T17:00:00+00:00"
],
"dates": ["2016-04-15T17:00:00+00:00"],
"event": {
"type": "academic event",
"uid": "dbb4e5e1-0789-59c1-9970-877430af56b3",
"name": "Einführung in die Wirtschaftspolitik",
"categories": [
"written exam"
],
"majors": [
"Economics BSc",
"Wirtschaftsingenieurwesen BSc"
]
"categories": ["written exam"],
"majors": ["Economics BSc", "Wirtschaftsingenieurwesen BSc"]
},
"origin": {
"indexed": "2018-09-11T12:30:00Z",

View File

@@ -9,30 +9,21 @@
"geo": {
"point": {
"type": "Point",
"coordinates": [
13.3266207,
52.5144409
]
"coordinates": [13.3266207, 52.5144409]
}
},
"type": "room",
"categories": [
"education"
],
"categories": ["education"],
"uid": "b535c86a-777b-54c3-b89a-cad528d0580f",
"name": "EMH 225",
"floorName": "2"
},
"dates": [
"2016-04-12T11:00:00+00:00"
],
"dates": ["2016-04-12T11:00:00+00:00"],
"event": {
"type": "academic event",
"uid": "e6fb74d4-c6d9-59bb-930f-e47eb6e39432",
"name": "Distributed Algorithms",
"categories": [
"written exam"
]
"categories": ["written exam"]
},
"origin": {
"indexed": "2018-09-11T12:30:00Z",

View File

@@ -9,30 +9,21 @@
"geo": {
"point": {
"type": "Point",
"coordinates": [
13.3266207,
52.5144409
]
"coordinates": [13.3266207, 52.5144409]
}
},
"type": "room",
"categories": [
"student union"
],
"categories": ["student union"],
"uid": "b535c86a-777b-54c3-b89a-cad528d0580f",
"name": "EMH 225",
"floorName": "2"
},
"dates": [
"2016-04-12T11:00:00+00:00"
],
"dates": ["2016-04-12T11:00:00+00:00"],
"event": {
"type": "academic event",
"uid": "4f86e8bb-ce73-520b-bfd9-e1ba9f754391",
"name": "Dance course for beginners",
"categories": [
"special"
]
"categories": ["special"]
},
"origin": {
"indexed": "2018-09-11T12:30:00Z",

View File

@@ -3,9 +3,7 @@
"instance": {
"type": "dish",
"name": "Pizza mit Geflügelsalami und Champignons",
"categories": [
"main dish"
],
"categories": ["main dish"],
"characteristics": [],
"additives": [
"konserviert",
@@ -38,21 +36,14 @@
"geo": {
"point": {
"type": "Point",
"coordinates": [
13.32612,
52.50978
]
"coordinates": [13.32612, 52.50978]
}
},
"type": "building",
"categories": [
"restaurant"
],
"categories": ["restaurant"],
"openingHours": "Mo-Fr 11:00-14:30",
"name": "TU-Mensa",
"alternateNames": [
"MensaHardenberg"
],
"alternateNames": ["MensaHardenberg"],
"uid": "72fbc8a3-ebd1-58f9-9526-ad65cba2e402",
"address": {
"addressCountry": "Germany",

View File

@@ -4,9 +4,7 @@
"type": "dish",
"name": "Sahne-Bärlauchsauce",
"description": "Nudelauswahl",
"categories": [
"main dish"
],
"categories": ["main dish"],
"offers": [
{
"prices": {
@@ -28,21 +26,14 @@
"geo": {
"point": {
"type": "Point",
"coordinates": [
13.32612,
52.50978
]
"coordinates": [13.32612, 52.50978]
}
},
"type": "building",
"categories": [
"restaurant"
],
"categories": ["restaurant"],
"openingHours": "Mo-Fr 11:00-14:30",
"name": "TU-Mensa",
"alternateNames": [
"MensaHardenberg"
],
"alternateNames": ["MensaHardenberg"],
"uid": "072db1e5-e479-5040-88e0-4a98d731e443",
"address": {
"addressCountry": "Germany",
@@ -63,10 +54,7 @@
"image": "https://backend/res/img/characteristic_small_vegetarian.png"
}
],
"additives": [
"Weizen",
"Milch(Laktose; Milcheiweiß)"
],
"additives": ["Weizen", "Milch(Laktose; Milcheiweiß)"],
"uid": "3222631f-82b3-5faf-a8e8-9c10719cc95b",
"origin": {
"indexed": "2018-09-11T12:30:00Z",

View File

@@ -19,21 +19,14 @@
"inPlace": {
"type": "room",
"name": "Cafeteria LEVEL",
"categories": [
"cafe"
],
"categories": ["cafe"],
"uid": "e5492c9c-064e-547c-8633-c8fc8955cfcf",
"alternateNames": [
"Cafeteria LEVEL"
],
"alternateNames": ["Cafeteria LEVEL"],
"openingHours": "Mo-Fr 08:30-17:00",
"geo": {
"point": {
"type": "Point",
"coordinates": [
8.6285375,
50.1743717
]
"coordinates": [8.6285375, 50.1743717]
}
}
},
@@ -49,9 +42,7 @@
}
}
],
"categories": [
"main dish"
],
"categories": ["main dish"],
"characteristics": [
{
"name": "Rind",
@@ -80,14 +71,9 @@
"proteinContent": 6.9,
"saltContent": 3.7
},
"additives": [
"3 = mit Antioxidationsmittel",
"5 = geschwefelt"
],
"additives": ["3 = mit Antioxidationsmittel", "5 = geschwefelt"],
"name": "Pommes frites",
"categories": [
"side dish"
]
"categories": ["side dish"]
},
{
"characteristics": [
@@ -108,14 +94,9 @@
"proteinContent": 6.9,
"saltContent": 3.7
},
"additives": [
"F = Soja u. Sojaerzeugnisse"
],
"additives": ["F = Soja u. Sojaerzeugnisse"],
"name": "Glasierte Karotten",
"categories": [
"side dish",
"salad"
]
"categories": ["side dish", "salad"]
}
],
"type": "dish",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -6,12 +6,8 @@
"image": "https://backend/res/img/message_small.png",
"name": "Lösung für das Problem des Zurücksetzens der StApps-App gefunden",
"messageBody": "Wie bereits berichtet, klagten User über das Löschen ihres Stundenplans beim Update von Version 0.8.0 auf 0.8.1. Wir haben eine Lösung für das Problem gefunden und testen diese ausführlich bis zum Ende dieser Woche. Wenn alles glatt verläuft, dann kommt am Wochenende die fehlerbereinige Version 0.8.2 heraus.\n\n*(25.Okt 2016)*",
"audiences": [
"students"
],
"categories": [
"news"
],
"audiences": ["students"],
"categories": ["news"],
"sequenceIndex": 1001,
"origin": {
"indexed": "2018-09-11T12:30:00Z",

View File

@@ -1,19 +1,13 @@
{
"errorNames": [
"const"
],
"errorNames": ["const"],
"instance": {
"type": "invalid-value-in-schema",
"uid": "cdb7059c-a1a2-5229-821d-434c345e2917",
"image": "https://backend/res/img/message_small.png",
"name": "Lösung für das Problem des Zurücksetzens der StApps-App gefunden",
"messageBody": "Wie bereits berichtet, klagten User über das Löschen ihres Stundenplans beim Update von Version 0.8.0 auf 0.8.1. Wir haben eine Lösung für das Problem gefunden und testen diese ausführlich bis zum Ende dieser Woche. Wenn alles glatt verläuft, dann kommt am Wochenende die fehlerbereinige Version 0.8.2 heraus.\n\n*(25.Okt 2016)*",
"audiences": [
"students"
],
"categories": [
"news"
],
"audiences": ["students"],
"categories": ["news"],
"sequenceIndex": 1004,
"origin": {
"indexed": "2018-09-11T12:30:00Z",

View File

@@ -1,7 +1,5 @@
{
"errorNames": [
"additionalProperties"
],
"errorNames": ["additionalProperties"],
"instance": {
"type": "message",
"invalid-non-existing-key-in-schema": 1,
@@ -9,17 +7,15 @@
"image": "https://backend/res/img/message_small.png",
"name": "Lösung für das Problem des Zurücksetzens der StApps-App gefunden",
"messageBody": "Wie bereits berichtet, klagten User über das Löschen ihres Stundenplans beim Update von Version 0.8.0 auf 0.8.1. Wir haben eine Lösung für das Problem gefunden und testen diese ausführlich bis zum Ende dieser Woche. Wenn alles glatt verläuft, dann kommt am Wochenende die fehlerbereinige Version 0.8.2 heraus.\n\n*(25.Okt 2016)*",
"audiences": [
"students"
"audiences": ["students"],
"categories": ["news"],
"audienceOrganizations": [
{
"name": "TU Berlin",
"type": "organization",
"uid": "4806ef14-b631-5c20-91d1-3c627decca5a"
}
],
"categories": [
"news"
],
"audienceOrganizations": [{
"name": "TU Berlin",
"type": "organization",
"uid": "4806ef14-b631-5c20-91d1-3c627decca5a"
}],
"sequenceIndex": 1005,
"origin": {
"indexed": "2018-09-11T12:30:00Z",

View File

@@ -1,7 +1,5 @@
{
"errorNames": [
"required"
],
"errorNames": ["required"],
"instance": {
"type": "message",
"invalid-non-existing-key-in-schema": 1,
@@ -9,14 +7,14 @@
"image": "https://backend/res/img/message_small.png",
"name": "Lösung für das Problem des Zurücksetzens der StApps-App gefunden",
"messageBody": "Wie bereits berichtet, klagten User über das Löschen ihres Stundenplans beim Update von Version 0.8.0 auf 0.8.1. Wir haben eine Lösung für das Problem gefunden und testen diese ausführlich bis zum Ende dieser Woche. Wenn alles glatt verläuft, dann kommt am Wochenende die fehlerbereinige Version 0.8.2 heraus.\n\n*(25.Okt 2016)*",
"audiences": [
"students"
"audiences": ["students"],
"audienceOrganizations": [
{
"name": "TU Berlin",
"type": "organization",
"uid": "4806ef14-b631-5c20-91d1-3c627decca5a"
}
],
"audienceOrganizations": [{
"name": "TU Berlin",
"type": "organization",
"uid": "4806ef14-b631-5c20-91d1-3c627decca5a"
}],
"sequenceIndex": 1005,
"origin": {
"indexed": "2018-09-11T12:30:00Z",

View File

@@ -4,24 +4,18 @@
"type": "periodical",
"uid": "d921479e-4d35-5cd1-b64a-939cbe40a5b0",
"name": "London magazine : a review of literature and the arts",
"categories": [
"journal"
],
"categories": ["journal"],
"firstPublished": "1954",
"publications": [
{
"uid": "603a6574-8910-588a-9e83-cd26e6988c74",
"type": "publication event",
"locations": [
"London"
],
"locations": ["London"],
"publisher": "London Magazine",
"name": "London Magazine"
}
],
"ISSNs": [
"0024-6085"
],
"ISSNs": ["0024-6085"],
"sameAs": "https://ubffm.hds.hebis.de/Record/HEB046847146",
"origin": {
"indexed": "2018-09-11T12:30:00Z",

View File

@@ -3,18 +3,14 @@
"instance": {
"type": "periodical",
"uid": "c8d7a4f7-88ac-5da3-86c7-32b93d16f00a",
"name": "[Frankfurter Allgemeine \/ R F A Z FAZ Republik Heroes], Frankfurter Allgemeine : Zeitung für Deutschland, R. Rhein-Main-Zeitung : Zeitung für Frankfurt",
"categories": [
"journal"
],
"name": "[Frankfurter Allgemeine / R F A Z FAZ Republik Heroes], Frankfurter Allgemeine : Zeitung für Deutschland, R. Rhein-Main-Zeitung : Zeitung für Frankfurt",
"categories": ["journal"],
"firstPublished": "1988",
"publications": [
{
"uid": "64829217-9eea-532f-8730-7e609efffbca",
"type": "publication event",
"locations": [
"Frankfurt, M."
],
"locations": ["Frankfurt, M."],
"publisher": "Frankfurter Allg. Zeitung",
"name": "Frankfurter Allg. Zeitung"
}

View File

@@ -4,17 +4,12 @@
"uid": "f5fe4d13-d56a-5770-b16e-78782841bf02",
"name": "Validierer (UB)",
"type": "point of interest",
"categories": [
"validator"
],
"categories": ["validator"],
"description": "EG Eingangsbereich",
"geo": {
"point": {
"type": "Point",
"coordinates": [
8.653079867363,
50.120368286434
]
"coordinates": [8.653079867363, 50.120368286434]
}
},
"inPlace": {
@@ -28,75 +23,31 @@
},
"geo": {
"point": {
"coordinates": [
8.65302,
50.12036
],
"coordinates": [8.65302, 50.12036],
"type": "Point"
},
"polygon": {
"coordinates": [
[
[
8.6524924635887,
50.120309814205
],
[
8.6525192856789,
50.120423319054
],
[
8.6526641249657,
50.120426758591
],
[
8.6526963114738,
50.120547142219
],
[
8.6526480317116,
50.120554021274
],
[
8.6527070403099,
50.120839501198
],
[
8.65344196558,
50.120777590034
],
[
8.6533936858177,
50.120498988804
],
[
8.6533454060554,
50.120498988804
],
[
8.6533239483833,
50.120375165515
],
[
8.6534956097603,
50.12035796781
],
[
8.6534580588341,
50.120241023257
],
[
8.6524924635887,
50.120309814205
]
[8.6524924635887, 50.120309814205],
[8.6525192856789, 50.120423319054],
[8.6526641249657, 50.120426758591],
[8.6526963114738, 50.120547142219],
[8.6526480317116, 50.120554021274],
[8.6527070403099, 50.120839501198],
[8.65344196558, 50.120777590034],
[8.6533936858177, 50.120498988804],
[8.6533454060554, 50.120498988804],
[8.6533239483833, 50.120375165515],
[8.6534956097603, 50.12035796781],
[8.6534580588341, 50.120241023257],
[8.6524924635887, 50.120309814205]
]
],
"type": "Polygon"
}
},
"categories": [
"library"
],
"categories": ["library"],
"type": "building",
"uid": "65596790-a217-5d70-888e-16aa17bfda0a"
},

View File

@@ -4,17 +4,12 @@
"uid": "5a5ca30a-1494-5707-9692-ff902e104c12",
"name": "Drucker 1 (IG)",
"type": "point of interest",
"categories": [
"printer"
],
"categories": ["printer"],
"description": "Raum 124 (Q1) (Bibliothek BzG, EG), 1x KM Farb-Drucker",
"geo": {
"point": {
"type": "Point",
"coordinates": [
8.6657989025116,
50.125455096926
]
"coordinates": [8.6657989025116, 50.125455096926]
}
},
"inPlace": {
@@ -28,264 +23,79 @@
},
"geo": {
"point": {
"coordinates": [
8.66754,
50.12539
],
"coordinates": [8.66754, 50.12539],
"type": "Point"
},
"polygon": {
"coordinates": [
[
[
8.6657291650772,
50.125584925616
],
[
8.6659651994705,
50.125568589575
],
[
8.6659370362759,
50.125409527832
],
[
8.6663648486137,
50.125404369064
],
[
8.6663661897182,
50.125483470114
],
[
8.6665780842304,
50.125483470114
],
[
8.6665780842304,
50.125404369064
],
[
8.6670058965683,
50.125416406189
],
[
8.6669830977917,
50.125504964942
],
[
8.6671829223633,
50.125527319552
],
[
8.6671949923038,
50.125484329907
],
[
8.6672767996788,
50.125493787632
],
[
8.6672674119473,
50.125550533945
],
[
8.6672835052013,
50.125590084365
],
[
8.6673210561275,
50.125612438936
],
[
8.6673800647259,
50.125631354334
],
[
8.6674457788467,
50.12562705538
],
[
8.667494058609,
50.125610719354
],
[
8.6675289273262,
50.125578047284
],
[
8.6675503849983,
50.12552645976
],
[
8.6676281690598,
50.125540216438
],
[
8.6676093935966,
50.125587504991
],
[
8.6677998304367,
50.125621036845
],
[
8.6678387224674,
50.125534197892
],
[
8.6682437360287,
50.125637372868
],
[
8.6681927740574,
50.125707015851
],
[
8.6683765053749,
50.125763761911
],
[
8.6684314906597,
50.125691539641
],
[
8.6688230931759,
50.125829105775
],
[
8.6686930060387,
50.125961512804
],
[
8.6688874661922,
50.126038893366
],
[
8.6690349876881,
50.125889290834
],
[
8.6690711975098,
50.125852320021
],
[
8.6692562699318,
50.125660587207
],
[
8.6690685153007,
50.125582346242
],
[
8.6689116060734,
50.125738828044
],
[
8.6685039103031,
50.125591803948
],
[
8.6686179041862,
50.125439620635
],
[
8.6684314906597,
50.125383733986
],
[
8.6683201789856,
50.125530758722
],
[
8.6678843200207,
50.125420705161
],
[
8.6679527163506,
50.125253904751
],
[
8.6677622795105,
50.125222092235
],
[
8.6677542328835,
50.125234989203
],
[
8.6677099764347,
50.125231550012
],
[
8.6677341163158,
50.125143850553
],
[
8.6674189567566,
50.125101720364
],
[
8.6673907935619,
50.125191139497
],
[
8.6672754585743,
50.125179102316
],
[
8.6672808229923,
50.125161906337
],
[
8.6670783162117,
50.125139551556
],
[
8.667034059763,
50.125310651347
],
[
8.6665807664394,
50.125294315213
],
[
8.6665767431259,
50.125107738964
],
[
8.6663635075092,
50.125106019364
],
[
8.6663635075092,
50.125293455416
],
[
8.6659182608128,
50.125301193586
],
[
8.6658847332001,
50.125124934962
],
[
8.6656500399113,
50.125142130954
],
[
8.6657291650772,
50.125584925616
]
[8.6657291650772, 50.125584925616],
[8.6659651994705, 50.125568589575],
[8.6659370362759, 50.125409527832],
[8.6663648486137, 50.125404369064],
[8.6663661897182, 50.125483470114],
[8.6665780842304, 50.125483470114],
[8.6665780842304, 50.125404369064],
[8.6670058965683, 50.125416406189],
[8.6669830977917, 50.125504964942],
[8.6671829223633, 50.125527319552],
[8.6671949923038, 50.125484329907],
[8.6672767996788, 50.125493787632],
[8.6672674119473, 50.125550533945],
[8.6672835052013, 50.125590084365],
[8.6673210561275, 50.125612438936],
[8.6673800647259, 50.125631354334],
[8.6674457788467, 50.12562705538],
[8.667494058609, 50.125610719354],
[8.6675289273262, 50.125578047284],
[8.6675503849983, 50.12552645976],
[8.6676281690598, 50.125540216438],
[8.6676093935966, 50.125587504991],
[8.6677998304367, 50.125621036845],
[8.6678387224674, 50.125534197892],
[8.6682437360287, 50.125637372868],
[8.6681927740574, 50.125707015851],
[8.6683765053749, 50.125763761911],
[8.6684314906597, 50.125691539641],
[8.6688230931759, 50.125829105775],
[8.6686930060387, 50.125961512804],
[8.6688874661922, 50.126038893366],
[8.6690349876881, 50.125889290834],
[8.6690711975098, 50.125852320021],
[8.6692562699318, 50.125660587207],
[8.6690685153007, 50.125582346242],
[8.6689116060734, 50.125738828044],
[8.6685039103031, 50.125591803948],
[8.6686179041862, 50.125439620635],
[8.6684314906597, 50.125383733986],
[8.6683201789856, 50.125530758722],
[8.6678843200207, 50.125420705161],
[8.6679527163506, 50.125253904751],
[8.6677622795105, 50.125222092235],
[8.6677542328835, 50.125234989203],
[8.6677099764347, 50.125231550012],
[8.6677341163158, 50.125143850553],
[8.6674189567566, 50.125101720364],
[8.6673907935619, 50.125191139497],
[8.6672754585743, 50.125179102316],
[8.6672808229923, 50.125161906337],
[8.6670783162117, 50.125139551556],
[8.667034059763, 50.125310651347],
[8.6665807664394, 50.125294315213],
[8.6665767431259, 50.125107738964],
[8.6663635075092, 50.125106019364],
[8.6663635075092, 50.125293455416],
[8.6659182608128, 50.125301193586],
[8.6658847332001, 50.125124934962],
[8.6656500399113, 50.125142130954],
[8.6657291650772, 50.125584925616]
]
],
"type": "Polygon"
}
},
"type": "building",
"categories": [
"education"
],
"categories": ["education"],
"uid": "a825451c-cbc4-544a-9d96-9de0b635fdbd"
},
"origin": {

View File

@@ -4,20 +4,13 @@
"geo": {
"point": {
"type": "Point",
"coordinates": [
13.32615,
52.51345
]
"coordinates": [13.32615, 52.51345]
}
},
"type": "room",
"categories": [
"cafe"
],
"categories": ["cafe"],
"uid": "b7206fb5-bd77-5572-928f-16aa70910f64",
"alternateNames": [
"MA Mathe Cafeteria"
],
"alternateNames": ["MA Mathe Cafeteria"],
"name": "Mathe Cafeteria",
"address": {
"addressCountry": "Germany",

View File

@@ -4,20 +4,13 @@
"geo": {
"point": {
"type": "Point",
"coordinates": [
13.3306966,
52.5104675
]
"coordinates": [13.3306966, 52.5104675]
}
},
"type": "room",
"categories": [
"library"
],
"categories": ["library"],
"uid": "6e5abbff-d995-507b-982b-e0d094da6606",
"alternateNames": [
"BIB"
],
"alternateNames": ["BIB"],
"name": "Universitätsbibliothek",
"floorName": "0",
"origin": {

View File

@@ -4,172 +4,64 @@
"geo": {
"point": {
"type": "Point",
"coordinates": [
13.3262843,
52.5135435
]
"coordinates": [13.3262843, 52.5135435]
}
},
"description": "loses Mobiliar im Foyer",
"type": "room",
"categories": [
"learn"
],
"categories": ["learn"],
"uid": "d33fa478-7e5d-5197-9f0e-091f7f8105df",
"name": "MA Foyer",
"inPlace": {
"geo": {
"point": {
"type": "Point",
"coordinates": [
13.32577,
52.51398
]
"coordinates": [13.32577, 52.51398]
},
"polygon": {
"type": "Polygon",
"coordinates": [
[
[
13.3259988,
52.5141108
],
[
13.3259718,
52.5143107
],
[
13.3262958,
52.5143236
],
[
13.3263291,
52.5143052
],
[
13.3263688,
52.5140098
],
[
13.3264324,
52.5139643
],
[
13.3264849,
52.5139415
],
[
13.3265148,
52.5139004
],
[
13.3265336,
52.5138571
],
[
13.3265411,
52.5137933
],
[
13.3265336,
52.5137546
],
[
13.3264961,
52.5137044
],
[
13.3264399,
52.5136725
],
[
13.3263875,
52.5136497
],
[
13.3263351,
52.5136429
],
[
13.3263613,
52.5134286
],
[
13.3262564,
52.5133603
],
[
13.3260767,
52.5133671
],
[
13.3259418,
52.5134286
],
[
13.3258744,
52.5135061
],
[
13.3258444,
52.5135677
],
[
13.3261366,
52.5135836
],
[
13.3261066,
52.513807
],
[
13.3260579,
52.5138047
],
[
13.3260317,
52.5139096
],
[
13.3254137,
52.5138708
],
[
13.3254287,
52.5137819
],
[
13.3250879,
52.513766
],
[
13.3250018,
52.5142697
],
[
13.3253613,
52.5142902
],
[
13.3253838,
52.5140747
],
[
13.3259988,
52.5141108
]
[13.3259988, 52.5141108],
[13.3259718, 52.5143107],
[13.3262958, 52.5143236],
[13.3263291, 52.5143052],
[13.3263688, 52.5140098],
[13.3264324, 52.5139643],
[13.3264849, 52.5139415],
[13.3265148, 52.5139004],
[13.3265336, 52.5138571],
[13.3265411, 52.5137933],
[13.3265336, 52.5137546],
[13.3264961, 52.5137044],
[13.3264399, 52.5136725],
[13.3263875, 52.5136497],
[13.3263351, 52.5136429],
[13.3263613, 52.5134286],
[13.3262564, 52.5133603],
[13.3260767, 52.5133671],
[13.3259418, 52.5134286],
[13.3258744, 52.5135061],
[13.3258444, 52.5135677],
[13.3261366, 52.5135836],
[13.3261066, 52.513807],
[13.3260579, 52.5138047],
[13.3260317, 52.5139096],
[13.3254137, 52.5138708],
[13.3254287, 52.5137819],
[13.3250879, 52.513766],
[13.3250018, 52.5142697],
[13.3253613, 52.5142902],
[13.3253838, 52.5140747],
[13.3259988, 52.5141108]
]
]
}
},
"type": "building",
"categories": [
"education"
],
"categories": ["education"],
"name": "Mathematikgebäude",
"alternateNames": [
"MA"
],
"alternateNames": ["MA"],
"uid": "edfaba58-254f-5da0-82d6-3b46a76c48ce",
"address": {
"addressCountry": "Germany",

View File

@@ -4,18 +4,12 @@
"uid": "ea9db087-240b-5b10-a65b-9684d88a3e4e",
"name": "Poolraum (HoF)",
"type": "room",
"categories": [
"computer",
"learn"
],
"categories": ["computer", "learn"],
"description": "1. OG, Raum 1.29, 18 Plätze, rollstuhlgerecht, Montag bis Freitag von 8:00 bis 20:00 Uhr",
"geo": {
"point": {
"type": "Point",
"coordinates": [
8.6654716730118,
50.127288142239
]
"coordinates": [8.6654716730118, 50.127288142239]
}
},
"inPlace": {
@@ -29,43 +23,23 @@
},
"geo": {
"point": {
"coordinates": [
8.66521,
50.12715
],
"coordinates": [8.66521, 50.12715],
"type": "Point"
},
"polygon": {
"coordinates": [
[
[
8.6646019667387,
50.127282983673
],
[
8.6655273288488,
50.127413667164
],
[
8.6656533926725,
50.127055146471
],
[
8.6647307127714,
50.126922742467
],
[
8.6646019667387,
50.127282983673
]
[8.6646019667387, 50.127282983673],
[8.6655273288488, 50.127413667164],
[8.6656533926725, 50.127055146471],
[8.6647307127714, 50.126922742467],
[8.6646019667387, 50.127282983673]
]
],
"type": "Polygon"
}
},
"categories": [
"education"
],
"categories": ["education"],
"type": "building",
"uid": "583b4bd4-d7b7-5736-b2df-87e05c41d97a"
},

View File

@@ -5,9 +5,7 @@
"type": "semester",
"name": "Wintersemester 2017/2018",
"acronym": "WS 2017/18",
"alternateNames": [
"WiSe 2017/18"
],
"alternateNames": ["WiSe 2017/18"],
"startDate": "2017-10-01",
"endDate": "2018-03-31",
"origin": {

View File

@@ -5,9 +5,7 @@
"type": "semester",
"name": "Sommersemester 2018",
"acronym": "SoSe 2018",
"alternateNames": [
"Sommer 2018"
],
"alternateNames": ["Sommer 2018"],
"startDate": "2018-04-01",
"endDate": "2018-09-30",
"eventsStartDate": "2018-04-09",

View File

@@ -10,21 +10,14 @@
"geo": {
"point": {
"type": "Point",
"coordinates": [
13.3255622,
52.5118668
]
"coordinates": [13.3255622, 52.5118668]
}
},
"type": "room",
"categories": [
"office"
],
"categories": ["office"],
"openingHours": "Mo-Fr 09:30-12:30; Tu 13:00-16:00; We off",
"uid": "7257a1d7-47ac-4acc-a8cc-3f9ac6442e5d",
"alternateNames": [
"H 0010"
],
"alternateNames": ["H 0010"],
"name": "Prüfungsamt - Team 2",
"floorName": "0"
},

View File

@@ -23,10 +23,7 @@
},
{
"type": "tooltip",
"element": [
"#stapps-home-add-widgets",
"#stapps-home-personalize"
],
"element": ["#stapps-home-add-widgets", "#stapps-home-personalize"],
"text": "Öffne die Widget-Auswahl.",
"resolved": {
"element": "ion-modal-view.active"

View File

@@ -26,9 +26,7 @@
}
],
"duration": "PT9M57S",
"thumbnails": [
"https://peach.blender.org/wp-content/uploads/bbb-splash.png?x11217"
],
"thumbnails": ["https://peach.blender.org/wp-content/uploads/bbb-splash.png?x11217"],
"actors": [
{
"type": "person",

View File

@@ -12,10 +12,10 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {expect} from 'chai';
import {slow, suite, test, timeout} from '@testdeck/mocha';
import {SCBulkRoute} from '../src/protocol/routes/bulk-request';
import {expect} from 'chai';
import {SCBulkAddRoute} from '../src/protocol/routes/bulk-add';
import {SCBulkRoute} from '../src/protocol/routes/bulk-request';
import {SCThingUpdateRoute} from '../src/protocol/routes/thing-update';
@suite(timeout(10000), slow(5000))
@@ -24,9 +24,11 @@ export class RoutesSpec {
public bulkAddRouteUrlPath() {
const bulkAddRoute = new SCBulkAddRoute();
expect(bulkAddRoute.getUrlPath({
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
})).to.equal('/bulk/540862f3-ea30-5b8f-8678-56b4dc217140');
expect(
bulkAddRoute.getUrlPath({
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
}),
).to.equal('/bulk/540862f3-ea30-5b8f-8678-56b4dc217140');
}
@test
@@ -40,10 +42,12 @@ export class RoutesSpec {
public thingUpdateRouteUrlPath() {
const thingUpdateRoute = new SCThingUpdateRoute();
expect(thingUpdateRoute.getUrlPath({
TYPE: 'dish',
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
})).to.equal('/dish/540862f3-ea30-5b8f-8678-56b4dc217140');
expect(
thingUpdateRoute.getUrlPath({
TYPE: 'dish',
UID: '540862f3-ea30-5b8f-8678-56b4dc217140',
}),
).to.equal('/dish/540862f3-ea30-5b8f-8678-56b4dc217140');
}
@test
@@ -72,6 +76,6 @@ export class RoutesSpec {
});
};
expect(fn).to.throw('Parameter \'TYPE\' not provided.');
expect(fn).to.throw("Parameter 'TYPE' not provided.");
}
}

View File

@@ -9,13 +9,13 @@ export class SchemaSpec {
@test
async 'validate against test files'() {
const errorsPerFile = {
...await validateFiles(resolve('lib', 'schema'), resolve('test', 'resources')),
...await validateFiles(resolve('lib', 'schema'), resolve('test', 'resources', 'indexable')),
...(await validateFiles(resolve('lib', 'schema'), resolve('test', 'resources'))),
...(await validateFiles(resolve('lib', 'schema'), resolve('test', 'resources', 'indexable'))),
};
let unexpected = false;
Object.keys(errorsPerFile).forEach((file) => {
unexpected = unexpected || errorsPerFile[file].some((error) => !error.expected);
Object.keys(errorsPerFile).forEach(file => {
unexpected = unexpected || errorsPerFile[file].some(error => !error.expected);
});
mkdirSync('report', {

View File

@@ -12,10 +12,10 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {slow, suite, test, timeout} from '@testdeck/mocha';
import {expect} from 'chai';
import clone from 'rfdc';
import {slow, suite, test, timeout} from '@testdeck/mocha';
import {SCThingOriginType, SCThingType, SCThingRemoteOrigin} from '../src/things/abstract/thing';
import {SCThingOriginType, SCThingRemoteOrigin, SCThingType} from '../src/things/abstract/thing';
import {SCBuildingWithoutReferences} from '../src/things/building';
import {SCDish, SCDishMeta} from '../src/things/dish';
import {SCSetting, SCSettingInputType} from '../src/things/setting';
@@ -51,7 +51,6 @@ const building: SCBuildingWithoutReferences = {
},
type: SCThingType.Building,
uid: '540862f3-ea30-5b8f-8678-56b4dc217140',
};
const dish: SCDish = {
@@ -129,20 +128,25 @@ export class TranslationSpecInplace {
public directStringProperty() {
expect(translator.translatedAccess(dish).name()).to.equal('de-dish-name');
expect(translatedThingDE.name).to.equal('de-dish-name');
}
@test
public directArrayOfString() {
expect(translator.translatedAccess(dish).characteristics()).to.deep
.equal([{name: 'de-characteristic0'}, {name: 'de-characteristic1'}]);
expect(translatedThingDE.characteristics).to.deep
.equal([{name: 'de-characteristic0'}, {name: 'de-characteristic1'}]);
expect(translator.translatedAccess(dish).characteristics()).to.deep.equal([
{name: 'de-characteristic0'},
{name: 'de-characteristic1'},
]);
expect(translatedThingDE.characteristics).to.deep.equal([
{name: 'de-characteristic0'},
{name: 'de-characteristic1'},
]);
}
@test
public directArrayOfStringSubscript() {
expect(translator.translatedAccess(dish).characteristics[1]()).to.deep.equal({name: 'de-characteristic1'});
expect(translator.translatedAccess(dish).characteristics[1]()).to.deep.equal({
name: 'de-characteristic1',
});
expect(translatedThingDE.characteristics![1]).to.deep.equal({name: 'de-characteristic1'});
}
@@ -172,7 +176,10 @@ export class TranslationSpecInplace {
@test
public nestedMetaArrayOfString() {
expect(translator.translatedAccess(dish).offers[0].inPlace.categories()).to.deep.equal(['Büro', 'Bildung']);
expect(translator.translatedAccess(dish).offers[0].inPlace.categories()).to.deep.equal([
'Büro',
'Bildung',
]);
expect(translatedThingDE.offers![0].inPlace!.categories).to.deep.equal(['Büro', 'Bildung']);
}
@@ -192,20 +199,22 @@ export class TranslationSpecInplace {
public directStringPropertyFallback() {
expect(translatorWithFallback.translatedAccess(dish).name()).to.equal('base-dish-name');
expect(translatedThingFallback.name).to.equal('base-dish-name');
}
@test
public directArrayOfStringSubscriptFallback() {
expect(translatorWithFallback.translatedAccess(dish).characteristics[1]())
.to.deep.equal({name: 'base-characteristic1'});
expect(translatedThingFallback.characteristics![1])
.to.deep.equal({name: 'base-characteristic1'});
expect(translatorWithFallback.translatedAccess(dish).characteristics[1]()).to.deep.equal({
name: 'base-characteristic1',
});
expect(translatedThingFallback.characteristics![1]).to.deep.equal({name: 'base-characteristic1'});
}
@test
public directMetaArrayOfStringFallback() {
expect(translatorWithFallback.translatedAccess(dish).categories()).to.deep.equal(['main dish', 'dessert']);
expect(translatorWithFallback.translatedAccess(dish).categories()).to.deep.equal([
'main dish',
'dessert',
]);
expect(translatedThingFallback.categories).to.deep.equal(['main dish', 'dessert']);
}
@@ -223,21 +232,26 @@ export class TranslationSpecInplace {
@test
public nestedStringPropertyFallback() {
expect(translatorWithFallback.translatedAccess(dish).offers[0].inPlace.name()).to.equal('base-space-name');
expect(translatorWithFallback.translatedAccess(dish).offers[0].inPlace.name()).to.equal(
'base-space-name',
);
expect(translatedThingFallback.offers![0].inPlace!.name).to.equal('base-space-name');
}
@test
public nestedMetaArrayOfStringFallback() {
expect(translatorWithFallback.translatedAccess(dish).offers[0].inPlace.categories())
.to.deep.equal(['office', 'education']);
expect(translatedThingFallback.offers![0].inPlace!.categories)
.to.deep.equal(['office', 'education']);
expect(translatorWithFallback.translatedAccess(dish).offers[0].inPlace.categories()).to.deep.equal([
'office',
'education',
]);
expect(translatedThingFallback.offers![0].inPlace!.categories).to.deep.equal(['office', 'education']);
}
@test
public nestedMetaArrayOfStringSubscriptFallback() {
expect(translatorWithFallback.translatedAccess(dish).offers[0].inPlace.categories[1]()).to.equal('education');
expect(translatorWithFallback.translatedAccess(dish).offers[0].inPlace.categories[1]()).to.equal(
'education',
);
expect(translatedThingFallback.offers![0].inPlace!.categories[1]).to.equal('education');
}
@@ -250,8 +264,12 @@ export class TranslationSpecInplace {
@test
public nestedMetaArrayOfStringSubscriptUndefined() {
const workingTranslation = eval('translator.translatedAccess(dish).offers[0].inPlace.categories[1](\'printer\');');
const defaultValueTranslation = eval('translator.translatedAccess(dish).offers[0].inPlace.categories[1234](\'printer\');');
const workingTranslation = eval(
"translator.translatedAccess(dish).offers[0].inPlace.categories[1]('printer');",
);
const defaultValueTranslation = eval(
"translator.translatedAccess(dish).offers[0].inPlace.categories[1234]('printer');",
);
expect(defaultValueTranslation).to.equal('printer');
expect(workingTranslation).to.not.equal('printer');
@@ -293,7 +311,6 @@ export class TranslationSpecInplace {
@suite(timeout(10000), slow(5000))
export class MetaTranslationSpec {
@test
public consistencyWithMetaClass() {
const dishMetaTranslationsDE = translator.translatedPropertyNames(dish.type);

View File

@@ -29,8 +29,10 @@ import {SCFavorite, SCFavoriteWithoutReferences} from '../src/things/favorite';
import {SCFloor, SCFloorWithoutReferences} from '../src/things/floor';
import {SCMessage, SCMessageWithoutReferences} from '../src/things/message';
import {SCOrganization, SCOrganizationWithoutReferences} from '../src/things/organization';
import {SCPeriodical, SCPeriodicalWithoutReferences} from '../src/things/periodical';
import {SCPerson, SCPersonWithoutReferences} from '../src/things/person';
import {SCPointOfInterest, SCPointOfInterestWithoutReferences} from '../src/things/point-of-interest';
import {SCPublicationEvent, SCPublicationEventWithoutReferences} from '../src/things/publication-event';
import {SCRoom, SCRoomWithoutReferences} from '../src/things/room';
import {SCSemester, SCSemesterWithoutReferences} from '../src/things/semester';
import {SCSetting, SCSettingWithoutReferences} from '../src/things/setting';
@@ -40,8 +42,6 @@ import {SCTicket, SCTicketWithoutReferences} from '../src/things/ticket';
import {SCToDo, SCToDoWithoutReferences} from '../src/things/todo';
import {SCTour, SCTourWithoutReferences} from '../src/things/tour';
import {SCVideo, SCVideoWithoutReferences} from '../src/things/video';
import {SCPeriodical, SCPeriodicalWithoutReferences} from '../src/things/periodical';
import {SCPublicationEvent, SCPublicationEventWithoutReferences} from '../src/things/publication-event';
/**
* Check if E extends T
@@ -51,10 +51,13 @@ type Extends<E, T> = E extends T ? true : false;
/**
* Get type of array elements up to nesting level 3
*/
type ElementType<T> = T extends any[] ?
(T[0] extends any[] ?
(T[0][0] extends any[] ?
T[0][0][0] : T[0][0]) : T[0]) : T;
type ElementType<T> = T extends any[]
? T[0] extends any[]
? T[0][0] extends any[]
? T[0][0][0]
: T[0][0]
: T[0]
: T;
/**
* Get types of properties
@@ -62,15 +65,17 @@ type ElementType<T> = T extends any[] ?
* - Extracts only the properties which extend object and are not any.
* - If type is an array it returns the type of the elements.
*/
type PropertyTypes<T> = Extract<ElementType<T extends object ?
(IsAny<T[keyof T]> extends true ?
never : T[keyof T]) : never>
, object>;
type PropertyTypes<T> = Extract<
ElementType<T extends object ? (IsAny<T[keyof T]> extends true ? never : T[keyof T]) : never>,
object
>;
/**
* Get nested property types
*/
type PropertyTypesNested<T> = PropertyTypes<T> extends object ? PropertyTypes<PropertyTypes<T>> : PropertyTypes<T>;
type PropertyTypesNested<T> = PropertyTypes<T> extends object
? PropertyTypes<PropertyTypes<T>>
: PropertyTypes<T>;
/**
* Types of properties of SCDiff
@@ -108,13 +113,13 @@ assert<Extends<SCArticle, SCThing>>(true);
/**
* Types of properties of SCAssessment
*/
type SCAssessmentPropertyTypes = PropertyTypesNested<SCAssessment>;
assert<NotHas<SCAssessmentPropertyTypes, SCThingWithoutReferences>>(false);
assert<Has<SCAssessmentPropertyTypes, SCThingWithoutReferences>>(true);
assert<NotHas<SCAssessmentPropertyTypes, SCThing>>(true);
assert<Has<SCAssessmentPropertyTypes, SCThing>>(false);
assert<Extends<SCAssessmentWithoutReferences, SCThing>>(false);
assert<Extends<SCAssessment, SCThing>>(true);
type SCAssessmentPropertyTypes = PropertyTypesNested<SCAssessment>;
assert<NotHas<SCAssessmentPropertyTypes, SCThingWithoutReferences>>(false);
assert<Has<SCAssessmentPropertyTypes, SCThingWithoutReferences>>(true);
assert<NotHas<SCAssessmentPropertyTypes, SCThing>>(true);
assert<Has<SCAssessmentPropertyTypes, SCThing>>(false);
assert<Extends<SCAssessmentWithoutReferences, SCThing>>(false);
assert<Extends<SCAssessment, SCThing>>(true);
/**
* Types of properties of SCBook