Skip to content
Snippets Groups Projects
Commit cbb77e77 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Remove getApiUrlForIdentifier()

Since it's not clear if IRIs should be unique in the API (also with subclasses etc)
just stop usingn them for now, to avoid name ID clashes.
parent 2348798b
No related branches found
No related tags found
No related merge requests found
Pipeline #88608 failed
......@@ -147,8 +147,7 @@ export class CheckInPlaceSelect extends ScopedElementsMixin(AdapterLitElement) {
}
// find the correct api url for a checkInPlace
const apiUrl = this.jsonld.getApiUrlForIdentifier('http://schema.org/Place');
// const apiUrl = this.jsonld.getApiUrlForEntityName("CheckInPlace");
const apiUrl = this.jsonld.getApiUrlForEntityName("CheckinPlace");
if (this.$select === null) {
return false;
......
......@@ -208,16 +208,6 @@ export default class JSONLD {
return this.entities[entityName];
}
getApiUrlForIdentifier(identifier) {
const entity = this.getEntityForIdentifier(identifier);
if (entity === undefined || entity['@entryPoint'] === undefined) {
throw new Error(`Entity with identifier "${identifier}" not found!`);
}
return entity['@entryPoint'];
}
getApiUrlForEntityName(entityName) {
const entity = this.getEntityForEntityName(entityName);
......
......@@ -148,8 +148,7 @@ export class PersonSelect extends ScopedElementsMixin(AdapterLitElement) {
}
// find the correct api url for a person
const apiUrl = this.jsonld.getApiUrlForIdentifier('http://schema.org/Person');
// const apiUrl = this.jsonld.getApiUrlForEntityName("Event");
const apiUrl = this.jsonld.getApiUrlForEntityName("BasePerson");
if (this.$select === null) {
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment