From a8ab1f7220f86eea76e5f601c080da066496f7df Mon Sep 17 00:00:00 2001 From: Christoph Reiter <reiter.christoph@gmail.com> Date: Tue, 23 Mar 2021 13:24:20 +0100 Subject: [PATCH] jsonld: make more functions "private" --- packages/common/jsonld.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/common/jsonld.js b/packages/common/jsonld.js index f56552b0..0a27bbfd 100644 --- a/packages/common/jsonld.js +++ b/packages/common/jsonld.js @@ -106,18 +106,18 @@ export default class JSONLD { } if (docXhr.status === 200) { - JSONLD.gatherEntities(docXhr, apiUrl, entryPoints); + JSONLD._gatherEntities(docXhr, apiUrl, entryPoints); } 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(); } 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 { - 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 { * @param apiUrl * @param entryPoints */ - static gatherEntities(docXhr, apiUrl, entryPoints) { + static _gatherEntities(docXhr, apiUrl, entryPoints) { const json = JSON.parse(docXhr.responseText); const supportedClasses = json["hydra:supportedClass"]; @@ -169,7 +169,7 @@ export default class JSONLD { * @param apiUrl * @param message */ - static executeFailureFunctions(apiUrl, message = "") { + static _executeFailureFunctions(apiUrl, message = "") { if (JSONLD.failureFunctions[apiUrl] !== undefined) { for (const fnc of JSONLD.failureFunctions[apiUrl]) { if (typeof fnc == 'function') { -- GitLab