graphdb-workbench 2.0.2 → 2.1.0-TR1

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.
Files changed (60) hide show
  1. package/dist/{0.55459f1b86b8bff8d22d.bundle.js → 0.509486bd2d198aadcb58.bundle.js} +2 -2
  2. package/dist/{0.55459f1b86b8bff8d22d.bundle.js.map → 0.509486bd2d198aadcb58.bundle.js.map} +1 -1
  3. package/dist/{11.3957302d7a301df30dd1.bundle.js → 11.3226313f4ba4bcfcab20.bundle.js} +2 -2
  4. package/dist/11.3226313f4ba4bcfcab20.bundle.js.map +1 -0
  5. package/dist/120.80843604737b7c260788.bundle.js +1 -1
  6. package/dist/120.80843604737b7c260788.bundle.js.map +1 -1
  7. package/dist/18.44723ea06155c72f46ae.bundle.js +1 -1
  8. package/dist/18.44723ea06155c72f46ae.bundle.js.map +1 -1
  9. package/dist/{2.6e340067f6eae14345cd.bundle.js → 2.06776cce6f6f06446892.bundle.js} +2 -2
  10. package/dist/2.06776cce6f6f06446892.bundle.js.map +1 -0
  11. package/dist/25.9e0925889b3a3f79c7fe.bundle.js +1 -1
  12. package/dist/25.9e0925889b3a3f79c7fe.bundle.js.map +1 -1
  13. package/dist/29.9bdb27c21d6eacac1341.bundle.js +1 -1
  14. package/dist/29.9bdb27c21d6eacac1341.bundle.js.map +1 -1
  15. package/dist/30.34b74ada583b1b0af913.bundle.js +1 -1
  16. package/dist/30.34b74ada583b1b0af913.bundle.js.map +1 -1
  17. package/dist/{48.f047a5ea62690543f8ad.bundle.js → 48.04d55156d377a26fda5b.bundle.js} +2 -2
  18. package/dist/48.04d55156d377a26fda5b.bundle.js.map +1 -0
  19. package/dist/68.e25480b7770a679a9654.bundle.js +1 -1
  20. package/dist/68.e25480b7770a679a9654.bundle.js.map +1 -1
  21. package/dist/8.d3360e2712bf75fc617a.bundle.js +3 -0
  22. package/dist/8.d3360e2712bf75fc617a.bundle.js.map +1 -0
  23. package/dist/{bundle.7d5dd8e4d7cb8ed01086.bundle.js → bundle.9458c8d0f00f7c08da89.bundle.js} +3 -3
  24. package/dist/bundle.9458c8d0f00f7c08da89.bundle.js.map +1 -0
  25. package/dist/index.html +3 -3
  26. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  27. package/dist/pages/autocomplete.html +1 -1
  28. package/dist/pages/choose-repository-type.html +1 -1
  29. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  30. package/dist/pages/create-index.html +4 -4
  31. package/dist/pages/dependencies.html +1 -1
  32. package/dist/pages/domainRangeInfo.html +2 -2
  33. package/dist/pages/edit.html +1 -1
  34. package/dist/pages/explore.html +3 -7
  35. package/dist/pages/export.html +1 -1
  36. package/dist/pages/find.html +1 -1
  37. package/dist/pages/graph-config/saveGraphConfig.html +11 -11
  38. package/dist/pages/graphs-visualizations.html +7 -7
  39. package/dist/pages/import.html +1 -1
  40. package/dist/pages/jdbc-create.html +5 -5
  41. package/dist/pages/monitor/queries.html +1 -1
  42. package/dist/pages/monitor/resources.html +2 -2
  43. package/dist/pages/namespaces.html +2 -2
  44. package/dist/pages/plugins.html +1 -1
  45. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  46. package/dist/pages/rdfrank.html +2 -2
  47. package/dist/pages/repositories.html +2 -2
  48. package/dist/pages/repository.html +2 -2
  49. package/dist/pages/similarity-indexes.html +1 -1
  50. package/dist/pages/sparql-template-create.html +5 -5
  51. package/dist/pages/sparql.html +4 -4
  52. package/dist/pages/webapi.html +2 -2
  53. package/dist/res/swagger/index.html +27 -27
  54. package/package.json +1 -1
  55. package/dist/11.3957302d7a301df30dd1.bundle.js.map +0 -1
  56. package/dist/2.6e340067f6eae14345cd.bundle.js.map +0 -1
  57. package/dist/48.f047a5ea62690543f8ad.bundle.js.map +0 -1
  58. package/dist/8.5abe78e9d72cdbc2607f.bundle.js +0 -3
  59. package/dist/8.5abe78e9d72cdbc2607f.bundle.js.map +0 -1
  60. package/dist/bundle.7d5dd8e4d7cb8ed01086.bundle.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///./src/js/angular/core/directives/queryeditor/query-editor.controller.js"],"names":["QueryEditorCtrl","$scope","$timeout","toastr","$repositories","$modal","ModalService","SparqlRestService","$filter","$window","$jwtAuth","RDF4JRepositoriesRestService","MonitoringRestService","LocalStorageAdapter","LSKeys","$translate","defaultTabConfig","id","name","query","inference","sameAs","principal","checkQueryIntervalId","saveQueryToLocal","currentQueryTab","isActiveRepoOntopType","sameAsBtn","document","getElementById","currentQuery","disabled","removeAttribute","appSettings","DEFAULT_SAMEAS","shouldDisableSameAs","tabs","forEach","tab","index","set","TABS_STATE","setLoader","isRunning","progressMessage","extraMessage","noTimer","yasrInnerContainer","angular","element","queryIsRunning","queryStartTime","Date","now","countTimeouted","noLoaderTimer","addClass","currentTrackAlias","abortRequested","removeClass","$$phase","$apply","fixSizesOnHorizontalViewModeSwitch","verticalView","visibleWindowHeight","window","innerHeight","documentElement","clientHeight","body","orientationViewMode","viewMode","newHeight","querySelector","getBoundingClientRect","style","height","noPadding","minHeight","paddingRight","paddingLeft","editor","timer","$on","cancel","yasr","container","resize","showHideEditor","deleteCachedSparqlResults","foo","params","newRepo","tabsData","get","item","yasrData","undefined","queryType","resultsCount","allResultsCount","sizeDelta","errorMessage","repositoryError","selectTab","$","runQuery","changePage","explain","executedQueryTab","getQueryType","warning","instant","explainRequested","currentTabConfig","resetCurrentTabConfig","lastRunQueryMode","getQueryMode","toggleSampleQueries","showSampleQueries","getSavedQueries","success","data","sampleQueries","collapse","width","error","msg","getError","getExistingTabId","existingTabId","showModal","modalSelector","shared","savedQuery","getValue","modal","findTabIndexByID","i","length","getPrincipal","then","response","scope","DEFAULT_INFERENCE","skipCountQuery","EXECUTE_COUNT","ignoreSharedQueries","IGNORE_SHARED_QUERIES","$watchCollection","newVal","oldVal","initTabs","this","hint","createElement","innerHTML","fontSize","color","backgroundColor","position","zIndex","$watch","newValue","elRect","appendChild","top","left","right","offsetWidth","parentNode","removeChild","pageSize","page","queryExists","saveTab","idx","loadTab","setValue","updateDownloadDropdown","$broadcast","options","output","outputType","customError","results","getException","setYasrResponse","textStatus","jqXhrOrErrorString","hasClass","click","TABS_STATE_CURRENT_ID","offset","allResultsCountExact","timeFinished","timeTook","customUpdateMessage","warningMessage","css","setInterval","showOrHideSaveAsDropDown","isOntop","isFedX","isActiveRepoFedXType","inferenceBtn","handleSameAsAndInferenceBtns","nocount","overrideSameAsInferenceAndNoCountIfNeeded","addNewTab","callback","tabName","isTabChangeOk","maxID","newID","newTab","push","TABS_STATE_MAXID","callbackArgs","Array","prototype","slice","call","arguments","apply","abortCurrentQuery","abortQueryByAlias","editQuery","open","templateUrl","controller","resolve","title","edit","okButtonText","result","queryModal","addNewSavedQuery","deleteQueryHttp","editSavedQuery","getNamespaces","namespacesLoading","getRepositoryNamespaces","usedPrefixes","bindings","e","prefix","value","namespace","namespaces","finally","changePagination","addKnownPrefixes","JSON","stringify","isDefined","querySelected","tabId","highlightNextTabChange","deleteQuery","savedQueryName","openSimpleModal","message","deleteSavedQuery","saveQuery","existingQueryErrMsg","saveQueryHttp","getLoaderMessage","timeSeconds","timeHuman","getHumanReadableSeconds","changeViewMode","VIEW_MODE","focusQueryEditor","find","is","focus","getActiveRepository","getActiveRepositoryNoError","onbeforeunload","clearInterval","mouseup","event","target","has","getQueryID","attr","$saveAsDropDown","queryValid","header","remove","isNew","info","tabEvent","relatedTarget","colors","times","highlightFun","editQueryModal","deleteQueryModal","saveQueryModal","getResultsDescription","desc","currentPageEnd","Math","min","getUpdateDescription","abs","getStaleWarningMessage","secondsAgo","round","bind","unbind","QuerySampleModalCtrl","$modalInstance","$sce","copy","trustAsHtml","ok","form","$valid","close","dismiss","module","$inject"],"mappings":"0FAAA,6BAcA,SAASA,EAAgBC,EAAQC,EAAUC,EAAQC,EAAeC,EAAQC,EAAcC,EAAmBC,EAASC,EAASC,EAAUC,EAA8BC,EAAuBC,EAAqBC,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W,kBAAmBtO,GAC9BsO,WAAW,uBAAwBmF,GAExCzT,EAAgBoU,QAAU,CAAC,SAAU,WAAY,SAAU,gBAAiB,SAAU,eAAgB,oBAAqB,UAAW,UAAW,WAAY,+BAAgC,wBAAyB,sBAAuB,SAAU,cAu5BvPX,EAAqBW,QAAU,CAAC,SAAU,iBAAkB,OAAQ","file":"48.f047a5ea62690543f8ad.bundle.js","sourcesContent":["import 'angular/utils/local-storage-adapter';\nimport 'angular/rest/sparql.rest.service';\nimport {decodeHTML} from \"../../../../../app\";\n\nangular\n .module('graphdb.framework.core.directives.queryeditor.controllers', [\n 'graphdb.framework.utils.localstorageadapter',\n 'graphdb.framework.rest.sparql.service'\n ])\n .controller('QueryEditorCtrl', QueryEditorCtrl)\n .controller('QuerySampleModalCtrl', QuerySampleModalCtrl);\n\nQueryEditorCtrl.$inject = ['$scope', '$timeout', 'toastr', '$repositories', '$modal', 'ModalService', 'SparqlRestService', '$filter', '$window', '$jwtAuth', 'RDF4JRepositoriesRestService', 'MonitoringRestService', 'LocalStorageAdapter', 'LSKeys', '$translate'];\n\nfunction QueryEditorCtrl($scope, $timeout, toastr, $repositories, $modal, ModalService, SparqlRestService, $filter, $window, $jwtAuth, RDF4JRepositoriesRestService, MonitoringRestService, LocalStorageAdapter, LSKeys, $translate) {\n const defaultTabConfig = {\n id: \"1\",\n name: '',\n query: 'select * where { \\n' +\n '\\t?s ?p ?o .\\n' +\n '} limit 100 \\n',\n inference: true,\n sameAs: true\n };\n\n let principal;\n // Wrapped in function for ease of testing\n $scope.getPrincipal = function () {\n return $jwtAuth.getPrincipal()\n .then((response) => {\n principal = response;\n initTabs($scope, principal);\n });\n };\n\n $scope.getPrincipal();\n let checkQueryIntervalId;\n\n function initTabs(scope, principal) {\n defaultTabConfig.inference = principal.appSettings.DEFAULT_INFERENCE;\n defaultTabConfig.sameAs = principal.appSettings.DEFAULT_SAMEAS;\n\n scope.skipCountQuery = !principal.appSettings.EXECUTE_COUNT;\n scope.ignoreSharedQueries = principal.appSettings.IGNORE_SHARED_QUERIES;\n scope.tabsData = scope.tabs = LocalStorageAdapter.get(LSKeys.TABS_STATE) || [defaultTabConfig];\n\n scope.$watchCollection('[currentQuery.inference, currentQuery.sameAs]', function (newVal, oldVal, scope) {\n saveQueryToLocal(scope.currentQuery);\n });\n\n scope.$on('repositoryIsSet', deleteCachedSparqlResults);\n }\n\n this.hint = document.createElement(\"span\");\n this.hint.innerHTML = $translate.instant('query.editor.autocomplete.hint');\n this.hint.style.fontSize = \"12px\";\n this.hint.style.color = \"gray\";\n this.hint.style.backgroundColor = \"white\";\n this.hint.style.position = \"absolute\";\n this.hint.style.zIndex = \"3\";\n this.hint.style.paddingLeft = 12 + \"px\";\n\n $scope.$watch(function() {\n return angular.element('.CodeMirror-hints').length;\n }, (newValue) => {\n if (newValue) {\n const elRect = angular.element('.CodeMirror-hints')[0].getBoundingClientRect();\n document.body.appendChild(this.hint);\n this.hint.style.top = elRect.top - 20 + \"px\";\n this.hint.style.left = elRect.right - this.hint.offsetWidth - 12 + \"px\";\n } else {\n this.hint && this.hint.parentNode && this.hint.parentNode.removeChild(this.hint);\n }\n });\n\n $scope.resetCurrentTabConfig = function () {\n $scope.currentTabConfig = {\n pageSize: 1000,\n page: 1,\n allResultsCount: 0,\n resultsCount: 0\n };\n };\n\n $scope.queryExists = false;\n\n $scope.resetCurrentTabConfig();\n\n // query tab operations\n $scope.saveTab = saveTab;\n $scope.loadTab = loadTab;\n $scope.addNewTab = addNewTab;\n $scope.isTabChangeOk = isTabChangeOk;\n\n // query operations\n $scope.runQuery = runQuery;\n $scope.abortCurrentQuery = abortCurrentQuery;\n $scope.editQuery = editQuery;\n $scope.getNamespaces = getNamespaces;\n $scope.changePagination = changePagination;\n $scope.toggleSampleQueries = toggleSampleQueries;\n $scope.addKnownPrefixes = addKnownPrefixes;\n $scope.getExistingTabId = getExistingTabId;\n $scope.querySelected = querySelected;\n $scope.deleteQuery = deleteQuery;\n $scope.deleteQueryHttp = deleteQueryHttp;\n $scope.saveQuery = saveQuery;\n $scope.saveQueryHttp = saveQueryHttp;\n $scope.saveQueryToLocal = saveQueryToLocal;\n\n $scope.setLoader = setLoader;\n $scope.getLoaderMessage = getLoaderMessage;\n\n // query editor and results orientation\n $scope.fixSizesOnHorizontalViewModeSwitch = fixSizesOnHorizontalViewModeSwitch;\n $scope.changeViewMode = changeViewMode;\n $scope.showHideEditor = showHideEditor;\n $scope.focusQueryEditor = focusQueryEditor;\n $scope.orientationViewMode = LocalStorageAdapter.get(LSKeys.VIEW_MODE) ? LocalStorageAdapter.get(LSKeys.VIEW_MODE) === \"true\" : true;\n $scope.viewMode = 'none';\n\n // start of repository actions\n // FIXME: do we need this??\n // $scope.getActiveRepository();\n $scope.getActiveRepository = function () {\n // same as getActiveRepository() but takes into account repo errors\n return $repositories.getActiveRepository();\n };\n\n $scope.getActiveRepositoryNoError = function () {\n if (!$scope.repositoryError) {\n return $repositories.getActiveRepository();\n }\n };\n\n function saveQueryToLocal(currentQueryTab) {\n shouldDisableSameAs();\n $scope.tabs.forEach(function (tab, index) {\n if (tab.id === currentQueryTab.id) {\n $scope.tabs[index].query = currentQueryTab.query;\n // Don't store inference and sameAs values for Ontop repository,\n // because they are overridden afterwards to true\n if (!$repositories.isActiveRepoOntopType()) {\n $scope.tabs[index].inference = currentQueryTab.inference;\n $scope.tabs[index].sameAs = currentQueryTab.sameAs;\n }\n }\n });\n LocalStorageAdapter.set(LSKeys.TABS_STATE, $scope.tabs);\n }\n\n function setLoader(isRunning, progressMessage, extraMessage, noTimer) {\n const yasrInnerContainer = angular.element(document.getElementById(\"yasr-inner\"));\n $scope.queryIsRunning = isRunning;\n if (isRunning) {\n $scope.queryStartTime = Date.now();\n $scope.countTimeouted = false;\n $scope.progressMessage = progressMessage;\n $scope.extraMessage = extraMessage;\n $scope.noLoaderTimer = noTimer;\n yasrInnerContainer.addClass(\"hide\");\n } else {\n $scope.progressMessage = \"\";\n $scope.extraMessage = \"\";\n $scope.noLoaderTimer = false;\n $scope.currentTrackAlias = null;\n $scope.abortRequested = false;\n yasrInnerContainer.removeClass(\"hide\");\n }\n // We might call this from angular or outside angular so take care of applying the scope.\n if ($scope.$$phase === null) {\n $scope.$apply();\n }\n }\n\n function getLoaderMessage() {\n const timeSeconds = (Date.now() - $scope.queryStartTime) / 1000;\n let timeHuman = \"\";\n let message = \"\";\n\n if (!$scope.noLoaderTimer) {\n timeHuman = $scope.getHumanReadableSeconds(timeSeconds);\n }\n\n if ($scope.progressMessage) {\n message = $translate.instant('query.editor.progress.msg', {progressMessage: $scope.progressMessage, timeHuman: timeHuman});\n } else {\n message = $translate.instant('common.running.operation', {timeHuman: timeHuman});\n }\n if ($scope.extraMessage && timeSeconds > 10) {\n message += $translate.instant('query.editor.extra.msg', {extraMessage: $scope.extraMessage});\n }\n\n return message;\n }\n\n // start of query editor results orientation operations\n function fixSizesOnHorizontalViewModeSwitch(verticalView) {\n function visibleWindowHeight() {\n return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0;\n }\n\n if (!$scope.orientationViewMode) {\n $scope.noPadding = {paddingRight: 15, paddingLeft: 0};\n\n // window.editor is undefined if no repo is selected\n if (window.editor && document.querySelector('.CodeMirror-wrap')) {\n let newHeight = visibleWindowHeight() - (document.querySelector('.CodeMirror-wrap').getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector('.CodeMirror-wrap').style.height = newHeight + 'px';\n document.getElementById('yasr').style.minHeight = newHeight + 'px';\n //window.editor.refresh();\n } else {\n let timer;\n if (verticalView) {\n timer = $timeout(function () {\n $scope.fixSizesOnHorizontalViewModeSwitch(verticalView);\n }, 100);\n } else {\n timer = $timeout($scope.fixSizesOnHorizontalViewModeSwitch, 100);\n }\n\n $scope.$on(\"$destroy\", function () {\n $timeout.cancel(timer);\n });\n }\n } else {\n if ($scope.viewMode === 'yasr') {\n let newHeight = visibleWindowHeight() - (document.querySelector('.CodeMirror-wrap').getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector('.CodeMirror-wrap').style.height = newHeight + 'px';\n //window.editor.refresh();\n } else {\n $scope.noPadding = {};\n document.querySelector('.CodeMirror-wrap').style.height = '';\n //window.editor.refresh();\n }\n document.getElementById('yasr').style.minHeight = '';\n }\n if (window.yasr && window.yasr.container) {\n $timeout(function () {\n window.yasr.container.resize();\n }, 100);\n }\n }\n\n if (!$scope.orientationViewMode) {\n showHideEditor();\n }\n\n function changeViewMode() {\n $scope.viewMode = 'none';\n $scope.orientationViewMode = !$scope.orientationViewMode;\n LocalStorageAdapter.set(LSKeys.VIEW_MODE, $scope.orientationViewMode);\n fixSizesOnHorizontalViewModeSwitch();\n }\n\n function showHideEditor() {\n fixSizesOnHorizontalViewModeSwitch(true);\n }\n\n function focusQueryEditor() {\n if (!angular.element(document).find('.editable-input').is(\":focus\")) {\n angular.element(document).find('.CodeMirror textarea:first-child').focus();\n }\n }\n\n // end of query editor results orientation operations\n\n function deleteCachedSparqlResults(foo, params) {\n if (params.newRepo) {\n $scope.tabsData = LocalStorageAdapter.get(LSKeys.TABS_STATE);\n $scope.tabsData.forEach(function (item) {\n item.yasrData = undefined;\n item.queryType = undefined;\n item.resultsCount = 0;\n item.allResultsCount = 0;\n item.sizeDelta = undefined;\n });\n\n LocalStorageAdapter.set(LSKeys.TABS_STATE, $scope.tabsData);\n $scope.tabs = $scope.tabsData;\n\n // The repository is changed. Remove error messages as well, if any\n $scope.currentQuery = {};\n $scope.errorMessage = null;\n $scope.repositoryError = null;\n }\n }\n\n function selectTab(id) {\n $timeout(function () {\n $('a[data-id = \"' + id + '\"]').tab('show');\n }, 0);\n }\n\n window.onbeforeunload = function () {\n if ($scope.currentQuery) {\n $scope.saveTab($scope.currentQuery.id);\n }\n LocalStorageAdapter.set(LSKeys.TABS_STATE, $scope.tabs);\n };\n\n $scope.$on('$destroy', function () {\n if ($scope.currentQuery) {\n $scope.saveTab($scope.currentQuery.id);\n }\n LocalStorageAdapter.set(LSKeys.TABS_STATE, $scope.tabs);\n clearInterval(checkQueryIntervalId);\n });\n\n // start of query operations\n function runQuery(changePage, explain) {\n $scope.executedQueryTab = $scope.currentQuery ;\n if (explain) {\n if (!(window.editor.getQueryType() === 'SELECT' || window.editor.getQueryType() === 'CONSTRUCT')) {\n toastr.warning($translate.instant('query.editor.warning.msg'));\n return;\n }\n\n if ($repositories.isActiveRepoOntopType()) {\n toastr.warning($translate.instant('query.editor.virtual.repo.warning.msg'));\n return;\n }\n }\n\n $scope.explainRequested = explain;\n if (!$scope.queryIsRunning) {\n if (changePage) {\n $scope.currentTabConfig.resultsCount = 0;\n } else {\n $scope.resetCurrentTabConfig();\n }\n\n $scope.lastRunQueryMode = window.editor.getQueryMode();\n\n if ($scope.lastRunQueryMode === 'update' && $repositories.isActiveRepoOntopType()) {\n toastr.warning($translate.instant('query.editor.virtual.repo.update.warning.msg'));\n return;\n }\n\n setLoader(true, $scope.lastRunQueryMode === 'update' ? $translate.instant('query.editor.executing.update') : $translate.instant('query.editor.evaluating.query'));\n if ($scope.viewMode !== 'none') {\n $scope.viewMode = 'none';\n if ($scope.orientationViewMode) {\n $scope.fixSizesOnHorizontalViewModeSwitch();\n }\n const timer = $timeout(window.editor.query, 500);\n $scope.$on('$destroy', function () {\n $timeout.cancel(timer);\n });\n } else {\n window.editor.query();\n }\n }\n }\n\n function abortCurrentQuery() {\n MonitoringRestService.abortQueryByAlias($scope.currentTrackAlias)\n .success(function () {\n $scope.abortRequested = true;\n });\n }\n\n function getNamespaces() {\n // Signals the namespaces are to be fetched => loader will be shown\n setLoader(true, $translate.instant('common.refreshing.namespaces'), $translate.instant('common.extra.message'));\n $scope.namespacesLoading = true;\n\n RDF4JRepositoriesRestService.getRepositoryNamespaces()\n .success(function (data) {\n const usedPrefixes = {};\n data.results.bindings.forEach(function (e) {\n usedPrefixes[e.prefix.value] = e.namespace.value;\n });\n $scope.namespaces = usedPrefixes;\n })\n .error(function (data) {\n $scope.repositoryError = getError(data);\n })\n .finally(function () {\n // Signals namespaces were fetched => loader will be hidden\n setLoader(false);\n $scope.namespacesLoading = false;\n });\n }\n\n function changePagination() {\n runQuery(true, $scope.explainRequested);\n }\n\n $scope.$on(\"$destroy\", function () {\n clearInterval(checkQueryIntervalId);\n window.editor = null;\n window.yasr = null;\n });\n\n function toggleSampleQueries() {\n $scope.showSampleQueries = !$scope.showSampleQueries;\n if ($scope.showSampleQueries) {\n SparqlRestService.getSavedQueries()\n .success(function (data) {\n $scope.sampleQueries = data;\n $('#sampleQueriesCollapse').collapse('show').width('300px');\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('query.editor.get.saved.queries.error'));\n });\n } else {\n $('#sampleQueriesCollapse').collapse('hide');\n }\n }\n\n // Hide the sample queries when the user clicks somewhere else in the UI.\n $(document).mouseup(function (event) {\n const container = $('#sampleQueriesCollapse');\n if (!container.is(event.target) // if the target of the click isn't the container..\n && container.has(event.target).length === 0 //... nor a descendant of the container\n && $scope.showSampleQueries) {\n toggleSampleQueries();\n }\n });\n\n // Add known prefixes\n function addKnownPrefixes() {\n SparqlRestService.addKnownPrefixes(JSON.stringify(window.editor.getValue()))\n .success(function (data) {\n if (angular.isDefined(window.editor) && angular.isDefined(data) && data !== window.editor.getValue()) {\n window.editor.setValue(data);\n }\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.add.known.prefixes.error'));\n return true;\n });\n }\n\n function querySelected(query) {\n const tabId = getExistingTabId(query);\n $scope.toggleSampleQueries();\n\n if ($scope.isTabChangeOk(false)) {\n $scope.highlightNextTabChange = true;\n if (!angular.isDefined(tabId)) {\n $scope.addNewTab(null, query.name, query.body);\n } else {\n selectTab(tabId);\n }\n }\n }\n\n function getExistingTabId(query) {\n let existingTabId = undefined;\n $scope.tabsData.forEach(function (item) {\n if (item.name === query.name && item.query === query.body) {\n existingTabId = item.id;\n return item;\n }\n });\n return existingTabId;\n }\n\n function editQuery(query) {\n const modalInstance = $modal.open({\n templateUrl: 'js/angular/core/directives/queryeditor/templates/query-sample.html',\n controller: 'QuerySampleModalCtrl',\n resolve: {\n data: function () {\n return {\n title: $translate.instant('query.editor.edit.saved.query', {name: query.name}),\n query: query,\n edit: true,\n okButtonText: $translate.instant('common.save.btn')\n };\n }\n }\n });\n\n modalInstance.result.then(function (queryModal) {\n const data = {\n name: queryModal.name,\n body: queryModal.body,\n shared: queryModal.shared\n };\n if (query.name !== queryModal.name) {\n SparqlRestService.addNewSavedQuery(data)\n .success(function () {\n $scope.deleteQueryHttp(query.name, true);\n })\n .error(function (error) {\n const msg = getError(error);\n toastr.error(msg, $translate.instant('query.editor.edit.saved.query.error'));\n });\n } else {\n SparqlRestService.editSavedQuery(data)\n .success(function () {\n $('#editQueryContainer').modal('hide');\n $scope.toggleSampleQueries();\n toastr.success($translate.instant('query.editor.edit.saved.query.success.msg', {name: query.name}));\n })\n .error(function (error) {\n const msg = getError(error);\n toastr.error(msg, $translate.instant('query.editor.edit.saved.query.error'));\n });\n }\n });\n }\n\n function deleteQueryHttp(savedQueryName, edit) {\n SparqlRestService.deleteSavedQuery(savedQueryName)\n .success(function () {\n $scope.toggleSampleQueries();\n if (!edit) {\n toastr.success($translate.instant('query.editor.delete.saved.query.success.msg', {savedQueryName: savedQueryName}));\n }\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('query.editor.delete.saved.query.error'));\n });\n }\n\n function deleteQuery(savedQueryName) {\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm'),\n message: $translate.instant('query.editor.delete.saved.query.warning.msg', {savedQueryName: savedQueryName}),\n warning: true\n }).result\n .then(function () {\n $scope.deleteQueryHttp(savedQueryName);\n });\n }\n\n function saveQueryHttp(query) {\n SparqlRestService.addNewSavedQuery(query)\n .success(function () {\n toastr.success($translate.instant('query.editor.save.saved.query.success.msg', {name: query.name}));\n })\n .error(function (data) {\n let msg = getError(data);\n toastr.error(msg, $translate.instant('query.editor.create.saved.query.error'));\n // TODO: This condition will always be true\n if (msg = \"Query '\" + query.name + \"' already exists!\") {\n query.query = query.body;\n const queryExists = true;\n $scope.saveQuery(query, queryExists);\n }\n });\n }\n\n function saveQuery(query, queryExists) {\n const modalInstance = $modal.open({\n templateUrl: 'js/angular/core/directives/queryeditor/templates/query-sample.html',\n controller: 'QuerySampleModalCtrl',\n resolve: {\n data: function () {\n return {\n title: $translate.instant('query.editor.create.saved.query.msg'),\n query: {name: query.name, body: query.query, shared: query.shared},\n edit: false,\n okButtonText: $translate.instant('common.create.btn'),\n queryExists: queryExists,\n existingQueryErrMsg: decodeHTML($translate.instant('query.sample.existing.query.warning', {name: query.name}))\n };\n }\n }\n });\n\n modalInstance.result.then(function (query) {\n $scope.saveQueryHttp(query);\n }, function () {\n });\n }\n\n // end of query operations\n\n function showModal(modalSelector) {\n return function (name, query, shared) {\n $scope.savedQuery = {\n name: name,\n query: query || window.editor.getValue(),\n shared: shared\n };\n $(modalSelector).modal('show');\n };\n }\n\n\n // start of query tab operations\n function findTabIndexByID(id) {\n for (let i = 0; i < $scope.tabsData.length; i++) {\n const tab = $scope.tabsData[i];\n if (tab.id === id) {\n return i;\n }\n }\n }\n\n function saveTab(id) {\n const idx = findTabIndexByID(id);\n // Tab was deleted, don't try to save it's state\n if (idx === undefined) {\n return {};\n }\n const tab = $scope.tabsData[idx];\n //tab.query = window.editor.getValue();\n $scope.saveQueryToLocal(tab);\n return tab;\n }\n\n let maxID = LocalStorageAdapter.get(LSKeys.TABS_STATE_MAXID) || 1;\n\n function addNewTab(callback, tabName, savedQuery) { // optional callback to call after tab has been added\n if (!isTabChangeOk(true)) {\n return;\n }\n let defaultTabConfig;\n if (tabName || savedQuery) {\n defaultTabConfig = {\n id: \"1\",\n name: tabName,\n query: savedQuery,\n inference: principal.appSettings.DEFAULT_INFERENCE,\n sameAs: principal.appSettings.DEFAULT_SAMEAS\n };\n } else {\n defaultTabConfig = {\n id: \"1\",\n name: '',\n query: 'select * where { \\n' +\n '\\t?s ?p ?o .\\n' +\n '} limit 100 \\n',\n inference: principal.appSettings.DEFAULT_INFERENCE,\n sameAs: principal.appSettings.DEFAULT_SAMEAS\n };\n }\n\n maxID++;\n const newID = '' + maxID;\n $scope.tabsData = $scope.tabs;\n\n const newTab = defaultTabConfig;\n newTab.id = newID;\n\n $scope.tabsData.push(newTab);\n\n LocalStorageAdapter.set(LSKeys.TABS_STATE_MAXID, maxID);\n LocalStorageAdapter.set(LSKeys.TABS_STATE, $scope.tabsData);\n const callbackArgs = Array.prototype.slice.call(arguments, 1); // skip one argument, i.e. the callback itself\n $timeout(function () {\n $scope.$apply();\n selectTab(newID);\n if (callback) {\n callback.apply(this, callbackArgs);\n }\n }, 0);\n $scope.tabs = $scope.tabsData;\n }\n\n function loadTab(id) {\n $scope.tabsData = LocalStorageAdapter.get(LSKeys.TABS_STATE) || [defaultTabConfig];\n\n // find available tab\n const idx = findTabIndexByID(id);\n const tab = $scope.tabsData[idx];\n\n if (tab.yasrData) {\n setLoader(true, $translate.instant('query.editor.render.results.msg'), null, true);\n }\n\n // set query in editor available on the current tab\n $timeout(function () {\n if ($scope.currentQuery.query === '') {\n $scope.currentQuery.query = \" \";\n }\n $timeout(function () {\n window.editor.setValue($scope.currentQuery.query);\n $scope.yasr.updateDownloadDropdown();\n $scope.$broadcast('tabLoaded', $scope.currentQuery.id);\n\n // set query results in query results sections after\n // previous query execution. Yasr response rendering depends on the\n // query type of window.editor!\n $scope.yasr.options.output = tab.outputType; // this may be undefined, that's fine!\n if (tab.yasrData) {\n if (tab.yasrData.customError) {\n // Our injected custom (not real HTTP) error\n $scope.yasr.results = {\n getException: function () {\n return tab.yasrData.customError;\n }\n };\n setLoader(false);\n } else {\n // Real YASR result\n $timeout(function () {\n $scope.setYasrResponse(tab.yasrData, tab.textStatus, tab.jqXhrOrErrorString);\n setLoader(false);\n if ($('.yasr_btnGroup li:nth-child(2)').hasClass(\"active\")) {\n $timeout(function () {\n $('.yasr_btnGroup li:nth-child(2) a').get(0).click();\n }, 0);\n }\n }, 0);\n }\n }\n }, 0);\n }, 0);\n\n\n // persist current tab id in local storage\n LocalStorageAdapter.set(LSKeys.TABS_STATE_CURRENT_ID, id);\n\n $scope.currentQuery = tab;\n\n $timeout(function () {\n $scope.currentTabConfig = {};\n $scope.currentTabConfig.queryType = tab.queryType;\n $scope.currentTabConfig.resultsCount = tab.resultsCount;\n\n $scope.currentTabConfig.offset = tab.offset;\n $scope.currentTabConfig.allResultsCount = tab.allResultsCount;\n $scope.currentTabConfig.allResultsCountExact = tab.allResultsCountExact;\n $scope.currentTabConfig.page = tab.page;\n $scope.currentTabConfig.pageSize = tab.pageSize;\n\n $scope.currentTabConfig.timeFinished = tab.timeFinished;\n $scope.currentTabConfig.timeTook = tab.timeTook;\n $scope.currentTabConfig.sizeDelta = tab.sizeDelta;\n $scope.currentTabConfig.customUpdateMessage = tab.customUpdateMessage;\n $scope.currentTabConfig.errorMessage = tab.errorMessage;\n $scope.currentTabConfig.warningMessage = tab.warningMessage;\n\n $scope.$apply();\n }, 0);\n\n //Remove paddign of yasr so it will be aligned with sparql editor\n $('#yasr').css('padding', '0');\n\n if (!checkQueryIntervalId) {\n checkQueryIntervalId = setInterval(showOrHideSaveAsDropDown, 200);\n }\n overrideSameAsInferenceAndNoCountIfNeeded();\n }\n\n function getQueryID(element) {\n return $(element).attr('data-id');\n }\n\n function showOrHideSaveAsDropDown() {\n // If selected tab has results and query in editor controller is invalid save as\n // dropdown menu will be removed and on fixing query latter will be added\n if ($scope.currentTabConfig.resultsCount >= 0) {\n const $saveAsDropDown = $('.saveAsDropDown');\n if ($saveAsDropDown.length > 0 && !window.editor.queryValid) {\n yasr.header.find('.saveAsDropDown').remove();\n } else if ($saveAsDropDown.length === 0 && window.editor.queryValid) {\n yasr.updateDownloadDropdown();\n }\n }\n }\n\n function isTabChangeOk(isNew) {\n if ($scope.queryIsRunning && !$scope.namespacesLoading) {\n if (isNew) {\n toastr.info($translate.instant('query.editor.new.tab.running.query.warning.msg'));\n } else {\n toastr.info($translate.instant('query.editor.tab.switching.running.query.warning.msg'));\n }\n\n return false;\n }\n\n return true;\n }\n\n // Raise this flag to provide visual feedback to the user the next time a tab changes\n // (either manually or by the system). See GDB-1983.\n $scope.highlightNextTabChange = false;\n $scope.$on('tabAction', function (e, tabEvent) {\n if (tabEvent.relatedTarget) {\n // Cancel any highlight timer that might have been left by the last highlight\n $timeout.cancel(tabEvent.relatedTarget.timer);\n $(tabEvent.relatedTarget).css('color', '');\n\n $scope.saveTab(getQueryID(tabEvent.relatedTarget));\n }\n\n $scope.loadTab(getQueryID(tabEvent.target));\n\n // These arrays define how the tab change will be visually enhanced.\n // colors contains the colors to set to the tab name,\n // while times defines the times in milliseconds to keep each color.\n // Once we cycle through the arrays we restore the default color.\n const colors = ['var(--onto-orange)', '', 'var(--onto-orange)'];\n const times = [400, 400, 400];\n if ($scope.highlightNextTabChange) {\n $scope.highlightNextTabChange = false;\n let index = 0;\n $(tabEvent.target).css('color', colors[index]);\n const highlightFun = function () {\n index++;\n if (index < colors.length) {\n $(tabEvent.target).css('color', colors[index]);\n tabEvent.target.timer = $timeout(highlightFun, times[index]);\n } else {\n $(tabEvent.target).css('color', '');\n }\n };\n $timeout(highlightFun, times[index]);\n }\n });\n\n $scope.$on('deleteAllexeptSelected', function (e, tabs) {\n $scope.tabsData = tabs;\n $scope.tabs = tabs;\n });\n // end of query tab operations\n\n $scope.currentQuery = {};\n // $scope.state = {};\n $scope.showSampleQueries = false;\n $scope.savedQuery = {};\n $scope.sampleQueries = {};\n $scope.editQueryModal = showModal('#editQueryContainer');\n $scope.deleteQueryModal = showModal('#confirmDeleteContainer');\n $scope.saveQueryModal = showModal('#saveQueryContainer');\n\n $scope.getResultsDescription = function () {\n let desc;\n if ($scope.currentTabConfig.resultsCount === 0) {\n desc = \"No results.\";\n } else {\n const currentPageEnd = ($scope.currentTabConfig.page - 1) * $scope.currentTabConfig.pageSize\n + Math.min($scope.currentTabConfig.resultsCount, $scope.currentTabConfig.pageSize);\n desc = $translate.instant('query.editor.showing.results.from.msg') + $filter('currency')($scope.currentTabConfig.offset, '', 0)\n + $translate.instant('query.editor.to') + $filter('currency')(currentPageEnd, '', 0);\n if ($scope.currentTabConfig.allResultsCount > 0) {\n // Unsure total results count \"of at least\" happens if counting timed out or\n // counting was disabled and we got at least $pageSize + 1 results for the current page.\n // It may reset become exact when we navigate and reach the end of results.\n desc += $translate.instant(($scope.currentTabConfig.allResultsCountExact\n ? 'query.editor.of' : 'query.editor.of.at.least'));\n desc += $filter('currency')($scope.currentTabConfig.allResultsCount, '', 0);\n }\n desc += \".\";\n }\n\n return desc;\n };\n\n $scope.getUpdateDescription = function () {\n if ($scope.currentTabConfig.customUpdateMessage) {\n return $translate.instant($scope.currentTabConfig.customUpdateMessage.msg, {name: $scope.currentTabConfig.customUpdateMessage.name});\n } else if ($scope.currentTabConfig.sizeDelta === undefined) {\n return '';\n } else if ($scope.currentTabConfig.sizeDelta < 0) {\n return $translate.instant('yasr.removed.statements.result.msg', {sizeDelta: Math.abs($scope.currentTabConfig.sizeDelta)});\n } else if ($scope.currentTabConfig.sizeDelta > 0) {\n return $translate.instant('yasr.added.statements.result.msg', {sizeDelta: $scope.currentTabConfig.sizeDelta});\n } else {\n return $translate.instant('yasr.statements.no.change.msg');\n }\n };\n\n $scope.getStaleWarningMessage = function () {\n const secondsAgo = Math.round((Date.now() - $scope.currentTabConfig.timeFinished) / 60000) * 60;\n if (secondsAgo >= 3600) { // must be at least an hour\n return $translate.instant('yasr.stale.result.msg', {secondsAgo: $scope.getHumanReadableSeconds(secondsAgo)});\n }\n };\n\n const resize = function () {\n // $scope.fixSizesOnHorizontalViewModeSwitch();\n };\n\n angular.element($window).bind('resize', resize);\n\n $scope.$on('$destroy', function () {\n angular.element($window).unbind('resize', resize);\n });\n\n /**\n * In case of Ontop repository, sameAs, inference and nocount are\n * overridden to true and #sameAs and #inference buttons are disabled, In case of FedX repo nocount is overridden\n */\n function overrideSameAsInferenceAndNoCountIfNeeded() {\n const isOntop = $repositories.isActiveRepoOntopType();\n const isFedX = $repositories.isActiveRepoFedXType();\n handleSameAsAndInferenceBtns(isOntop);\n\n $scope.nocount = (isOntop || isFedX) ? true : !principal.appSettings.EXECUTE_COUNT;\n if (isOntop) {\n $scope.currentQuery.inference = true;\n $scope.currentQuery.sameAs = true;\n }\n }\n\n function handleSameAsAndInferenceBtns(isOntop) {\n const sameAsBtn = document.getElementById('sameAs');\n const inferenceBtn = document.getElementById('inference');\n\n if (sameAsBtn) {\n sameAsBtn.disabled = !!isOntop;\n }\n\n if (inferenceBtn) {\n inferenceBtn.disabled = !!isOntop;\n }\n }\n\n // The sameAs is meaningless without inference.\n // Set its value to false and disable button\n function shouldDisableSameAs() {\n // don't try to override sameAs if repository is Ontop type\n if ($repositories.isActiveRepoOntopType()) {\n return;\n }\n const sameAsBtn = document.getElementById('sameAs');\n if (sameAsBtn && !$scope.currentQuery.inference && !sameAsBtn.disabled) {\n sameAsBtn.disabled = true;\n $scope.currentQuery.sameAs = false;\n } else if ($scope.currentQuery.inference && sameAsBtn.disabled) {\n sameAsBtn.removeAttribute('disabled');\n $scope.currentQuery.sameAs = principal.appSettings.DEFAULT_SAMEAS;\n }\n }\n}\n\nQuerySampleModalCtrl.$inject = ['$scope', '$modalInstance', 'data', '$sce'];\n\nfunction QuerySampleModalCtrl($scope, $modalInstance, data, $sce) {\n if (data.queryExists) {\n $scope.queryExists = true;\n }\n $scope.query = angular.copy(data.query);\n $scope.title = data.title;\n $scope.edit = data.edit;\n $scope.okButtonText = data.okButtonText;\n $scope.existingQueryErrMsg = $sce.trustAsHtml(data.existingQueryErrMsg);\n $scope.ok = function () {\n if ($scope.form.$valid) {\n $modalInstance.close($scope.query);\n }\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n}\n"],"sourceRoot":""}
