graphdb-workbench 2.0.0-TR4 → 2.0.0-TR8
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.
- package/dist/{0.21974a2453b9a92dec33.bundle.js → 0.965871b861f4dddbba56.bundle.js} +3 -3
- package/dist/0.965871b861f4dddbba56.bundle.js.map +1 -0
- package/dist/{112.b871480dd961ac3c18b6.bundle.js → 112.0c1bdd906ac321ffbf5f.bundle.js} +2 -2
- package/dist/{112.b871480dd961ac3c18b6.bundle.js.map → 112.0c1bdd906ac321ffbf5f.bundle.js.map} +1 -1
- package/dist/114.282a327015f8ae87918b.bundle.js +1 -1
- package/dist/114.282a327015f8ae87918b.bundle.js.map +1 -1
- package/dist/{12.449fb5148a68a44ba324.bundle.js → 12.60db051e76264d3f95b2.bundle.js} +2 -2
- package/dist/12.60db051e76264d3f95b2.bundle.js.map +1 -0
- package/dist/13.1419a81a33174950a34c.bundle.js +4 -0
- package/dist/13.1419a81a33174950a34c.bundle.js.map +1 -0
- package/dist/14.7e9059b5c9c57d952e47.bundle.js +2 -0
- package/dist/14.7e9059b5c9c57d952e47.bundle.js.map +1 -0
- package/dist/15.02ad5872995df6d6692a.bundle.js +2 -0
- package/dist/15.02ad5872995df6d6692a.bundle.js.map +1 -0
- package/dist/{17.4b048ae019a8d2fd5b46.bundle.js → 17.8bfbe7d08efa149bdb00.bundle.js} +2 -2
- package/dist/17.8bfbe7d08efa149bdb00.bundle.js.map +1 -0
- package/dist/21.e75213686a349ae7df89.bundle.js +1 -1
- package/dist/21.e75213686a349ae7df89.bundle.js.map +1 -1
- package/dist/25.cbe8e59c80330ff6e706.bundle.js +2 -0
- package/dist/25.cbe8e59c80330ff6e706.bundle.js.map +1 -0
- package/dist/26.67154910989ca1f563ec.bundle.js +2 -0
- package/dist/26.67154910989ca1f563ec.bundle.js.map +1 -0
- package/dist/27.61bd08d0e926fe471a91.bundle.js +2 -0
- package/dist/27.61bd08d0e926fe471a91.bundle.js.map +1 -0
- package/dist/29.66259b8a21bbb5431a06.bundle.js +1 -1
- package/dist/29.66259b8a21bbb5431a06.bundle.js.map +1 -1
- package/dist/{30.4d469715c2f2d1028b4b.bundle.js → 30.3592aaa1063719853218.bundle.js} +2 -2
- package/dist/30.3592aaa1063719853218.bundle.js.map +1 -0
- package/dist/{33.ea3b66016bbeff928fc3.bundle.js → 33.c670eeb3a325251e141f.bundle.js} +2 -2
- package/dist/33.c670eeb3a325251e141f.bundle.js.map +1 -0
- package/dist/34.22a096bd891109c927f5.bundle.js +2 -0
- package/dist/34.22a096bd891109c927f5.bundle.js.map +1 -0
- package/dist/36.d444f7ad7724d126da1c.bundle.js +1 -1
- package/dist/36.d444f7ad7724d126da1c.bundle.js.map +1 -1
- package/dist/37.e82ed70c9f1ccac1fa36.bundle.js +1 -1
- package/dist/37.e82ed70c9f1ccac1fa36.bundle.js.map +1 -1
- package/dist/49.80591a5efda019de6e4a.bundle.js +2 -0
- package/dist/49.80591a5efda019de6e4a.bundle.js.map +1 -0
- package/dist/7.0d2811d01a379d8b75fb.bundle.js +3 -0
- package/dist/7.0d2811d01a379d8b75fb.bundle.js.map +1 -0
- package/dist/8.66013fc0c58811b51903.bundle.js +2 -0
- package/dist/8.66013fc0c58811b51903.bundle.js.map +1 -0
- package/dist/{bundle.9245d22c0fae1701aa84.bundle.js → bundle.e787556c9b592367c35c.bundle.js} +4 -4
- package/dist/bundle.e787556c9b592367c35c.bundle.js.map +1 -0
- package/dist/css/graphs-vizualizations.css +9 -1
- package/dist/css/lib/yasr.css +1 -0
- package/dist/css/yasr.custom.css +9 -0
- package/dist/index.html +4 -4
- package/dist/js/angular/core/directives/queryeditor/templates/query-editor.html +1 -0
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/{main.ea86ac1b6d636ab25dc7.css → main.db108895fbac32ad7e7b.css} +1 -1
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/clusterInfo.html +1 -1
- package/dist/pages/create-index.html +4 -4
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +1 -1
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +11 -11
- package/dist/pages/graphs-visualizations.html +13 -9
- package/dist/pages/import.html +1 -1
- package/dist/pages/jdbc-create.html +5 -5
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +2 -2
- package/dist/pages/namespaces.html +2 -2
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +2 -2
- package/dist/pages/repository.html +2 -2
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-template-create.html +5 -5
- package/dist/pages/sparql.html +3 -3
- package/dist/pages/webapi.html +2 -2
- package/dist/res/swagger/index.html +25 -25
- package/package.json +1 -1
- package/dist/0.21974a2453b9a92dec33.bundle.js.map +0 -1
- package/dist/12.449fb5148a68a44ba324.bundle.js.map +0 -1
- package/dist/13.a1f1742be19b26f1959e.bundle.js +0 -4
- package/dist/13.a1f1742be19b26f1959e.bundle.js.map +0 -1
- package/dist/14.a1d84445382b665e13e0.bundle.js +0 -2
- package/dist/14.a1d84445382b665e13e0.bundle.js.map +0 -1
- package/dist/15.73ffeb044255abbac7bf.bundle.js +0 -2
- package/dist/15.73ffeb044255abbac7bf.bundle.js.map +0 -1
- package/dist/17.4b048ae019a8d2fd5b46.bundle.js.map +0 -1
- package/dist/25.34da4f496fc62f2dae9b.bundle.js +0 -2
- package/dist/25.34da4f496fc62f2dae9b.bundle.js.map +0 -1
- package/dist/26.02814d2ed726f5a71d4e.bundle.js +0 -2
- package/dist/26.02814d2ed726f5a71d4e.bundle.js.map +0 -1
- package/dist/27.5a64597ee4a947af77fa.bundle.js +0 -2
- package/dist/27.5a64597ee4a947af77fa.bundle.js.map +0 -1
- package/dist/30.4d469715c2f2d1028b4b.bundle.js.map +0 -1
- package/dist/33.ea3b66016bbeff928fc3.bundle.js.map +0 -1
- package/dist/34.620159c2b04af0a88d1b.bundle.js +0 -2
- package/dist/34.620159c2b04af0a88d1b.bundle.js.map +0 -1
- package/dist/49.71f6e0f6f3284bf63cab.bundle.js +0 -2
- package/dist/49.71f6e0f6f3284bf63cab.bundle.js.map +0 -1
- package/dist/7.036cd4322fa473fb187a.bundle.js +0 -3
- package/dist/7.036cd4322fa473fb187a.bundle.js.map +0 -1
- package/dist/8.46db359ed59a04d3799b.bundle.js +0 -2
- package/dist/8.46db359ed59a04d3799b.bundle.js.map +0 -1
- package/dist/bundle.9245d22c0fae1701aa84.bundle.js.map +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[7,104],{213: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,h=!1,x=function(){l(m,"writestart progress write writeend".split(" "))},w=function(){(!h&&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,x(),c(p)},y=function(e){return function(){if(m.readyState!==m.DONE)return e.apply(this,arguments)}},R={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),x(),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"),h=!0),o&&"download"!==a&&(a+=".download"),("application/octet-stream"===g||o)&&(d=e),i?(s+=t.size,i(e.TEMPORARY,s,y((function(e){e.root.getDirectory("saved",R,y((function(e){var n=function(){e.getFile(a,R,y((function(e){e.createWriter(y((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},y((function(e){e.remove(),n()})),y((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(214)&&null!=n(215)&&(void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r))},214:function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},215:function(e,t){(function(t){e.exports=t}).call(this,{})},36: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"}])},83:function(e,t,n){"use strict";n.r(t);n(36);var r=n(210),o=n.n(r),i=n(213);function a(e,t,n,r,a,s,c,l,u,p,d){const f=d.getPrincipal();let m;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:"Explicit and Implicit"},{id:"explicit",title:"Explicit only"},{id:"implicit",title:"Implicit only"}],e.context="",e.getLocalName=function(e){return c.getLocalName(e)},e.blanks=!0,e.inference=f.appSettings.DEFAULT_INFERENCE?"all":"explicit",e.sameAs=f.appSettings.DEFAULT_INFERENCE&&f.appSettings.DEFAULT_SAMEAS,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})),m=o()(document.getElementById("yasr"),{getUsedPrefixes:e.usedPrefixes,persistency:!1,hideHeader:!0}),e.loadResource()})).error((function(e){r.error("Cannot get namespaces for repository. View will not work properly; "+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("Cannot get resource details; "+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 g=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(){g(!0),null!=a.context&&(e.context=a.context);$.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){g(!1),m.setResponse(n,t)})).fail((function(e){r.error("Could not get resource; "+getError(e)),g(!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,"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)}}function s(e,t,n,r,o,i,a,s,c,l,u){function p(){s.checkAutocompleteStatus().success((function(t){t||a.warning("",'<div class="autocomplete-toast"><a href="autocomplete">Autocomplete is OFF<br>Go to Setup -> Autocomplete</a></div>',{allowHtml:!0}),e.autocompleteEnabled=t})).error((function(){a.error("Error attempting to check autocomplete capability!")}))}function d(){u.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);a.error(n,"Error"),e.loader=!1}))}function f(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 m,g;function h(t){function r(t){i((function(){e.form&&(e.form.$dirty=t)}))}t||(t=document.getElementById("resources_finder_value").value),t&&f(t)?(r(!1),n.path("resource").search("uri",t)):(r(!0),t&&a.error("Invalid input!"))}e.submit=h,e.getAutocompleteSuggestions=function(t){if(!/<|>/.test(t)&&":"===t.slice(-1)){const n=c.getNamespaceUriForPrefix(e.namespaces,t.slice(0,-1));g=n!==g?n:g,g&&$("#resources_finder_value").val(g)}let n;if(e.autocompleteEnabled){const e=t.replace(g,g+";");n=s.getAutocompleteSuggestions(e)}else n=o.when(e.autocompleteEnabled);return n},e.inputChangedFn=function(){m=document.getElementById("resources_finder_value").value,e.form.$dirty=!(m&&f(m))},e.selectedUriCallback=function(t){e.selectedUri={name:t.title},h(e.selectedUri.name)},e.selectedUri={name:""},e.autocompleteEnabled=!1,angular.isDefined(l.search)&&i((function(){$("#resources_finder_value").val(l.search),$(".search-button").click()}),500),e.getActiveRepository()&&(p(),d()),e.$on("repositoryIsSet",(function(){p(),d()}))}function c(e,t,n,r,o,i,a,s,c,l){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,"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("Cannot get resource details; "+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"Please enter a valid value."},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("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 l(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",s).controller("ExploreCtrl",a).controller("EditResourceCtrl",c).controller("ViewTrigCtrl",l),a.$inject=["$scope","$http","$location","toastr","$routeParams","$repositories","ClassInstanceDetailsService","ModalService","RDF4JRepositoriesRestService","FileTypes","$jwtAuth"],s.$inject=["$scope","$http","$location","$repositories","$q","$timeout","toastr","AutocompleteRestService","ClassInstanceDetailsService","$routeParams","RDF4JRepositoriesRestService"],c.$inject=["$scope","$http","$location","toastr","$repositories","$modal","$timeout","ClassInstanceDetailsService","StatementsService","RDF4JRepositoriesRestService"],l.$inject=["$scope","$modalInstance","data"]}}]);
|
|
3
|
+
//# sourceMappingURL=7.0d2811d01a379d8b75fb.bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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","principal","getPrincipal","yasr","loading","getActiveRepository","isTripleResource","tripleParam","encodeURIComponent","param","getRdfStarLocalNames","triple","localNames","replace","uri","getLocalName","role","search","inferenceNamed","inferences","id","title","context","blanks","inference","appSettings","sameAs","formats","editor","getQueryType","$watch","usedPrefixes","loadResource","getNamespaces","success","data","results","bindings","e","prefix","namespace","getElementById","getUsedPrefixes","persistency","hideHeader","getError","localName","uriParam","hash","absUrl","url","method","params","headers","details","encodeURI","exploreResource","isContextAvailable","goToGraphsViz","path","toggleOntoLoader","showLoader","yasrInnerContainer","element","resultsLoader","addClass","removeClass","$","ajax","bnodes","Accept","done","textStatus","jqXhr","setResponse","fail","downloadExport","format","encodedURI","response","indexOf","JSON","stringify","ua","toLowerCase","msg","changeRole","roleVar","changeInference","copyToClipboardResult","openCopyToClipboardModal","FindResourceCtrl","$q","$timeout","AutocompleteRestService","checkAutocompleteStatus","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","when","inputChangedFn","selectedUriCallback","selected","selectedUri","isDefined","click","$on","EditResourceCtrl","$modal","StatementsService","newRow","subject","object","datatype","newResource","datatypeOptions","getDatatypeOptions","activeRepository","getClassInstancesDetails","getDetails","getGraph","then","res","statements","buildStatements","addStatement","newRowPredicate","$setSubmitted","newRowObject","newRowContext","$valid","push","copy","$setPristine","$setUntouched","removeStatement","idx","splice","checkValid","isUndefined","validEditRow","rowform","viewTrig","templateUrl","controller","resolve","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,EAA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2811d01a379d8b75fb.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';\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'];\n\nfunction ExploreCtrl($scope, $http, $location, toastr, $routeParams, $repositories, ClassInstanceDetailsService, ModalService, RDF4JRepositoriesRestService, FileTypes, $jwtAuth) {\n\n // We need to get sameAs and inference for the current user\n const principal = $jwtAuth.getPrincipal();\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: 'Explicit and Implicit'},\n {id: 'explicit', title: 'Explicit only'},\n {id: 'implicit', title: 'Implicit only'}\n ];\n $scope.context = '';\n\n $scope.getLocalName = function (uri) {\n return ClassInstanceDetailsService.getLocalName(uri);\n };\n\n $scope.blanks = true;\n\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 $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 });\n $scope.loadResource();\n }).error(function (data) {\n toastr.error('Cannot get namespaces for repository. View will not work properly; ' + 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('Cannot get resource details; ' + 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 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('Could not get resource; ' + 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, '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\nFindResourceCtrl.$inject = ['$scope', '$http', '$location', '$repositories', '$q', '$timeout', 'toastr', 'AutocompleteRestService', 'ClassInstanceDetailsService', '$routeParams', 'RDF4JRepositoriesRestService'];\n\nfunction FindResourceCtrl($scope, $http, $location, $repositories, $q, $timeout, toastr, AutocompleteRestService, ClassInstanceDetailsService, $routeParams, RDF4JRepositoriesRestService) {\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 toastr.warning('', '<div class=\"autocomplete-toast\"><a href=\"autocomplete\">Autocomplete is OFF<br>Go to Setup -> Autocomplete</a></div>',\n {allowHtml: true});\n }\n $scope.autocompleteEnabled = response;\n })\n .error(function () {\n toastr.error(\"Error attempting to check autocomplete capability!\");\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, '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(\"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'];\n\nfunction EditResourceCtrl($scope, $http, $location, toastr, $repositories, $modal, $timeout, ClassInstanceDetailsService, StatementsService, RDF4JRepositoriesRestService) {\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, '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('Cannot get resource details; ' + 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 \"Please enter a valid value.\";\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(\"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":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[8,26,34,49,85],{29:function(e,t){angular.module("graphdb.framework.rest.connectors.service",[]).factory("ConnectorsRestService",r),r.$inject=["$http"];const n="rest/connectors";function r(e){return{getConnectors:function(){return e.get(n)},initConnector:function(t){return e.get(`${n}/options?prefix=${t}`)},hasConnector:function(t){return e.get(`${n}/existing?prefix=${t}`)},checkConnector:function(t){return e.post(`${n}/check`,t,{headers:{"Content-Type":"text/plain"}})}}}},32:function(e,t,n){"use strict";n.r(t);n(10),n(29);function r(e){const t=[];return Object.keys(e).forEach((function(n){t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]))})),t.join("&")}function o(e,t){for(let r=0;r<t.length;r++){const o=t[r];if("StringArray"===o.__type)e[o.__name]||(e[o.__name]=[""]);else if("OptionArray"===o.__type)if(e[o.__name])for(let t=0;t<o.__childOptions.length;t++){const n=o.__childOptions[t];if("Boolean"===n.__type)for(let t=0;t<e[o.__name].length;t++){const r=e[o.__name][t];!r.hasOwnProperty([n.__name])&&angular.isDefined(n.__defaultValue)&&(r[n.__name]=n.__defaultValue)}}else{e[o.__name]=[];const t={};for(let e=0;e<o.__childOptions.length;e++){const n=o.__childOptions[e];"StringArray"===n.__type?t[n.__name]=[""]:t[n.__name]=angular.isUndefined(n.__defaultValue)?"":n.__defaultValue}e[o.__name].push(t)}else"Map"===o.__type?e[o.__name]?e[o.__name]=(n=e[o.__name],_.map(n,(function(e,t){return{key:t,value:e}}))):e[o.__name]=[]:"JsonString"===o.__type?!e[o.__name]||e[o.__name]instanceof String||"string"==typeof e[o.__name]||(e[o.__name]=angular.toJson(e[o.__name],2)):angular.isUndefined(e[o.__name])&&(e[o.__name]=angular.isUndefined(o.__defaultValue)?"":o.__defaultValue)}var n;return e}function a(e,t,n){return e.post("repositories/"+t,r({query:n}),{headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/sparql-results+json","X-GraphDB-Local-Consistency":"updating"}})}function i(e){return e.substring(0,e.length-1)+"/instance#"}function s(e,t,n,r,o){const a=function e(t,n){const r={};return _.each(n,(function(n){angular.isDefined(t[n.__name])&&("OptionArray"===n.__type?(r[n.__name]=[],_.each(t[n.__name],(function(t){r[n.__name].push(e(t,n.__childOptions))}))):r[n.__name]=angular.copy(t[n.__name]))})),r}(n,r);for(let e=0;e<r.length;e++)try{"Map"===r[e].__type?a[r[e].__name]=(s=a[r[e].__name],_.reduce(s,(function(e,t){if(""===t.key&&""===t.value);else{if(""===t.key)throw new Error('Key may not be empty with value "'+t.value+'"');if(e.hasOwnProperty(t.key))throw new Error("Duplicate key "+t.key);e[t.key]=t.value}return e}),{})):"JsonString"===r[e].__type&&(a[r[e].__name]=angular.fromJson(a[r[e].__name]))}catch(t){return o(r[e].__label,t.message),null}var s;!function e(t){Array.isArray(t)&&(t=_.filter(t,(function(e){return null!==e&&(!e.trim||""!==e.trim())})));return Object.keys(t).forEach((function(n){""!==t[n]&&null!=t[n]||!1===t[n]?"object"==typeof t[n]&&(t[n]=e(t[n])):delete t[n]})),t}(a);let u="";return u+="PREFIX :<"+t+">\n",u+="PREFIX inst:<"+i(t)+">\n",u+="INSERT DATA {\n",u+="\tinst:"+e+" :createConnector '''\n",u+=angular.toJson(a,2),u+="\n''' .\n}\n",u=u.replace(/\\/g,"\\\\\\"),u}function u(e,t,n,u,c,l,d,p,g){function f(t){e.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:t?"Repairing":"Creating",waitOnRepairStartOnce:!!t,eta:"-",inline:!1,iri:null}}function y(t,n,r){return f(r),$.extend(e.beingBuiltConnector,{iri:i(t)+n,name:n,inline:!1,doneCallback:function(){e.beingBuiltConnector.modalInstance.dismiss("cancel")}}),e.beingBuiltConnector.modalInstance=u.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:e}),e.beingBuiltConnector.modalInstance}function m(t,o,a){const i=y(t.value,o.name,!1);p.addStatements(n.getActiveRepository(),r({update:o.query})).then((function(){g.getConnectors().then((function(){g.hasConnector(encodeURIComponent(t.value)).then((function(n){e.existing[t.key]=n.data}))})),c.success("Created connector "+o.name)}),(function(e){c.error(getError(e)),a()})).finally((function(){i.dismiss("cancel")}))}e.loader=!1,e.controllers=[],e.existing={},e.definitions={},e.getLoaderMessage=function(){const t=(Date.now()-e.loaderStartTime)/1e3,n=e.getHumanReadableSeconds(t);let r="";return r=e.progressMessage?e.progressMessage+"... "+n:"Running operation..."+n,e.extraMessage&&t>10&&(r+="\n"+e.extraMessage),r},e.setLoader=function(t,n,r){t?(e.loader=!0,e.loaderStartTime=Date.now(),e.progressMessage=n,e.extraMessage=r):(e.loader=!1,e.progressMessage="",e.extraMessage="")},e.initConnector=function(t){return g.initConnector(encodeURIComponent(t.value)).then((function(n){return e.definitions[t.key]=n.data,g.hasConnector(encodeURIComponent(t.value)).then((function(n){e.existing[t.key]=n.data}))}))},e.getConnectors=function(){e.isLicenseValid()&&e.canWriteActiveRepo()&&(e.setLoader(!0,"Fetching connectors","Normally this is a fast operation but it may take longer if a bigger repository needs to be initialised first."),g.getConnectors().then((function(r){e.connectors=Object.keys(r.data).map((function(e){return{key:e,value:r.data[e]}})),d.all(_.map(e.connectors,(function(t){return e.initConnector(t)}))).finally((function(){f();const r=function(e){const t=_.map(e,(function(e){return"<"+e.value+"connectorStatus>"})).join("|");return t?"SELECT ?connector ?status { ?connector "+t+" ?status }":null}(e.connectors);r?function(e){return a(t,n.getActiveRepository(),e)}(r).then((function(t){const n=function(e){if(e.bindings)for(let t=0;t<e.bindings.length;t++)try{const n=JSON.parse(e.bindings[t].status.value);if("BUILDING"===n.status)return{connector:e.bindings[t].connector.value,status:n}}catch(e){console.error(e)}return{}}(t.data.results);if(n.connector){const t=n.connector.split(/#/);t[0]=t[0].replace(/\/instance$/,"#"),r=t[0],o=t[1],f(),$.extend(e.beingBuiltConnector,{iri:i(r)+o,name:o,inline:!0,doneCallback:function(){e.beingBuiltConnector.inline=!1}})}var r,o})).finally((function(){e.setLoader(!1)})):e.setLoader(!1)}))})).catch((function(t){e.setLoader(!1),c.error(getError(t),"Could not get connectors")})),e.existing={})},e.getOptions=function(t){return e.definitions[t.key]},e.isEmpty=function(e){return angular.isObject(e)&&0===Object.keys(e).length},e.toPrettyJson=function(e){return angular.toJson(e,2)},e.$watch((function(){return n.getActiveRepository()}),e.getConnectors),e.$watch((function(){return n.getActiveLocation()}),e.getConnectors),e.copyConnector=function(t,n){let r;angular.isUndefined(n)||(r=angular.copy(n),r.name=r.name+"-copy"),u.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return t},values:function(){return angular.isUndefined(r)?{name:"",values:{}}:r},options:function(){return e.getOptions(t)}}}).result.then((function(n){m(t,n,(function(){n.skipConversion=!0,e.newConnector(t,n)}))}))},e.newConnector=function(t,n){u.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return t},values:function(){return angular.isUndefined(n)?{name:"",values:{}}:n},options:function(){return e.getOptions(t)}}}).result.then((function(n){m(t,n,(function(){n.skipConversion=!0,e.newConnector(t,n)}))}))},e.repair=function(t,o){l.openSimpleModal({title:"Confirm repair",message:"Are you sure you want to repair this connector?<br>Note that repair means delete + recreate with the same settings.",warning:!0}).result.then((function(){const a=y(o.value,t.name,!0),s=(u=t.name,"PREFIX prefix:<"+(l=o.value)+">\nINSERT DATA {\n\t<"+i(l)+u+'> prefix:repairConnector ""\n}');var u,l;p.addStatements(n.getActiveRepository(),r({update:s})).then((function(){g.getConnectors().then((function(){g.hasConnector(encodeURIComponent(o.value)).then((function(t){e.existing[o.key]=t.data}))})),c.success("Repaired connector "+t.name)}),(function(e){c.error(getError(e))})).finally((function(){a.dismiss("cancel")}))}))},e.delete=function(t,o){const a=o.key.indexOf("Elastic")>=0||o.key.indexOf("Solr")>=0;u.open({templateUrl:"js/angular/externalsync/templates/deleteConnector.html",controller:"DeleteConnectorCtrl",resolve:{type:function(){return o.key},isExternal:function(){return a}}}).result.then((function(i){e.setLoader(!0,"Deleting connector "+t.name,"This is usually a fast operation but it might take a while.");const s=function(e,t,n){const r=t.substring(0,t.length-1)+"/instance#";return"PREFIX prefix:<"+t+">\nINSERT DATA {\n\t<"+r+e+'> prefix:dropConnector "'+(n?"force":"")+'"\n}'}(t.name,o.value,i);p.addStatements(n.getActiveRepository(),r({update:s})).then((function(){g.getConnectors().then((function(){g.hasConnector(encodeURIComponent(o.value)).then((function(t){e.existing[o.key]=t.data}))})),i?(c.success("Deleted (with force) connector "+t.name),a&&c.warning("You may have to remove the index manually from "+o.key)):c.success("Deleted connector "+t.name)}),(function(e){c.error(getError(e))})).finally((function(){e.setLoader(!1)}))}))},e.viewQuery=function(t,n){u.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){const r=e.getOptions(t);return s(n.name,t.value,o(n.values,r),r)}}})}}function c(e,t,n,r){e.force=!1,e.type=n,e.isExternal=r,e.ok=function(){t.close(e.force)},e.cancel=function(){t.dismiss()}}function l(e,t,n,r,o){function a(){return s(e.name,n.value,e.values,e.options,(function(e,t){o.error(t,e)}))}e.connector=n,e.addField=function(t,n){const r=angular.copy(e.defaultValues[n][0]);e.values[n].splice(t+1,0,r)},e.addOption=function(e,t){t.splice(e+1,0,"")},e.deleteOption=function(e,t){t.splice(e,1)},e.addMapOption=function(e,t){t.splice(e+1,0,{key:"",value:""})},e.deleteMapOption=function(e,t){t.splice(e,1)},e.ok=function(){if(e.form.$valid){const n=a();n&&t.close({name:e.name,values:e.values,options:e.options,query:n})}},e.viewQuery=function(){const e=a();e&&r.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})},e.cancel=function(){t.dismiss("cancel")}}function d(e,t,n,r,a,i,s,u){angular.extend(this,t("ExtendNewConnectorCtrl",{$scope:e,$modalInstance:r,connector:a,$modal:i})),e.values=s.values,e.options=u,e.name=s.name,s.skipConversion||(e.values=o(e.values,e.options)),e.defaultValues=angular.copy(e.values)}function p(e,t,n,r){function o(){const o=function(e){const t=e.replace(/\/instance#.+$/,"#connectorStatus");let n="";return n+="SELECT ?status {\n",n+="\t<"+e+"> <"+t+"> ?status",n+="\n}",n}(e.beingBuiltConnector.iri);e.beingBuiltConnector.iri=null,e.progressInterval=t((function(){(function(e){return a(n,r.getActiveRepository(),e)})(o).then((function(n){const r=function(e){if(e.bindings&&e.bindings.length>0)try{return JSON.parse(e.bindings[0].status.value)}catch(e){console.error(e)}return{}}(n.data.results);"BUILDING"===r.status?(e.beingBuiltConnector.status=r,e.beingBuiltConnector.percentDone=(100*r.processedEntities/r.estimatedEntities).toFixed(0),e.beingBuiltConnector.eta=e.getHumanReadableSeconds(r.etaSeconds),e.beingBuiltConnector.actionName=r.repair?"Repairing":"Creating",e.beingBuiltConnector.waitOnRepairStartOnce=!1):"BUILT"!==r.status||e.beingBuiltConnector.waitOnRepairStartOnce||(t.cancel(e.progressInterval),e.beingBuiltConnector.doneCallback&&e.beingBuiltConnector.doneCallback())}))}),1e3),e.$on("$destroy",(function(){t.cancel(e.progressInterval)}))}e.beingBuiltConnector=e.beingBuiltConnector||{},!e.beingBuiltConnector.inline&&e.beingBuiltConnector.iri&&o(),e.$watch("beingBuiltConnector.iri",(function(t){e.beingBuiltConnector.inline&&t&&o()}))}angular.module("graphdb.framework.externalsync.controllers",["graphdb.framework.rest.rdf4j.repositories.service","graphdb.framework.rest.connectors.service"]).controller("ConnectorsCtrl",u).controller("ExtendNewConnectorCtrl",l).controller("CreateConnectorCtrl",d).controller("CreateProgressCtrl",p).controller("DeleteConnectorCtrl",c).filter("ceil",(function(){return function(e){return Math.ceil(e)}})),u.$inject=["$scope","$http","$repositories","$modal","toastr","ModalService","$q","RDF4JRepositoriesRestService","ConnectorsRestService"],c.$inject=["$scope","$modalInstance","type","isExternal"],l.$inject=["$scope","$modalInstance","connector","$modal","toastr"],d.$inject=["$scope","$controller","$http","$modalInstance","connector","$modal","values","options"],p.$inject=["$scope","$interval","$http","$repositories"]},33:function(e,t,n){"use strict";n.r(t);n(4),n(12);function r(e,t,n,r,o,a,i,s,u,c,l,d,p,g){const f={id:"1",name:"",query:"select * where { \n\t?s ?p ?o .\n} limit 100 \n",inference:!0,sameAs:!0};let y,m=c.getPrincipal();function h(e,t){f.inference=t.appSettings.DEFAULT_INFERENCE,f.sameAs=t.appSettings.DEFAULT_SAMEAS,e.skipCountQuery=!t.appSettings.EXECUTE_COUNT,e.ignoreSharedQueries=t.appSettings.IGNORE_SHARED_QUERIES,e.tabsData=e.tabs=p.get(g.TABS_STATE)||[f],e.$watchCollection("[currentQuery.inference, currentQuery.sameAs]",(function(e,t,n){C(n.currentQuery)})),e.$on("repositoryIsSet",v)}function C(t){!function(){if(r.isActiveRepoOntopType())return;const t=document.getElementById("sameAs");!t||e.currentQuery.inference||t.disabled?e.currentQuery.inference&&t.disabled&&(t.removeAttribute("disabled"),e.currentQuery.sameAs=m.appSettings.DEFAULT_SAMEAS):(t.disabled=!0,e.currentQuery.sameAs=!1)}(),e.tabs.forEach((function(n,o){n.id===t.id&&(e.tabs[o].query=t.query,r.isActiveRepoOntopType()||(e.tabs[o].inference=t.inference,e.tabs[o].sameAs=t.sameAs))})),p.set(g.TABS_STATE,e.tabs)}function b(t,n,r,o){const a=angular.element(document.getElementById("yasr-inner"));e.queryIsRunning=t,t?(e.queryStartTime=Date.now(),e.countTimeouted=!1,e.progressMessage=n,e.extraMessage=r,e.noLoaderTimer=o,a.addClass("hide")):(e.progressMessage="",e.extraMessage="",e.noLoaderTimer=!1,e.currentTrackAlias=null,e.abortRequested=!1,a.removeClass("hide")),null===e.$$phase&&e.$apply()}function T(n){function r(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}if(e.orientationViewMode){if("yasr"===e.viewMode){let e=r()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px"}else e.noPadding={},document.querySelector(".CodeMirror-wrap").style.height="";document.getElementById("yasr").style.minHeight=""}else if(e.noPadding={paddingRight:15,paddingLeft:0},window.editor&&document.querySelector(".CodeMirror-wrap")){let e=r()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px",document.getElementById("yasr").style.minHeight=e+"px"}else{let r;r=t(n?function(){e.fixSizesOnHorizontalViewModeSwitch(n)}:e.fixSizesOnHorizontalViewModeSwitch,100),e.$on("$destroy",(function(){t.cancel(r)}))}window.yasr&&window.yasr.container&&t((function(){window.yasr.container.resize()}),100)}function w(){T(!0)}function v(t,n){n.newRepo&&(e.tabsData=p.get(g.TABS_STATE),e.tabsData.forEach((function(e){e.yasrData=void 0,e.queryType=void 0,e.resultsCount=0,e.allResultsCount=0,e.sizeDelta=void 0})),p.set(g.TABS_STATE,e.tabsData),e.tabs=e.tabsData,e.currentQuery={},e.errorMessage=null,e.repositoryError=null)}function S(e){t((function(){$('a[data-id = "'+e+'"]').tab("show")}),0)}function E(o,a){if(e.executedQueryTab=e.currentQuery,a){if("SELECT"!==window.editor.getQueryType()&&"CONSTRUCT"!==window.editor.getQueryType())return void n.warning("Explain only works with SELECT or CONSTRUCT queries.");if(r.isActiveRepoOntopType())return void n.warning("Explain not supported for Virtual repositories.")}if(e.explainRequested=a,!e.queryIsRunning){if(o?e.currentTabConfig.resultsCount=0:e.resetCurrentTabConfig(),e.lastRunQueryMode=window.editor.getQueryMode(),"update"===e.lastRunQueryMode&&r.isActiveRepoOntopType())return void n.warning("Updates are not supported for Virtual repositories.");if(b(!0,"update"===e.lastRunQueryMode?"Executing update":"Evaluating query"),"none"!==e.viewMode){e.viewMode="none",e.orientationViewMode&&e.fixSizesOnHorizontalViewModeSwitch();const n=t(window.editor.query,500);e.$on("$destroy",(function(){t.cancel(n)}))}else window.editor.query()}}function R(){e.showSampleQueries=!e.showSampleQueries,e.showSampleQueries?i.getSavedQueries().success((function(t){e.sampleQueries=t,$("#sampleQueriesCollapse").collapse("show").width("300px")})).error((function(e){const t=getError(e);n.error(t,"Error! Could not get saved queries")})):$("#sampleQueriesCollapse").collapse("hide")}function A(t){let n=void 0;return e.tabsData.forEach((function(e){if(e.name===t.name&&e.query===t.body)return n=e.id,e})),n}function _(t){return function(n,r,o){e.savedQuery={name:n,query:r||window.editor.getValue(),shared:o},$(t).modal("show")}}function Q(t){for(let n=0;n<e.tabsData.length;n++){if(e.tabsData[n].id===t)return n}}m?h(e,m):e.$on("securityInit",(function(e){m=c.getPrincipal(),h(e.currentScope,m)})),this.hint=document.createElement("span"),this.hint.innerHTML='Hint: "abC" matches "abC*", "ab c*" and "ab-c*"',this.hint.style.fontSize="12px",this.hint.style.color="gray",this.hint.style.backgroundColor="white",this.hint.style.position="absolute",this.hint.style.zIndex="3",this.hint.style.paddingLeft="12px",e.$watch((function(){return angular.element(".CodeMirror-hints").length}),e=>{if(e){const e=angular.element(".CodeMirror-hints")[0].getBoundingClientRect();document.body.appendChild(this.hint),this.hint.style.top=e.top-20+"px",this.hint.style.left=e.right-this.hint.offsetWidth-12+"px"}else this.hint&&this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint)}),e.resetCurrentTabConfig=function(){e.currentTabConfig={pageSize:1e3,page:1,allResultsCount:0,resultsCount:0}},e.queryExists=!1,e.resetCurrentTabConfig(),e.saveTab=function(t){const n=Q(t);if(void 0===n)return{};const r=e.tabsData[n];return e.saveQueryToLocal(r),r},e.loadTab=function(n){e.tabsData=p.get(g.TABS_STATE)||[f];const o=Q(n),a=e.tabsData[o];a.yasrData&&b(!0,"Rendering results",null,!0);t((function(){""===e.currentQuery.query&&(e.currentQuery.query=" "),t((function(){window.editor.setValue(e.currentQuery.query),e.yasr.updateDownloadDropdown(),e.$broadcast("tabLoaded",e.currentQuery.id),e.yasr.options.output=a.outputType,a.yasrData&&(a.yasrData.customError?(e.yasr.results={getException:function(){return a.yasrData.customError}},b(!1)):t((function(){e.setYasrResponse(a.yasrData,a.textStatus,a.jqXhrOrErrorString),b(!1),$(".yasr_btnGroup li:nth-child(2)").hasClass("active")&&t((function(){$(".yasr_btnGroup li:nth-child(2) a").get(0).click()}),0)}),0))}),0)}),0),p.set(g.TABS_STATE_CURRENT_ID,n),e.currentQuery=a,t((function(){e.currentTabConfig={},e.currentTabConfig.queryType=a.queryType,e.currentTabConfig.resultsCount=a.resultsCount,e.currentTabConfig.offset=a.offset,e.currentTabConfig.allResultsCount=a.allResultsCount,e.currentTabConfig.allResultsCountExact=a.allResultsCountExact,e.currentTabConfig.page=a.page,e.currentTabConfig.pageSize=a.pageSize,e.currentTabConfig.timeFinished=a.timeFinished,e.currentTabConfig.timeTook=a.timeTook,e.currentTabConfig.sizeDelta=a.sizeDelta,e.currentTabConfig.customUpdateMessage=a.customUpdateMessage,e.currentTabConfig.errorMessage=a.errorMessage,e.currentTabConfig.warningMessage=a.warningMessage,e.$apply()}),0),$("#yasr").css("padding","0"),y||(y=setInterval(M,200));!function(){const t=r.isActiveRepoOntopType(),n=r.isActiveRepoFedXType();(function(e){const t=document.getElementById("sameAs"),n=document.getElementById("inference");t&&(t.disabled=!!e);n&&(n.disabled=!!e)})(t),e.nocount=!(!t&&!n)||!m.appSettings.EXECUTE_COUNT,t&&(e.currentQuery.inference=!0,e.currentQuery.sameAs=!0)}()},e.addNewTab=function(n,r,o){if(!D(!0))return;let a;a=r||o?{id:"1",name:r,query:o,inference:m.appSettings.DEFAULT_INFERENCE,sameAs:m.appSettings.DEFAULT_SAMEAS}:{id:"1",name:"",query:"select * where { \n\t?s ?p ?o .\n} limit 100 \n",inference:m.appSettings.DEFAULT_INFERENCE,sameAs:m.appSettings.DEFAULT_SAMEAS};x++;const i=""+x;e.tabsData=e.tabs;const s=a;s.id=i,e.tabsData.push(s),p.set(g.TABS_STATE_MAXID,x),p.set(g.TABS_STATE,e.tabsData);const u=Array.prototype.slice.call(arguments,1);t((function(){e.$apply(),S(i),n&&n.apply(this,u)}),0),e.tabs=e.tabsData},e.isTabChangeOk=D,e.runQuery=E,e.abortCurrentQuery=function(){d.abortQueryByAlias(e.currentTrackAlias).success((function(){e.abortRequested=!0}))},e.editQuery=function(t){o.open({templateUrl:"js/angular/core/directives/queryeditor/templates/query-sample.html",controller:"QuerySampleModalCtrl",resolve:{data:function(){return{title:'Edit Saved Query: "'+t.name+'"',query:t,edit:!0,okButtonText:"Save"}}}}).result.then((function(r){const o={name:r.name,body:r.body,shared:r.shared};t.name!==r.name?i.addNewSavedQuery(o).success((function(){e.deleteQueryHttp(t.name,!0)})).error((function(e){const t=getError(e);n.error(t,"Error! Cannot edit saved query")})):i.editSavedQuery(o).success((function(){$("#editQueryContainer").modal("hide"),e.toggleSampleQueries(),n.success("Saved query "+t.name+" was edited.")})).error((function(e){const t=getError(e);n.error(t,"Error! Cannot edit Saved query")}))}))},e.getNamespaces=function(){b(!0,"Refreshing namespaces","Normally this is a fast operation but it may take longer if a bigger repository needs to be initialised first."),e.namespacesLoading=!0,l.getRepositoryNamespaces().success((function(t){const n={};t.results.bindings.forEach((function(e){n[e.prefix.value]=e.namespace.value})),e.namespaces=n})).error((function(t){e.repositoryError=getError(t)})).finally((function(){b(!1),e.namespacesLoading=!1}))},e.changePagination=function(){E(!0,e.explainRequested)},e.toggleSampleQueries=R,e.addKnownPrefixes=function(){i.addKnownPrefixes(JSON.stringify(window.editor.getValue())).success((function(e){angular.isDefined(window.editor)&&angular.isDefined(e)&&e!==window.editor.getValue()&&window.editor.setValue(e)})).error((function(e){const t=getError(e);return n.error(t,"Error! Could not add known prefixes"),!0}))},e.getExistingTabId=A,e.querySelected=function(t){const n=A(t);e.toggleSampleQueries(),e.isTabChangeOk(!1)&&(e.highlightNextTabChange=!0,angular.isDefined(n)?S(n):e.addNewTab(null,t.name,t.body))},e.deleteQuery=function(t){a.openSimpleModal({title:"Confirm",message:"Are you sure you want to delete the saved query '"+t+"'?",warning:!0}).result.then((function(){e.deleteQueryHttp(t)}))},e.deleteQueryHttp=function(t,r){i.deleteSavedQuery(t).success((function(){e.toggleSampleQueries(),r||n.success("Saved query: "+t+" was deleted.")})).error((function(e){const t=getError(e);n.error(t,"Error! Cannot delete saved query")}))},e.saveQuery=function(t,n){o.open({templateUrl:"js/angular/core/directives/queryeditor/templates/query-sample.html",controller:"QuerySampleModalCtrl",resolve:{data:function(){return{title:"Create New Saved Query",query:{name:t.name,body:t.query,shared:t.shared},edit:!1,okButtonText:"Create",queryExists:n}}}}).result.then((function(t){e.saveQueryHttp(t)}),(function(){}))},e.saveQueryHttp=function(t){i.addNewSavedQuery(t).success((function(){n.success("Saved query "+t.name+" was saved.")})).error((function(r){let o=getError(r);if(n.error(o,"Error! Cannot create saved query"),o="Query '"+t.name+"' already exists!"){t.query=t.body;const n=!0;e.saveQuery(t,n)}}))},e.saveQueryToLocal=C,e.setLoader=b,e.getLoaderMessage=function(){const t=(Date.now()-e.queryStartTime)/1e3;let n="",r="";e.noLoaderTimer||(n=e.getHumanReadableSeconds(t));r=e.progressMessage?e.progressMessage+"... "+n:"Running operation... "+n;e.extraMessage&&t>10&&(r+="\n"+e.extraMessage);return r},e.fixSizesOnHorizontalViewModeSwitch=T,e.changeViewMode=function(){e.viewMode="none",e.orientationViewMode=!e.orientationViewMode,p.set(g.VIEW_MODE,e.orientationViewMode),T()},e.showHideEditor=w,e.focusQueryEditor=function(){angular.element(document).find(".editable-input").is(":focus")||angular.element(document).find(".CodeMirror textarea:first-child").focus()},e.orientationViewMode=!p.get(g.VIEW_MODE)||"true"===p.get(g.VIEW_MODE),e.viewMode="none",e.getActiveRepository=function(){return r.getActiveRepository()},e.getActiveRepositoryNoError=function(){if(!e.repositoryError)return r.getActiveRepository()},e.orientationViewMode||w(),window.onbeforeunload=function(){e.currentQuery&&e.saveTab(e.currentQuery.id),p.set(g.TABS_STATE,e.tabs)},e.$on("$destroy",(function(){e.currentQuery&&e.saveTab(e.currentQuery.id),p.set(g.TABS_STATE,e.tabs),clearInterval(y)})),e.$on("$destroy",(function(){clearInterval(y),window.editor=null,window.yasr=null})),$(document).mouseup((function(t){const n=$("#sampleQueriesCollapse");!n.is(t.target)&&0===n.has(t.target).length&&e.showSampleQueries&&R()}));let x=p.get(g.TABS_STATE_MAXID)||1;function q(e){return $(e).attr("data-id")}function M(){if(e.currentTabConfig.resultsCount>=0){const e=$(".saveAsDropDown");e.length>0&&!window.editor.queryValid?yasr.header.find(".saveAsDropDown").remove():0===e.length&&window.editor.queryValid&&yasr.updateDownloadDropdown()}}function D(t){return!(e.queryIsRunning&&!e.namespacesLoading)||(t?n.info("New tabs may not be opened while query or update is running."):n.info("Tabs may not be switched while query or update is running."),!1)}e.highlightNextTabChange=!1,e.$on("tabAction",(function(n,r){r.relatedTarget&&(t.cancel(r.relatedTarget.timer),$(r.relatedTarget).css("color",""),e.saveTab(q(r.relatedTarget))),e.loadTab(q(r.target));const o=["#ED4F2F","","#ED4F2F"],a=[400,400,400];if(e.highlightNextTabChange){e.highlightNextTabChange=!1;let n=0;$(r.target).css("color",o[n]);const i=function(){n++,n<o.length?($(r.target).css("color",o[n]),r.target.timer=t(i,a[n])):$(r.target).css("color","")};t(i,a[n])}})),e.$on("deleteAllexeptSelected",(function(t,n){e.tabsData=n,e.tabs=n})),e.currentQuery={},e.showSampleQueries=!1,e.savedQuery={},e.sampleQueries={},e.editQueryModal=_("#editQueryContainer"),e.deleteQueryModal=_("#confirmDeleteContainer"),e.saveQueryModal=_("#saveQueryContainer"),e.getResultsDescription=function(){let t;if(0===e.currentTabConfig.resultsCount)t="No results.";else{const n=(e.currentTabConfig.page-1)*e.currentTabConfig.pageSize+Math.min(e.currentTabConfig.resultsCount,e.currentTabConfig.pageSize);t="Showing results from "+s("currency")(e.currentTabConfig.offset,"",0)+" to "+s("currency")(n,"",0),e.currentTabConfig.allResultsCount>0&&(t+=e.currentTabConfig.allResultsCountExact?" of ":" of at least ",t+=s("currency")(e.currentTabConfig.allResultsCount,"",0)),t+="."}return t},e.getUpdateDescription=function(){return e.currentTabConfig.customUpdateMessage?e.currentTabConfig.customUpdateMessage:void 0===e.currentTabConfig.sizeDelta?"":e.currentTabConfig.sizeDelta<0?"Removed "+Math.abs(e.currentTabConfig.sizeDelta)+" statements.":e.currentTabConfig.sizeDelta>0?"Added "+e.currentTabConfig.sizeDelta+" statements.":"The number of statements did not change."},e.getStaleWarningMessage=function(){const t=60*Math.round((Date.now()-e.currentTabConfig.timeFinished)/6e4);if(t>=3600)return"Possibly stale result (obtained "+e.getHumanReadableSeconds(t)+" ago)."};const k=function(){};angular.element(u).bind("resize",k),e.$on("$destroy",(function(){angular.element(u).unbind("resize",k)}))}function o(e,t,n){n.queryExists&&(e.queryExists=!0),e.query=angular.copy(n.query),e.title=n.title,e.edit=n.edit,e.okButtonText=n.okButtonText,e.ok=function(){e.form.$valid&&t.close(e.query)},e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.core.directives.queryeditor.controllers",["graphdb.framework.utils.localstorageadapter","graphdb.framework.rest.sparql.service"]).controller("QueryEditorCtrl",r).controller("QuerySampleModalCtrl",o),r.$inject=["$scope","$timeout","toastr","$repositories","$modal","ModalService","SparqlRestService","$filter","$window","$jwtAuth","RDF4JRepositoriesRestService","MonitoringRestService","LocalStorageAdapter","LSKeys"],o.$inject=["$scope","$modalInstance","data"]},34:function(e,t,n){"use strict";n.r(t);n(29),n(4),n(32);var r=n(212),o=n.n(r),a=n(210),i=n.n(a);function s(e,t,n,r,a,s,u,c,l,d,p,g){let f;return{restrict:"AE",scope:!1,templateUrl:"js/angular/core/directives/queryeditor/templates/query-editor.html",link:function(y,m,h){y.nostorage=h.hasOwnProperty("nostorage"),y.notabs=h.hasOwnProperty("notabs"),y.notoolbar=h.hasOwnProperty("notoolbar"),y.notoolbarSaved=h.hasOwnProperty("notoolbarSaved"),y.notoolbarCopy=h.hasOwnProperty("notoolbarCopy"),y.notoolbarInference=h.hasOwnProperty("notoolbarInference"),y.notoolbarSameAs=h.hasOwnProperty("notoolbarSameAs"),y.nostatus=h.hasOwnProperty("nostatus"),y.norun=h.hasOwnProperty("norun"),y.runButtonName="Run",h.runButtonName&&(y.runButtonName=h.runButtonName);if(y.nocount="true"===h.nocount,h.callbackOnChange){const e=y[h.callbackOnChange];"function"==typeof e&&(f=e)}e((function(){!function(y){function m(){angular.element("#wb-sparql-saveQuery")[0].click()}function h(){y.runQuery(!1,!1)}function C(){y.runQuery(!1,!0)}function b(){if(y.tabs.length<2||!y.currentQuery.id||!y.isTabChangeOk(!1))return;let e=D(y.currentQuery.id);e=(e+1)%y.tabs.length,w(y.tabs[e].id)}function T(){if(y.tabs.length<2||!y.currentQuery.id||!y.isTabChangeOk(!1))return;let e=D(y.currentQuery.id);e--,-1===e&&(e=y.tabs.length-1),w(y.tabs[e].id)}function w(t){e((function(){let e=$('a[data-id = "'+t+'"]');0===e.length&&(e=$("a[data-id]").first()),e.tab("show")}),0)}y.changePagination=function(){y.runQuery(!0,y.explainRequested)},window.editor=o.a.fromTextArea(document.getElementById("query"),{persistent:null,value:"",indentUnit:4,createShareLink:null,cursorHeight:1,sparql:{showQueryButton:!1,acceptHeaderGraph:"application/x-graphdb-table-results+json, application/rdf+json;q=0.9, */*;q=0.8",acceptHeaderSelect:"application/x-sparqlstar-results+json, application/sparql-results+json;q=0.9, */*;q=0.8"},extraKeys:{"Ctrl-Enter":h,"Cmd-Enter":h,"Shift-Ctrl-Enter":C,"Shift-Cmd-Enter":C,"Ctrl-Alt-T":y.addNewTab,"Cmd-Alt-T":y.addNewTab,"Ctrl-S":m,"Cmd-S":m,"Ctrl-Alt-Left":T,"Cmd-Alt-Left":T,"Ctrl-Alt-Right":b,"Cmd-Alt-Right":b}}),window.editor.toastBuildIndex=function(){n.warning("",'<div class="autocomplete-toast"><a href="autocomplete">Autocomplete is OFF<br>Go to Setup -> Autocomplete</a></div>',{allowHtml:!0})},window.editor.toastError=function(e){n.error("Cannot execute autocomplete query. "+getError(e))},window.editor.on("changes",(function(){angular.element(".CodeMirror-linenumbers").css("width","1px"),angular.element(".CodeMirror-sizer").css("margin-left","0px"),clearTimeout(y.changesTimeout);const e=!window.editor.queryValid;y.changesTimeout=setTimeout(f?f():function(){const t=D(y.currentQuery.id)+1;$('a[data-id = "'+t+'"]').toggleClass("query-has-error",e).attr("title",e?"Query contains a syntax error. See the relevant line for more information.":"")},200),y.currentQuery.query=window.editor.getValue(),y.currentQuery.queryType=window.editor.getQueryType()})),$(".fullscreenToggleBtns").hide();const v=function(e){$(e.target).removeClass("fa-link").addClass("fa-check").blur(),setTimeout((function(){$(e.target).removeClass("fa-check").addClass("fa-link")}),1e3)};window.onbeforeunload=function(){y.nostorage||p.set(g.TABS_STATE,y.tabs),y.saveTab(y.currentQuery.id)};const S=o.a.executeQuery,E=o.a.getUrlArguments;function R(e,t,n){return{status:e,statusText:t,responseText:n}}let A,Q;y.$on("$destroy",(function(){y.nostorage||p.set(g.TABS_STATE,y.tabs),o.a.executeQuery=S,o.a.getUrlArguments=E,y.saveTab(y.currentQuery.id)})),o.a.drawButtons=function(e){e.buttons=$("#yasqe_buttons_mocked")},o.a.getActiveRepository=function(){return r.getActiveRepository()},o.a.getUrlArguments=function(e,t){const n=E(e,t),r=window.editor.getQueryType();return"SELECT"!==r&&"CONSTRUCT"!==r&&"DESCRIBE"!==r||(n.push({name:"limit",value:y.currentTabConfig.pageSize+1}),y.currentTabConfig.offset=(y.currentTabConfig.page-1)*y.currentTabConfig.pageSize+1,n.push({name:"offset",value:y.currentTabConfig.offset-1})),!y.explainRequested||"SELECT"!==r&&"CONSTRUCT"!==r||n.push({name:"explain",value:"true"}),n},o.a.executeQuery=function(e){if(Q&&$(Q.resultsContainer).length&&$(Q.resultsContainer).empty(),e.options.sparql.headers["X-GraphDB-Catch"]=y.currentTabConfig.pageSize+"; throw",y.currentTrackAlias="query-editor-"+performance.now()+"-"+Date.now(),e.options.sparql.headers["X-GraphDB-Track-Alias"]=y.currentTrackAlias,y.countTimeouted=!1,"query"===e.getQueryMode()?e.options.sparql.endpoint="repositories/"+r.getActiveRepository():"update"===e.getQueryMode()&&(e.options.sparql.endpoint="repositories/"+r.getActiveRepository()+"/statements"),e.options.sparql.args=[{name:"infer",value:y.currentQuery.inference},{name:"sameAs",value:y.currentQuery.sameAs}],y.currentTabConfig.customUpdateMessage="","update"!==window.editor.getQueryMode()){const t=y.currentTabConfig,n=y.executedQueryTab.id;return window.editor.options.sparql.handlers.countCallback=function(e,r,o){if(200===e.status){const a=y.tabs[D(n)];a&&(Q.setResultsCount(e,r,o),t.allResultsCount=Q.allCount,a.allResultsCount=Q.allCount,t.allResultsCountExact=!0,a.allResultsCountExact=!0,y.saveTab(a.id))}else t.countTimeouted=!0},null!=y.currentQuery.outputType?Q.options.output=y.currentQuery.outputType:Q.options.output="table",y.currentTabConfig.queryType=window.editor.getQueryType(),y.queryStartTime=(new Date).getTime(),S(e,{setQueryLimit:function(e){return"CONSTRUCT"===y.currentTabConfig.queryType&&r.isActiveRepoOntopType()?window.editor.getValueWithoutComments():e}})}{const t=function(){y.currentTabConfig.queryType="UPDATE",l.getRepositorySize().success((function(t){return y.repoSize=parseInt(t),y.queryStartTime=(new Date).getTime(),S(e,{})})).error((function(t){return n.warning("Could not get repository size for: "+r.getActiveRepository()+"; "+getError(t)),y.queryStartTime=(new Date).getTime(),S(e,{})}))};d.checkConnector(window.editor.getValue()).then((function(e){if(e.data.command&&!e.data.hasSupport){y.currentTabConfig.queryType="ERROR",y.currentTabConfig.timeFinished=Date.now(),y.currentTabConfig.timeTook=(y.currentTabConfig.timeFinished-y.queryStartTime)/1e3;const t=R(-1,"No support for "+e.data.connectorName,e.data.connectorName+" connectors are not supported because the plugin "+e.data.pluginName+" is not active.");return Q.results={getException:function(){return t}},y.setLoader(!1),void q({customError:t},"",null)}if("create"===e.data.command||"repair"===e.data.command){const t="repair"===e.data.command;t?(y.setLoader(!0,"Repairing connector "+e.data.name),y.currentTabConfig.customUpdateMessage="Repaired connector "+e.data.name+"."):(y.setLoader(!0,"Creating connector "+e.data.name),y.currentTabConfig.customUpdateMessage="Created connector "+e.data.name+".");const n=y.$new(!0);n.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:t?"Repairing":"Creating",eta:"-",inline:!1,iri:e.data.iri,name:e.data.name,doneCallback:function(){A.dismiss("cancel")}},n.getHumanReadableSeconds=y.getHumanReadableSeconds,A=u.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:n})}else"drop"===e.data.command&&(y.setLoader(!0,"Deleting connector "+e.data.name),y.currentTabConfig.customUpdateMessage="Deleted connector "+e.data.name+".");t()}),(function(){t()}))}};const x=o.a.getAjaxConfig;function q(e,t,n){e.getResponseHeader&&e.getResponseHeader("content-type")&&(e.contentType=e.getResponseHeader("content-type")),delete e.response;const r=D(y.executedQueryTab.id),o=y.tabs[r],a={queryType:y.currentTabConfig.queryType,yasrData:e,textStatus:t,jqXhrOrErrorString:n,page:y.currentTabConfig.page,pageSize:y.currentTabConfig.pageSize,allResultsCount:y.currentTabConfig.allResultsCount,allResultsCountExact:y.currentTabConfig.allResultsCountExact,resultsCount:y.currentTabConfig.resultsCount,offset:y.currentTabConfig.offset,timeTook:y.currentTabConfig.timeTook,timeFinished:y.currentTabConfig.timeFinished,sizeDelta:y.currentTabConfig.sizeDelta,customUpdateMessage:y.currentTabConfig.customUpdateMessage,errorMessage:y.currentTabConfig.errorMessage,warningMessage:y.currentTabConfig.warningMessage};"ERROR"!==y.currentTabConfig.queryType&&"UPDATE"!==y.currentTabConfig.queryType&&"ASK"!==y.currentTabConfig.queryType&&(a.outputType=y.yasr.options.output),angular.extend(y.currentQuery,a),angular.extend(o,a),y.nostorage||p.set(g.TABS_STATE,y.tabs),$('a[data-id = "'+y.executedQueryTab.id+'"]').tab("show")}function M(){if(window.editor.getValue().includes("onto:explain")||window.editor.getValue().includes("http://www.ontotext.com/explain")){var e=document.getElementsByClassName("nonUri")[0];e.classList.add("cm-s-default"),e.setAttribute("id","highlighted_output");var t=e.innerText.substring(1,e.innerText.length-1);e.innerHTML="",o.a.runMode(t,"sparql11",document.getElementById("highlighted_output"));const n=$(".yasr .cm-comment");for(const e of n)e.innerHTML.includes("Begin optimization group")||e.innerHTML.includes("End optimization group")?e.setAttribute("id","cm-comment-explain-optimization-gr"):e.setAttribute("id","cm-comment-explain-statistics")}}function D(e){for(let t=0;t<y.tabs.length;t++){if(y.tabs[t].id===e)return t}}function k(e){return angular.isDefined(e)&&"false"!==e}function O(e,n,r){const o=y.getExistingTabId(e),a=y.$on("tabLoaded",(function(){angular.isDefined(n)&&(y.currentQuery.inference=k(n)),angular.isDefined(r)&&(y.currentQuery.sameAs=k(r)),k(t.search().execute)&&("update"===window.editor.getQueryMode()?s.openSimpleModal({title:"Confirm execute",message:"This is an update and it may change the data in the repository.<br>Are you sure you want to execute it automatically?",warning:!0}).result.then((function(){y.runQuery(!1)})):y.runQuery(!1)),a()}));y.highlightNextTabChange=!0,angular.isDefined(o)?w(o):y.addNewTab(null,e.name,e.body)}function B(){if(t.search().savedQueryName)e=t.search().savedQueryName,r=t.search().owner,o=t.search().infer,i=t.search().sameAs,a.getSavedQuery(e,r).success((function(e){O(e,o,i)})).error((function(t){n.error("Could not get data for saved query: "+e+"; "+getError(t))}));else if(t.search().query){O({name:t.search().name,body:t.search().query},t.search().infer,t.search().sameAs)}else{w(p.get(g.TABS_STATE_CURRENT_ID))}var e,r,o,i}function N(){y.getNamespaces(),o.a.signal(window.editor,"repositoryOrAuthorizationChanged",r.getActiveRepository(),c.getAuthToken()),B()}o.a.getAjaxConfig=function(e,t){const n=x(e,t);return _.extend(n.headers,{Authorization:c.getAuthToken()}),n},y.copyToClipboardQuery=function(e,t){s.openCopyToClipboardModal(function(e,t){let n=[location.protocol,"//",location.host,location.pathname].join("");e?(n=n+"?savedQueryName="+encodeURIComponent(e),null!=t&&(n+="&owner="+encodeURIComponent(t))):n=n+"?"+$.param({name:y.currentQuery.name,infer:y.currentQuery.inference,sameAs:y.currentQuery.sameAs,query:window.editor.getValue()});return n}(e,t))},y.copyToClipboardResult=function(e){s.openCopyToClipboardModal(e)},y.goToVisual=function(){const e={query:window.editor.getValue(),sameAs:y.currentQuery.sameAs,inference:y.currentQuery.inference};t.path("graphs-visualizations").search(e)},$("textarea").on("paste",(function(){e((function(){y.addKnownPrefixes()}),0)})),Q=i()(document.getElementById("yasr"),{getUsedPrefixes:{},persistency:!1}),window.yasr=Q,Q.afterCopy=v,Q.getQueryResultsAsFormat=function(e){const t=$("#wb-download");t.attr("action","repositories/"+r.getActiveRepository()),$("#wb-download-query").val(y.currentQuery.query),window.editor.getValue()!==y.currentQuery.query&&n.warning("The query in your editor does not match the query results. Download will save the results from the last executed query."),$("#wb-download-infer").val(y.currentQuery.inference),$("#wb-download-sameAs").val(y.currentQuery.sameAs);const o=localStorage.getItem("com.ontotext.graphdb.auth");o&&$("#wb-auth-token").val(o),$("#wb-download-accept").val(e),t.submit()},window.editor.options.sparql.handlers.complete=function(t,r,o){function a(){q(t,r,o)}if(A&&A.dismiss("cancel"),null===window.editor)return void y.setLoader(!1);if(y.currentTabConfig.errorMessage=t.getResponseHeader("X-GraphDB-Error"),y.currentTabConfig.warningMessage=t.getResponseHeader("X-GraphDB-Warning"),Q.currentQuery=y.currentQuery,y.currentTabConfig.timeFinished=Date.now(),y.currentTabConfig.timeTook=(y.currentTabConfig.timeFinished-y.queryStartTime)/1e3,t.status>=400)return t.responseText=t.responseText.replace(/^([^: ]+: )+/,""),y.currentTabConfig.queryType="ERROR",a(),y.setYasrResponse(t,r,o),void y.setLoader(!1);if(0===t.status){y.currentTabConfig.queryType="ERROR";const e=R(-1,"Request was aborted","The request has been aborted. There are no results to show.");return Q.results={getException:function(){return e}},y.setLoader(!1),void q({customError:e},"",null)}let i;if(y.setLoader(!1),"update"===window.editor.getQueryMode())i=function(){l.getRepositorySize().success((function(e){let t;void 0!==y.repoSize&&(t=Number(e)-y.repoSize),y.currentTabConfig.sizeDelta=t,a()})).error((function(e){n.warning("Could not get repository size for: "+y.getActiveRepository()+"; "+getError(e)),y.currentTabConfig.sizeDelta=void 0,a()}))};else{if(200===t.status){const e=t.getResponseHeader("Content-Type");0!==e.indexOf("application/sparql-results+json")&&0!==e.indexOf("application/x-sparqlstar-results+json")&&0!==e.indexOf("application/x-graphdb-table-results+json")||t.responseJSON.results&&(y.currentTabConfig.resultsCount=t.responseJSON.results.bindings.length,t.responseJSON.results.bindings.length>y.currentTabConfig.pageSize&&(t.responseJSON.results.bindings.length=y.currentTabConfig.pageSize),y.currentTabConfig.allResultsCountExact||((y.nocount||y.countTimeouted||y.currentTabConfig.resultsCount<=y.currentTabConfig.pageSize)&&(t.status=204),y.currentTabConfig.allResultsCount=Math.max(y.currentTabConfig.allResultsCount,y.currentTabConfig.pageSize*(y.currentTabConfig.page-1)+y.currentTabConfig.resultsCount),y.currentTabConfig.resultsCount<=y.currentTabConfig.pageSize&&(y.currentTabConfig.allResultsCountExact=!0)))}y.setLoader(!0,"Rendering results",null,!0),i=function(){y.setYasrResponse(t,r,o),a(),y.setLoader(!1)}}e((function(){i(),"CONSTRUCT"!==window.editor.getQueryType()?($(".yasr_btnGroup.nav.nav-tabs li a.disabled").removeClass("disabled").css("font-weight","400"),$(".yasr_btnGroup.nav.nav-tabs li.disabled a").addClass("disabled").css("font-weight","200"),"DESCRIBE"===window.editor.getQueryType()&&$(".yasr_btnGroup.nav.nav-tabs li a").removeClass("disabled").css("font-weight","400")):"CONSTRUCT"===window.editor.getQueryType()&&$(".yasr_btnGroup.nav.nav-tabs li a.disabled").removeClass("disabled").css("font-weight","400"),$("#yasr").css("padding","0"),$(".yasr_btnGroup li:nth-child(2)").hasClass("active")&&e((function(){$(".yasr_btnGroup li:nth-child(2) a").get(0).click()}),100),$("#wb-sparql-addNewTab").click((function(){$(".dataTables_filter").hide(),$(".resultsTable").hide()}))}),100)},window.editor.options.sparql.handlers.resetResults=function(){},y.yasr=Q,y.setYasrResponse=function(e,t,n){e.responseJSON&&(e.response=e.responseJSON,e.responseText=void 0),window.yasr.plugins.table.options.highlightLiteralCellResult=M,Q.setResponse(e,t,n)},y.$watch("yasr.options.output",(function(e){if(e&&"UPDATE"!==y.currentTabConfig.queryType&&"ASK"!==y.currentTabConfig.queryType){const t=y.tabs[D(y.currentQuery.id)];angular.isDefined(t)&&y.currentTabConfig.queryType&&t.outputType!==e&&(t.outputType=y.currentQuery.outputType=e,y.saveTab(t.id))}})),void y.$watch("namespaces",(function(){y.namespaces&&(Q&&Q.options&&y.namespaces&&(Q.options.getUsedPrefixes=y.namespaces),o.a.signal(window.editor,"namespacesChanged",y.namespaces))})),$(document).mouseup((function(e){const t=$("#sampleQueriesCollapse");!t.is(e.target)&&0===t.has(e.target).length&&y.showSampleQueries&&y.toggleSampleQueries()})),r.getActiveRepository()&&N();y.$on("repositoryIsSet",(function(){r.getActiveRepository()&&N()})),e((function(){angular.element(document).find(".CodeMirror textarea:first-child").focus()}),50)}(y)}),150)}}}angular.module("graphdb.framework.core.directives.queryeditor.queryeditor",["ngCookies","graphdb.framework.externalsync.controllers","graphdb.framework.rest.connectors.service","graphdb.framework.utils.localstorageadapter"]).directive("queryEditor",s),s.$inject=["$timeout","$location","toastr","$repositories","SparqlRestService","ModalService","$modal","$jwtAuth","RDF4JRepositoriesRestService","ConnectorsRestService","LocalStorageAdapter","LSKeys"]}}]);
|
|
2
|
+
//# sourceMappingURL=8.66013fc0c58811b51903.bundle.js.map
|