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

jsonld: make more functions "private"

parent 3b0f8b7c
No related branches found
No related tags found
No related merge requests found
Pipeline #18250 failed
...@@ -106,18 +106,18 @@ export default class JSONLD { ...@@ -106,18 +106,18 @@ export default class JSONLD {
} }
if (docXhr.status === 200) { if (docXhr.status === 200) {
JSONLD.gatherEntities(docXhr, apiUrl, entryPoints); JSONLD._gatherEntities(docXhr, apiUrl, entryPoints);
} else { } else {
JSONLD.executeFailureFunctions(apiUrl, i18n.t('jsonld.api-documentation-server', {apiUrl: apiDocUrl})); JSONLD._executeFailureFunctions(apiUrl, i18n.t('jsonld.api-documentation-server', {apiUrl: apiDocUrl}));
} }
}; };
docXhr.send(); docXhr.send();
} else { } else {
JSONLD.executeFailureFunctions(apiUrl, i18n.t('jsonld.error-hydra-documentation-url-not-set', {apiUrl: apiUrl})); JSONLD._executeFailureFunctions(apiUrl, i18n.t('jsonld.error-hydra-documentation-url-not-set', {apiUrl: apiUrl}));
} }
} else { } else {
JSONLD.executeFailureFunctions(apiUrl, i18n.t('jsonld.error-api-server', {apiUrl: apiUrl})); JSONLD._executeFailureFunctions(apiUrl, i18n.t('jsonld.error-api-server', {apiUrl: apiUrl}));
} }
}; };
...@@ -131,7 +131,7 @@ export default class JSONLD { ...@@ -131,7 +131,7 @@ export default class JSONLD {
* @param apiUrl * @param apiUrl
* @param entryPoints * @param entryPoints
*/ */
static gatherEntities(docXhr, apiUrl, entryPoints) { static _gatherEntities(docXhr, apiUrl, entryPoints) {
const json = JSON.parse(docXhr.responseText); const json = JSON.parse(docXhr.responseText);
const supportedClasses = json["hydra:supportedClass"]; const supportedClasses = json["hydra:supportedClass"];
...@@ -169,7 +169,7 @@ export default class JSONLD { ...@@ -169,7 +169,7 @@ export default class JSONLD {
* @param apiUrl * @param apiUrl
* @param message * @param message
*/ */
static executeFailureFunctions(apiUrl, message = "") { static _executeFailureFunctions(apiUrl, message = "") {
if (JSONLD.failureFunctions[apiUrl] !== undefined) { if (JSONLD.failureFunctions[apiUrl] !== undefined) {
for (const fnc of JSONLD.failureFunctions[apiUrl]) { for (const fnc of JSONLD.failureFunctions[apiUrl]) {
if (typeof fnc == 'function') { if (typeof fnc == 'function') {
......
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