@@ -1,3 +0,0 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[8,106],{225:function(e,t,n){var r,o=o||function(e){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS("http://www.w3.org/1999/xhtml","a"),o=e.webkitRequestFileSystem,i=e.requestFileSystem||o||e.mozRequestFileSystem,a=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},s=0,c=function(t){var r=function(){"string"==typeof t?n().revokeObjectURL(t):t.remove()};e.chrome?r():setTimeout(r,500)},l=function(e,t,n){for(var r=(t=[].concat(t)).length;r--;){var o=e["on"+t[r]];if("function"==typeof o)try{o.call(e,n||e)}catch(e){a(e)}}},u=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e},p=function(t,a){t=u(t);var p,d,f,m=this,g=t.type,x=!1,h=function(){l(m,"writestart progress write writeend".split(" "))},w=function(){(!x&&p||(p=n().createObjectURL(t)),d)?d.location.href=p:null==e.open(p,"_blank")&&"undefined"!=typeof safari&&(e.location.href=p);m.readyState=m.DONE,h(),c(p)},v=function(e){return function(){if(m.readyState!==m.DONE)return e.apply(this,arguments)}},y={create:!0,exclusive:!1};if(m.readyState=m.INIT,a||(a="download"),r)return p=n().createObjectURL(t),r.href=p,r.download=a,void setTimeout((function(){var e,t;e=r,t=new MouseEvent("click"),e.dispatchEvent(t),h(),c(p),m.readyState=m.DONE}));e.chrome&&g&&"application/octet-stream"!==g&&(f=t.slice||t.webkitSlice,t=f.call(t,0,t.size,"application/octet-stream"),x=!0),o&&"download"!==a&&(a+=".download"),("application/octet-stream"===g||o)&&(d=e),i?(s+=t.size,i(e.TEMPORARY,s,v((function(e){e.root.getDirectory("saved",y,v((function(e){var n=function(){e.getFile(a,y,v((function(e){e.createWriter(v((function(n){n.onwriteend=function(t){d.location.href=e.toURL(),m.readyState=m.DONE,l(m,"writeend",t),c(e)},n.onerror=function(){var e=n.error;e.code!==e.ABORT_ERR&&w()},"writestart progress write abort".split(" ").forEach((function(e){n["on"+e]=m["on"+e]})),n.write(t),m.abort=function(){n.abort(),m.readyState=m.DONE},m.readyState=m.WRITING})),w)})),w)};e.getFile(a,{create:!1},v((function(e){e.remove(),n()})),v((function(e){e.code===e.NOT_FOUND_ERR?n():w()})))})),w)})),w)):w()},d=p.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t){return navigator.msSaveOrOpenBlob(u(e),t)}:(d.abort=function(){this.readyState=this.DONE,l(this,"abort")},d.readyState=d.INIT=0,d.WRITING=1,d.DONE=2,d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null,function(e,t){return new p(e,t)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);
2
- /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */e.exports?e.exports.saveAs=o:null!==n(226)&&null!=n(227)&&(void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r))},226:function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},227:function(e,t){(function(t){e.exports=t}).call(this,{})},41:function(e,t){angular.module("graphdb.workbench.utils.filetypes",[]).value("FileTypes",[{name:"JSON",type:"application/rdf+json",extension:".json"},{name:"JSON-LD",type:"application/ld+json",extension:".jsonld"},{name:"RDF-XML",type:"application/rdf+xml",extension:".rdf"},{name:"N3",type:"text/rdf+n3",extension:".n3"},{name:"N-Triples",type:"text/plain",extension:".nt"},{name:"N-Quads",type:"text/x-nquads",extension:".nq"},{name:"Turtle",type:"text/turtle",extension:".ttl"},{name:"Turtle*",type:"application/x-turtlestar",extension:".ttls"},{name:"TriX",type:"application/trix",extension:".trix"},{name:"TriG",type:"application/x-trig",extension:".trig"},{name:"TriG*",type:"application/x-trigstar",extension:".trigs"},{name:"Binary RDF",type:"application/x-binary-rdf",extension:".brf"}])},90:function(e,t,n){"use strict";n.r(t);n(41);var r=n(223),o=n.n(r),i=n(225),a=n(0);function s(e,t,n,r,a,s,c,l,u,p,d,f,m,g){let x;g.when(d.getPrincipal()).then(t=>{e.inference=t.appSettings.DEFAULT_INFERENCE?"all":"explicit",e.sameAs=t.appSettings.DEFAULT_INFERENCE&&t.appSettings.DEFAULT_SAMEAS}),e.loading=!1,e.getActiveRepository=function(){return s.getActiveRepository()},e.isTripleResource=function(){return!!e.tripleParam},e.encodeURIComponent=function(e){return encodeURIComponent(e)},e.getRdfStarLocalNames=function(e){let t=e.slice();return e.replace(/[<>]+/g,"").split(" ").forEach(e=>{t=t.replace(e,c.getLocalName(e))}),t},e.role=n.search().role?n.search().role:"subject",e.inferenceNamed="explicit",e.inferences=[{id:"all",title:"explore.explicit.implicit"},{id:"explicit",title:"explore.explicit"},{id:"implicit",title:"explore.implicit"}],e.context="",e.getLocalName=function(e){return c.getLocalName(e)},e.blanks=!0,e.formats=p,window.editor={},window.editor.getQueryType=function(){return"RESOURCE"},e.$watch((function(){return s.getActiveRepository()}),(function(){e.getActiveRepository()&&(e.usedPrefixes?e.loadResource():u.getNamespaces(e.getActiveRepository()).success((function(t){e.usedPrefixes={},t.results.bindings.forEach((function(t){e.usedPrefixes[t.prefix.value]=t.namespace.value})),x=o()(document.getElementById("yasr"),{getUsedPrefixes:e.usedPrefixes,persistency:!1,hideHeader:!0,locale:m.getLanguage()}),e.loadResource()})).error((function(e){r.error(f.instant("get.namespaces.error.msg",{error:getError(e)}))})))})),e.loadResource=function(){a.prefix&&a.localName&&e.usedPrefixes[a.prefix]?e.uriParam=e.usedPrefixes[a.prefix]+a.localName:n.search().uri?e.uriParam=n.search().uri+(n.hash()?"#"+n.hash():""):n.search().triple?e.tripleParam=n.search().triple+(n.hash()?"#"+n.hash():""):e.uriParam=n.absUrl(),null!=a.context&&(e.context=a.context),e.uriParam=e.uriParam&&e.uriParam.replace(/<|>/g,""),t({url:"rest/explore/details",method:"GET",params:{uri:e.uriParam,triple:e.tripleParam,context:e.context},headers:{Accept:"application/json"}}).success((function(t){e.details=t,e.context=e.details.context,"object"!==e.details.uri&&(e.details.encodeURI=encodeURIComponent(e.details.uri))})).error((function(e){r.error(f.instant("explore.error.resource.details",{data:getError(e)}))})),e.exploreResource()},e.isContextAvailable=function(){return null!==e.context&&"http://rdf4j.org/schema/rdf4j#SHACLShapeGraph"===e.context},e.goToGraphsViz=function(){n.path("graphs-visualizations").search("uri",e.uriParam)};const h=function(t){const n=angular.element(document.getElementById("yasr-inner")),r=angular.element(document.getElementById("results-loader"));t?(e.loading=!0,n.addClass("opacity-hide"),r.removeClass("opacity-hide")):(e.loading=!1,n.removeClass("opacity-hide"),r.addClass("opacity-hide"))};e.exploreResource=function(){h(!0),null!=a.context&&(e.context=a.context),Promise.resolve(void 0).then(()=>void $.ajax({method:"GET",url:"rest/explore/graph",data:{uri:e.uriParam,triple:e.tripleParam,inference:e.inference,role:e.role,bnodes:e.blanks,sameAs:e.sameAs,context:e.context},headers:{Accept:"application/x-graphdb-table-results+json"}}).done((function(e,t,n){h(!1),x.setResponse(n,t)})).fail((function(e){r.error(f.instant("explore.error.resource",{data:getError(e)})),h(!1)})))},e.downloadExport=function(n){let o,a;e.uriParam?(o="uri=",a=encodeURIComponent(e.uriParam)):(o="triple=",a=encodeURIComponent(e.tripleParam)),t({method:"GET",url:"rest/explore/graph?"+o+a+"&role="+e.role+"&inference="+e.inference+"&bnodes="+e.blanks+"&sameAs="+e.sameAs+(e.context?"&context="+encodeURIComponent(e.context):""),headers:{Accept:n.type}}).success((function(e){let t=e;n.type.indexOf("json")>-1&&(t=JSON.stringify(t));const r=navigator.userAgent.toLowerCase();if(-1!==r.indexOf("safari")&&-1===r.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+n.extension+'",'+encodeURIComponent(t),"statements."+n.extension);else{const e=new Blob([t],{type:n.type});Object(i.saveAs)(e,"statements"+n.extension)}})).error((function(e){const t=getError(e);r.error(t,f.instant("common.error"))}))},e.changeRole=function(t){e.role=t,e.exploreResource()},e.changeInference=function(t){e.inference=t,e.exploreResource()},e.copyToClipboardResult=function(e){l.openCopyToClipboardModal(e)},e.$on("language-changed",(function(e,t){x&&x.options&&(x.options.locale=t.locale,x.changeLanguage(t.locale))}))}function c(e,t,n,r,o,i,s,c,l,u,p,d){function f(){c.checkAutocompleteStatus().success((function(t){if(!t){const e=Object(a.decodeHTML)(d.instant("explore.autocomplete.warning.msg"));s.warning("",`<div class="autocomplete-toast"><a href="autocomplete">${e}</a></div>`,{allowHtml:!0})}e.autocompleteEnabled=t})).error((function(){s.error(d.instant("explore.error.autocomplete"))}))}function m(){p.getNamespaces(r.getActiveRepository()).success((function(t){e.namespaces=t.results.bindings.map((function(e){return{prefix:e.prefix.value,uri:e.namespace.value}})),e.loader=!1})).error((function(t){const n=getError(t);s.error(n,d.instant("common.error")),e.loader=!1}))}function g(e){const t=e.indexOf("<")>=0&&e.lastIndexOf(">")===e.length-1,n=-1===e.indexOf("<")&&-1===e.lastIndexOf(">"),r=/^<?[http|urn].*>?$/.test(e)&&(t||n);let o=!1;if(r)if(e.indexOf("http")>=0){const t=e.indexOf("//");o=t>4&&e.substring(t+2).length>0}else e.indexOf("urn")>=0&&(o=e.substring(4).length>0);return r&&o}let x,h;function w(t){function r(t){i((function(){e.form&&(e.form.$dirty=t)}))}t||(t=document.getElementById("resources_finder_value").value),t&&g(t)?(r(!1),n.path("resource").search("uri",t)):(r(!0),t&&s.error(d.instant("explore.error.invalid.input")))}e.submit=w,e.getAutocompleteSuggestions=function(t){if(!/<|>/.test(t)&&":"===t.slice(-1)){const n=l.getNamespaceUriForPrefix(e.namespaces,t.slice(0,-1));h=n!==h?n:h,h&&$("#resources_finder_value").val(h)}let n;if(e.autocompleteEnabled){const e=t.replace(h,h+";");n=c.getAutocompleteSuggestions(e)}else n=o.when(e.autocompleteEnabled);return n},e.inputChangedFn=function(){x=document.getElementById("resources_finder_value").value,e.form.$dirty=!(x&&g(x))},e.selectedUriCallback=function(t){e.selectedUri={name:t.title},w(e.selectedUri.name)},e.selectedUri={name:""},e.autocompleteEnabled=!1,angular.isDefined(u.search)&&i((function(){$("#resources_finder_value").val(u.search),$(".search-button").click()}),500),e.getActiveRepository()&&(f(),m()),e.$on("repositoryIsSet",(function(){f(),m()}))}function l(e,t,n,r,o,i,a,s,c,l,u){e.uriParam=n.search().uri,e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newResource=!1,e.datatypeOptions=c.getDatatypeOptions(),e.activeRepository=function(){return o.getActiveRepository()},e.getClassInstancesDetails=function(){l.getNamespaces(e.activeRepository()).success((function(t){e.namespaces=t.results.bindings.map((function(e){return{prefix:e.prefix.value,uri:e.namespace.value}})),e.loader=!1})).error((function(t){const n=getError(t);r.error(n,u.instant("common.error")),e.loader=!1})),s.getDetails(e.uriParam).success((function(t){e.details=t,e.details.encodeURI=encodeURIComponent(e.details.uri)})).error((function(e){r.error(u.instant("explore.error.resource.details",{data:getError(e)}))})),s.getGraph(e.uriParam).then((function(t){const n=c.buildStatements(t,e.uriParam);e.statements=n,e.newResource=!n.length}))},e.addStatement=function(){e.newRowPredicate.$setSubmitted(),e.newRowObject.$setSubmitted(),e.newRowContext.$setSubmitted(),e.newRowPredicate.$valid&&e.newRowObject.$valid&&e.newRowContext.$valid&&(e.statements.push(angular.copy(e.newRow)),e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newRowPredicate.$setPristine(),e.newRowPredicate.$setUntouched(),e.newRowObject.$setPristine(),e.newRowObject.$setUntouched(),e.newRowContext.$setPristine(),e.newRowContext.$setUntouched())},e.removeStatement=function(t){e.statements.splice(t,1)},e.getLocalName=function(e){return s.getLocalName(e)},e.checkValid=function(e){if(!angular.isUndefined(e))return!0;return u.instant("explore.validation")},e.validEditRow=function(){return e.rowform.$valid},e.viewTrig=function(){i.open({templateUrl:"js/angular/explore/templates/viewTrig.html",controller:"ViewTrigCtrl",size:"lg",resolve:{data:function(){return c.transformToTrig(e.statements)}}})},e.save=function(){const o=e.newResource?"POST":"PUT";t({method:o,url:"rest/resource?uri="+encodeURIComponent(e.uriParam),headers:{"Content-Type":"application/x-trig"},data:c.transformToTrig(e.statements)}).success((function(){r.success(u.instant("explore.resource.saved"));const t=a((function(){n.path("resource").search("uri",e.uriParam)}),500);e.$on("$destroy",(function(){a.cancel(t)}))})).error((function(e){r.error(getError(e))}))},e.$watch((function(){return o.getActiveRepository()}),(function(){e.activeRepository()&&e.getClassInstancesDetails()})),e.validateUri=function(t){let n=!0;const r=t||"";if(-1===r.indexOf(":"))n=!1;else{const t=r.substring(0,r.indexOf(":"));if(""===s.getNamespaceUriForPrefix(e.namespaces,t)){!1===/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/.test(r)&&(n=!1);const e=r.match(/\//g);(void 0===e||e.length<3)&&(n=!1)}else{r.substring(r.indexOf(":")+1).trim().length<1&&(n=!1)}}return n}}function u(e,t,n){e.trig=n,e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.explore.controllers",["ngCookies","ngRoute","ui.bootstrap","toastr","graphdb.framework.core","graphdb.framework.core.services.repositories","graphdb.framework.explore.services","graphdb.workbench.utils.filetypes"]).controller("FindResourceCtrl",c).controller("ExploreCtrl",s).controller("EditResourceCtrl",l).controller("ViewTrigCtrl",u),s.$inject=["$scope","$http","$location","toastr","$routeParams","$repositories","ClassInstanceDetailsService","ModalService","RDF4JRepositoriesRestService","FileTypes","$jwtAuth","$translate","$languageService","$q"],c.$inject=["$scope","$http","$location","$repositories","$q","$timeout","toastr","AutocompleteRestService","ClassInstanceDetailsService","$routeParams","RDF4JRepositoriesRestService","$translate"],l.$inject=["$scope","$http","$location","toastr","$repositories","$modal","$timeout","ClassInstanceDetailsService","StatementsService","RDF4JRepositoriesRestService","$translate"],u.$inject=["$scope","$modalInstance","data"]}}]);
3
- //# sourceMappingURL=8.5abe78e9d72cdbc2607f.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///./src/js/lib/FileSaver-patch.js","webpack:///(webpack)/buildin/amd-define.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///./src/js/angular/utils/file-types.js","webpack:///./src/js/angular/explore/controllers.js"],"names":["saveAs","view","navigator","test","userAgent","doc","document","get_URL","URL","webkitURL","save_link","createElementNS","webkit_req_fs","webkitRequestFileSystem","req_fs","requestFileSystem","mozRequestFileSystem","throw_outside","ex","setImmediate","setTimeout","fs_min_size","revoke","file","revoker","revokeObjectURL","remove","chrome","dispatch","filesaver","event_types","event","i","concat","length","listener","call","auto_bom","blob","type","Blob","FileSaver","name","object_url","target_view","slice","this","blob_changed","dispatch_all","split","fs_error","createObjectURL","location","href","undefined","open","safari","readyState","DONE","abortable","func","apply","arguments","create_if_not_found","create","exclusive","INIT","download","node","MouseEvent","dispatchEvent","webkitSlice","size","TEMPORARY","fs","root","getDirectory","dir","save","getFile","createWriter","writer","onwriteend","toURL","onerror","error","code","ABORT_ERR","forEach","write","abort","WRITING","NOT_FOUND_ERR","FS_proto","prototype","msSaveOrOpenBlob","onwritestart","onprogress","onwrite","onabort","self","window","content","module","exports","Error","__webpack_amd_options__","angular","value","extension","ExploreCtrl","$scope","$http","$location","toastr","$routeParams","$repositories","ClassInstanceDetailsService","ModalService","RDF4JRepositoriesRestService","FileTypes","$jwtAuth","$translate","$languageService","$q","yasr","when","getPrincipal","then","principal","inference","appSettings","sameAs","loading","getActiveRepository","isTripleResource","tripleParam","encodeURIComponent","param","getRdfStarLocalNames","triple","localNames","replace","uri","getLocalName","role","search","inferenceNamed","inferences","id","title","context","blanks","formats","editor","getQueryType","$watch","usedPrefixes","loadResource","getNamespaces","success","data","results","bindings","e","prefix","namespace","getElementById","getUsedPrefixes","persistency","hideHeader","locale","getLanguage","instant","getError","localName","uriParam","hash","absUrl","url","method","params","headers","details","encodeURI","exploreResource","isContextAvailable","goToGraphsViz","path","toggleOntoLoader","showLoader","yasrInnerContainer","element","resultsLoader","addClass","removeClass","Promise","resolve","principalRequestPromise","$","ajax","bnodes","Accept","done","textStatus","jqXhr","setResponse","fail","downloadExport","format","encodedURI","response","indexOf","JSON","stringify","ua","toLowerCase","msg","changeRole","roleVar","changeInference","copyToClipboardResult","openCopyToClipboardModal","$on","args","options","changeLanguage","FindResourceCtrl","$timeout","AutocompleteRestService","checkAutocompleteStatus","warningMsg","warning","allowHtml","autocompleteEnabled","getAllNamespacesForActiveRepository","namespaces","map","loader","validateRdfUri","hasAngleBrackets","lastIndexOf","noAngleBrackets","validProtocol","validPath","schemaSlashesIdx","substring","expandedUri","submit","setFormInvalid","isDirty","form","$dirty","getAutocompleteSuggestions","str","newExpandedUri","getNamespaceUriForPrefix","val","promise","query","inputChangedFn","selectedUriCallback","selected","selectedUri","isDefined","click","EditResourceCtrl","$modal","StatementsService","newRow","subject","object","datatype","newResource","datatypeOptions","getDatatypeOptions","activeRepository","getClassInstancesDetails","getDetails","getGraph","res","statements","buildStatements","addStatement","newRowPredicate","$setSubmitted","newRowObject","newRowContext","$valid","push","copy","$setPristine","$setUntouched","removeStatement","idx","splice","checkValid","isUndefined","validEditRow","rowform","viewTrig","templateUrl","controller","transformToTrig","timer","cancel","validateUri","check","text","count","match","trim","ViewTrigCtrl","$modalInstance","trig","dismiss","$inject"],"mappings":"iFAAA,MAcIA,EAASA,GAAW,SAASC,GAChC,aAEA,GAAyB,oBAAdC,YAA6B,eAAeC,KAAKD,UAAUE,WAAtE,CAGA,IACGC,EAAMJ,EAAKK,SAEXC,EAAU,WACX,OAAON,EAAKO,KAAOP,EAAKQ,WAAaR,GAEpCS,EAAYL,EAAIM,gBAAgB,+BAAgC,KAMhEC,EAAgBX,EAAKY,wBACrBC,EAASb,EAAKc,mBAAqBH,GAAiBX,EAAKe,qBACzDC,EAAgB,SAASC,IACzBjB,EAAKkB,cAAgBlB,EAAKmB,aAAY,WACtC,MAAMF,IACJ,IAGFG,EAAc,EAKdC,EAAS,SAASC,GACnB,IAAIC,EAAU,WACO,iBAATD,EACVhB,IAAUkB,gBAAgBF,GAE1BA,EAAKG,UAGHzB,EAAK0B,OACRH,IA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,QAAU,CAAC,SAAU,QAAS,YAAa,gBAAiB,KAAM,WAAY,SAAU,0BAA2B,8BAA+B,eAAgB,+BAAgC,cAoJnNlD,EAAiBkD,QAAU,CAAC,SAAU,QAAS,YAAa,SAAU,gBAAiB,SAAU,WAAY,8BAA+B,oBAAqB,+BAAgC,cA+KjMJ,EAAaI,QAAU,CAAC,SAAU,iBAAkB","file":"8.5abe78e9d72cdbc2607f.bundle.js","sourcesContent":["/* FileSaver.js\n * A saveAs() FileSaver implementation.\n * 2015-05-07.2\n *\n * By Eli Grey, http://eligrey.com\n * License: X11/MIT\n * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md\n */\n\n/*global self */\n/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */\n\n/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */\n\nvar saveAs = saveAs || (function(view) {\n\t\"use strict\";\n\t// IE <10 is explicitly unsupported\n\tif (typeof navigator !== \"undefined\" && /MSIE [1-9]\\./.test(navigator.userAgent)) {\n\t\treturn;\n\t}\n\tvar\n\t\t doc = view.document\n\t\t // only get URL when necessary in case Blob.js hasn't overridden it yet\n\t\t, get_URL = function() {\n\t\t\treturn view.URL || view.webkitURL || view;\n\t\t}\n\t\t, save_link = doc.createElementNS(\"http://www.w3.org/1999/xhtml\", \"a\")\n\t\t, can_use_save_link = \"download\" in save_link\n\t\t, click = function(node) {\n\t\t\tvar event = new MouseEvent(\"click\");\n\t\t\tnode.dispatchEvent(event);\n\t\t}\n\t\t, webkit_req_fs = view.webkitRequestFileSystem\n\t\t, req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem\n\t\t, throw_outside = function(ex) {\n\t\t\t(view.setImmediate || view.setTimeout)(function() {\n\t\t\t\tthrow ex;\n\t\t\t}, 0);\n\t\t}\n\t\t, force_saveable_type = \"application/octet-stream\"\n\t\t, fs_min_size = 0\n\t\t// See https://code.google.com/p/chromium/issues/detail?id=375297#c7 and\n\t\t// https://github.com/eligrey/FileSaver.js/commit/485930a#commitcomment-8768047\n\t\t// for the reasoning behind the timeout and revocation flow\n\t\t, arbitrary_revoke_timeout = 500 // in ms\n\t\t, revoke = function(file) {\n\t\t\tvar revoker = function() {\n\t\t\t\tif (typeof file === \"string\") { // file is an object URL\n\t\t\t\t\tget_URL().revokeObjectURL(file);\n\t\t\t\t} else { // file is a File\n\t\t\t\t\tfile.remove();\n\t\t\t\t}\n\t\t\t};\n\t\t\tif (view.chrome) {\n\t\t\t\trevoker();\n\t\t\t} else {\n\t\t\t\tsetTimeout(revoker, arbitrary_revoke_timeout);\n\t\t\t}\n\t\t}\n\t\t, dispatch = function(filesaver, event_types, event) {\n\t\t\tevent_types = [].concat(event_types);\n\t\t\tvar i = event_types.length;\n\t\t\twhile (i--) {\n\t\t\t\tvar listener = filesaver[\"on\" + event_types[i]];\n\t\t\t\tif (typeof listener === \"function\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlistener.call(filesaver, event || filesaver);\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\tthrow_outside(ex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t, auto_bom = function(blob) {\n\t\t\t// prepend BOM for UTF-8 XML and text/* types (including HTML)\n\t\t\tif (/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n\t\t\t\treturn new Blob([\"\\ufeff\", blob], {type: blob.type});\n\t\t\t}\n\t\t\treturn blob;\n\t\t}\n\t\t, FileSaver = function(blob, name) {\n\t\t\tblob = auto_bom(blob);\n\t\t\t// First try a.download, then web filesystem, then object URLs\n\t\t\tvar\n\t\t\t\t filesaver = this\n\t\t\t\t, type = blob.type\n\t\t\t\t, blob_changed = false\n\t\t\t\t, object_url\n\t\t\t\t, target_view\n\t\t\t\t, dispatch_all = function() {\n\t\t\t\t\tdispatch(filesaver, \"writestart progress write writeend\".split(\" \"));\n\t\t\t\t}\n\t\t\t\t// on any filesys errors revert to saving with object URLs\n\t\t\t\t, fs_error = function() {\n\t\t\t\t\t// don't create more object URLs than needed\n\t\t\t\t\tif (blob_changed || !object_url) {\n\t\t\t\t\t\tobject_url = get_URL().createObjectURL(blob);\n\t\t\t\t\t}\n\t\t\t\t\tif (target_view) {\n\t\t\t\t\t\ttarget_view.location.href = object_url;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar new_tab = view.open(object_url, \"_blank\");\n\t\t\t\t\t\tif (new_tab == undefined && typeof safari !== \"undefined\") {\n\t\t\t\t\t\t\t//Apple do not allow window.open, see http://bit.ly/1kZffRI\n\t\t\t\t\t\t\tview.location.href = object_url\n\t\t\t\t\t\t} \n\t\t\t\t\t}\n\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\tdispatch_all();\n\t\t\t\t\trevoke(object_url);\n\t\t\t\t}\n\t\t\t\t, abortable = function(func) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif (filesaver.readyState !== filesaver.DONE) {\n\t\t\t\t\t\t\treturn func.apply(this, arguments);\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\t, create_if_not_found = {create: true, exclusive: false}\n\t\t\t\t, slice\n\t\t\t;\n\t\t\tfilesaver.readyState = filesaver.INIT;\n\t\t\tif (!name) {\n\t\t\t\tname = \"download\";\n\t\t\t}\n\t\t\tif (save_link) {\n\t\t\t\tobject_url = get_URL().createObjectURL(blob);\n\t\t\t\t//window.open('data:attachment/csv;charset=utf-8,' + object_url);\n\t\t\t\tsave_link.href = object_url;\n\t\t\t\tsave_link.download = name;\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tclick(save_link);\n\t\t\t\t\tdispatch_all();\n\t\t\t\t\trevoke(object_url);\n\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Object and web filesystem URLs have a problem saving in Google Chrome when\n\t\t\t// viewed in a tab, so I force save with application/octet-stream\n\t\t\t// http://code.google.com/p/chromium/issues/detail?id=91158\n\t\t\t// Update: Google errantly closed 91158, I submitted it again:\n\t\t\t// https://code.google.com/p/chromium/issues/detail?id=389642\n\t\t\tif (view.chrome && type && type !== force_saveable_type) {\n\t\t\t\tslice = blob.slice || blob.webkitSlice;\n\t\t\t\tblob = slice.call(blob, 0, blob.size, force_saveable_type);\n\t\t\t\tblob_changed = true;\n\t\t\t}\n\t\t\t// Since I can't be sure that the guessed media type will trigger a download\n\t\t\t// in WebKit, I append .download to the filename.\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=65440\n\t\t\tif (webkit_req_fs && name !== \"download\") {\n\t\t\t\tname += \".download\";\n\t\t\t}\n\t\t\tif (type === force_saveable_type || webkit_req_fs) {\n\t\t\t\ttarget_view = view;\n\t\t\t}\n\t\t\tif (!req_fs) {\n\t\t\t\tfs_error();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfs_min_size += blob.size;\n\t\t\treq_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) {\n\t\t\t\tfs.root.getDirectory(\"saved\", create_if_not_found, abortable(function(dir) {\n\t\t\t\t\tvar save = function() {\n\t\t\t\t\t\tdir.getFile(name, create_if_not_found, abortable(function(file) {\n\t\t\t\t\t\t\tfile.createWriter(abortable(function(writer) {\n\t\t\t\t\t\t\t\twriter.onwriteend = function(event) {\n\t\t\t\t\t\t\t\t\ttarget_view.location.href = file.toURL();\n\t\t\t\t\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\t\t\t\t\tdispatch(filesaver, \"writeend\", event);\n\t\t\t\t\t\t\t\t\trevoke(file);\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\twriter.onerror = function() {\n\t\t\t\t\t\t\t\t\tvar error = writer.error;\n\t\t\t\t\t\t\t\t\tif (error.code !== error.ABORT_ERR) {\n\t\t\t\t\t\t\t\t\t\tfs_error();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\"writestart progress write abort\".split(\" \").forEach(function(event) {\n\t\t\t\t\t\t\t\t\twriter[\"on\" + event] = filesaver[\"on\" + event];\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\twriter.write(blob);\n\t\t\t\t\t\t\t\tfilesaver.abort = function() {\n\t\t\t\t\t\t\t\t\twriter.abort();\n\t\t\t\t\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tfilesaver.readyState = filesaver.WRITING;\n\t\t\t\t\t\t\t}), fs_error);\n\t\t\t\t\t\t}), fs_error);\n\t\t\t\t\t};\n\t\t\t\t\tdir.getFile(name, {create: false}, abortable(function(file) {\n\t\t\t\t\t\t// delete file if it already exists\n\t\t\t\t\t\tfile.remove();\n\t\t\t\t\t\tsave();\n\t\t\t\t\t}), abortable(function(ex) {\n\t\t\t\t\t\tif (ex.code === ex.NOT_FOUND_ERR) {\n\t\t\t\t\t\t\tsave();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfs_error();\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\t\t}), fs_error);\n\t\t\t}), fs_error);\n\t\t}\n\t\t, FS_proto = FileSaver.prototype\n\t\t, saveAs = function(blob, name) {\n\t\t\treturn new FileSaver(blob, name);\n\t\t}\n\t;\n\t// IE 10+ (native saveAs)\n\tif (typeof navigator !== \"undefined\" && navigator.msSaveOrOpenBlob) {\n\t\treturn function(blob, name) {\n\t\t\treturn navigator.msSaveOrOpenBlob(auto_bom(blob), name);\n\t\t};\n\t}\n\n\tFS_proto.abort = function() {\n\t\tvar filesaver = this;\n\t\tfilesaver.readyState = filesaver.DONE;\n\t\tdispatch(filesaver, \"abort\");\n\t};\n\tFS_proto.readyState = FS_proto.INIT = 0;\n\tFS_proto.WRITING = 1;\n\tFS_proto.DONE = 2;\n\n\tFS_proto.error =\n\tFS_proto.onwritestart =\n\tFS_proto.onprogress =\n\tFS_proto.onwrite =\n\tFS_proto.onabort =\n\tFS_proto.onerror =\n\tFS_proto.onwriteend =\n\t\tnull;\n\n\treturn saveAs;\n}(\n\t typeof self !== \"undefined\" && self\n\t|| typeof window !== \"undefined\" && window\n\t|| this.content\n));\n// `self` is undefined in Firefox for Android content script context\n// while `this` is nsIContentFrameMessageManager\n// with an attribute `content` that corresponds to the window\n\nif (typeof module !== \"undefined\" && module.exports) {\n module.exports.saveAs = saveAs;\n} else if ((typeof define !== \"undefined\" && define !== null) && (define.amd != null)) {\n define([], function() {\n return saveAs;\n });\n}","module.exports = function() {\n\tthrow new Error(\"define cannot be used indirect\");\n};\n","/* globals __webpack_amd_options__ */\nmodule.exports = __webpack_amd_options__;\n","angular.module('graphdb.workbench.utils.filetypes', [])\n .value('FileTypes', [\n {name: 'JSON', type: 'application/rdf+json', extension: '.json'},\n {name: 'JSON-LD', type: 'application/ld+json', extension: '.jsonld'},\n {name: 'RDF-XML', type: 'application/rdf+xml', extension: '.rdf'},\n {name: 'N3', type: 'text/rdf+n3', extension: '.n3'},\n {name: 'N-Triples', type: 'text/plain', extension: '.nt'},\n {name: 'N-Quads', type: 'text/x-nquads', extension: '.nq'},\n {name: 'Turtle', type: 'text/turtle', extension: '.ttl'},\n {name: 'Turtle*', type: 'application/x-turtlestar', extension: '.ttls'},\n {name: 'TriX', type: 'application/trix', extension: '.trix'},\n {name: 'TriG', type: 'application/x-trig', extension: '.trig'},\n {name: 'TriG*', type: 'application/x-trigstar', extension: '.trigs'},\n {name: 'Binary RDF', type: 'application/x-binary-rdf', extension: '.brf'}\n ]);\n","import 'angular/utils/file-types';\nimport YASR from 'lib/yasr.bundled';\nimport {saveAs} from 'lib/FileSaver-patch';\nimport {decodeHTML} from \"../../../app\";\n\nconst modules = [\n 'ngCookies',\n 'ngRoute',\n 'ui.bootstrap',\n 'toastr',\n 'graphdb.framework.core',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.explore.services',\n 'graphdb.workbench.utils.filetypes'\n];\n\nangular\n .module('graphdb.framework.explore.controllers', modules)\n .controller('FindResourceCtrl', FindResourceCtrl)\n .controller('ExploreCtrl', ExploreCtrl)\n .controller('EditResourceCtrl', EditResourceCtrl)\n .controller('ViewTrigCtrl', ViewTrigCtrl);\n\nExploreCtrl.$inject = ['$scope', '$http', '$location', 'toastr', '$routeParams', '$repositories', 'ClassInstanceDetailsService', 'ModalService', 'RDF4JRepositoriesRestService', 'FileTypes', '$jwtAuth', '$translate', '$languageService', '$q'];\n\nfunction ExploreCtrl($scope, $http, $location, toastr, $routeParams, $repositories, ClassInstanceDetailsService, ModalService, RDF4JRepositoriesRestService, FileTypes, $jwtAuth, $translate, $languageService, $q) {\n\n let principalRequestPromise;\n // We need to get sameAs and inference for the current user\n // Using $q.when to proper set values in view\n $q.when($jwtAuth.getPrincipal())\n .then((principal) => {\n // Get the predefined settings for sameAs and inference per user\n $scope.inference = principal.appSettings['DEFAULT_INFERENCE'] ? 'all' : 'explicit';\n $scope.sameAs = principal.appSettings['DEFAULT_INFERENCE'] && principal.appSettings['DEFAULT_SAMEAS'];\n });\n\n $scope.loading = false;\n\n $scope.getActiveRepository = function () {\n return $repositories.getActiveRepository();\n };\n\n $scope.isTripleResource = function () {\n return !!$scope.tripleParam;\n };\n\n // TODO move this to core\n $scope.encodeURIComponent = function (param) {\n return encodeURIComponent(param);\n };\n\n $scope.getRdfStarLocalNames = function(triple) {\n let localNames = triple.slice();\n const trimmed = triple.replace(/[<>]+/g, '');\n trimmed.split(' ').forEach(uri => {\n localNames = localNames.replace(uri, ClassInstanceDetailsService.getLocalName(uri));\n });\n return localNames;\n };\n\n // Defaults\n $scope.role = $location.search().role ? $location.search().role : 'subject';\n // Fixed inference when we're showing the context tab and a named graph\n $scope.inferenceNamed = 'explicit';\n $scope.inferences = [\n {id: 'all', title: 'explore.explicit.implicit'},\n {id: 'explicit', title: 'explore.explicit'},\n {id: 'implicit', title: 'explore.implicit'}\n ];\n $scope.context = '';\n\n $scope.getLocalName = function (uri) {\n return ClassInstanceDetailsService.getLocalName(uri);\n };\n\n $scope.blanks = true;\n\n $scope.formats = FileTypes;\n\n let yasr;\n\n window.editor = {};\n window.editor.getQueryType = function () {\n return 'RESOURCE';\n };\n\n $scope.$watch(function () {\n return $repositories.getActiveRepository();\n }, function () {\n if ($scope.getActiveRepository()) {\n if ($scope.usedPrefixes) {\n $scope.loadResource();\n } else {\n RDF4JRepositoriesRestService.getNamespaces($scope.getActiveRepository())\n .success(function (data) {\n $scope.usedPrefixes = {};\n data.results.bindings.forEach(function (e) {\n $scope.usedPrefixes[e.prefix.value] = e.namespace.value;\n });\n yasr = YASR(document.getElementById('yasr'), { // eslint-disable-line new-cap\n //this way, the URLs in the results are prettified using the defined prefixes\n getUsedPrefixes: $scope.usedPrefixes,\n persistency: false,\n hideHeader: true,\n locale: $languageService.getLanguage()\n });\n $scope.loadResource();\n }).error(function (data) {\n toastr.error($translate.instant('get.namespaces.error.msg', {error: getError(data)}));\n });\n }\n }\n });\n\n $scope.loadResource = function () {\n if ($routeParams.prefix && $routeParams.localName && $scope.usedPrefixes[$routeParams.prefix]) {\n // /resource/PREFIX/LOCAL -> URI = expanded PREFIX + LOCAL\n $scope.uriParam = $scope.usedPrefixes[$routeParams.prefix] + $routeParams.localName;\n } else if ($location.search().uri) {\n // uri parameter -> URI\n $scope.uriParam = $location.search().uri + ($location.hash() ? '#' + $location.hash() : '');\n } else if ($location.search().triple) {\n // uri parameter -> URI\n $scope.tripleParam = $location.search().triple + ($location.hash() ? '#' + $location.hash() : '');\n } else {\n // absolute URI -> URI\n $scope.uriParam = $location.absUrl();\n }\n if ($routeParams.context != null) {\n $scope.context = $routeParams.context;\n }\n // remove angle brackets which were allowed when filling out the search input field\n // but are forbidden when passing the uri as a query parameter\n $scope.uriParam = $scope.uriParam && $scope.uriParam.replace(/<|>/g, \"\");\n\n // Get resource details\n $http({\n url: 'rest/explore/details',\n method: 'GET',\n params: {\n uri: $scope.uriParam,\n triple: $scope.tripleParam,\n context: $scope.context\n },\n headers: {\n 'Accept': 'application/json'\n }\n }).success(function (data) {\n $scope.details = data;\n $scope.context = $scope.details.context;\n if ($scope.details.uri !== 'object') {\n $scope.details.encodeURI = encodeURIComponent($scope.details.uri);\n }\n }).error(function (data) {\n toastr.error($translate.instant('explore.error.resource.details', {data: getError(data)}));\n });\n\n $scope.exploreResource();\n };\n\n $scope.isContextAvailable = function () {\n return $scope.context !== null && $scope.context === \"http://rdf4j.org/schema/rdf4j#SHACLShapeGraph\";\n };\n\n $scope.goToGraphsViz = function () {\n $location.path('graphs-visualizations').search('uri', $scope.uriParam);\n };\n\n const toggleOntoLoader = function (showLoader) {\n const yasrInnerContainer = angular.element(document.getElementById('yasr-inner'));\n const resultsLoader = angular.element(document.getElementById('results-loader'));\n const opacityHideClass = 'opacity-hide';\n /* Angular b**it. For some reason the loader behaved strangely with ng-show not always showing */\n if (showLoader) {\n $scope.loading = true;\n yasrInnerContainer.addClass(opacityHideClass);\n resultsLoader.removeClass(opacityHideClass);\n } else {\n $scope.loading = false;\n yasrInnerContainer.removeClass(opacityHideClass);\n resultsLoader.addClass(opacityHideClass);\n }\n };\n\n // Get resource table\n $scope.exploreResource = function () {\n toggleOntoLoader(true);\n if ($routeParams.context != null) {\n $scope.context = $routeParams.context;\n }\n // wait for principal request if it has not finished and then fetch graph\n Promise.resolve(principalRequestPromise)\n .then(() => getGraph());\n };\n\n function getGraph() {\n const headers = {Accept: 'application/x-graphdb-table-results+json'};\n $.ajax({\n method: 'GET',\n url: 'rest/explore/graph',\n data: {\n uri: $scope.uriParam,\n triple: $scope.tripleParam,\n inference: $scope.inference,\n role: $scope.role,\n bnodes: $scope.blanks,\n sameAs: $scope.sameAs,\n context: $scope.context\n },\n headers: headers\n }).done(function (data, textStatus, jqXhr) {\n toggleOntoLoader(false);\n // Pass the xhr argument first as the yasr expects it that way. See https://ontotext.atlassian.net/browse/GDB-3939\n yasr.setResponse(jqXhr, textStatus);\n }).fail(function (data) {\n toastr.error($translate.instant('explore.error.resource', {data: getError(data)}));\n toggleOntoLoader(false);\n });\n }\n\n $scope.downloadExport = function (format) {\n let param;\n let encodedURI;\n if ($scope.uriParam) {\n param = 'uri=';\n encodedURI = encodeURIComponent($scope.uriParam);\n } else {\n param = 'triple=';\n encodedURI = encodeURIComponent($scope.tripleParam);\n }\n\n $http({\n method: 'GET',\n url: 'rest/explore/graph?' + param + encodedURI +\n \"&role=\" + $scope.role +\n \"&inference=\" + $scope.inference +\n \"&bnodes=\" + $scope.blanks +\n \"&sameAs=\" + $scope.sameAs +\n ($scope.context ? \"&context=\" + encodeURIComponent($scope.context) : \"\"),\n headers: {\n 'Accept': format.type\n }\n }).success(function (response) {\n let data = response;\n if (format.type.indexOf('json') > -1) {\n data = JSON.stringify(data);\n }\n // TODO: Use bowser library to get the browser type\n const ua = navigator.userAgent.toLowerCase();\n if (ua.indexOf('safari') !== -1 && ua.indexOf('chrome') === -1) {\n window.open('data:attachment/csv;filename=\"statements.' + format.extension + '\",' + encodeURIComponent(data), 'statements.' + format.extension);\n } else {\n const file = new Blob([data], {type: format.type});\n saveAs(file, 'statements' + format.extension);\n }\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n });\n };\n\n $scope.changeRole = function (roleVar) {\n $scope.role = roleVar;\n $scope.exploreResource();\n };\n\n $scope.changeInference = function (inference) {\n $scope.inference = inference;\n $scope.exploreResource();\n };\n\n $scope.copyToClipboardResult = function (uri) {\n ModalService.openCopyToClipboardModal(uri);\n };\n\n $scope.$on('language-changed', function (event, args) {\n if (yasr && yasr.options) {\n yasr.options.locale = args.locale;\n yasr.changeLanguage(args.locale);\n }\n });\n}\n\nFindResourceCtrl.$inject = ['$scope', '$http', '$location', '$repositories', '$q', '$timeout', 'toastr', 'AutocompleteRestService', 'ClassInstanceDetailsService', '$routeParams', 'RDF4JRepositoriesRestService', '$translate'];\n\nfunction FindResourceCtrl($scope, $http, $location, $repositories, $q, $timeout, toastr, AutocompleteRestService, ClassInstanceDetailsService, $routeParams, RDF4JRepositoriesRestService, $translate) {\n $scope.submit = submit;\n $scope.getAutocompleteSuggestions = getAutocompleteSuggestions;\n $scope.inputChangedFn = inputChangedFn;\n $scope.selectedUriCallback = selectedUriCallback;\n\n $scope.selectedUri = {name: \"\"};\n\n $scope.autocompleteEnabled = false;\n\n if (angular.isDefined($routeParams.search)) {\n $timeout(function () {\n $('#resources_finder_value').val($routeParams.search);\n $('.search-button').click();\n }, 500);\n }\n\n function checkAutocompleteStatus() {\n AutocompleteRestService.checkAutocompleteStatus()\n .success(function (response) {\n if (!response) {\n const warningMsg = decodeHTML($translate.instant('explore.autocomplete.warning.msg'));\n toastr.warning('', `<div class=\"autocomplete-toast\"><a href=\"autocomplete\">${warningMsg}</a></div>`,\n {allowHtml: true});\n }\n $scope.autocompleteEnabled = response;\n })\n .error(function () {\n toastr.error($translate.instant('explore.error.autocomplete'));\n });\n }\n\n function getAllNamespacesForActiveRepository() {\n RDF4JRepositoriesRestService.getNamespaces($repositories.getActiveRepository())\n .success(function (data) {\n $scope.namespaces = data.results.bindings.map(function (e) {\n return {\n prefix: e.prefix.value,\n uri: e.namespace.value\n };\n });\n $scope.loader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n }\n\n function validateRdfUri(value) {\n // has a pair of angle brackets and the closing one is the last char of the string\n const hasAngleBrackets = value.indexOf(\"<\") >= 0 && value.lastIndexOf(\">\") === value.length - 1;\n\n // does not have a pair of angle bracket - if only one of the is available that is incorrect\n const noAngleBrackets = value.indexOf(\"<\") === -1 && value.lastIndexOf(\">\") === -1;\n\n const validProtocol = /^<?[http|urn].*>?$/.test(value) && (hasAngleBrackets || noAngleBrackets);\n let validPath = false;\n if (validProtocol) {\n if (value.indexOf(\"http\") >= 0) {\n const schemaSlashesIdx = value.indexOf('//');\n validPath = schemaSlashesIdx > 4\n && value.substring(schemaSlashesIdx + 2).length > 0;\n } else if (value.indexOf(\"urn\") >= 0) {\n validPath = value.substring(4).length > 0;\n }\n }\n return validProtocol && validPath;\n }\n\n let uri;\n\n function submit(uri) {\n function setFormInvalid(isDirty) {\n // does not work yet\n $timeout(function () {\n if ($scope.form) {\n $scope.form.$dirty = isDirty;\n }\n });\n }\n\n if (!uri) {\n uri = document.getElementById(\"resources_finder_value\").value;\n }\n if (uri && validateRdfUri(uri)) {\n setFormInvalid(false);\n $location\n .path('resource')\n .search('uri', uri);\n } else {\n setFormInvalid(true);\n if (uri) {\n toastr.error($translate.instant('explore.error.invalid.input'));\n }\n }\n }\n\n if ($scope.getActiveRepository()) {\n checkAutocompleteStatus();\n getAllNamespacesForActiveRepository();\n }\n\n // use a global var to keep old uri in order to change it when a new one appears\n let expandedUri;\n\n function getAutocompleteSuggestions(str) {\n // expand prefix to uri only if the last character of the input is a colon and\n // there are no angle brackets because they are allowed only for absolute uris\n const ANGLE_BRACKETS_REGEX = /<|>/;\n if (!ANGLE_BRACKETS_REGEX.test(str) && str.slice(-1) === ':') {\n const newExpandedUri = ClassInstanceDetailsService.getNamespaceUriForPrefix($scope.namespaces, str.slice(0, -1));\n expandedUri = (newExpandedUri !== expandedUri) ? newExpandedUri : expandedUri;\n if (expandedUri) {\n $(\"#resources_finder_value\").val(expandedUri);\n }\n }\n\n let promise;\n if ($scope.autocompleteEnabled) {\n // add semicolon after the expanded uri in order to filter only by local names for this uri\n const query = str.replace(expandedUri, expandedUri + ';');\n promise = AutocompleteRestService.getAutocompleteSuggestions(query);\n } else {\n // return empty promise\n promise = $q.when($scope.autocompleteEnabled);\n }\n return promise;\n }\n\n $scope.$on('repositoryIsSet', function () {\n checkAutocompleteStatus();\n getAllNamespacesForActiveRepository();\n });\n\n function inputChangedFn() {\n uri = document.getElementById(\"resources_finder_value\").value;\n $scope.form.$dirty = !(uri && validateRdfUri(uri));\n }\n\n function selectedUriCallback(selected) {\n $scope.selectedUri = {name: selected.title};\n submit($scope.selectedUri.name);\n }\n}\n\nEditResourceCtrl.$inject = ['$scope', '$http', '$location', 'toastr', '$repositories', '$modal', '$timeout', 'ClassInstanceDetailsService', 'StatementsService', 'RDF4JRepositoriesRestService', '$translate'];\n\nfunction EditResourceCtrl($scope, $http, $location, toastr, $repositories, $modal, $timeout, ClassInstanceDetailsService, StatementsService, RDF4JRepositoriesRestService, $translate) {\n $scope.uriParam = $location.search().uri;\n $scope.newRow = {\n subject: $scope.uriParam,\n object: {\n type: 'uri',\n datatype: ''\n }\n };\n $scope.newResource = false;\n $scope.datatypeOptions = StatementsService.getDatatypeOptions();\n\n $scope.activeRepository = function () {\n return $repositories.getActiveRepository();\n };\n\n $scope.getClassInstancesDetails = getClassInstancesDetails;\n $scope.addStatement = addStatement;\n $scope.removeStatement = removeStatement;\n $scope.getLocalName = getLocalName;\n $scope.checkValid = checkValid;\n $scope.validEditRow = validEditRow;\n $scope.viewTrig = viewTrig;\n $scope.save = save;\n\n function getClassInstancesDetails() {\n RDF4JRepositoriesRestService.getNamespaces($scope.activeRepository())\n .success(function (data) {\n $scope.namespaces = data.results.bindings.map(function (e) {\n return {\n prefix: e.prefix.value,\n uri: e.namespace.value\n };\n });\n $scope.loader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n\n ClassInstanceDetailsService.getDetails($scope.uriParam)\n .success(function (data) {\n $scope.details = data;\n $scope.details.encodeURI = encodeURIComponent($scope.details.uri);\n }).error(function (data) {\n toastr.error($translate.instant('explore.error.resource.details', {data: getError(data)}));\n });\n\n ClassInstanceDetailsService.getGraph($scope.uriParam)\n .then(function (res) {\n const statements = StatementsService.buildStatements(res, $scope.uriParam);\n $scope.statements = statements;\n $scope.newResource = !statements.length;\n });\n }\n\n $scope.$watch(function () {\n return $repositories.getActiveRepository();\n }, function () {\n if ($scope.activeRepository()) {\n $scope.getClassInstancesDetails();\n }\n });\n\n $scope.validateUri = function (val) {\n let check = true;\n const text = val ? val : '';\n\n if (text.indexOf(':') === -1) {\n check = false;\n } else {\n const prefix = text.substring(0, text.indexOf(':'));\n const uriForPrefixNotAvailable = ClassInstanceDetailsService.getNamespaceUriForPrefix($scope.namespaces, prefix) === '';\n if (uriForPrefixNotAvailable) {\n // TODO: There's this reported useless escape character for this regex, but I'm not sure if and can I fix it.\n if (/^(http:\\/\\/www\\.|https:\\/\\/www\\.|http:\\/\\/|https:\\/\\/)[a-z0-9]+([\\-\\.]{1}[a-z0-9]+)*\\.[a-z]{2,5}(:[0-9]{1,5})?(\\/.*)?$/.test(text) === false) {\n check = false;\n }\n\n const count = text.match(/\\//g);\n\n if (count === undefined || count.length < 3) {\n check = false;\n }\n } else {\n const restText = text.substring(text.indexOf(':') + 1).trim();\n if (restText.length < 1) {\n check = false;\n }\n }\n }\n\n return check;\n };\n\n function addStatement() {\n $scope.newRowPredicate.$setSubmitted();\n $scope.newRowObject.$setSubmitted();\n $scope.newRowContext.$setSubmitted();\n if ($scope.newRowPredicate.$valid && $scope.newRowObject.$valid && $scope.newRowContext.$valid) {\n $scope.statements.push(angular.copy($scope.newRow));\n $scope.newRow = {\n subject: $scope.uriParam,\n object: {\n type: 'uri',\n datatype: ''\n }\n };\n $scope.newRowPredicate.$setPristine();\n $scope.newRowPredicate.$setUntouched();\n $scope.newRowObject.$setPristine();\n $scope.newRowObject.$setUntouched();\n $scope.newRowContext.$setPristine();\n $scope.newRowContext.$setUntouched();\n }\n }\n\n function checkValid(data) {\n if (!angular.isUndefined(data)) {\n return true;\n }\n return $translate.instant('explore.validation');\n }\n\n function validEditRow() {\n return $scope.rowform.$valid;\n }\n\n function removeStatement(idx) {\n $scope.statements.splice(idx, 1);\n }\n\n function getLocalName(uri) {\n return ClassInstanceDetailsService.getLocalName(uri);\n }\n\n function viewTrig() {\n $modal.open({\n templateUrl: 'js/angular/explore/templates/viewTrig.html',\n controller: 'ViewTrigCtrl',\n size: 'lg',\n resolve: {\n data: function () {\n return StatementsService.transformToTrig($scope.statements);\n }\n }\n });\n }\n\n function save() {\n const method = $scope.newResource ? 'POST' : 'PUT';\n $http({\n method: method,\n url: 'rest/resource?uri=' + encodeURIComponent($scope.uriParam),\n headers: {\n 'Content-Type': 'application/x-trig'\n },\n data: StatementsService.transformToTrig($scope.statements)\n }).success(function () {\n toastr.success($translate.instant('explore.resource.saved'));\n const timer = $timeout(function () {\n $location.path('resource').search('uri', $scope.uriParam);\n }, 500);\n $scope.$on(\"$destroy\", function () {\n $timeout.cancel(timer);\n });\n }).error(function (data) {\n toastr.error(getError(data));\n });\n }\n}\n\nViewTrigCtrl.$inject = ['$scope', '$modalInstance', 'data'];\n\nfunction ViewTrigCtrl($scope, $modalInstance, data) {\n $scope.trig = data;\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n}\n"],"sourceRoot":""}