graphdb-workbench 2.2.3 → 2.2.4-TR2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/dist/{102.7141102a059ef5eba1ea.bundle.js → 102.d52dc777ce7b5de1a30a.bundle.js} +2 -2
  2. package/dist/{102.7141102a059ef5eba1ea.bundle.js.map → 102.d52dc777ce7b5de1a30a.bundle.js.map} +1 -1
  3. package/dist/{104.ecd04b9cba294e159ca5.bundle.js → 104.09c8b5802e53cd9dced9.bundle.js} +2 -2
  4. package/dist/{104.ecd04b9cba294e159ca5.bundle.js.map → 104.09c8b5802e53cd9dced9.bundle.js.map} +1 -1
  5. package/dist/{107.5972b71755d2f24f6f44.bundle.js → 107.481f84627ac231f49e56.bundle.js} +2 -2
  6. package/dist/{107.5972b71755d2f24f6f44.bundle.js.map → 107.481f84627ac231f49e56.bundle.js.map} +1 -1
  7. package/dist/108.d61b0e4a54e1d0e6550d.bundle.js +2 -0
  8. package/dist/{108.162ea156d1fc4ad2525f.bundle.js.map → 108.d61b0e4a54e1d0e6550d.bundle.js.map} +1 -1
  9. package/dist/{11.f7cb87be309f6bd00aa5.bundle.js → 11.89d3de4f2e80e373ecf2.bundle.js} +3 -3
  10. package/dist/{11.f7cb87be309f6bd00aa5.bundle.js.map → 11.89d3de4f2e80e373ecf2.bundle.js.map} +1 -1
  11. package/dist/{115.abb22e52d5886ed645c1.bundle.js → 115.36a12f5a0804f33cb569.bundle.js} +2 -2
  12. package/dist/{115.abb22e52d5886ed645c1.bundle.js.map → 115.36a12f5a0804f33cb569.bundle.js.map} +1 -1
  13. package/dist/{117.ed07ffe3ff3bead9b43b.bundle.js → 117.9c58e6155d7467c45284.bundle.js} +2 -2
  14. package/dist/{117.ed07ffe3ff3bead9b43b.bundle.js.map → 117.9c58e6155d7467c45284.bundle.js.map} +1 -1
  15. package/dist/{118.57c922b04fbcf0d65d1c.bundle.js → 118.7cdbf2a7be83e4cdc7e2.bundle.js} +2 -2
  16. package/dist/{118.57c922b04fbcf0d65d1c.bundle.js.map → 118.7cdbf2a7be83e4cdc7e2.bundle.js.map} +1 -1
  17. package/dist/{119.7b75484ef37c16039937.bundle.js → 119.f7c106efa2582220baa7.bundle.js} +2 -2
  18. package/dist/{119.7b75484ef37c16039937.bundle.js.map → 119.f7c106efa2582220baa7.bundle.js.map} +1 -1
  19. package/dist/{12.eb41e4af80fee51d893c.bundle.js → 12.b4ac6d1ff3d669d3e63f.bundle.js} +2 -2
  20. package/dist/{12.eb41e4af80fee51d893c.bundle.js.map → 12.b4ac6d1ff3d669d3e63f.bundle.js.map} +1 -1
  21. package/dist/{120.0f42d5a0967c1f4636ca.bundle.js → 120.d20d9e20e2d3c5476f8d.bundle.js} +2 -2
  22. package/dist/{120.0f42d5a0967c1f4636ca.bundle.js.map → 120.d20d9e20e2d3c5476f8d.bundle.js.map} +1 -1
  23. package/dist/{121.f85253eb7e057efdb05d.bundle.js → 121.dc96efcaf4dc5e63f58d.bundle.js} +2 -2
  24. package/dist/{121.f85253eb7e057efdb05d.bundle.js.map → 121.dc96efcaf4dc5e63f58d.bundle.js.map} +1 -1
  25. package/dist/{126.349ebcea493c77fecf7e.bundle.js → 126.4c2fb40676d2508bbc65.bundle.js} +2 -2
  26. package/dist/{126.349ebcea493c77fecf7e.bundle.js.map → 126.4c2fb40676d2508bbc65.bundle.js.map} +1 -1
  27. package/dist/{13.bc3607638ad1e2068125.bundle.js → 13.f6b8f9a2288e2485ee20.bundle.js} +2 -2
  28. package/dist/{13.bc3607638ad1e2068125.bundle.js.map → 13.f6b8f9a2288e2485ee20.bundle.js.map} +1 -1
  29. package/dist/148.45985ae23de642595544.bundle.js +1 -1
  30. package/dist/148.45985ae23de642595544.bundle.js.map +1 -1
  31. package/dist/16.2ca98f5bec0fae221cef.bundle.js +3 -0
  32. package/dist/{16.cd06772f9e031d37db03.bundle.js.map → 16.2ca98f5bec0fae221cef.bundle.js.map} +1 -1
  33. package/dist/{17.45b5c34f6c73bde1113d.bundle.js → 17.b19a2d3870590d21e8e9.bundle.js} +2 -2
  34. package/dist/{17.45b5c34f6c73bde1113d.bundle.js.map → 17.b19a2d3870590d21e8e9.bundle.js.map} +1 -1
  35. package/dist/{19.92f27dd146df127e8d6e.bundle.js → 19.34c180252e48207f01b4.bundle.js} +3 -3
  36. package/dist/{19.92f27dd146df127e8d6e.bundle.js.map → 19.34c180252e48207f01b4.bundle.js.map} +1 -1
  37. package/dist/20.9e9e388a98851c65f8f7.bundle.js +2 -0
  38. package/dist/{20.4eb25ede434dc329ecf1.bundle.js.map → 20.9e9e388a98851c65f8f7.bundle.js.map} +1 -1
  39. package/dist/21.8434e1ecb6fcfa06e1f1.bundle.js +2 -0
  40. package/dist/21.8434e1ecb6fcfa06e1f1.bundle.js.map +1 -0
  41. package/dist/{23.16fc17b0a8983ce3d809.bundle.js → 23.22e3720d741ee87c8108.bundle.js} +2 -2
  42. package/dist/{23.16fc17b0a8983ce3d809.bundle.js.map → 23.22e3720d741ee87c8108.bundle.js.map} +1 -1
  43. package/dist/{24.04d84edbd8f93d036633.bundle.js → 24.63acd0fc451fc797ff79.bundle.js} +2 -2
  44. package/dist/{24.04d84edbd8f93d036633.bundle.js.map → 24.63acd0fc451fc797ff79.bundle.js.map} +1 -1
  45. package/dist/{26.3a642e64c7803f3b32f1.bundle.js → 26.194b2d09daa679b7e09c.bundle.js} +2 -2
  46. package/dist/{26.3a642e64c7803f3b32f1.bundle.js.map → 26.194b2d09daa679b7e09c.bundle.js.map} +1 -1
  47. package/dist/27.35fe33bb9622c2e29c43.bundle.js +2 -0
  48. package/dist/{27.fef157d9275358c9f1a0.bundle.js.map → 27.35fe33bb9622c2e29c43.bundle.js.map} +1 -1
  49. package/dist/{29.a1b30610d7960a86b1cb.bundle.js → 29.e4eadb676659c5d6e44b.bundle.js} +3 -3
  50. package/dist/{29.a1b30610d7960a86b1cb.bundle.js.map → 29.e4eadb676659c5d6e44b.bundle.js.map} +1 -1
  51. package/dist/{30.3a05504ff287ca6df711.bundle.js → 30.0fb90b3cdf78fcde6251.bundle.js} +2 -2
  52. package/dist/{30.3a05504ff287ca6df711.bundle.js.map → 30.0fb90b3cdf78fcde6251.bundle.js.map} +1 -1
  53. package/dist/{31.13d5a8e9834cd5db589c.bundle.js → 31.8dd9fe71d36bd04a0433.bundle.js} +2 -2
  54. package/dist/{31.13d5a8e9834cd5db589c.bundle.js.map → 31.8dd9fe71d36bd04a0433.bundle.js.map} +1 -1
  55. package/dist/{32.59a7369287d15e8b9ab6.bundle.js → 32.8e1c25a47debdf5145d8.bundle.js} +2 -2
  56. package/dist/{32.59a7369287d15e8b9ab6.bundle.js.map → 32.8e1c25a47debdf5145d8.bundle.js.map} +1 -1
  57. package/dist/33.89b51420b48880728b96.bundle.js +2 -0
  58. package/dist/33.89b51420b48880728b96.bundle.js.map +1 -0
  59. package/dist/{35.fe688fc32270724c391d.bundle.js → 35.a9846fba95e98a294957.bundle.js} +2 -2
  60. package/dist/{35.fe688fc32270724c391d.bundle.js.map → 35.a9846fba95e98a294957.bundle.js.map} +1 -1
  61. package/dist/{36.7da22f08c8e850885cc5.bundle.js → 36.4dbd0f9007404b0adbe2.bundle.js} +2 -2
  62. package/dist/{36.7da22f08c8e850885cc5.bundle.js.map → 36.4dbd0f9007404b0adbe2.bundle.js.map} +1 -1
  63. package/dist/37.ac99eb00fe71266c5bff.bundle.js +2 -0
  64. package/dist/{37.8a9855206d5ae5eba9be.bundle.js.map → 37.ac99eb00fe71266c5bff.bundle.js.map} +1 -1
  65. package/dist/{39.0eebc4b972cff879c1c9.bundle.js → 39.8f8ae5c232bd2f023e7c.bundle.js} +2 -2
  66. package/dist/{39.0eebc4b972cff879c1c9.bundle.js.map → 39.8f8ae5c232bd2f023e7c.bundle.js.map} +1 -1
  67. package/dist/4.5391679fa01c55e842cc.bundle.js +2 -0
  68. package/dist/4.5391679fa01c55e842cc.bundle.js.map +1 -0
  69. package/dist/{40.10f42e3f6d8d87bd3221.bundle.js → 40.50f010a0a0ce99da5092.bundle.js} +2 -2
  70. package/dist/{40.10f42e3f6d8d87bd3221.bundle.js.map → 40.50f010a0a0ce99da5092.bundle.js.map} +1 -1
  71. package/dist/{41.368780c518c3f6cab4b7.bundle.js → 41.d09e0f01eac3492e3376.bundle.js} +2 -2
  72. package/dist/{41.368780c518c3f6cab4b7.bundle.js.map → 41.d09e0f01eac3492e3376.bundle.js.map} +1 -1
  73. package/dist/{42.1a48ae582180fa6374f9.bundle.js → 42.9561ff9cd77df0f86a91.bundle.js} +2 -2
  74. package/dist/{42.1a48ae582180fa6374f9.bundle.js.map → 42.9561ff9cd77df0f86a91.bundle.js.map} +1 -1
  75. package/dist/{43.64268be8880acd392fee.bundle.js → 43.0400aae23dac518b78ec.bundle.js} +2 -2
  76. package/dist/{43.64268be8880acd392fee.bundle.js.map → 43.0400aae23dac518b78ec.bundle.js.map} +1 -1
  77. package/dist/{53.58a23efc22865c67d57d.bundle.js → 53.54b20545d5504efa8958.bundle.js} +2 -2
  78. package/dist/{53.58a23efc22865c67d57d.bundle.js.map → 53.54b20545d5504efa8958.bundle.js.map} +1 -1
  79. package/dist/{54.1e2e99cd8cdf20b99a4f.bundle.js → 54.81f97307e31f5eabb5f0.bundle.js} +2 -2
  80. package/dist/{54.1e2e99cd8cdf20b99a4f.bundle.js.map → 54.81f97307e31f5eabb5f0.bundle.js.map} +1 -1
  81. package/dist/{55.693c1a0dd775181e1e29.bundle.js → 55.e8df33b84ca578a9a633.bundle.js} +2 -2
  82. package/dist/{55.693c1a0dd775181e1e29.bundle.js.map → 55.e8df33b84ca578a9a633.bundle.js.map} +1 -1
  83. package/dist/{56.62459de7af529d956b75.bundle.js → 56.d765faad673f618d41b0.bundle.js} +2 -2
  84. package/dist/{56.62459de7af529d956b75.bundle.js.map → 56.d765faad673f618d41b0.bundle.js.map} +1 -1
  85. package/dist/{60.2cb24e628b92cb3e0210.bundle.js → 60.f13766507ec5f29fde78.bundle.js} +2 -2
  86. package/dist/{60.2cb24e628b92cb3e0210.bundle.js.map → 60.f13766507ec5f29fde78.bundle.js.map} +1 -1
  87. package/dist/{65.6c12c48ac0d6f57a5079.bundle.js → 65.aa9736b7aad2582ca7ea.bundle.js} +2 -2
  88. package/dist/{65.6c12c48ac0d6f57a5079.bundle.js.map → 65.aa9736b7aad2582ca7ea.bundle.js.map} +1 -1
  89. package/dist/{67.5ae0610f77a1455ce92b.bundle.js → 67.e7bd652fadf93be1fbae.bundle.js} +2 -2
  90. package/dist/{67.5ae0610f77a1455ce92b.bundle.js.map → 67.e7bd652fadf93be1fbae.bundle.js.map} +1 -1
  91. package/dist/{69.90776e70cb361d1ac6d5.bundle.js → 69.6b915e6a7a9c36a78e2b.bundle.js} +2 -2
  92. package/dist/{69.90776e70cb361d1ac6d5.bundle.js.map → 69.6b915e6a7a9c36a78e2b.bundle.js.map} +1 -1
  93. package/dist/{71.3e927496e6e4175a3127.bundle.js → 71.624ca936339bf337e46a.bundle.js} +2 -2
  94. package/dist/{71.3e927496e6e4175a3127.bundle.js.map → 71.624ca936339bf337e46a.bundle.js.map} +1 -1
  95. package/dist/{72.bc99fbec188b4e49aa53.bundle.js → 72.3a5620a182219e9ea05d.bundle.js} +2 -2
  96. package/dist/{72.bc99fbec188b4e49aa53.bundle.js.map → 72.3a5620a182219e9ea05d.bundle.js.map} +1 -1
  97. package/dist/{73.40b5cbae08c7f3a58438.bundle.js → 73.f162e544378754078826.bundle.js} +2 -2
  98. package/dist/{73.40b5cbae08c7f3a58438.bundle.js.map → 73.f162e544378754078826.bundle.js.map} +1 -1
  99. package/dist/{74.cc42a1dcef7e9b830354.bundle.js → 74.7595755907badb1a99b8.bundle.js} +2 -2
  100. package/dist/{74.cc42a1dcef7e9b830354.bundle.js.map → 74.7595755907badb1a99b8.bundle.js.map} +1 -1
  101. package/dist/{75.31d1a4766c80c90b2afc.bundle.js → 75.4cc7ff534d56a05c578a.bundle.js} +2 -2
  102. package/dist/{75.31d1a4766c80c90b2afc.bundle.js.map → 75.4cc7ff534d56a05c578a.bundle.js.map} +1 -1
  103. package/dist/{76.89d209ce08efa7429e87.bundle.js → 76.cd0cfea4c96e88230dbe.bundle.js} +2 -2
  104. package/dist/{76.89d209ce08efa7429e87.bundle.js.map → 76.cd0cfea4c96e88230dbe.bundle.js.map} +1 -1
  105. package/dist/{77.64c49e9e99b0ae3fbbca.bundle.js → 77.df7767b1a0a3a0efa202.bundle.js} +2 -2
  106. package/dist/{77.64c49e9e99b0ae3fbbca.bundle.js.map → 77.df7767b1a0a3a0efa202.bundle.js.map} +1 -1
  107. package/dist/{79.0fbaedffc1f583a6064f.bundle.js → 79.4d64b377b0308809136f.bundle.js} +2 -2
  108. package/dist/{79.0fbaedffc1f583a6064f.bundle.js.map → 79.4d64b377b0308809136f.bundle.js.map} +1 -1
  109. package/dist/{80.6d489af9482e358c8dd8.bundle.js → 80.36e424031127d1743f20.bundle.js} +2 -2
  110. package/dist/{80.6d489af9482e358c8dd8.bundle.js.map → 80.36e424031127d1743f20.bundle.js.map} +1 -1
  111. package/dist/{94.94158487a9024ff3a623.bundle.js → 94.b1ccdd207229ae57569f.bundle.js} +2 -2
  112. package/dist/{94.94158487a9024ff3a623.bundle.js.map → 94.b1ccdd207229ae57569f.bundle.js.map} +1 -1
  113. package/dist/{97.48e14b67906b4d61a1b1.bundle.js → 97.951e03ffd2d5a10f868d.bundle.js} +2 -2
  114. package/dist/{97.48e14b67906b4d61a1b1.bundle.js.map → 97.951e03ffd2d5a10f868d.bundle.js.map} +1 -1
  115. package/dist/{98.cc7086155b76601af017.bundle.js → 98.745b4c457214d4189d7a.bundle.js} +2 -2
  116. package/dist/{98.cc7086155b76601af017.bundle.js.map → 98.745b4c457214d4189d7a.bundle.js.map} +1 -1
  117. package/dist/{bundle.d34ddcc40dd190254f1c.bundle.js → bundle.651116fe2383a66f32c9.bundle.js} +21 -21
  118. package/dist/{bundle.d34ddcc40dd190254f1c.bundle.js.map → bundle.651116fe2383a66f32c9.bundle.js.map} +1 -1
  119. package/dist/index.html +3 -3
  120. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  121. package/dist/pages/autocomplete.html +1 -1
  122. package/dist/pages/choose-repository-type.html +1 -1
  123. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  124. package/dist/pages/create-index.html +4 -4
  125. package/dist/pages/dependencies.html +1 -1
  126. package/dist/pages/domainRangeInfo.html +2 -2
  127. package/dist/pages/edit.html +1 -1
  128. package/dist/pages/explore.html +1 -1
  129. package/dist/pages/export.html +1 -1
  130. package/dist/pages/find.html +1 -1
  131. package/dist/pages/graph-config/saveGraphConfig.html +11 -11
  132. package/dist/pages/graphs-visualizations.html +7 -7
  133. package/dist/pages/guides.html +1 -1
  134. package/dist/pages/import.html +1 -1
  135. package/dist/pages/jdbc-create.html +5 -5
  136. package/dist/pages/monitor/queries.html +1 -1
  137. package/dist/pages/monitor/resources.html +2 -2
  138. package/dist/pages/namespaces.html +2 -2
  139. package/dist/pages/plugins.html +1 -1
  140. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  141. package/dist/pages/rdfrank.html +2 -2
  142. package/dist/pages/repositories.html +2 -2
  143. package/dist/pages/repository.html +2 -2
  144. package/dist/pages/similarity-indexes.html +1 -1
  145. package/dist/pages/sparql-template-create.html +5 -5
  146. package/dist/pages/sparql.html +3 -3
  147. package/dist/pages/webapi.html +2 -2
  148. package/dist/res/swagger/index.html +27 -27
  149. package/package.json +1 -1
  150. package/dist/108.162ea156d1fc4ad2525f.bundle.js +0 -2
  151. package/dist/16.cd06772f9e031d37db03.bundle.js +0 -3
  152. package/dist/20.4eb25ede434dc329ecf1.bundle.js +0 -2
  153. package/dist/21.5586732af2e5cec0d05a.bundle.js +0 -2
  154. package/dist/21.5586732af2e5cec0d05a.bundle.js.map +0 -1
  155. package/dist/27.fef157d9275358c9f1a0.bundle.js +0 -2
  156. package/dist/33.fde8076c81c87c25c367.bundle.js +0 -2
  157. package/dist/33.fde8076c81c87c25c367.bundle.js.map +0 -1
  158. package/dist/37.8a9855206d5ae5eba9be.bundle.js +0 -2
  159. package/dist/4.ca3eb6b5da0890c0abe0.bundle.js +0 -2
  160. package/dist/4.ca3eb6b5da0890c0abe0.bundle.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///./src/js/angular/rest/similarity.rest.service.js","webpack:///./src/js/angular/similarity/controllers/similarity-list.controller.js","webpack:///./src/js/angular/similarity/controllers/create-index.controller.js","webpack:///./src/js/angular/similarity/app.js","webpack:///./src/js/angular/utils/notifications.js","webpack:///./src/js/angular/core/directives/queryeditor/sparql-tab.directive.js"],"names":["angular","module","factory","SimilarityRestService","$inject","$http","getIndexes","get","getSearchQueries","rebuildIndex","index","createIndex","name","options","selectQuery","searchQuery","analogicalQuery","stopList","infer","sameAs","type","deleteIndex","delete","getSamples","getQuery","data","params","indexName","indexOptions","indexStopList","query","queryInference","querySameAs","viewType","analyzer","indexAnalyzer","saveSearchQuery","method","url","noCancelOnRouteChange","SimilarityCtrl","$scope","$interval","toastr","$repositories","$licenseService","ModalService","$uibModal","AutocompleteRestService","productInfo","RDF4JRepositoriesRestService","$translate","PREFIX","PREFIX_PREDICATION","ANY_PREDICATE","pluginName","pluginIsActive","setPluginIsActive","isPluginActive","literalForQuery","literal","iriForQuery","iri","undefined","startsWith","endsWith","shouldSkipCall","getActiveRepository","isActiveRepoFedXType","isActiveRepoOntopType","yasr","checkAutocompleteStatus","isLicenseValid","getAutocompletePromise","info","success","searchQueries","error","msg","getError","instant","encodeURIComponent","param","getSimilarityIndexes","similarityIndexes","pullList","timer","$broadcast","$","attr","$on","cancel","$watch","getNamespacesPromise","getNamespaces","usedPrefixes","results","bindings","forEach","e","prefix","value","namespace","destroy","document","getElementById","getUsedPrefixes","persistency","hideHeader","pluginsOptions","getYasrConfiguration","loading","selected","searchType","resultType","empty","goToSimilarityIndex","status","lastSearch","collapse","toggleOntoLoader","showLoader","yasrInnerContainer","element","resultsLoader","addClass","removeClass","performSearch","uri","parameters","termOrSubject","psiSubject","predicate","sparqlQuery","sendData","$index","$query","$searchType","$resultType","$parameters","$psiPredicate","searchSubject","$givenSubject","analogicalSubject","$givenObject","analogicalObject","$searchSubject","ajax","headers","Accept","done","textStatus","jqXhrOrErrorString","setResponse","fail","viewSearchQuery","queryTemplate","tokens","match","substring","indexOf","replacedQuery","replace","searchParameters","open","templateUrl","controller","resolve","openSimpleModal","title","message","warning","result","then","err","viewCreateQuery","text","res","copyToClipboardResult","openCopyToClipboardModal","trimIRI","_","trim","CreateSimilarityIdxCtrl","$timeout","SparqlRestService","$location","Notifications","LocalStorageAdapter","LSKeys","indexType","search","newIndex","page","defaultTabConfig","id","inference","initForViewType","indexNameFromLocation","editSearchQuery","currentQuery","notoolbarInference","notoolbarSameAs","window","editor","setQuery","allSamples","samples","isLiteralIndex","getAndRemoveOption","literalIndexes","concat","filter","idx","map","inputIndex","desiredIdx","j","length","filenamePattern","RegExp","validateIndex","invalidIndexName","saveQueries","test","getQueryType","appendOption","option","key","optArr","split","i","join","saveQueryToLocal","currentQueryTab","setLoader","isRunning","progressMessage","extraMessage","queryIsRunning","queryStartTime","Date","now","countTimeouted","$$phase","$apply","fixSizesOnHorizontalViewModeSwitch","verticalViewParam","visibleWindowHeight","innerHeight","documentElement","clientHeight","body","verticalView","orientationViewMode","viewMode","newHeight","querySelector","getBoundingClientRect","style","height","noPadding","minHeight","paddingRight","paddingLeft","container","resize","showHideEditor","selectTab","tab","runQuery","changePage","explain","executedQueryTab","getQueryMode","explainRequested","currentTabConfig","resultsCount","resetCurrentTabConfig","getRepositoryNamespaces","namespaces","repositoryError","finally","addKnownPrefixes","JSON","stringify","getValue","isDefined","setValue","getExistingTabId","existingTabId","tabsData","item","loadTab","queryType","offset","allResultsCount","pageSize","timeFinished","timeTook","sizeDelta","css","getQueryID","tabs","copy","helpHidden","HIDE_SIMILARITY_HELP","toggleHelp","set","viewQuery","isInvalidIndexName","isEmptyIndexName","goToPage","showEditor","notoolbar","xhr","abort","showPreview","outputType","queryExists","saveTab","findTabIndexByID","addNewTab","callback","tabName","savedQuery","changePagination","toggleSampleQueries","querySelected","tabId","getLoaderMessage","timeSeconds","timeHuman","getHumanReadableSeconds","changeViewMode","tabID","remove","focusQueryEditor","find","is","focus","on","$watchCollection","tabEvent","relatedTarget","target","showSampleQueries","sampleQueries","getResultsDescription","getUpdateDescription","getStaleWarningMessage","changedQuery","isSearchQuery","async","showToastMessageWithDelay","response","getCloseBtnMsg","operationType","operation","Promise","r","setTimeout","sparqlTabDirective","$rootScope","restrict","template","$element","state","deleteTab","preventDefault","stopPropagation","shiftKey","selectedTabId","obj","TABS_STATE","idForDelete","isUndefined","splice","deleteTabByID","editCurrentTab","editCurrentlySelectedOnly","$show","$editableButtons","children","$el","currentTarget","$$currentValue","selectThisTab","isTabChangeOk","directive"],"mappings":"8FAAAA,QACKC,OAAO,4CAA6C,IACpDC,QAAQ,wBAAyBC,GAEtCA,EAAsBC,QAAU,CAAC,QAAS,iBAI1C,SAASD,EAAsBE,GAE3B,MAAO,CACHC,WAUJ,WACI,OAAOD,EAAME,IAhBO,oBAMpBC,iBAiBJ,WACI,OAAOH,EAAME,IAAI,2BAjBjBE,aAyCJ,SAAsBC,GAClB,OAAOC,EAAY,MAAOD,EAAME,KAAMF,EAAMG,QAASH,EAAMI,YAAaJ,EAAMK,YAAaL,EAAMM,gBAAiBN,EAAMO,SAAUP,EAAMQ,MAAOR,EAAMS,OAAQT,EAAMU,OAzCnKC,YA4CJ,SAAqBX,GACjB,OAAOL,EAAMiB,OAAO,wBAA+BZ,EAAME,OA5CzDD,cACAY,WASJ,WACI,OAAOlB,EAAME,IAAI,4BATjBiB,SA6CJ,SAAkBC,GACd,OAAOpB,EAAME,IAAI,wBACb,CACImB,OAAQ,CACJd,KAAMa,EAAKE,UACXd,QAASY,EAAKG,aACdX,SAAUQ,EAAKI,cACff,YAAaW,EAAKK,MAClBZ,MAAOO,EAAKM,eACZZ,OAAQM,EAAKO,YACb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AEP,SAAuBhS,GACnBA,EAAE8Q,iBACF9Q,EAAE+Q,kBACEzU,EAAO2V,eAAc,IACrB5S,EAAEsR,GAAUjG,IAAI,YAtChC7Q,QACKC,OAAO,0DAA2D,CAC/D,yBACA,gDAEHoY,UAAU,YAAa3B,GAE5BA,EAAmBtW,QAAU,CAAC,aAAc,sBAAuB,SAAU","file":"17.45b5c34f6c73bde1113d.bundle.js","sourcesContent":["angular\n .module('graphdb.framework.rest.similarity.service', [])\n .factory('SimilarityRestService', SimilarityRestService);\n\nSimilarityRestService.$inject = ['$http', '$repositories'];\n\nconst SIMILARITY_ENDPOINT = 'rest/similarity';\n\nfunction SimilarityRestService($http) {\n\n return {\n getIndexes,\n getSearchQueries,\n rebuildIndex,\n deleteIndex,\n createIndex,\n getSamples,\n getQuery,\n saveSearchQuery\n };\n\n function getIndexes() {\n return $http.get(SIMILARITY_ENDPOINT);\n }\n\n function getSamples() {\n return $http.get(`${SIMILARITY_ENDPOINT}/samples`);\n }\n\n function getSearchQueries() {\n return $http.get(`${SIMILARITY_ENDPOINT}/config`);\n }\n\n function createIndex(method, name, options, selectQuery, searchQuery, analogicalQuery, stopList, infer, sameAs, type, analyzer) {\n return $http({\n method,\n url: `${SIMILARITY_ENDPOINT}`,\n noCancelOnRouteChange: true,\n data: {\n name,\n options,\n selectQuery,\n stopList,\n infer,\n sameAs,\n type,\n analyzer,\n searchQuery,\n analogicalQuery\n }\n }\n );\n }\n\n function rebuildIndex(index) {\n return createIndex('PUT', index.name, index.options, index.selectQuery, index.searchQuery, index.analogicalQuery, index.stopList, index.infer, index.sameAs, index.type);\n }\n\n function deleteIndex(index) {\n return $http.delete(`${SIMILARITY_ENDPOINT}?name=${index.name}`);\n }\n\n function getQuery(data) {\n return $http.get('rest/similarity/query',\n {\n params: {\n name: data.indexName,\n options: data.indexOptions,\n stopList: data.indexStopList,\n selectQuery: data.query,\n infer: data.queryInference,\n sameAs: data.querySameAs,\n type: data.viewType,\n analyzer: data.indexAnalyzer\n }\n });\n }\n\n function saveSearchQuery(data) {\n return $http({\n method: 'put',\n url: 'rest/similarity/search-query',\n data\n });\n }\n}\n","import YASR from 'lib/yasr.bundled';\nimport {decodeHTML} from \"../../../../app\";\nimport {YasrUtils} from \"../../utils/yasr-utils\";\n\nangular\n .module('graphdb.framework.similarity.controllers.list', [])\n .controller('SimilarityCtrl', SimilarityCtrl);\n\nSimilarityCtrl.$inject = ['$scope', '$interval', 'toastr', '$repositories', '$licenseService', 'ModalService', '$uibModal', 'SimilarityRestService', 'AutocompleteRestService', 'productInfo', 'RDF4JRepositoriesRestService', '$translate'];\n\nfunction SimilarityCtrl($scope, $interval, toastr, $repositories, $licenseService, ModalService, $uibModal, SimilarityRestService, AutocompleteRestService, productInfo, RDF4JRepositoriesRestService, $translate) {\n\n const PREFIX = 'http://www.ontotext.com/graphdb/similarity/';\n const PREFIX_PREDICATION = 'http://www.ontotext.com/graphdb/similarity/psi/';\n const PREFIX_INSTANCE = PREFIX + 'instance/';\n const ANY_PREDICATE = PREFIX_PREDICATION + 'any';\n $scope.pluginName = 'similarity';\n $scope.pluginIsActive = true;\n\n $scope.setPluginIsActive = function (isPluginActive) {\n $scope.pluginIsActive = isPluginActive;\n };\n\n const literalForQuery = function (literal) {\n return '\"' + literal + '\"';\n };\n\n // TODO: Fix cases when this function is called with undefined\n const iriForQuery = function (iri) {\n // Do not put brackets on nested triples\n if (iri === undefined || iri.startsWith(\"<<\") && iri.endsWith(\">>\")) {\n return iri;\n }\n return '<' + iri + '>';\n };\n\n $scope.info = productInfo;\n\n $scope.getActiveRepository = function () {\n return $repositories.getActiveRepository();\n };\n\n // Don't call functions if one of the following conditions are met\n function shouldSkipCall() {\n return !$scope.getActiveRepository() ||\n $scope.isActiveRepoFedXType() ||\n $scope.isActiveRepoOntopType();\n }\n\n if (!shouldSkipCall()) {\n SimilarityRestService.getSearchQueries().success(function (data) {\n $scope.searchQueries = data;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('similarity.could.not.get.search.queries.error'));\n });\n }\n\n $scope.encodeURIComponent = function (param) {\n return encodeURIComponent(param);\n };\n\n // get similarity indexes\n $scope.getSimilarityIndexes = function () {\n if (shouldSkipCall() || !$scope.pluginIsActive) {\n return;\n }\n SimilarityRestService.getIndexes()\n .success(function (data) {\n $scope.similarityIndexes = data;\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('similarity.could.not.get.indexes.error'));\n });\n };\n\n $scope.pullList = function () {\n $scope.getSimilarityIndexes();\n const timer = $interval(function () {\n $scope.$broadcast('checkIsActive');\n if ($('#indexes-table').attr('aria-expanded') !== 'false') {\n $scope.getSimilarityIndexes();\n }\n }, 5000);\n $scope.$on('$destroy', function () {\n $interval.cancel(timer);\n });\n };\n\n if ($scope.getActiveRepository()) {\n if ($licenseService.isLicenseValid()) {\n $scope.pullList();\n }\n }\n\n let yasr;\n\n $scope.$watch(function () {\n return $repositories.getActiveRepository();\n }, function () {\n // Don't try to get namespaces for ontop or fedx repository\n if ($scope.getActiveRepository() && !$scope.isActiveRepoOntopType() && !$scope.isActiveRepoFedXType()) {\n $scope.getNamespacesPromise = RDF4JRepositoriesRestService.getNamespaces($scope.getActiveRepository())\n .success(function (data) {\n checkAutocompleteStatus();\n $scope.usedPrefixes = {};\n data.results.bindings.forEach(function (e) {\n $scope.usedPrefixes[e.prefix.value] = e.namespace.value;\n });\n $scope.$on('$destroy', function () {\n if (yasr) {\n yasr.destroy();\n }\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 pluginsOptions: YasrUtils.getYasrConfiguration()\n });\n }).error(function (data) {\n toastr.error(getError(data), $translate.instant('get.namespaces.error.msg'));\n });\n }\n });\n\n function checkAutocompleteStatus() {\n if ($licenseService.isLicenseValid()) {\n $scope.getAutocompletePromise = AutocompleteRestService.checkAutocompleteStatus();\n }\n }\n\n $scope.$on('autocompleteStatus', function() {\n checkAutocompleteStatus();\n });\n\n $scope.loading = false;\n\n $scope.selected = undefined;\n $scope.searchType = 'searchTerm';\n $scope.resultType = 'termResult';\n\n $scope.$watch('searchType', function () {\n $scope.empty = true;\n });\n\n $scope.goToSimilarityIndex = function (index) {\n if (!('BUILT' === index.status || 'OUTDATED' === index.status || 'REBUILDING' === index.status)) {\n return;\n }\n $scope.empty = true;\n if ($scope.selected !== index) {\n $scope.lastSearch = undefined;\n $scope.selected = index;\n }\n if (index.type === 'text') {\n $scope.searchType = 'searchTerm';\n } else if (index.type === 'predication') {\n $scope.searchType = 'searchEntity';\n }\n if (index.type === 'text' || index.type === 'predication') {\n $('#indexes-table').collapse('hide');\n }\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 /* 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('opacity-hide');\n resultsLoader.removeClass('opacity-hide');\n } else {\n $scope.loading = false;\n yasrInnerContainer.removeClass('opacity-hide');\n resultsLoader.addClass('opacity-hide');\n }\n };\n\n $scope.performSearch = function (index, uri, searchType, resultType, parameters) {\n\n toggleOntoLoader(true);\n\n // this is either the search term or the iri for the subject\n let termOrSubject = uri;\n\n $scope.lastSearch = {};\n $scope.lastSearch.type = searchType;\n\n if (searchType === 'searchEntityPredicate') {\n termOrSubject = $scope.psiSubject;\n $scope.lastSearch.predicate = uri;\n }\n\n if (searchType === 'searchTerm') {\n termOrSubject = literalForQuery(termOrSubject);\n } else {\n termOrSubject = iriForQuery(termOrSubject);\n }\n\n $scope.lastSearch.termOrSubject = termOrSubject;\n\n const headers = {Accept: 'application/x-sparqlstar-results+json, application/sparql-results+json;q=0.9, */*;q=0.8'};\n let sparqlQuery;\n if (searchType === 'searchAnalogical') {\n sparqlQuery = ($scope.selected.analogicalQuery) ? $scope.selected.analogicalQuery : $scope.searchQueries['analogical'];\n } else {\n sparqlQuery = ($scope.selected.searchQuery) ? $scope.selected.searchQuery : $scope.searchQueries[$scope.selected.type];\n }\n const sendData = {\n query: sparqlQuery,\n $index: iriForQuery(PREFIX_INSTANCE + index),\n $query: termOrSubject,\n $searchType: iriForQuery(($scope.selected.type === 'text' ? PREFIX : PREFIX_PREDICATION) + (searchType === 'searchEntityPredicate' ? 'searchEntity' : searchType)),\n $resultType: iriForQuery($scope.selected.type === 'text' ? PREFIX + resultType : PREFIX_PREDICATION + 'entityResult'),\n $parameters: literalForQuery(parameters)\n };\n\n if (searchType === 'searchEntityPredicate') {\n sendData.$psiPredicate = $scope.lastSearch.predicate ? iriForQuery($scope.lastSearch.predicate) : iriForQuery(ANY_PREDICATE);\n }\n\n if (searchType === 'searchAnalogical') {\n $scope.searchSubject = uri;\n sendData.$givenSubject = iriForQuery($scope.analogicalSubject);\n sendData.$givenObject = iriForQuery($scope.analogicalObject);\n sendData.$searchSubject = iriForQuery(uri);\n }\n\n $.ajax({\n method: 'GET',\n url: 'repositories/' + $repositories.getActiveRepository(),\n data: sendData,\n headers: headers\n }).done(function (data, textStatus, jqXhrOrErrorString) {\n toggleOntoLoader(false);\n yasr.setResponse(data, textStatus, jqXhrOrErrorString);\n }).fail(function (data) {\n toastr.error(getError(data), $translate.instant('similarity.get.resource.error'));\n toggleOntoLoader(false);\n });\n };\n\n $scope.viewSearchQuery = function () {\n let queryTemplate;\n if ($scope.lastSearch.type === 'searchAnalogical') {\n queryTemplate = ($scope.selected.analogicalQuery) ? $scope.selected.analogicalQuery : $scope.searchQueries['analogical'];\n } else {\n queryTemplate = ($scope.selected.searchQuery) ? $scope.selected.searchQuery : $scope.searchQueries[$scope.selected.type];\n }\n\n //replace template prefix for PREFIX_INSTANCE in the view mode with actual prefix from the query\n let tokens = [];\n let prefix = '';\n tokens = queryTemplate.match(/[a-zA-Z0-9-]+:<http:\\/\\/www.ontotext.com\\/graphdb\\/similarity\\/instance\\/>/);\n prefix = tokens == null ? \"similarity-index\" : tokens[0].substring(0, tokens[0].indexOf(':'));\n\n const replacedQuery = queryTemplate\n .replace('?index', prefix + ':' + $scope.selected.name)\n .replace('?query', $scope.lastSearch.termOrSubject)\n .replace('?searchType', ($scope.selected.type === 'text' ? ':' : 'psi:') + ($scope.lastSearch.type === 'searchEntityPredicate' ? 'searchEntity' : $scope.lastSearch.type))\n .replace('?resultType', $scope.selected.type === 'text' ? ':' + $scope.resultType : 'psi:entityResult')\n .replace('?parameters', literalForQuery((!$scope.searchParameters) ? '' : $scope.searchParameters))\n .replace('?psiPredicate', $scope.lastSearch.predicate ? iriForQuery($scope.lastSearch.predicate) : iriForQuery(ANY_PREDICATE))\n .replace('?givenSubject', iriForQuery($scope.analogicalSubject))\n .replace('?givenObject', iriForQuery($scope.analogicalObject))\n .replace('?searchSubject', iriForQuery($scope.searchSubject));\n\n $uibModal.open({\n templateUrl: 'pages/viewQuery.html',\n controller: 'ViewQueryCtrl',\n resolve: {\n query: function () {\n return replacedQuery;\n }\n }\n });\n };\n\n\n $scope.deleteIndex = function (index) {\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm'),\n message: $translate.instant('similarity.delete.index.warning', {name: index.name}),\n warning: true\n }).result\n .then(function () {\n SimilarityRestService.deleteIndex(index)\n .then(function () {\n $scope.getSimilarityIndexes();\n }, function (err) {\n toastr.error(getError(err));\n });\n });\n };\n\n $scope.viewCreateQuery = function (index) {\n SimilarityRestService.getQuery({\n indexName: index.name,\n indexOptions: index.options,\n query: index.selectQuery,\n indexStopList: index.stopList,\n queryInference: index.infer,\n querySameAs: index.sameAs,\n viewType: index.type,\n indexAnalyzer: index.analyzer\n }).success(function (query) {\n $uibModal.open({\n templateUrl: 'pages/viewQuery.html',\n controller: 'ViewQueryCtrl',\n resolve: {\n query: function () {\n return query;\n }\n }\n });\n });\n };\n\n $scope.rebuildIndex = function (index) {\n // Migration\n if (!index.searchQuery) {\n index.searchQuery = index.type ? $scope.searchQueries[index.type] : $scope.searchQueries.text;\n }\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm'),\n message: decodeHTML($translate.instant('similarity.rebuild.index.warning', {name: index.name})),\n warning: true\n }).result\n .then(function () {\n index.status = 'REBUILDING';\n SimilarityRestService.rebuildIndex(index)\n .then(function (res) {\n }, function (err) {\n toastr.error(getError(err));\n });\n });\n };\n\n $scope.copyToClipboardResult = function (uri) {\n ModalService.openCopyToClipboardModal(uri);\n };\n\n $scope.trimIRI = function (iri) {\n return _.trim(iri, \"<>\");\n };\n}\n","import 'angular/utils/notifications';\nimport 'angular/utils/local-storage-adapter';\n\nangular\n .module('graphdb.framework.similarity.controllers.create', [\n 'graphdb.framework.utils.notifications',\n 'graphdb.framework.utils.localstorageadapter'\n ])\n .controller('CreateSimilarityIdxCtrl', CreateSimilarityIdxCtrl);\n\nCreateSimilarityIdxCtrl.$inject = ['$scope', 'toastr', '$uibModal', '$timeout', 'SimilarityRestService', 'SparqlRestService', '$location', 'productInfo', 'Notifications', 'RDF4JRepositoriesRestService', 'LocalStorageAdapter', 'LSKeys', '$translate'];\n\nfunction CreateSimilarityIdxCtrl($scope, toastr, $uibModal, $timeout, SimilarityRestService, SparqlRestService, $location, productInfo, Notifications, RDF4JRepositoriesRestService, LocalStorageAdapter, LSKeys, $translate) {\n\n const indexType = $location.search().type;\n if (indexType === undefined || indexType.startsWith('text')) {\n $scope.viewType = 'text';\n } else {\n $scope.viewType = indexType;\n }\n\n const textDefaultOptions = '-termweight idf';\n const predDefaultOptions = '';\n $scope.newIndex = {};\n\n $scope.info = productInfo;\n $scope.page = 1;\n\n const defaultTabConfig = {\n id: '1',\n name: '',\n query: '',\n inference: true,\n sameAs: true\n };\n\n let getNewIndexName = function (indexNameFromLocation) {\n if (indexNameFromLocation) {\n if ($scope.page !== 1) {\n return indexNameFromLocation;\n } else {\n return 'Copy_of_' + indexNameFromLocation;\n }\n }\n return '';\n };\n\n const initForViewType = function () {\n $scope.editSearchQuery = $location.search().editSearchQuery;\n $scope.page = $scope.editSearchQuery ? 2 : 1;\n $scope.newIndex.name = getNewIndexName($location.search().name);\n $scope.newIndex.options = ($location.search().options ? $location.search().options : ($scope.viewType === \"text\") ? textDefaultOptions : predDefaultOptions);\n\n if ($scope.searchQueries) {\n $scope.newIndex.searchQuery = $location.search().searchQuery ? $location.search().searchQuery : $scope.searchQueries[$scope.viewType];\n if ($scope.viewType === 'predication') {\n $scope.newIndex.analogicalQuery = $location.search().analogicalQuery ? $location.search().analogicalQuery : $scope.searchQueries['analogical'];\n }\n }\n\n if ($scope.editSearchQuery) {\n // Default will be opened search query tab for edition\n $scope.currentQuery.query = $scope.newIndex.searchQuery;\n $scope.notoolbarInference = true;\n $scope.notoolbarSameAs = true;\n if (window.editor) {\n $scope.setQuery($scope.newIndex.searchQuery);\n }\n } else {\n if ($scope.viewType === 'text' && $scope.allSamples) {\n $scope.samples = $scope.allSamples['text'];\n $scope.newIndex.stopList = ($location.search().stopList ? $location.search().stopList : undefined);\n $scope.newIndex.analyzer = ($location.search().analyzer ? $location.search().analyzer : 'org.apache.lucene.analysis.en.EnglishAnalyzer');\n const isLiteralIndex = getAndRemoveOption('-literal_index');\n if (isLiteralIndex !== undefined) {\n $scope.newIndex.isLiteralIndex = isLiteralIndex;\n }\n if (window.editor) {\n $scope.setQuery($scope.samples['literals']);\n }\n }\n if ($scope.viewType === 'predication' && $scope.allSamples) {\n SimilarityRestService.getIndexes()\n .success(function (data) {\n $scope.literalIndexes = ['no-index'].concat(data\n .filter(function (idx) {\n return idx.type === 'textLiteral' && (idx.status === 'BUILT' || idx.status === 'OUTDATED')\n })\n .map(function (idx) {\n return idx.name;\n }));\n\n if ($scope.newIndex.inputIndex === undefined) {\n const desiredIdx = getAndRemoveOption('-input_index');\n if (desiredIdx !== undefined) {\n for (let j = 0; j < $scope.literalIndexes.length; j++) {\n if (desiredIdx === $scope.literalIndexes[j]) {\n $scope.newIndex.inputIndex = $scope.literalIndexes[j];\n }\n }\n }\n }\n if ($scope.newIndex.inputIndex === undefined) {\n $scope.newIndex.inputIndex = $scope.literalIndexes[0];\n }\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('similarity.could.not.get.indexes.error'));\n });\n\n $scope.samples = $scope.allSamples['predication'];\n if (window.editor) {\n $scope.setQuery($scope.samples['predication']);\n }\n }\n }\n };\n\n const filenamePattern = new RegExp('^[a-zA-Z0-9-_]+$');\n\n const validateIndex = function () {\n $scope.invalidIndexName = false;\n $scope.saveQueries();\n if (!$scope.newIndex.name) {\n $scope.invalidIndexName = $translate.instant('similarity.empty.index.name.error');\n return false;\n }\n if (!filenamePattern.test($scope.newIndex.name)) {\n $scope.invalidIndexName = $translate.instant('similarity.index.name.constraint');\n return false;\n }\n\n if (!$scope.newIndex.query) {\n toastr.error($translate.instant('similarity.empty.select.query.error'));\n return false;\n }\n\n if (!$scope.newIndex.searchQuery) {\n toastr.error($translate.instant('similarity.empty.search.query.error'));\n return false;\n }\n\n if ($scope.viewType === 'predication' && !$scope.newIndex.analogicalQuery) {\n toastr.error($translate.instant('similarity.empty.analogical.query.error'));\n return false;\n }\n\n if (window.editor.getQueryType() !== 'SELECT') {\n toastr.error($translate.instant('similarity.index.select.queries.constraint'));\n return;\n }\n\n return true;\n };\n\n const appendOption = function (option, value) {\n $scope.newIndex.options = $scope.newIndex.options + ($scope.newIndex.options === '' ? '' : ' ') + option + ' ' + value;\n };\n\n SimilarityRestService.getSearchQueries().success(function (data) {\n $scope.searchQueries = data;\n SimilarityRestService.getSamples().success(function (samples) {\n defaultTabConfig.query = $location.search().selectQuery ? $location.search().selectQuery : samples['text']['literals'];\n defaultTabConfig.inference = !($location.search().infer === 'false');\n defaultTabConfig.sameAs = !($location.search().sameAs === 'false');\n $scope.tabsData = $scope.tabs = [defaultTabConfig];\n $scope.currentQuery = angular.copy(defaultTabConfig);\n $scope.allSamples = samples;\n initForViewType();\n });\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('similarity.could.not.get.search.queries.error'));\n });\n\n $scope.$watch('viewType', function () {\n initForViewType();\n });\n\n $scope.helpHidden = LocalStorageAdapter.get(LSKeys.HIDE_SIMILARITY_HELP) === 1;\n $scope.toggleHelp = function (value) {\n if (value === undefined) {\n value = LocalStorageAdapter.get(LSKeys.HIDE_SIMILARITY_HELP);\n }\n if (value !== 1) {\n LocalStorageAdapter.set(LSKeys.HIDE_SIMILARITY_HELP, 1);\n $scope.helpHidden = true;\n } else {\n LocalStorageAdapter.set(LSKeys.HIDE_SIMILARITY_HELP, 0);\n $scope.helpHidden = false;\n }\n };\n\n $scope.viewQuery = function () {\n if (!validateIndex()) {\n return;\n }\n\n SimilarityRestService.getQuery({\n indexName: $scope.newIndex.name,\n indexOptions: $scope.newIndex.options,\n query: $scope.currentQuery.query,\n indexStopList: $scope.newIndex.stopList,\n queryInference: $scope.currentQuery.inference,\n querySameAs: $scope.currentQuery.sameAs,\n viewType: $scope.viewType,\n indexAnalyzer: $scope.newIndex.analyzer\n }).success(function (query) {\n if (query) {\n $uibModal.open({\n templateUrl: 'pages/viewQuery.html',\n controller: 'ViewQueryCtrl',\n resolve: {\n query: function () {\n return query;\n }\n }\n });\n }\n }).error(function (error) {\n const msg = getError(error);\n toastr.error(msg);\n });;\n };\n\n $scope.$watch('newIndex.name', function () {\n $scope.isInvalidIndexName = false;\n $scope.isEmptyIndexName = false;\n });\n\n $scope.saveQueries = function () {\n // save the current query\n const query = window.editor.getValue().trim();\n if ($scope.page === 1) {\n $scope.newIndex.query = query;\n } else if ($scope.page === 2) {\n $scope.newIndex.searchQuery = query;\n } else if ($scope.page === 3) {\n $scope.newIndex.analogicalQuery = query;\n }\n };\n\n $scope.goToPage = function (page) {\n // ugly fix for GDB-3099\n if (page !== 1 && $scope.viewMode !== 'yasr') {\n $scope.showEditor();\n $timeout(function () {\n if (page === 2) {\n $scope.currentQuery.query = $scope.newIndex.searchQuery;\n }\n if (page === 3) {\n $scope.currentQuery.query = $scope.newIndex.analogicalQuery;\n }\n\n window.editor.setValue($scope.currentQuery.query || ' ');\n });\n }\n\n $scope.saveQueries();\n // get the saved query\n if (page === 1) {\n $scope.currentQuery.query = $scope.newIndex.query;\n } else if (page === 2) {\n $scope.currentQuery.query = $scope.newIndex.searchQuery;\n } else if (page === 3) {\n $scope.currentQuery.query = $scope.newIndex.analogicalQuery;\n }\n\n loadTab();\n $scope.notoolbar = page !== 1;\n\n $scope.page = page;\n };\n\n $scope.createIndex = function () {\n if (!validateIndex()) {\n return;\n }\n // Check existing indexes\n SimilarityRestService.getIndexes()\n .success(function (data) {\n data.forEach(function (index) {\n if (index.name === $scope.newIndex.name) {\n $scope.invalidIndexName = $translate.instant('similarity.existing.index.name.error');\n }\n });\n if (!$scope.invalidIndexName) {\n let indexType = $scope.viewType;\n\n if ($scope.literalIndexes !== undefined) {\n const inputIndex = $scope.newIndex.inputIndex;\n if (inputIndex !== $scope.literalIndexes[0]) {\n appendOption('-input_index', inputIndex);\n }\n }\n if ($scope.newIndex.isLiteralIndex === 'true') {\n appendOption('-literal_index', 'true');\n indexType = 'textLiteral';\n }\n\n SimilarityRestService.createIndex('POST',\n $scope.newIndex.name,\n $scope.newIndex.options,\n $scope.newIndex.query,\n $scope.newIndex.searchQuery,\n $scope.newIndex.analogicalQuery,\n $scope.newIndex.stopList,\n $scope.currentQuery.inference,\n $scope.currentQuery.sameAs,\n indexType,\n $scope.newIndex.analyzer)\n .error(function (err) {\n toastr.error(getError(err), $translate.instant('similarity.create.index.error'));\n });\n $location.url('similarity');\n }\n\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('similarity.could.not.get.indexes.error'));\n });\n };\n\n // Called when user clicks on a sample query\n $scope.setQuery = function (query) {\n // Hack for YASQE bug\n window.editor.setValue(query ? query : ' ');\n };\n\n // TODO don't copy paste each time, this is the same as in the graph config\n // DOWN HERE WE KEEP EVERYTHING PURELY QUERY EDITOR (MOSTLY BORROWED FROM query-editor.controller.js)\n\n $scope.showEditor = function () {\n if (window.editor.xhr) {\n window.editor.xhr.abort();\n }\n $scope.viewMode = 'yasr';\n };\n\n $scope.showPreview = function () {\n // For some reason YASR gets confused and sets this to rawResponse\n // if we execute a CONSTRUCT and then a SELECT. This makes sure it's always table.\n $scope.currentQuery.outputType = 'table';\n $scope.runQuery();\n };\n\n $scope.resetCurrentTabConfig = function () {\n $scope.currentTabConfig = {\n pageSize: 100, // page limit 100 as this is only used for preview\n page: 1,\n allResultsCount: 0,\n resultsCount: 0\n };\n };\n\n $scope.queryExists = false;\n\n $scope.resetCurrentTabConfig();\n\n $scope.tabsData = $scope.tabs = [defaultTabConfig];\n\n // query tab operations\n $scope.saveTab = saveTab;\n $scope.loadTab = loadTab;\n $scope.addNewTab = addNewTab;\n\n // query operations\n $scope.runQuery = runQuery;\n $scope.getNamespaces = getNamespaces;\n $scope.changePagination = changePagination;\n $scope.toggleSampleQueries = toggleSampleQueries;\n $scope.addKnownPrefixes = addKnownPrefixes;\n $scope.getExistingTabId = getExistingTabId;\n $scope.querySelected = querySelected;\n $scope.saveQueryToLocal = saveQueryToLocal;\n\n $scope.setLoader = setLoader;\n $scope.getLoaderMessage = getLoaderMessage;\n\n // query editor and results orientation\n $scope.fixSizesOnHorizontalViewModeSwitch = fixSizesOnHorizontalViewModeSwitch;\n $scope.changeViewMode = changeViewMode;\n $scope.showHideEditor = showHideEditor;\n $scope.focusQueryEditor = focusQueryEditor;\n $scope.orientationViewMode = true;\n\n // start of repository actions\n $scope.getActiveRepository();\n\n function getAndRemoveOption(key) {\n const optArr = $scope.newIndex.options.split(' ');\n for (let i = 0; i < optArr.length; i++) {\n if (optArr[i] === key && i + 1 < optArr.length) {\n const value = optArr[i + 1];\n\n delete optArr[i];\n delete optArr[i + 1];\n $scope.newIndex.options = optArr.join(' ');\n\n return value;\n }\n }\n return undefined;\n }\n\n function saveQueryToLocal(currentQueryTab) {\n }\n\n function setLoader(isRunning, progressMessage, extraMessage) {\n const yasrInnerContainer = angular.element(document.getElementById('yasr-inner'));\n $scope.queryIsRunning = isRunning;\n if (isRunning) {\n $scope.queryStartTime = Date.now();\n $scope.countTimeouted = false;\n $scope.progressMessage = progressMessage;\n $scope.extraMessage = extraMessage;\n yasrInnerContainer.addClass('hide');\n } else {\n $scope.progressMessage = '';\n $scope.extraMessage = '';\n yasrInnerContainer.removeClass('hide');\n }\n // We might call this from angular or outside angular so take care of applying the scope.\n if ($scope.$$phase === null) {\n $scope.$apply();\n }\n }\n\n function getLoaderMessage() {\n const timeSeconds = (Date.now() - $scope.queryStartTime) / 1000;\n const timeHuman = $scope.getHumanReadableSeconds(timeSeconds);\n let message = '';\n\n if ($scope.progressMessage) {\n message = $scope.progressMessage + '... ' + timeHuman;\n } else {\n message = $translate.instant('common.running.operation', {timeHuman: timeHuman});\n }\n if ($scope.extraMessage && timeSeconds > 10) {\n message += '\\n' + $scope.extraMessage;\n }\n\n return message;\n }\n\n // start of query editor results orientation operations\n function fixSizesOnHorizontalViewModeSwitch(verticalViewParam) {\n function visibleWindowHeight() {\n return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0;\n }\n\n const verticalView = verticalViewParam;\n if (!$scope.orientationViewMode) {\n $scope.noPadding = {paddingRight: 15, paddingLeft: 0};\n\n // window.editor is undefined if no repo is selected\n if (window.editor && document.querySelector('.CodeMirror-wrap')) {\n let newHeight = visibleWindowHeight() - (document.querySelector('.CodeMirror-wrap').getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector('.CodeMirror-wrap').style.height = newHeight + 'px';\n document.getElementById('yasr').style.minHeight = newHeight + 'px';\n //window.editor.refresh();\n } else {\n let timer;\n if (verticalView) {\n timer = $timeout(function () {\n $scope.fixSizesOnHorizontalViewModeSwitch(verticalView);\n }, 100);\n } else {\n timer = $timeout($scope.fixSizesOnHorizontalViewModeSwitch, 100);\n }\n\n $scope.$on('$destroy', function () {\n $timeout.cancel(timer);\n });\n }\n } else {\n if ($scope.viewMode === 'yasr') {\n let newHeight = visibleWindowHeight() - (document.querySelector('.CodeMirror-wrap').getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector('.CodeMirror-wrap').style.height = newHeight + 'px';\n } else {\n $scope.noPadding = {};\n document.querySelector('.CodeMirror-wrap').style.height = '';\n }\n document.getElementById('yasr').style.minHeight = '';\n }\n if (window.yasr && window.yasr.container) {\n $timeout(function () {\n window.yasr.container.resize();\n }, 100);\n }\n }\n\n if (!$scope.orientationViewMode) {\n showHideEditor();\n }\n\n function changeViewMode(tabID) {\n $scope.viewMode = 'none';\n $scope.orientationViewMode = !$scope.orientationViewMode;\n fixSizesOnHorizontalViewModeSwitch();\n $('.dataTables_filter').remove();\n $('.resultsTable').remove();\n $timeout(function () {\n loadTab();\n selectTab(tabID);\n }, 100);\n }\n\n function showHideEditor() {\n fixSizesOnHorizontalViewModeSwitch(true);\n }\n\n function focusQueryEditor() {\n if (!angular.element(document).find('.editable-input').is(':focus')) {\n angular.element(document).find('.CodeMirror textarea:first-child').focus();\n }\n }\n\n // end of query editor results orientation operations\n\n function selectTab(id) {\n $timeout(function () {\n $('a[data-id = \"' + id + '\"]').tab('show');\n }, 0);\n }\n\n // start of query operations\n function runQuery(changePage, explain) {\n $scope.executedQueryTab = $scope.currentQuery;\n if (window.editor.getQueryType() !== 'SELECT') {\n toastr.error($translate.instant('similarity.indexes.select.queries.constraint'));\n return;\n }\n if (explain && window.editor.getQueryType() !== 'SELECT') {\n toastr.warning($translate.instant('similarity.explain.select.queries.constraint'));\n return;\n }\n\n if (window.editor.getQueryMode() === 'update') {\n toastr.warning($translate.instant('cannot.execute.update.error'));\n return;\n }\n\n $scope.explainRequested = explain;\n if (!$scope.queryIsRunning) {\n if (changePage) {\n $scope.currentTabConfig.resultsCount = 0;\n } else {\n $scope.resetCurrentTabConfig();\n }\n\n // Hides the editor and shows the yasr results\n $scope.viewMode = 'editor';\n if ($scope.orientationViewMode) {\n $scope.fixSizesOnHorizontalViewModeSwitch();\n }\n\n setLoader(true, $translate.instant('evaluating.query.msg'));\n window.editor.query();\n }\n }\n\n // FIXME: this is copy-pasted in graphs-config.controller.js and query-editor.controller.js. Find a way to avoid duplications\n function getNamespaces() {\n // Signals the namespaces are to be fetched => loader will be shown\n setLoader(true, $translate.instant('common.refreshing.namespaces'), $translate.instant('common.extra.message'));\n RDF4JRepositoriesRestService.getRepositoryNamespaces()\n .success(function (data) {\n const usedPrefixes = {};\n data.results.bindings.forEach(function (e) {\n usedPrefixes[e.prefix.value] = e.namespace.value;\n });\n $scope.namespaces = usedPrefixes;\n })\n .error(function (data) {\n $scope.repositoryError = getError(data);\n })\n .finally(function () {\n // Signals namespaces were fetched => loader will be hidden\n setLoader(false);\n });\n }\n\n function changePagination() {\n runQuery(true, $scope.explainRequested);\n }\n\n if ($scope.getActiveRepository()) {\n getNamespaces();\n }\n\n $scope.$on('$destroy', function () {\n window.editor = null;\n window.yasr = null;\n });\n\n function toggleSampleQueries() {\n }\n\n // Add known prefixes\n function addKnownPrefixes() {\n SparqlRestService.addKnownPrefixes(JSON.stringify(window.editor.getValue()))\n .success(function (data) {\n if (angular.isDefined(window.editor) && angular.isDefined(data) && data !== window.editor.getValue()) {\n window.editor.setValue(data);\n }\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.add.known.prefixes.error'));\n return true;\n });\n }\n\n $('textarea').on('paste', function () {\n $timeout(function () {\n addKnownPrefixes();\n }, 0);\n });\n\n function querySelected(query) {\n const tabId = getExistingTabId(query);\n $scope.toggleSampleQueries();\n if (!angular.isDefined(tabId)) {\n $scope.addNewTab(null, query.name, query.body);\n } else {\n selectTab(tabId);\n }\n }\n\n function getExistingTabId(query) {\n let existingTabId = undefined;\n angular.forEach($scope.tabsData, function (item) {\n if (item.name === query.name && item.query === query.body) {\n existingTabId = item.id;\n return item;\n }\n });\n\n return existingTabId;\n }\n\n\n // end of query operations\n\n // start of query tab operations\n function findTabIndexByID(id) {\n for (let i = 0; i < $scope.tabsData.length; i++) {\n const tab = $scope.tabsData[i];\n if (tab.id === id) {\n return i;\n }\n }\n }\n\n $scope.$watchCollection('[currentQuery.inference, currentQuery.sameAs]', function () {\n saveQueryToLocal($scope.currentQuery);\n });\n\n function saveTab(id) {\n const idx = findTabIndexByID(id);\n // Tab was deleted, don't try to save it's state\n if (idx === undefined) {\n return {};\n }\n const tab = $scope.tabsData[idx];\n //tab.query = window.editor.getValue();\n $scope.saveQueryToLocal(tab);\n return tab;\n }\n\n function addNewTab(callback, tabName, savedQuery) {\n }\n\n function loadTab() {\n $scope.tabsData = [$scope.currentQuery];\n\n const tab = $scope.currentQuery;\n\n if ($scope.currentQuery.query === null || $scope.currentQuery.query === '') {\n // hack for YASQE bug\n window.editor.setValue(' ');\n } else {\n window.editor.setValue($scope.currentQuery.query || ' ');\n }\n\n $timeout(function () {\n $scope.currentTabConfig = {};\n $scope.currentTabConfig.queryType = tab.queryType;\n $scope.currentTabConfig.resultsCount = tab.resultsCount;\n\n $scope.currentTabConfig.offset = tab.offset;\n $scope.currentTabConfig.allResultsCount = tab.allResultsCount;\n $scope.currentTabConfig.page = tab.page;\n $scope.currentTabConfig.pageSize = tab.pageSize;\n\n $scope.currentTabConfig.timeFinished = tab.timeFinished;\n $scope.currentTabConfig.timeTook = tab.timeTook;\n $scope.currentTabConfig.sizeDelta = tab.sizeDelta;\n $scope.$apply();\n }, 0);\n\n //Remove paddign of yasr so it will be aligned with sparql editor\n $('#yasr').css('padding', '0');\n }\n\n function getQueryID(element) {\n return $(element).attr('data-id');\n }\n\n $scope.$on('tabAction', function (e, tabEvent) {\n if (tabEvent.relatedTarget) {\n $scope.saveTab(getQueryID(tabEvent.relatedTarget));\n }\n $scope.loadTab(getQueryID(tabEvent.target));\n });\n\n $scope.$on('deleteAllexeptSelected', function (e, tabs) {\n $scope.tabsData = tabs;\n $scope.tabs = tabs;\n });\n // end of query tab operations\n\n $scope.currentQuery = angular.copy(defaultTabConfig);\n // $scope.state = {};\n $scope.showSampleQueries = false;\n $scope.savedQuery = {};\n $scope.sampleQueries = {};\n\n $scope.getResultsDescription = function () {\n };\n\n $scope.getUpdateDescription = function () {\n };\n\n $scope.getStaleWarningMessage = function () {\n };\n\n $scope.saveSearchQuery = function () {\n // Should validate that query is SELECT\n if (window.editor.getQueryType() !== 'SELECT') {\n toastr.error($translate.instant('similarity.index.select.queries.constraint'));\n return;\n }\n let data = {\n name: $scope.newIndex.name,\n changedQuery: $scope.currentQuery.query,\n isSearchQuery: $scope.page === 2\n };\n\n return SimilarityRestService.saveSearchQuery(JSON.stringify(data))\n .then(async function () {\n await Notifications.showToastMessageWithDelay($scope.page === 2 ? 'similarity.changed.search.query.msg' : 'similarity.changed.analogical.query.msg');\n $location.url('similarity');\n }, function (response) {\n toastr.error(getError(response), $translate.instant('similarity.change.query.error'));\n });\n };\n\n $scope.getCloseBtnMsg = function () {\n let operationType = $scope.editSearchQuery ? $translate.instant('similarity.query.edition.msg') : $translate.instant('similarity.index.creation.msg');\n return $translate.instant('similarity.close.btn.msg', {operation: operationType});\n }\n}\n","import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/core/controllers';\nimport 'angular/rest/similarity.rest.service';\nimport 'angular/similarity/controllers/similarity-list.controller';\nimport 'angular/similarity/controllers/create-index.controller';\nimport 'angular/core/directives/queryeditor/sparql-tab.directive';\nimport 'angular/core/directives/queryeditor/query-editor.controller';\nimport 'angular/core/directives/queryeditor/query-editor.directive';\n\nangular.module('graphdb.framework.similarity', [\n 'graphdb.framework.core.controllers',\n 'graphdb.framework.core.directives',\n 'graphdb.framework.rest.similarity.service',\n 'graphdb.framework.similarity.controllers.create',\n 'graphdb.framework.similarity.controllers.list',\n 'graphdb.framework.core.directives.queryeditor.controllers',\n 'graphdb.framework.core.directives.queryeditor.sparqltab',\n 'graphdb.framework.core.directives.queryeditor.queryeditor'\n]);\n","angular\n .module('graphdb.framework.utils.notifications', [])\n .factory('Notifications', Notifications);\n\nNotifications.$inject = ['toastr', '$translate'];\n\nfunction Notifications(toastr, $translate) {\n return {\n showToastMessageWithDelay\n };\n\n /**\n * This method will show message with tiny delay and only after completion\n * of latter redirection to \"graphs-visualizations\" page will happen.\n * @param {string} message The message to be displayed.\n * @return {Promise<any>}\n */\n function showToastMessageWithDelay(message) {\n return new Promise((r) => {\n toastr.success($translate.instant(message));\n setTimeout(r, 200);\n });\n }\n}\n","import 'angular/utils/local-storage-adapter';\n\nangular\n .module('graphdb.framework.core.directives.queryeditor.sparqltab', [\n 'graphdb.framework.core',\n 'graphdb.framework.utils.localstorageadapter'\n ])\n .directive('sparqlTab', sparqlTabDirective);\n\nsparqlTabDirective.$inject = ['$rootScope', 'LocalStorageAdapter', 'LSKeys', 'ModalService'];\n\nfunction sparqlTabDirective($rootScope, LocalStorageAdapter, LSKeys, ModalService) {\n const SparqlTabCtrl = ['$scope', '$element', '$rootScope', 'ModalService', 'toastr', '$translate', function ($scope, $element, $rootScope, ModalService, toastr, $translate) {\n $scope.state = {};\n\n function getQueryID(element) {\n return $(element).attr('data-id');\n }\n\n function findTabIndexByID(id) {\n for (let i = 0; i < $scope.tabs.length; i++) {\n const tab = $scope.tabs[i];\n if (tab.id === id) {\n return i;\n }\n }\n }\n\n $($element).on('shown.bs.tab', function (e) {\n $rootScope.$broadcast('tabAction', e);\n });\n\n $scope.deleteTab = deleteTab;\n $scope.editCurrentTab = editCurrentTab;\n $scope.selectThisTab = selectThisTab;\n\n function selectThisTab(e) {\n e.preventDefault();\n e.stopPropagation();\n if ($scope.isTabChangeOk(false)) {\n $($element).tab('show');\n }\n }\n\n function selectTab(id) {\n $('a[data-id = \"' + id + '\"]').tab('show');\n }\n\n function deleteTab(e) {\n e.preventDefault();\n e.stopPropagation();\n\n if ($scope.tabs.length < 2) {\n toastr.warning($translate.instant('sparql.tab.directive.close.last.warning'));\n return;\n }\n\n if (e.shiftKey) {\n $scope.state.selectedTabId = getQueryID($element);\n\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm'),\n message: $translate.instant('sparql.tab.directive.delete.all.tabs.warning'),\n warning: true\n }).result.then(function () {\n deleteAllTabsExceptSelected($scope.state.selectedTabId);\n });\n } else {\n $scope.state.idForDelete = getQueryID($element);\n\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm'),\n message: $translate.instant('sparql.tab.directive.close.tab.warning'),\n warning: true\n }).result.then(function () {\n deleteTabByID($scope.state.idForDelete);\n });\n }\n angular.element(document).find('.CodeMirror textarea:first-child').focus();\n }\n\n function editCurrentTab() {\n if (getQueryID($element) !== $scope.currentQuery.id) {\n return;\n }\n $scope.editCurrentlySelectedOnly.$show();\n //fix for buttons for edit\n const $editableButtons = $(\".editable-buttons\");\n $editableButtons.children(\".btn.btn-primary\").addClass('btn-sm');\n $editableButtons.children(\".btn.btn-default\").addClass('btn-sm');\n $('.editable-controls .editable-input').addClass('form-control-sm').on('change', function ($el) {\n $scope.currentQuery.name = $el.currentTarget.$$currentValue;\n });\n //$('.editable-buttons').css('margin-top', '5px');\n //$('.editable-input.editable-has-buttons').css('width', '50%');\n $('.editable-buttons .glyphicon.glyphicon-ok')\n .removeClass('glyphicon glyphicon-ok')\n .addClass('fa fa-check');\n $('.editable-buttons .glyphicon.glyphicon-remove')\n .removeClass('glyphicon glyphicon-remove')\n .addClass('fa fa-close');\n }\n\n function deleteTabByID(id) {\n if (angular.isUndefined(id)) {\n throw 'Delete by id was called with undefined id';\n }\n const idx = findTabIndexByID(id);\n $scope.tabs.splice(idx, 1);\n\n if (id === $scope.currentQuery.id) {\n if ($scope.tabs.length > 0) {\n if (idx > 0) {\n // select previous tab if we deleted any but the first tab\n selectTab($scope.tabs[idx - 1].id);\n } else {\n // select first tab if we deleted the first tab\n selectTab($scope.tabs[0].id);\n }\n }\n }\n }\n\n function deleteAllTabsExceptSelected(id) {\n $scope.tabs = $scope.tabs.filter(function (obj) {\n if (obj.id === id) {\n return obj;\n }\n });\n selectTab($scope.tabs[0].id);\n LocalStorageAdapter.set(LSKeys.TABS_STATE, $scope.tabs);\n $rootScope.$broadcast('deleteAllexeptSelected', $scope.tabs);\n }\n }];\n\n return {\n restrict: 'AE',\n // for some reason when you extract this template in a file and use templateUrl it selects all tabs when editing the tab name, not only the currently selected one\n template: '<a class=\"nav-link\" role=\"tab\" data-toggle=\"tab\" blur=\"submit\" editable-text=\"tab.name\" e-form=\"editCurrentlySelectedOnly\" ng-click=\"selectThisTab($event)\" ng-dblclick=\"editCurrentTab()\" ><span ng-class=\"{\\'text-muted\\': !tab.name}\">{{ tab.name || (\\'sparql.tab.directive.unnamed.tab.title\\' | translate)}}</span><button type=\"button\" ng-click=\"deleteTab($event)\" class=\"btn btn-link btn-sm secondary delete-sparql-tab-btn\" title=\"Delete tab\"><i class=\"icon-close\"></i></button></a>',\n replace: true,\n controller: SparqlTabCtrl\n };\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///./src/js/angular/rest/similarity.rest.service.js","webpack:///./src/js/angular/similarity/controllers/similarity-list.controller.js","webpack:///./src/js/angular/similarity/controllers/create-index.controller.js","webpack:///./src/js/angular/similarity/app.js","webpack:///./src/js/angular/utils/notifications.js","webpack:///./src/js/angular/core/directives/queryeditor/sparql-tab.directive.js"],"names":["angular","module","factory","SimilarityRestService","$inject","$http","getIndexes","get","getSearchQueries","rebuildIndex","index","createIndex","name","options","selectQuery","searchQuery","analogicalQuery","stopList","infer","sameAs","type","deleteIndex","delete","getSamples","getQuery","data","params","indexName","indexOptions","indexStopList","query","queryInference","querySameAs","viewType","analyzer","indexAnalyzer","saveSearchQuery","method","url","noCancelOnRouteChange","SimilarityCtrl","$scope","$interval","toastr","$repositories","$licenseService","ModalService","$uibModal","AutocompleteRestService","productInfo","RDF4JRepositoriesRestService","$translate","PREFIX","PREFIX_PREDICATION","ANY_PREDICATE","pluginName","pluginIsActive","setPluginIsActive","isPluginActive","literalForQuery","literal","iriForQuery","iri","undefined","startsWith","endsWith","shouldSkipCall","getActiveRepository","isActiveRepoFedXType","isActiveRepoOntopType","yasr","checkAutocompleteStatus","isLicenseValid","getAutocompletePromise","info","success","searchQueries","error","msg","getError","instant","encodeURIComponent","param","getSimilarityIndexes","similarityIndexes","pullList","timer","$broadcast","$","attr","$on","cancel","$watch","getNamespacesPromise","getNamespaces","usedPrefixes","results","bindings","forEach","e","prefix","value","namespace","destroy","document","getElementById","getUsedPrefixes","persistency","hideHeader","pluginsOptions","getYasrConfiguration","loading","selected","searchType","resultType","empty","goToSimilarityIndex","status","lastSearch","collapse","toggleOntoLoader","showLoader","yasrInnerContainer","element","resultsLoader","addClass","removeClass","performSearch","uri","parameters","termOrSubject","psiSubject","predicate","sparqlQuery","sendData","$index","$query","$searchType","$resultType","$parameters","$psiPredicate","searchSubject","$givenSubject","analogicalSubject","$givenObject","analogicalObject","$searchSubject","ajax","headers","Accept","done","textStatus","jqXhrOrErrorString","setResponse","fail","viewSearchQuery","queryTemplate","tokens","match","substring","indexOf","replacedQuery","replace","searchParameters","open","templateUrl","controller","resolve","openSimpleModal","title","message","warning","result","then","err","viewCreateQuery","text","res","copyToClipboardResult","openCopyToClipboardModal","trimIRI","_","trim","CreateSimilarityIdxCtrl","$timeout","SparqlRestService","$location","Notifications","LocalStorageAdapter","LSKeys","indexType","search","newIndex","page","defaultTabConfig","id","inference","initForViewType","indexNameFromLocation","editSearchQuery","currentQuery","notoolbarInference","notoolbarSameAs","window","editor","setQuery","allSamples","samples","isLiteralIndex","getAndRemoveOption","literalIndexes","concat","filter","idx","map","inputIndex","desiredIdx","j","length","filenamePattern","RegExp","validateIndex","invalidIndexName","saveQueries","test","getQueryType","appendOption","option","key","optArr","split","i","join","saveQueryToLocal","currentQueryTab","setLoader","isRunning","progressMessage","extraMessage","queryIsRunning","queryStartTime","Date","now","countTimeouted","$$phase","$apply","fixSizesOnHorizontalViewModeSwitch","verticalViewParam","visibleWindowHeight","innerHeight","documentElement","clientHeight","body","verticalView","orientationViewMode","viewMode","newHeight","querySelector","getBoundingClientRect","style","height","noPadding","minHeight","paddingRight","paddingLeft","container","resize","showHideEditor","selectTab","tab","runQuery","changePage","explain","executedQueryTab","getQueryMode","explainRequested","currentTabConfig","resultsCount","resetCurrentTabConfig","getRepositoryNamespaces","namespaces","repositoryError","finally","addKnownPrefixes","JSON","stringify","getValue","isDefined","setValue","getExistingTabId","existingTabId","tabsData","item","loadTab","queryType","offset","allResultsCount","pageSize","timeFinished","timeTook","sizeDelta","css","getQueryID","tabs","copy","helpHidden","HIDE_SIMILARITY_HELP","toggleHelp","set","viewQuery","isInvalidIndexName","isEmptyIndexName","goToPage","showEditor","notoolbar","xhr","abort","showPreview","outputType","queryExists","saveTab","findTabIndexByID","addNewTab","callback","tabName","savedQuery","changePagination","toggleSampleQueries","querySelected","tabId","getLoaderMessage","timeSeconds","timeHuman","getHumanReadableSeconds","changeViewMode","tabID","remove","focusQueryEditor","find","is","focus","on","$watchCollection","tabEvent","relatedTarget","target","showSampleQueries","sampleQueries","getResultsDescription","getUpdateDescription","getStaleWarningMessage","changedQuery","isSearchQuery","async","showToastMessageWithDelay","response","getCloseBtnMsg","operationType","operation","Promise","r","setTimeout","sparqlTabDirective","$rootScope","restrict","template","$element","state","deleteTab","preventDefault","stopPropagation","shiftKey","selectedTabId","obj","TABS_STATE","idForDelete","isUndefined","splice","deleteTabByID","editCurrentTab","editCurrentlySelectedOnly","$show","$editableButtons","children","$el","currentTarget","$$currentValue","selectThisTab","isTabChangeOk","directive"],"mappings":"8FAAAA,QACKC,OAAO,4CAA6C,IACpDC,QAAQ,wBAAyBC,GAEtCA,EAAsBC,QAAU,CAAC,QAAS,iBAI1C,SAASD,EAAsBE,GAE3B,MAAO,CACHC,WAUJ,WACI,OAAOD,EAAME,IAhBO,oBAMpBC,iBAiBJ,WACI,OAAOH,EAAME,IAAI,2BAjBjBE,aAyCJ,SAAsBC,GAClB,OAAOC,EAAY,MAAOD,EAAME,KAAMF,EAAMG,QAASH,EAAMI,YAAaJ,EAAMK,YAAaL,EAAMM,gBAAiBN,EAAMO,SAAUP,EAAMQ,MAAOR,EAAMS,OAAQT,EAAMU,OAzCnKC,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EAAE,qBAC3BsS,EAAiBC,SAAS,oBAAoBlQ,SAAS,UACvDiQ,EAAiBC,SAAS,oBAAoBlQ,SAAS,UACvDrC,EAAE,sCAAsCqC,SAAS,mBAAmBwN,GAAG,UAAU,SAAU2C,GACvFvV,EAAO+J,aAAa5L,KAAOoX,EAAIC,cAAcC,kBAIjD1S,EAAE,6CACGsC,YAAY,0BACZD,SAAS,eACdrC,EAAE,iDACGsC,YAAY,8BACZD,SAAS,gBAlElBpF,EAAO0V,cAEP,SAAuBhS,GACnBA,EAAE8Q,iBACF9Q,EAAE+Q,kBACEzU,EAAO2V,eAAc,IACrB5S,EAAEsR,GAAUjG,IAAI,YAtChC7Q,QACKC,OAAO,0DAA2D,CAC/D,yBACA,gDAEHoY,UAAU,YAAa3B,GAE5BA,EAAmBtW,QAAU,CAAC,aAAc,sBAAuB,SAAU","file":"17.b19a2d3870590d21e8e9.bundle.js","sourcesContent":["angular\n .module('graphdb.framework.rest.similarity.service', [])\n .factory('SimilarityRestService', SimilarityRestService);\n\nSimilarityRestService.$inject = ['$http', '$repositories'];\n\nconst SIMILARITY_ENDPOINT = 'rest/similarity';\n\nfunction SimilarityRestService($http) {\n\n return {\n getIndexes,\n getSearchQueries,\n rebuildIndex,\n deleteIndex,\n createIndex,\n getSamples,\n getQuery,\n saveSearchQuery\n };\n\n function getIndexes() {\n return $http.get(SIMILARITY_ENDPOINT);\n }\n\n function getSamples() {\n return $http.get(`${SIMILARITY_ENDPOINT}/samples`);\n }\n\n function getSearchQueries() {\n return $http.get(`${SIMILARITY_ENDPOINT}/config`);\n }\n\n function createIndex(method, name, options, selectQuery, searchQuery, analogicalQuery, stopList, infer, sameAs, type, analyzer) {\n return $http({\n method,\n url: `${SIMILARITY_ENDPOINT}`,\n noCancelOnRouteChange: true,\n data: {\n name,\n options,\n selectQuery,\n stopList,\n infer,\n sameAs,\n type,\n analyzer,\n searchQuery,\n analogicalQuery\n }\n }\n );\n }\n\n function rebuildIndex(index) {\n return createIndex('PUT', index.name, index.options, index.selectQuery, index.searchQuery, index.analogicalQuery, index.stopList, index.infer, index.sameAs, index.type);\n }\n\n function deleteIndex(index) {\n return $http.delete(`${SIMILARITY_ENDPOINT}?name=${index.name}`);\n }\n\n function getQuery(data) {\n return $http.get('rest/similarity/query',\n {\n params: {\n name: data.indexName,\n options: data.indexOptions,\n stopList: data.indexStopList,\n selectQuery: data.query,\n infer: data.queryInference,\n sameAs: data.querySameAs,\n type: data.viewType,\n analyzer: data.indexAnalyzer\n }\n });\n }\n\n function saveSearchQuery(data) {\n return $http({\n method: 'put',\n url: 'rest/similarity/search-query',\n data\n });\n }\n}\n","import YASR from 'lib/yasr.bundled';\nimport {decodeHTML} from \"../../../../app\";\nimport {YasrUtils} from \"../../utils/yasr-utils\";\n\nangular\n .module('graphdb.framework.similarity.controllers.list', [])\n .controller('SimilarityCtrl', SimilarityCtrl);\n\nSimilarityCtrl.$inject = ['$scope', '$interval', 'toastr', '$repositories', '$licenseService', 'ModalService', '$uibModal', 'SimilarityRestService', 'AutocompleteRestService', 'productInfo', 'RDF4JRepositoriesRestService', '$translate'];\n\nfunction SimilarityCtrl($scope, $interval, toastr, $repositories, $licenseService, ModalService, $uibModal, SimilarityRestService, AutocompleteRestService, productInfo, RDF4JRepositoriesRestService, $translate) {\n\n const PREFIX = 'http://www.ontotext.com/graphdb/similarity/';\n const PREFIX_PREDICATION = 'http://www.ontotext.com/graphdb/similarity/psi/';\n const PREFIX_INSTANCE = PREFIX + 'instance/';\n const ANY_PREDICATE = PREFIX_PREDICATION + 'any';\n $scope.pluginName = 'similarity';\n $scope.pluginIsActive = true;\n\n $scope.setPluginIsActive = function (isPluginActive) {\n $scope.pluginIsActive = isPluginActive;\n };\n\n const literalForQuery = function (literal) {\n return '\"' + literal + '\"';\n };\n\n // TODO: Fix cases when this function is called with undefined\n const iriForQuery = function (iri) {\n // Do not put brackets on nested triples\n if (iri === undefined || iri.startsWith(\"<<\") && iri.endsWith(\">>\")) {\n return iri;\n }\n return '<' + iri + '>';\n };\n\n $scope.info = productInfo;\n\n $scope.getActiveRepository = function () {\n return $repositories.getActiveRepository();\n };\n\n // Don't call functions if one of the following conditions are met\n function shouldSkipCall() {\n return !$scope.getActiveRepository() ||\n $scope.isActiveRepoFedXType() ||\n $scope.isActiveRepoOntopType();\n }\n\n if (!shouldSkipCall()) {\n SimilarityRestService.getSearchQueries().success(function (data) {\n $scope.searchQueries = data;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('similarity.could.not.get.search.queries.error'));\n });\n }\n\n $scope.encodeURIComponent = function (param) {\n return encodeURIComponent(param);\n };\n\n // get similarity indexes\n $scope.getSimilarityIndexes = function () {\n if (shouldSkipCall() || !$scope.pluginIsActive) {\n return;\n }\n SimilarityRestService.getIndexes()\n .success(function (data) {\n $scope.similarityIndexes = data;\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('similarity.could.not.get.indexes.error'));\n });\n };\n\n $scope.pullList = function () {\n $scope.getSimilarityIndexes();\n const timer = $interval(function () {\n $scope.$broadcast('checkIsActive');\n if ($('#indexes-table').attr('aria-expanded') !== 'false') {\n $scope.getSimilarityIndexes();\n }\n }, 5000);\n $scope.$on('$destroy', function () {\n $interval.cancel(timer);\n });\n };\n\n if ($scope.getActiveRepository()) {\n if ($licenseService.isLicenseValid()) {\n $scope.pullList();\n }\n }\n\n let yasr;\n\n $scope.$watch(function () {\n return $repositories.getActiveRepository();\n }, function () {\n // Don't try to get namespaces for ontop or fedx repository\n if ($scope.getActiveRepository() && !$scope.isActiveRepoOntopType() && !$scope.isActiveRepoFedXType()) {\n $scope.getNamespacesPromise = RDF4JRepositoriesRestService.getNamespaces($scope.getActiveRepository())\n .success(function (data) {\n checkAutocompleteStatus();\n $scope.usedPrefixes = {};\n data.results.bindings.forEach(function (e) {\n $scope.usedPrefixes[e.prefix.value] = e.namespace.value;\n });\n $scope.$on('$destroy', function () {\n if (yasr) {\n yasr.destroy();\n }\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 pluginsOptions: YasrUtils.getYasrConfiguration()\n });\n }).error(function (data) {\n toastr.error(getError(data), $translate.instant('get.namespaces.error.msg'));\n });\n }\n });\n\n function checkAutocompleteStatus() {\n if ($licenseService.isLicenseValid()) {\n $scope.getAutocompletePromise = AutocompleteRestService.checkAutocompleteStatus();\n }\n }\n\n $scope.$on('autocompleteStatus', function() {\n checkAutocompleteStatus();\n });\n\n $scope.loading = false;\n\n $scope.selected = undefined;\n $scope.searchType = 'searchTerm';\n $scope.resultType = 'termResult';\n\n $scope.$watch('searchType', function () {\n $scope.empty = true;\n });\n\n $scope.goToSimilarityIndex = function (index) {\n if (!('BUILT' === index.status || 'OUTDATED' === index.status || 'REBUILDING' === index.status)) {\n return;\n }\n $scope.empty = true;\n if ($scope.selected !== index) {\n $scope.lastSearch = undefined;\n $scope.selected = index;\n }\n if (index.type === 'text') {\n $scope.searchType = 'searchTerm';\n } else if (index.type === 'predication') {\n $scope.searchType = 'searchEntity';\n }\n if (index.type === 'text' || index.type === 'predication') {\n $('#indexes-table').collapse('hide');\n }\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 /* 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('opacity-hide');\n resultsLoader.removeClass('opacity-hide');\n } else {\n $scope.loading = false;\n yasrInnerContainer.removeClass('opacity-hide');\n resultsLoader.addClass('opacity-hide');\n }\n };\n\n $scope.performSearch = function (index, uri, searchType, resultType, parameters) {\n\n toggleOntoLoader(true);\n\n // this is either the search term or the iri for the subject\n let termOrSubject = uri;\n\n $scope.lastSearch = {};\n $scope.lastSearch.type = searchType;\n\n if (searchType === 'searchEntityPredicate') {\n termOrSubject = $scope.psiSubject;\n $scope.lastSearch.predicate = uri;\n }\n\n if (searchType === 'searchTerm') {\n termOrSubject = literalForQuery(termOrSubject);\n } else {\n termOrSubject = iriForQuery(termOrSubject);\n }\n\n $scope.lastSearch.termOrSubject = termOrSubject;\n\n const headers = {Accept: 'application/x-sparqlstar-results+json, application/sparql-results+json;q=0.9, */*;q=0.8'};\n let sparqlQuery;\n if (searchType === 'searchAnalogical') {\n sparqlQuery = ($scope.selected.analogicalQuery) ? $scope.selected.analogicalQuery : $scope.searchQueries['analogical'];\n } else {\n sparqlQuery = ($scope.selected.searchQuery) ? $scope.selected.searchQuery : $scope.searchQueries[$scope.selected.type];\n }\n const sendData = {\n query: sparqlQuery,\n $index: iriForQuery(PREFIX_INSTANCE + index),\n $query: termOrSubject,\n $searchType: iriForQuery(($scope.selected.type === 'text' ? PREFIX : PREFIX_PREDICATION) + (searchType === 'searchEntityPredicate' ? 'searchEntity' : searchType)),\n $resultType: iriForQuery($scope.selected.type === 'text' ? PREFIX + resultType : PREFIX_PREDICATION + 'entityResult'),\n $parameters: literalForQuery(parameters)\n };\n\n if (searchType === 'searchEntityPredicate') {\n sendData.$psiPredicate = $scope.lastSearch.predicate ? iriForQuery($scope.lastSearch.predicate) : iriForQuery(ANY_PREDICATE);\n }\n\n if (searchType === 'searchAnalogical') {\n $scope.searchSubject = uri;\n sendData.$givenSubject = iriForQuery($scope.analogicalSubject);\n sendData.$givenObject = iriForQuery($scope.analogicalObject);\n sendData.$searchSubject = iriForQuery(uri);\n }\n\n $.ajax({\n method: 'GET',\n url: 'repositories/' + $repositories.getActiveRepository(),\n data: sendData,\n headers: headers\n }).done(function (data, textStatus, jqXhrOrErrorString) {\n toggleOntoLoader(false);\n yasr.setResponse(data, textStatus, jqXhrOrErrorString);\n }).fail(function (data) {\n toastr.error(getError(data), $translate.instant('similarity.get.resource.error'));\n toggleOntoLoader(false);\n });\n };\n\n $scope.viewSearchQuery = function () {\n let queryTemplate;\n if ($scope.lastSearch.type === 'searchAnalogical') {\n queryTemplate = ($scope.selected.analogicalQuery) ? $scope.selected.analogicalQuery : $scope.searchQueries['analogical'];\n } else {\n queryTemplate = ($scope.selected.searchQuery) ? $scope.selected.searchQuery : $scope.searchQueries[$scope.selected.type];\n }\n\n //replace template prefix for PREFIX_INSTANCE in the view mode with actual prefix from the query\n let tokens = [];\n let prefix = '';\n tokens = queryTemplate.match(/[a-zA-Z0-9-]+:<http:\\/\\/www.ontotext.com\\/graphdb\\/similarity\\/instance\\/>/);\n prefix = tokens == null ? \"similarity-index\" : tokens[0].substring(0, tokens[0].indexOf(':'));\n\n const replacedQuery = queryTemplate\n .replace('?index', prefix + ':' + $scope.selected.name)\n .replace('?query', $scope.lastSearch.termOrSubject)\n .replace('?searchType', ($scope.selected.type === 'text' ? ':' : 'psi:') + ($scope.lastSearch.type === 'searchEntityPredicate' ? 'searchEntity' : $scope.lastSearch.type))\n .replace('?resultType', $scope.selected.type === 'text' ? ':' + $scope.resultType : 'psi:entityResult')\n .replace('?parameters', literalForQuery((!$scope.searchParameters) ? '' : $scope.searchParameters))\n .replace('?psiPredicate', $scope.lastSearch.predicate ? iriForQuery($scope.lastSearch.predicate) : iriForQuery(ANY_PREDICATE))\n .replace('?givenSubject', iriForQuery($scope.analogicalSubject))\n .replace('?givenObject', iriForQuery($scope.analogicalObject))\n .replace('?searchSubject', iriForQuery($scope.searchSubject));\n\n $uibModal.open({\n templateUrl: 'pages/viewQuery.html',\n controller: 'ViewQueryCtrl',\n resolve: {\n query: function () {\n return replacedQuery;\n }\n }\n });\n };\n\n\n $scope.deleteIndex = function (index) {\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm'),\n message: $translate.instant('similarity.delete.index.warning', {name: index.name}),\n warning: true\n }).result\n .then(function () {\n SimilarityRestService.deleteIndex(index)\n .then(function () {\n $scope.getSimilarityIndexes();\n }, function (err) {\n toastr.error(getError(err));\n });\n });\n };\n\n $scope.viewCreateQuery = function (index) {\n SimilarityRestService.getQuery({\n indexName: index.name,\n indexOptions: index.options,\n query: index.selectQuery,\n indexStopList: index.stopList,\n queryInference: index.infer,\n querySameAs: index.sameAs,\n viewType: index.type,\n indexAnalyzer: index.analyzer\n }).success(function (query) {\n $uibModal.open({\n templateUrl: 'pages/viewQuery.html',\n controller: 'ViewQueryCtrl',\n resolve: {\n query: function () {\n return query;\n }\n }\n });\n });\n };\n\n $scope.rebuildIndex = function (index) {\n // Migration\n if (!index.searchQuery) {\n index.searchQuery = index.type ? $scope.searchQueries[index.type] : $scope.searchQueries.text;\n }\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm'),\n message: decodeHTML($translate.instant('similarity.rebuild.index.warning', {name: index.name})),\n warning: true\n }).result\n .then(function () {\n index.status = 'REBUILDING';\n SimilarityRestService.rebuildIndex(index)\n .then(function (res) {\n }, function (err) {\n toastr.error(getError(err));\n });\n });\n };\n\n $scope.copyToClipboardResult = function (uri) {\n ModalService.openCopyToClipboardModal(uri);\n };\n\n $scope.trimIRI = function (iri) {\n return _.trim(iri, \"<>\");\n };\n}\n","import 'angular/utils/notifications';\nimport 'angular/utils/local-storage-adapter';\n\nangular\n .module('graphdb.framework.similarity.controllers.create', [\n 'graphdb.framework.utils.notifications',\n 'graphdb.framework.utils.localstorageadapter'\n ])\n .controller('CreateSimilarityIdxCtrl', CreateSimilarityIdxCtrl);\n\nCreateSimilarityIdxCtrl.$inject = ['$scope', 'toastr', '$uibModal', '$timeout', 'SimilarityRestService', 'SparqlRestService', '$location', 'productInfo', 'Notifications', 'RDF4JRepositoriesRestService', 'LocalStorageAdapter', 'LSKeys', '$translate'];\n\nfunction CreateSimilarityIdxCtrl($scope, toastr, $uibModal, $timeout, SimilarityRestService, SparqlRestService, $location, productInfo, Notifications, RDF4JRepositoriesRestService, LocalStorageAdapter, LSKeys, $translate) {\n\n const indexType = $location.search().type;\n if (indexType === undefined || indexType.startsWith('text')) {\n $scope.viewType = 'text';\n } else {\n $scope.viewType = indexType;\n }\n\n const textDefaultOptions = '-termweight idf';\n const predDefaultOptions = '';\n $scope.newIndex = {};\n\n $scope.info = productInfo;\n $scope.page = 1;\n\n const defaultTabConfig = {\n id: '1',\n name: '',\n query: '',\n inference: true,\n sameAs: true\n };\n\n let getNewIndexName = function (indexNameFromLocation) {\n if (indexNameFromLocation) {\n if ($scope.page !== 1) {\n return indexNameFromLocation;\n } else {\n return 'Copy_of_' + indexNameFromLocation;\n }\n }\n return '';\n };\n\n const initForViewType = function () {\n $scope.editSearchQuery = $location.search().editSearchQuery;\n $scope.page = $scope.editSearchQuery ? 2 : 1;\n $scope.newIndex.name = getNewIndexName($location.search().name);\n $scope.newIndex.options = ($location.search().options ? $location.search().options : ($scope.viewType === \"text\") ? textDefaultOptions : predDefaultOptions);\n\n if ($scope.searchQueries) {\n $scope.newIndex.searchQuery = $location.search().searchQuery ? $location.search().searchQuery : $scope.searchQueries[$scope.viewType];\n if ($scope.viewType === 'predication') {\n $scope.newIndex.analogicalQuery = $location.search().analogicalQuery ? $location.search().analogicalQuery : $scope.searchQueries['analogical'];\n }\n }\n\n if ($scope.editSearchQuery) {\n // Default will be opened search query tab for edition\n $scope.currentQuery.query = $scope.newIndex.searchQuery;\n $scope.notoolbarInference = true;\n $scope.notoolbarSameAs = true;\n if (window.editor) {\n $scope.setQuery($scope.newIndex.searchQuery);\n }\n } else {\n if ($scope.viewType === 'text' && $scope.allSamples) {\n $scope.samples = $scope.allSamples['text'];\n $scope.newIndex.stopList = ($location.search().stopList ? $location.search().stopList : undefined);\n $scope.newIndex.analyzer = ($location.search().analyzer ? $location.search().analyzer : 'org.apache.lucene.analysis.en.EnglishAnalyzer');\n const isLiteralIndex = getAndRemoveOption('-literal_index');\n if (isLiteralIndex !== undefined) {\n $scope.newIndex.isLiteralIndex = isLiteralIndex;\n }\n if (window.editor) {\n $scope.setQuery($scope.samples['literals']);\n }\n }\n if ($scope.viewType === 'predication' && $scope.allSamples) {\n SimilarityRestService.getIndexes()\n .success(function (data) {\n $scope.literalIndexes = ['no-index'].concat(data\n .filter(function (idx) {\n return idx.type === 'textLiteral' && (idx.status === 'BUILT' || idx.status === 'OUTDATED')\n })\n .map(function (idx) {\n return idx.name;\n }));\n\n if ($scope.newIndex.inputIndex === undefined) {\n const desiredIdx = getAndRemoveOption('-input_index');\n if (desiredIdx !== undefined) {\n for (let j = 0; j < $scope.literalIndexes.length; j++) {\n if (desiredIdx === $scope.literalIndexes[j]) {\n $scope.newIndex.inputIndex = $scope.literalIndexes[j];\n }\n }\n }\n }\n if ($scope.newIndex.inputIndex === undefined) {\n $scope.newIndex.inputIndex = $scope.literalIndexes[0];\n }\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('similarity.could.not.get.indexes.error'));\n });\n\n $scope.samples = $scope.allSamples['predication'];\n if (window.editor) {\n $scope.setQuery($scope.samples['predication']);\n }\n }\n }\n };\n\n const filenamePattern = new RegExp('^[a-zA-Z0-9-_]+$');\n\n const validateIndex = function () {\n $scope.invalidIndexName = false;\n $scope.saveQueries();\n if (!$scope.newIndex.name) {\n $scope.invalidIndexName = $translate.instant('similarity.empty.index.name.error');\n return false;\n }\n if (!filenamePattern.test($scope.newIndex.name)) {\n $scope.invalidIndexName = $translate.instant('similarity.index.name.constraint');\n return false;\n }\n\n if (!$scope.newIndex.query) {\n toastr.error($translate.instant('similarity.empty.select.query.error'));\n return false;\n }\n\n if (!$scope.newIndex.searchQuery) {\n toastr.error($translate.instant('similarity.empty.search.query.error'));\n return false;\n }\n\n if ($scope.viewType === 'predication' && !$scope.newIndex.analogicalQuery) {\n toastr.error($translate.instant('similarity.empty.analogical.query.error'));\n return false;\n }\n\n if (window.editor.getQueryType() !== 'SELECT') {\n toastr.error($translate.instant('similarity.index.select.queries.constraint'));\n return;\n }\n\n return true;\n };\n\n const appendOption = function (option, value) {\n $scope.newIndex.options = $scope.newIndex.options + ($scope.newIndex.options === '' ? '' : ' ') + option + ' ' + value;\n };\n\n SimilarityRestService.getSearchQueries().success(function (data) {\n $scope.searchQueries = data;\n SimilarityRestService.getSamples().success(function (samples) {\n defaultTabConfig.query = $location.search().selectQuery ? $location.search().selectQuery : samples['text']['literals'];\n defaultTabConfig.inference = !($location.search().infer === 'false');\n defaultTabConfig.sameAs = !($location.search().sameAs === 'false');\n $scope.tabsData = $scope.tabs = [defaultTabConfig];\n $scope.currentQuery = angular.copy(defaultTabConfig);\n $scope.allSamples = samples;\n initForViewType();\n });\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('similarity.could.not.get.search.queries.error'));\n });\n\n $scope.$watch('viewType', function () {\n initForViewType();\n });\n\n $scope.helpHidden = LocalStorageAdapter.get(LSKeys.HIDE_SIMILARITY_HELP) === 1;\n $scope.toggleHelp = function (value) {\n if (value === undefined) {\n value = LocalStorageAdapter.get(LSKeys.HIDE_SIMILARITY_HELP);\n }\n if (value !== 1) {\n LocalStorageAdapter.set(LSKeys.HIDE_SIMILARITY_HELP, 1);\n $scope.helpHidden = true;\n } else {\n LocalStorageAdapter.set(LSKeys.HIDE_SIMILARITY_HELP, 0);\n $scope.helpHidden = false;\n }\n };\n\n $scope.viewQuery = function () {\n if (!validateIndex()) {\n return;\n }\n\n SimilarityRestService.getQuery({\n indexName: $scope.newIndex.name,\n indexOptions: $scope.newIndex.options,\n query: $scope.currentQuery.query,\n indexStopList: $scope.newIndex.stopList,\n queryInference: $scope.currentQuery.inference,\n querySameAs: $scope.currentQuery.sameAs,\n viewType: $scope.viewType,\n indexAnalyzer: $scope.newIndex.analyzer\n }).success(function (query) {\n if (query) {\n $uibModal.open({\n templateUrl: 'pages/viewQuery.html',\n controller: 'ViewQueryCtrl',\n resolve: {\n query: function () {\n return query;\n }\n }\n });\n }\n }).error(function (error) {\n const msg = getError(error);\n toastr.error(msg);\n });;\n };\n\n $scope.$watch('newIndex.name', function () {\n $scope.isInvalidIndexName = false;\n $scope.isEmptyIndexName = false;\n });\n\n $scope.saveQueries = function () {\n // save the current query\n const query = window.editor.getValue().trim();\n if ($scope.page === 1) {\n $scope.newIndex.query = query;\n } else if ($scope.page === 2) {\n $scope.newIndex.searchQuery = query;\n } else if ($scope.page === 3) {\n $scope.newIndex.analogicalQuery = query;\n }\n };\n\n $scope.goToPage = function (page) {\n // ugly fix for GDB-3099\n if (page !== 1 && $scope.viewMode !== 'yasr') {\n $scope.showEditor();\n $timeout(function () {\n if (page === 2) {\n $scope.currentQuery.query = $scope.newIndex.searchQuery;\n }\n if (page === 3) {\n $scope.currentQuery.query = $scope.newIndex.analogicalQuery;\n }\n\n window.editor.setValue($scope.currentQuery.query || ' ');\n });\n }\n\n $scope.saveQueries();\n // get the saved query\n if (page === 1) {\n $scope.currentQuery.query = $scope.newIndex.query;\n } else if (page === 2) {\n $scope.currentQuery.query = $scope.newIndex.searchQuery;\n } else if (page === 3) {\n $scope.currentQuery.query = $scope.newIndex.analogicalQuery;\n }\n\n loadTab();\n $scope.notoolbar = page !== 1;\n\n $scope.page = page;\n };\n\n $scope.createIndex = function () {\n if (!validateIndex()) {\n return;\n }\n // Check existing indexes\n SimilarityRestService.getIndexes()\n .success(function (data) {\n data.forEach(function (index) {\n if (index.name === $scope.newIndex.name) {\n $scope.invalidIndexName = $translate.instant('similarity.existing.index.name.error');\n }\n });\n if (!$scope.invalidIndexName) {\n let indexType = $scope.viewType;\n\n if ($scope.literalIndexes !== undefined) {\n const inputIndex = $scope.newIndex.inputIndex;\n if (inputIndex !== $scope.literalIndexes[0]) {\n appendOption('-input_index', inputIndex);\n }\n }\n if ($scope.newIndex.isLiteralIndex === 'true') {\n appendOption('-literal_index', 'true');\n indexType = 'textLiteral';\n }\n\n SimilarityRestService.createIndex('POST',\n $scope.newIndex.name,\n $scope.newIndex.options,\n $scope.newIndex.query,\n $scope.newIndex.searchQuery,\n $scope.newIndex.analogicalQuery,\n $scope.newIndex.stopList,\n $scope.currentQuery.inference,\n $scope.currentQuery.sameAs,\n indexType,\n $scope.newIndex.analyzer)\n .error(function (err) {\n toastr.error(getError(err), $translate.instant('similarity.create.index.error'));\n });\n $location.url('similarity');\n }\n\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('similarity.could.not.get.indexes.error'));\n });\n };\n\n // Called when user clicks on a sample query\n $scope.setQuery = function (query) {\n // Hack for YASQE bug\n window.editor.setValue(query ? query : ' ');\n };\n\n // TODO don't copy paste each time, this is the same as in the graph config\n // DOWN HERE WE KEEP EVERYTHING PURELY QUERY EDITOR (MOSTLY BORROWED FROM query-editor.controller.js)\n\n $scope.showEditor = function () {\n if (window.editor.xhr) {\n window.editor.xhr.abort();\n }\n $scope.viewMode = 'yasr';\n };\n\n $scope.showPreview = function () {\n // For some reason YASR gets confused and sets this to rawResponse\n // if we execute a CONSTRUCT and then a SELECT. This makes sure it's always table.\n $scope.currentQuery.outputType = 'table';\n $scope.runQuery();\n };\n\n $scope.resetCurrentTabConfig = function () {\n $scope.currentTabConfig = {\n pageSize: 100, // page limit 100 as this is only used for preview\n page: 1,\n allResultsCount: 0,\n resultsCount: 0\n };\n };\n\n $scope.queryExists = false;\n\n $scope.resetCurrentTabConfig();\n\n $scope.tabsData = $scope.tabs = [defaultTabConfig];\n\n // query tab operations\n $scope.saveTab = saveTab;\n $scope.loadTab = loadTab;\n $scope.addNewTab = addNewTab;\n\n // query operations\n $scope.runQuery = runQuery;\n $scope.getNamespaces = getNamespaces;\n $scope.changePagination = changePagination;\n $scope.toggleSampleQueries = toggleSampleQueries;\n $scope.addKnownPrefixes = addKnownPrefixes;\n $scope.getExistingTabId = getExistingTabId;\n $scope.querySelected = querySelected;\n $scope.saveQueryToLocal = saveQueryToLocal;\n\n $scope.setLoader = setLoader;\n $scope.getLoaderMessage = getLoaderMessage;\n\n // query editor and results orientation\n $scope.fixSizesOnHorizontalViewModeSwitch = fixSizesOnHorizontalViewModeSwitch;\n $scope.changeViewMode = changeViewMode;\n $scope.showHideEditor = showHideEditor;\n $scope.focusQueryEditor = focusQueryEditor;\n $scope.orientationViewMode = true;\n\n // start of repository actions\n $scope.getActiveRepository();\n\n function getAndRemoveOption(key) {\n const optArr = $scope.newIndex.options.split(' ');\n for (let i = 0; i < optArr.length; i++) {\n if (optArr[i] === key && i + 1 < optArr.length) {\n const value = optArr[i + 1];\n\n delete optArr[i];\n delete optArr[i + 1];\n $scope.newIndex.options = optArr.join(' ');\n\n return value;\n }\n }\n return undefined;\n }\n\n function saveQueryToLocal(currentQueryTab) {\n }\n\n function setLoader(isRunning, progressMessage, extraMessage) {\n const yasrInnerContainer = angular.element(document.getElementById('yasr-inner'));\n $scope.queryIsRunning = isRunning;\n if (isRunning) {\n $scope.queryStartTime = Date.now();\n $scope.countTimeouted = false;\n $scope.progressMessage = progressMessage;\n $scope.extraMessage = extraMessage;\n yasrInnerContainer.addClass('hide');\n } else {\n $scope.progressMessage = '';\n $scope.extraMessage = '';\n yasrInnerContainer.removeClass('hide');\n }\n // We might call this from angular or outside angular so take care of applying the scope.\n if ($scope.$$phase === null) {\n $scope.$apply();\n }\n }\n\n function getLoaderMessage() {\n const timeSeconds = (Date.now() - $scope.queryStartTime) / 1000;\n const timeHuman = $scope.getHumanReadableSeconds(timeSeconds);\n let message = '';\n\n if ($scope.progressMessage) {\n message = $scope.progressMessage + '... ' + timeHuman;\n } else {\n message = $translate.instant('common.running.operation', {timeHuman: timeHuman});\n }\n if ($scope.extraMessage && timeSeconds > 10) {\n message += '\\n' + $scope.extraMessage;\n }\n\n return message;\n }\n\n // start of query editor results orientation operations\n function fixSizesOnHorizontalViewModeSwitch(verticalViewParam) {\n function visibleWindowHeight() {\n return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0;\n }\n\n const verticalView = verticalViewParam;\n if (!$scope.orientationViewMode) {\n $scope.noPadding = {paddingRight: 15, paddingLeft: 0};\n\n // window.editor is undefined if no repo is selected\n if (window.editor && document.querySelector('.CodeMirror-wrap')) {\n let newHeight = visibleWindowHeight() - (document.querySelector('.CodeMirror-wrap').getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector('.CodeMirror-wrap').style.height = newHeight + 'px';\n document.getElementById('yasr').style.minHeight = newHeight + 'px';\n //window.editor.refresh();\n } else {\n let timer;\n if (verticalView) {\n timer = $timeout(function () {\n $scope.fixSizesOnHorizontalViewModeSwitch(verticalView);\n }, 100);\n } else {\n timer = $timeout($scope.fixSizesOnHorizontalViewModeSwitch, 100);\n }\n\n $scope.$on('$destroy', function () {\n $timeout.cancel(timer);\n });\n }\n } else {\n if ($scope.viewMode === 'yasr') {\n let newHeight = visibleWindowHeight() - (document.querySelector('.CodeMirror-wrap').getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector('.CodeMirror-wrap').style.height = newHeight + 'px';\n } else {\n $scope.noPadding = {};\n document.querySelector('.CodeMirror-wrap').style.height = '';\n }\n document.getElementById('yasr').style.minHeight = '';\n }\n if (window.yasr && window.yasr.container) {\n $timeout(function () {\n window.yasr.container.resize();\n }, 100);\n }\n }\n\n if (!$scope.orientationViewMode) {\n showHideEditor();\n }\n\n function changeViewMode(tabID) {\n $scope.viewMode = 'none';\n $scope.orientationViewMode = !$scope.orientationViewMode;\n fixSizesOnHorizontalViewModeSwitch();\n $('.dataTables_filter').remove();\n $('.resultsTable').remove();\n $timeout(function () {\n loadTab();\n selectTab(tabID);\n }, 100);\n }\n\n function showHideEditor() {\n fixSizesOnHorizontalViewModeSwitch(true);\n }\n\n function focusQueryEditor() {\n if (!angular.element(document).find('.editable-input').is(':focus')) {\n angular.element(document).find('.CodeMirror textarea:first-child').focus();\n }\n }\n\n // end of query editor results orientation operations\n\n function selectTab(id) {\n $timeout(function () {\n $('a[data-id = \"' + id + '\"]').tab('show');\n }, 0);\n }\n\n // start of query operations\n function runQuery(changePage, explain) {\n $scope.executedQueryTab = $scope.currentQuery;\n if (window.editor.getQueryType() !== 'SELECT') {\n toastr.error($translate.instant('similarity.indexes.select.queries.constraint'));\n return;\n }\n if (explain && window.editor.getQueryType() !== 'SELECT') {\n toastr.warning($translate.instant('similarity.explain.select.queries.constraint'));\n return;\n }\n\n if (window.editor.getQueryMode() === 'update') {\n toastr.warning($translate.instant('cannot.execute.update.error'));\n return;\n }\n\n $scope.explainRequested = explain;\n if (!$scope.queryIsRunning) {\n if (changePage) {\n $scope.currentTabConfig.resultsCount = 0;\n } else {\n $scope.resetCurrentTabConfig();\n }\n\n // Hides the editor and shows the yasr results\n $scope.viewMode = 'editor';\n if ($scope.orientationViewMode) {\n $scope.fixSizesOnHorizontalViewModeSwitch();\n }\n\n setLoader(true, $translate.instant('evaluating.query.msg'));\n window.editor.query();\n }\n }\n\n // FIXME: this is copy-pasted in graphs-config.controller.js and query-editor.controller.js. Find a way to avoid duplications\n function getNamespaces() {\n // Signals the namespaces are to be fetched => loader will be shown\n setLoader(true, $translate.instant('common.refreshing.namespaces'), $translate.instant('common.extra.message'));\n RDF4JRepositoriesRestService.getRepositoryNamespaces()\n .success(function (data) {\n const usedPrefixes = {};\n data.results.bindings.forEach(function (e) {\n usedPrefixes[e.prefix.value] = e.namespace.value;\n });\n $scope.namespaces = usedPrefixes;\n })\n .error(function (data) {\n $scope.repositoryError = getError(data);\n })\n .finally(function () {\n // Signals namespaces were fetched => loader will be hidden\n setLoader(false);\n });\n }\n\n function changePagination() {\n runQuery(true, $scope.explainRequested);\n }\n\n if ($scope.getActiveRepository()) {\n getNamespaces();\n }\n\n $scope.$on('$destroy', function () {\n window.editor = null;\n window.yasr = null;\n });\n\n function toggleSampleQueries() {\n }\n\n // Add known prefixes\n function addKnownPrefixes() {\n SparqlRestService.addKnownPrefixes(JSON.stringify(window.editor.getValue()))\n .success(function (data) {\n if (angular.isDefined(window.editor) && angular.isDefined(data) && data !== window.editor.getValue()) {\n window.editor.setValue(data);\n }\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.add.known.prefixes.error'));\n return true;\n });\n }\n\n $('textarea').on('paste', function () {\n $timeout(function () {\n addKnownPrefixes();\n }, 0);\n });\n\n function querySelected(query) {\n const tabId = getExistingTabId(query);\n $scope.toggleSampleQueries();\n if (!angular.isDefined(tabId)) {\n $scope.addNewTab(null, query.name, query.body);\n } else {\n selectTab(tabId);\n }\n }\n\n function getExistingTabId(query) {\n let existingTabId = undefined;\n angular.forEach($scope.tabsData, function (item) {\n if (item.name === query.name && item.query === query.body) {\n existingTabId = item.id;\n return item;\n }\n });\n\n return existingTabId;\n }\n\n\n // end of query operations\n\n // start of query tab operations\n function findTabIndexByID(id) {\n for (let i = 0; i < $scope.tabsData.length; i++) {\n const tab = $scope.tabsData[i];\n if (tab.id === id) {\n return i;\n }\n }\n }\n\n $scope.$watchCollection('[currentQuery.inference, currentQuery.sameAs]', function () {\n saveQueryToLocal($scope.currentQuery);\n });\n\n function saveTab(id) {\n const idx = findTabIndexByID(id);\n // Tab was deleted, don't try to save it's state\n if (idx === undefined) {\n return {};\n }\n const tab = $scope.tabsData[idx];\n //tab.query = window.editor.getValue();\n $scope.saveQueryToLocal(tab);\n return tab;\n }\n\n function addNewTab(callback, tabName, savedQuery) {\n }\n\n function loadTab() {\n $scope.tabsData = [$scope.currentQuery];\n\n const tab = $scope.currentQuery;\n\n if ($scope.currentQuery.query === null || $scope.currentQuery.query === '') {\n // hack for YASQE bug\n window.editor.setValue(' ');\n } else {\n window.editor.setValue($scope.currentQuery.query || ' ');\n }\n\n $timeout(function () {\n $scope.currentTabConfig = {};\n $scope.currentTabConfig.queryType = tab.queryType;\n $scope.currentTabConfig.resultsCount = tab.resultsCount;\n\n $scope.currentTabConfig.offset = tab.offset;\n $scope.currentTabConfig.allResultsCount = tab.allResultsCount;\n $scope.currentTabConfig.page = tab.page;\n $scope.currentTabConfig.pageSize = tab.pageSize;\n\n $scope.currentTabConfig.timeFinished = tab.timeFinished;\n $scope.currentTabConfig.timeTook = tab.timeTook;\n $scope.currentTabConfig.sizeDelta = tab.sizeDelta;\n $scope.$apply();\n }, 0);\n\n //Remove paddign of yasr so it will be aligned with sparql editor\n $('#yasr').css('padding', '0');\n }\n\n function getQueryID(element) {\n return $(element).attr('data-id');\n }\n\n $scope.$on('tabAction', function (e, tabEvent) {\n if (tabEvent.relatedTarget) {\n $scope.saveTab(getQueryID(tabEvent.relatedTarget));\n }\n $scope.loadTab(getQueryID(tabEvent.target));\n });\n\n $scope.$on('deleteAllexeptSelected', function (e, tabs) {\n $scope.tabsData = tabs;\n $scope.tabs = tabs;\n });\n // end of query tab operations\n\n $scope.currentQuery = angular.copy(defaultTabConfig);\n // $scope.state = {};\n $scope.showSampleQueries = false;\n $scope.savedQuery = {};\n $scope.sampleQueries = {};\n\n $scope.getResultsDescription = function () {\n };\n\n $scope.getUpdateDescription = function () {\n };\n\n $scope.getStaleWarningMessage = function () {\n };\n\n $scope.saveSearchQuery = function () {\n // Should validate that query is SELECT\n if (window.editor.getQueryType() !== 'SELECT') {\n toastr.error($translate.instant('similarity.index.select.queries.constraint'));\n return;\n }\n let data = {\n name: $scope.newIndex.name,\n changedQuery: $scope.currentQuery.query,\n isSearchQuery: $scope.page === 2\n };\n\n return SimilarityRestService.saveSearchQuery(JSON.stringify(data))\n .then(async function () {\n await Notifications.showToastMessageWithDelay($scope.page === 2 ? 'similarity.changed.search.query.msg' : 'similarity.changed.analogical.query.msg');\n $location.url('similarity');\n }, function (response) {\n toastr.error(getError(response), $translate.instant('similarity.change.query.error'));\n });\n };\n\n $scope.getCloseBtnMsg = function () {\n let operationType = $scope.editSearchQuery ? $translate.instant('similarity.query.edition.msg') : $translate.instant('similarity.index.creation.msg');\n return $translate.instant('similarity.close.btn.msg', {operation: operationType});\n }\n}\n","import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/core/controllers';\nimport 'angular/rest/similarity.rest.service';\nimport 'angular/similarity/controllers/similarity-list.controller';\nimport 'angular/similarity/controllers/create-index.controller';\nimport 'angular/core/directives/queryeditor/sparql-tab.directive';\nimport 'angular/core/directives/queryeditor/query-editor.controller';\nimport 'angular/core/directives/queryeditor/query-editor.directive';\n\nangular.module('graphdb.framework.similarity', [\n 'graphdb.framework.core.controllers',\n 'graphdb.framework.core.directives',\n 'graphdb.framework.rest.similarity.service',\n 'graphdb.framework.similarity.controllers.create',\n 'graphdb.framework.similarity.controllers.list',\n 'graphdb.framework.core.directives.queryeditor.controllers',\n 'graphdb.framework.core.directives.queryeditor.sparqltab',\n 'graphdb.framework.core.directives.queryeditor.queryeditor'\n]);\n","angular\n .module('graphdb.framework.utils.notifications', [])\n .factory('Notifications', Notifications);\n\nNotifications.$inject = ['toastr', '$translate'];\n\nfunction Notifications(toastr, $translate) {\n return {\n showToastMessageWithDelay\n };\n\n /**\n * This method will show message with tiny delay and only after completion\n * of latter redirection to \"graphs-visualizations\" page will happen.\n * @param {string} message The message to be displayed.\n * @return {Promise<any>}\n */\n function showToastMessageWithDelay(message) {\n return new Promise((r) => {\n toastr.success($translate.instant(message));\n setTimeout(r, 200);\n });\n }\n}\n","import 'angular/utils/local-storage-adapter';\n\nangular\n .module('graphdb.framework.core.directives.queryeditor.sparqltab', [\n 'graphdb.framework.core',\n 'graphdb.framework.utils.localstorageadapter'\n ])\n .directive('sparqlTab', sparqlTabDirective);\n\nsparqlTabDirective.$inject = ['$rootScope', 'LocalStorageAdapter', 'LSKeys', 'ModalService'];\n\nfunction sparqlTabDirective($rootScope, LocalStorageAdapter, LSKeys, ModalService) {\n const SparqlTabCtrl = ['$scope', '$element', '$rootScope', 'ModalService', 'toastr', '$translate', function ($scope, $element, $rootScope, ModalService, toastr, $translate) {\n $scope.state = {};\n\n function getQueryID(element) {\n return $(element).attr('data-id');\n }\n\n function findTabIndexByID(id) {\n for (let i = 0; i < $scope.tabs.length; i++) {\n const tab = $scope.tabs[i];\n if (tab.id === id) {\n return i;\n }\n }\n }\n\n $($element).on('shown.bs.tab', function (e) {\n $rootScope.$broadcast('tabAction', e);\n });\n\n $scope.deleteTab = deleteTab;\n $scope.editCurrentTab = editCurrentTab;\n $scope.selectThisTab = selectThisTab;\n\n function selectThisTab(e) {\n e.preventDefault();\n e.stopPropagation();\n if ($scope.isTabChangeOk(false)) {\n $($element).tab('show');\n }\n }\n\n function selectTab(id) {\n $('a[data-id = \"' + id + '\"]').tab('show');\n }\n\n function deleteTab(e) {\n e.preventDefault();\n e.stopPropagation();\n\n if ($scope.tabs.length < 2) {\n toastr.warning($translate.instant('sparql.tab.directive.close.last.warning'));\n return;\n }\n\n if (e.shiftKey) {\n $scope.state.selectedTabId = getQueryID($element);\n\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm'),\n message: $translate.instant('sparql.tab.directive.delete.all.tabs.warning'),\n warning: true\n }).result.then(function () {\n deleteAllTabsExceptSelected($scope.state.selectedTabId);\n });\n } else {\n $scope.state.idForDelete = getQueryID($element);\n\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm'),\n message: $translate.instant('sparql.tab.directive.close.tab.warning'),\n warning: true\n }).result.then(function () {\n deleteTabByID($scope.state.idForDelete);\n });\n }\n angular.element(document).find('.CodeMirror textarea:first-child').focus();\n }\n\n function editCurrentTab() {\n if (getQueryID($element) !== $scope.currentQuery.id) {\n return;\n }\n $scope.editCurrentlySelectedOnly.$show();\n //fix for buttons for edit\n const $editableButtons = $(\".editable-buttons\");\n $editableButtons.children(\".btn.btn-primary\").addClass('btn-sm');\n $editableButtons.children(\".btn.btn-default\").addClass('btn-sm');\n $('.editable-controls .editable-input').addClass('form-control-sm').on('change', function ($el) {\n $scope.currentQuery.name = $el.currentTarget.$$currentValue;\n });\n //$('.editable-buttons').css('margin-top', '5px');\n //$('.editable-input.editable-has-buttons').css('width', '50%');\n $('.editable-buttons .glyphicon.glyphicon-ok')\n .removeClass('glyphicon glyphicon-ok')\n .addClass('fa fa-check');\n $('.editable-buttons .glyphicon.glyphicon-remove')\n .removeClass('glyphicon glyphicon-remove')\n .addClass('fa fa-close');\n }\n\n function deleteTabByID(id) {\n if (angular.isUndefined(id)) {\n throw 'Delete by id was called with undefined id';\n }\n const idx = findTabIndexByID(id);\n $scope.tabs.splice(idx, 1);\n\n if (id === $scope.currentQuery.id) {\n if ($scope.tabs.length > 0) {\n if (idx > 0) {\n // select previous tab if we deleted any but the first tab\n selectTab($scope.tabs[idx - 1].id);\n } else {\n // select first tab if we deleted the first tab\n selectTab($scope.tabs[0].id);\n }\n }\n }\n }\n\n function deleteAllTabsExceptSelected(id) {\n $scope.tabs = $scope.tabs.filter(function (obj) {\n if (obj.id === id) {\n return obj;\n }\n });\n selectTab($scope.tabs[0].id);\n LocalStorageAdapter.set(LSKeys.TABS_STATE, $scope.tabs);\n $rootScope.$broadcast('deleteAllexeptSelected', $scope.tabs);\n }\n }];\n\n return {\n restrict: 'AE',\n // for some reason when you extract this template in a file and use templateUrl it selects all tabs when editing the tab name, not only the currently selected one\n template: '<a class=\"nav-link\" role=\"tab\" data-toggle=\"tab\" blur=\"submit\" editable-text=\"tab.name\" e-form=\"editCurrentlySelectedOnly\" ng-click=\"selectThisTab($event)\" ng-dblclick=\"editCurrentTab()\" ><span ng-class=\"{\\'text-muted\\': !tab.name}\">{{ tab.name || (\\'sparql.tab.directive.unnamed.tab.title\\' | translate)}}</span><button type=\"button\" ng-click=\"deleteTab($event)\" class=\"btn btn-link btn-sm secondary delete-sparql-tab-btn\" title=\"Delete tab\"><i class=\"icon-close\"></i></button></a>',\n replace: true,\n controller: SparqlTabCtrl\n };\n}\n"],"sourceRoot":""}
@@ -1,4 +1,4 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[19,60,65,67],{115:function(e,t,n){"use strict";n.r(t);n(4),n(11),n(70),n(108),n(71),n(267),n(272),n(69);angular.module("graphdb.framework.explore",["ngRoute","toastr","xeditable","angucomplete-alt-onto","graphdb.framework.explore.services","graphdb.framework.explore.controllers","graphdb.framework.explore.directives","graphdb.framework.core.directives.fittext"])},272:function(e,t){
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[19,60,65,67],{115:function(e,t,n){"use strict";n.r(t);n(4),n(11),n(71),n(108),n(72),n(267),n(272),n(70);angular.module("graphdb.framework.explore",["ngRoute","toastr","xeditable","angucomplete-alt-onto","graphdb.framework.explore.services","graphdb.framework.explore.controllers","graphdb.framework.explore.directives","graphdb.framework.core.directives.fittext"])},272:function(e,t){
2
2
  /*! Copyright (c) 2014 Hidenari Nozaki and contributors | Licensed under the MIT license */
3
- !function(e,t){"use strict";!function(e){e.module("angucomplete-alt-onto",[]).directive("angucompleteAltOnto",["$q","$parse","$http","$sce","$timeout","$templateCache","$interpolate","$rootScope",function(e,t,n,r,l,i,o,a){function u(t,i,o,a){var u,s,c,d,g,p,h=i.find("input"),f=3,m=null,w="autocomplete-required",v=null,b=null,x=i[0].querySelector(".angucomplete-dropdown"),y=!1,S=null;function C(e,n){e&&("object"==typeof e?(t.uri=R(e),M({originalObject:e})):"string"==typeof e&&e.length>0?t.uri=e:console&&console.error&&console.error("Tried to set "+(n?"initial":"")+" value of angucomplete to",e,"which is an invalid value"),F(!0))}function I(e){S=null,t.hideResults(e),document.body.removeEventListener("click",I)}function $(e){return e.which?e.which:e.keyCode}function M(e){"function"==typeof t.selectedObject?t.selectedObject(e):t.selectedObject=e,F(!!e)}function R(e){return t.titleField.split(",").map((function(t){return L(e,t)})).join(" ")}function L(e,t){var n,r;if(t){n=t.split("."),r=e;for(var l=0;l<n.length;l++)r=r[n[l]]}else r=e;return r}function D(e,n){var l,i,o;if(o=new RegExp(n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"),e)return e.match&&e.replace||(e=e.toString()),l=(i=e.match(o))?e.replace(o,'<span class="'+t.matchClass+'">'+i[0]+"</span>"):e,r.trustAsHtml(l)}function F(e){t.notEmpty=e,v=t.uri,t.fieldRequired&&a&&t.inputName&&a[t.inputName].$setValidity(w,e)}function j(e){!t.overrideSuggestions||t.selectedObject&&t.selectedObject.originalObject===t.uri||(e&&e.preventDefault(),l.cancel(m),H(),M({originalObject:t.uri}),t.clearSelected&&(t.uri=null),z())}function X(){return i[0].querySelectorAll(".angucomplete-row")[t.currentIndex]}function k(e){x.scrollTop=x.scrollTop+e}function U(){var e=t.results[t.currentIndex];if(t.matchClass){var n=R(e.originalObject);n=n.replace(/<b>|<\/b>/g,""),h.val(n)}else h.val(e.title)}function O(e){return function(n,r,l,i){r||l||i||!n.data||(n=n.data),t.searching=!1,B(L(s(n),t.remoteUrlDataField),e)}}function q(e,n,r,l){0!==n&&-1!==n&&(n||r||l||(n=e.status),t.remoteUrlErrorCallback?t.remoteUrlErrorCallback(e,n,r,l):console&&console.error&&console.error("http error"))}function H(){b&&b.resolve()}function T(r){var l={},i=t.remoteUrl+encodeuriComponent(r);t.remoteUrlRequestFormatter&&(l={params:t.remoteUrlRequestFormatter(r)},i=t.remoteUrl),t.remoteUrlRequestWithCredentials&&(l.withCredentials=!0),H(),b=e.defer(),l.timeout=b.promise,n.get(i,l).success(O(r)).error(q)}function N(n){H(),b=e.defer(),t.remoteApiHandler(n,b.promise).then(O(n)).catch(q)}function z(){t.showDropdown=!1,t.results=[],x&&(x.scrollTop=0)}function E(){t.showDropdown=d,t.currentIndex=t.focusFirst?0:-1,t.results=[]}function A(e){!e||e.length<f||(t.localData?t.$apply((function(){var n;n=void 0!==t.localSearch()?t.localSearch()(e):function(e){var n,r,l,i,o=t.searchFields.split(","),a=[];for(void 0!==t.parseInput()&&(e=t.parseInput()(e)),n=0;n<t.localData.length;n++){for(r=!1,l=0;l<o.length;l++)i=L(t.localData[n],o[l])||"",r=r||i.toString().toLowerCase().indexOf(e.toString().toLowerCase())>=0;r&&(a[a.length]=t.localData[n])}return a}(e),t.searching=!1,B(n,e)})):t.remoteApiHandler?N(e):T(e))}function B(e,n){var r,l,i,o,a,u;if(e&&e.length>0)for(t.results=[],r=0;r<e.length;r++)t.titleField&&""!==t.titleField&&(o=a=R(e[r])),l="",t.descriptionField&&(l=u=L(e[r],t.descriptionField)),i="",t.imageField&&(i=L(e[r],t.imageField)),t.matchClass&&(a=D(o,n),u=D(l,n)),t.results[t.results.length]={title:a,description:u,image:i,originalObject:e[r]};else t.results=[];t.autoMatch&&1===t.results.length&&function(e,n,r){if(!r)return!1;for(var l in n)if(n[l].toLowerCase()===r.toLowerCase())return t.selectResult(e),!0;return!1}(t.results[0],{title:o,desc:l||""},t.uri)?t.showDropdown=!1:0!==t.results.length||g?t.showDropdown=!0:t.showDropdown=!1}function V(){t.localData?B(t.localData,""):t.remoteApiHandler?N(""):T("")}i.on("mousedown",(function(e){e.target.id?(S=e.target.id)===t.id+"_dropdown"&&document.body.addEventListener("click",I):S=e.target.className})),t.currentIndex=t.focusFirst?0:null,t.searching=!1,c=t.$watch("initialValue",(function(e){e&&(c(),C(e,!0))})),t.$watch("fieldRequired",(function(e,n){e!==n&&(e?v&&-1!==t.currentIndex?F(!0):F(!1):a[t.inputName].$setValidity(w,!0))})),t.$on("angucomplete-alt:clearInput",(function(e,n){n&&n!==t.id||(t.uri=null,M(),F(!1),z())})),t.$on("angucomplete-alt:changeInput",(function(e,n,r){n&&n===t.id&&C(r)})),t.onFocusHandler=function(){t.focusIn&&t.focusIn(),0!==f||t.uri&&0!==t.uri.length||(t.currentIndex=t.focusFirst?0:t.currentIndex,t.showDropdown=!0,V())},t.hideResults=function(){S&&(S===t.id+"_dropdown"||S.indexOf("angucomplete")>=0)?S=null:(u=l((function(){z(),t.$apply((function(){t.uri&&t.uri.length>0&&h.val(t.uri)}))}),200),H(),t.focusOut&&t.focusOut(),t.overrideSuggestions&&t.uri&&t.uri.length>0&&-1===t.currentIndex&&j())},t.resetHideResults=function(){u&&l.cancel(u)},t.hoverRow=function(e){t.currentIndex=e},t.selectResult=function(e){t.matchClass&&(e.title=R(e.originalObject),"string"==typeof e.title&&(e.title=e.title.replace(/<b>|<\/b>/g,"")),e.description=L(e.originalObject,t.descriptionField)),t.clearSelected?t.uri=null:t.uri=e.title,M(e),z()},t.inputChangeHandler=function(e){return e.length<f?(H(),z()):0===e.length&&0===f&&(t.searching=!1,V()),t.inputChanged&&(e=t.inputChanged(e)),e},t.fieldRequiredClass&&""!==t.fieldRequiredClass&&(w=t.fieldRequiredClass),t.minlength&&""!==t.minlength&&(f=parseInt(t.minlength,10)),t.pause||(t.pause=500),t.clearSelected||(t.clearSelected=!1),t.overrideSuggestions||(t.overrideSuggestions=!1),t.fieldRequired&&a&&(t.initialValue?F(!0):F(!1)),t.inputType=o.type?o.type:"text",t.textSearching=o.textSearching?o.textSearching:"Searching...",t.textNoResults=o.textNoResults?o.textNoResults:"No results found",d="false"!==t.textSearching,g="false"!==t.textNoResults,t.maxlength=o.maxlength?o.maxlength:524288,h.on("keydown",(function(e){var n=$(e),r=null,l=null;13===n&&t.results?(t.currentIndex>=0&&t.currentIndex<t.results.length?(e.preventDefault(),t.selectResult(t.results[t.currentIndex])):(j(e),z()),t.$apply()):40===n&&t.results?(e.preventDefault(),t.currentIndex+1<t.results.length&&t.showDropdown&&(t.$apply((function(){t.currentIndex++,U()})),y&&(r=X(),x.getBoundingClientRect().top+parseInt(getComputedStyle(x).maxHeight,10)<r.getBoundingClientRect().bottom&&k(function(e){var t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}(r))))):38===n&&t.results?(e.preventDefault(),t.currentIndex>=1?(t.$apply((function(){t.currentIndex--,U()})),y&&(l=X().getBoundingClientRect().top-(x.getBoundingClientRect().top+parseInt(getComputedStyle(x).paddingTop,10)))<0&&k(l-1)):0===t.currentIndex&&t.$apply((function(){t.currentIndex=-1,h.val(t.uri)}))):9===n?t.results&&t.results.length>0&&t.showDropdown?-1===t.currentIndex&&t.overrideSuggestions?j():(-1===t.currentIndex&&(t.currentIndex=0),t.selectResult(t.results[t.currentIndex]),t.$digest()):t.uri&&t.uri.length>0&&j():27===n&&e.preventDefault()})),h.on("keyup",(function(e){var n=$(e);if(37!==n&&39!==n)if(38===n||13===n)e.preventDefault();else if(40===n)e.preventDefault(),!t.showDropdown&&t.uri&&t.uri.length>=f&&(E(),t.searching=!0,A(t.uri));else if(27===n)z(),t.$apply((function(){h.val(t.uri)}));else{if(0===f&&!t.uri)return;t.uri&&""!==t.uri?t.uri.length>=f&&(E(),m&&l.cancel(m),t.searching=!0,m=l((function(){A(t.uri)}),t.pause)):t.showDropdown=!1,v&&v!==t.uri&&!t.clearSelected&&t.$apply((function(){M()}))}})),p="remoteUrlResponseFormatter",s=function(e){return t[p]?t[p](e):e},l((function(){var e=getComputedStyle(x);y=e.maxHeight&&"auto"===e.overflowY}))}return i.put("/angucomplete-alt/index.html",'<div class="angucomplete-holder" ng-class="{\'angucomplete-dropdown-visible\': showDropdown}"> <input id="{{id}}_value" name="{{inputName}}" tabindex="{{fieldTabindex}}" ng-class="{\'angucomplete-input-not-empty\': notEmpty}" ng-model="uri" ng-disabled="disableInput" type="{{inputType}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" ng-focus="onFocusHandler()" class="{{inputClass}}" ng-focus="resetHideResults()" ng-blur="hideResults($event)" autocapitalize="off" autocorrect="off" autocomplete="off" ng-change="inputChangeHandler(uri)" style="overflow: hidden; padding-right: .5em;"/> <div id="{{id}}_dropdown" class="angucomplete-dropdown" ng-show="disableSuggestions && showDropdown"> <div class="angucomplete-searching" ng-show="searching" ng-bind="textSearching"></div> <div class="angucomplete-searching" ng-show="!searching && (!results || results.length == 0)" ng-bind="textNoResults"></div> <div class="angucomplete-row" ng-repeat="result in results" ng-click="selectResult(result)" ng-mouseenter="hoverRow($index)" ng-class="{\'angucomplete-selected-row\': $index == currentIndex}"> <div ng-if="imageField" class="angucomplete-image-holder"> <img ng-if="result.image && result.image != \'\'" ng-src="{{result.image}}" class="angucomplete-image"/> <div ng-if="!result.image && result.image != \'\'" class="angucomplete-image-default"></div> </div> <div class="angucomplete-title" ng-if="matchClass" ng-bind-html="result.title"></div> <div class="angucomplete-title" ng-if="!matchClass">{{ result.title }}</div> <div ng-if="matchClass && result.description && result.description != \'\'" class="angucomplete-description" ng-bind-html="result.description"></div> <div ng-if="!matchClass && result.description && result.description != \'\'" class="angucomplete-description">{{result.description}}</div> </div> </div></div>'),{restrict:"EA",require:"^?form",scope:{selectedObject:"=",disableInput:"=",disableSuggestions:"=",initialValue:"=",localData:"=",localSearch:"&",remoteUrlRequestFormatter:"=",remoteUrlRequestWithCredentials:"@",remoteUrlResponseFormatter:"=",remoteUrlErrorCallback:"=",remoteApiHandler:"=",id:"@",type:"@",placeholder:"@",remoteUrl:"@",remoteUrlDataField:"@",titleField:"@",descriptionField:"@",imageField:"@",inputClass:"@",pause:"@",searchFields:"@",minlength:"@",matchClass:"@",clearSelected:"@",overrideSuggestions:"@",fieldRequired:"=",fieldRequiredClass:"@",inputChanged:"=",autoMatch:"@",focusOut:"&",focusIn:"&",fieldTabindex:"@",inputName:"@",focusFirst:"@",parseInput:"&"},templateUrl:function(e,t){return t.templateUrl||"/angucomplete-alt/index.html"},compile:function(e){var t=o.startSymbol(),n=o.endSymbol();if("{{"!==t||"}}"!==n){var r=e.html().replace(/\{\{/g,t).replace(/\}\}/g,n);e.html(r)}return u}}}])}(window.angular)}()},69:function(e,t){function n(e){return{restrict:"A",scope:{min:"=",max:"="},link:function(t,n,r){const l={debounce:_.debounce,delay:100,loadDelay:10,compressor:1,min:r.fitTextMin||"inherit",max:r.fitTextMax||"inherit",calcSize:10,lines:1},i=n.parent(),o=n[0],a=o.style,u=window.getComputedStyle(n[0],null),s=n.children().length||l.lines,c="inherit"===l.min?u["font-size"]:l.min,d="inherit"===l.max?u["font-size"]:l.max,g=u["line-height"],p=u.display;let h;function f(){const e=l.calcSize*s/o.offsetWidth/s;return Math.max(Math.min(function(e){const t=parseFloat(getComputedStyle(i[0]).paddingLeft),n=parseFloat(getComputedStyle(i[0]).paddingRight);return(i[0].offsetWidth-(t+n))*e*l.compressor}(e),parseFloat(d)),parseFloat(c))}function m(){h&&e.cancel(h),h=e((function(){o.offsetHeight*o.offsetWidth!=0&&(a.fontSize=l.calcSize+"px",a.lineHeight="1",a.display="inline-block",a.fontSize=f()+"px",a.lineHeight=g,a.display=p)}),l.loadDelay)}t.$watch((function(){return[i[0].offsetWidth,n[0].offsetWidth].join("_")}),(function(){m()})),$(window).on("resize",l.debounce((function(){t.$apply(m)}),l.delay)),t.$on("$destroy",(function(){h&&e.cancel(h),$(window).off("resize")}))}}}angular.module("graphdb.framework.core.directives.fittext",[]).directive("fitText",n),n.$inject=["$timeout"]},70:function(e,t){function n(){return{transformToTrig:function(e){let t="";const n={};for(let t=0;t<e.length;t++){const r=e[t];if(void 0===r.context?r.context="":r.context=_.trim(r.context),angular.isUndefined(n[r.context])){const e=[];e.push(r),n[r.context]=e}else n[r.context].push(r)}const r=Object.keys(n);for(let e=0;e<r.length;e++){const l=r[e];t+=""===l?"\n{":"\n<"+l+"> {";const i=n[l];for(let e=0;e<i.length;e++){const n=i[e];t+="\n\t<"+n.subject+"> <"+n.predicate+"> ","uri"===n.object.type?t+="<"+n.object.value+"> .":t+='"""'+n.object.value+'"""'+(n.object.datatype?"^^<"+n.object.datatype+">":n.object.lang?"@"+n.object.lang:"")+" ."}t+="\n}"}return t},buildStatements:function(e,t){const n=[];if(!_.isEmpty(e.data)){const r=e.data[t],l=Object.keys(r);for(let e=0;e<l.length;e++){const i=l[e],o=r[i];for(let e=0;e<o.length;e++){const r=o[e];for(let e=0;e<r.graphs.length;e++){let l=r.graphs[e];"http://www.ontotext.com/explicit"===l&&(l=""),r.lang&&(r.datatype=""),r.datatype||(r.datatype=""),n.push({subject:t,predicate:i,object:{value:r.value,type:r.type,datatype:r.datatype,lang:r.lang},context:l})}}}}return n},getDatatypeOptions:function(){return[{value:"",label:"string"},{value:"http://www.w3.org/2001/XMLSchema#boolean",label:"boolean"},{value:"http://www.w3.org/2001/XMLSchema#decimal",label:"decimal"},{value:"http://www.w3.org/2001/XMLSchema#integer",label:"integer"},{value:"http://www.w3.org/2001/XMLSchema#double",label:"double"},{value:"http://www.w3.org/2001/XMLSchema#float",label:"float"},{value:"http://www.w3.org/2001/XMLSchema#date",label:"date"},{value:"http://www.w3.org/2001/XMLSchema#time",label:"time"},{value:"http://www.w3.org/2001/XMLSchema#dateTime",label:"date time"},{value:"http://www.w3.org/2001/XMLSchema#byte",label:"byte"},{value:"http://www.w3.org/2001/XMLSchema#short",label:"short"},{value:"http://www.w3.org/2001/XMLSchema#int",label:"int"},{value:"http://www.w3.org/2001/XMLSchema#long",label:"long"},{value:"http://www.w3.org/2001/XMLSchema#unsignedByte",label:"unsigned byte"},{value:"http://www.w3.org/2001/XMLSchema#unsignedShort",label:"unsigned short"},{value:"http://www.w3.org/2001/XMLSchema#unsignedInt",label:"unsigned int"},{value:"http://www.w3.org/2001/XMLSchema#unsignedLong",label:"unsigned long"},{value:"http://www.w3.org/2001/XMLSchema#positoveInteger",label:"positive integer"},{value:"http://www.w3.org/2001/XMLSchema#nonNegativeInteger",label:"non-negative integer"},{value:"http://www.w3.org/2001/XMLSchema#negativeInteger",label:"negative integer"},{value:"http://www.w3.org/2001/XMLSchema#nonPositiveInteger",label:"non-positive integer"},{value:"http://www.w3.org/2001/XMLSchema#gYear",label:"gYear"},{value:"http://www.w3.org/2001/XMLSchema#gMonth",label:"gMonth"},{value:"http://www.w3.org/2001/XMLSchema#gDay",label:"gDay"},{value:"http://www.w3.org/2001/XMLSchema#gYearMonth",label:"gYearMonth"},{value:"http://www.w3.org/2001/XMLSchema#gMonthDay",label:"gMonthDay"},{value:"http://www.w3.org/2001/XMLSchema#duration",label:"duration"},{value:"http://www.w3.org/2001/XMLSchema#hexBinary",label:"hex binary"},{value:"http://www.w3.org/2001/XMLSchema#base64Binary",label:"base64 binary"}]}}}angular.module("graphdb.framework.explore.services",[]).factory("StatementsService",n),n.$inject=[]},71:function(e,t,n){"use strict";n.r(t);n(14);angular.module("graphdb.framework.explore.directives",["graphdb.framework.utils.uriutils"]).directive("uri",["UriUtils",function(e){return{require:"ngModel",link:function(t,n,r,l){l.$parsers.unshift((function(t){if(!angular.isUndefined(t)&&t.length>0){const n=e.validateRdfUri(t);return l.$setValidity("searchStr",n),n?t:void 0}return l.$setValidity("searchStr",!0),t})),l.$formatters.unshift((function(t){return angular.isUndefined(t)||l.$setValidity("searchStr",e.validateRdfUri),t}))}}}])}}]);
4
- //# sourceMappingURL=19.92f27dd146df127e8d6e.bundle.js.map
3
+ !function(e,t){"use strict";!function(e){e.module("angucomplete-alt-onto",[]).directive("angucompleteAltOnto",["$q","$parse","$http","$sce","$timeout","$templateCache","$interpolate","$rootScope",function(e,t,n,r,l,i,o,a){function u(t,i,o,a){var u,s,c,d,g,p,h=i.find("input"),f=3,m=null,w="autocomplete-required",v=null,b=null,x=i[0].querySelector(".angucomplete-dropdown"),y=!1,S=null;function C(e,n){e&&("object"==typeof e?(t.uri=R(e),M({originalObject:e})):"string"==typeof e&&e.length>0?t.uri=e:console&&console.error&&console.error("Tried to set "+(n?"initial":"")+" value of angucomplete to",e,"which is an invalid value"),F(!0))}function I(e){S=null,t.hideResults(e),document.body.removeEventListener("click",I)}function $(e){return e.which?e.which:e.keyCode}function M(e){"function"==typeof t.selectedObject?t.selectedObject(e):t.selectedObject=e,F(!!e)}function R(e){return t.titleField.split(",").map((function(t){return L(e,t)})).join(" ")}function L(e,t){var n,r;if(t){n=t.split("."),r=e;for(var l=0;l<n.length;l++)r=r[n[l]]}else r=e;return r}function D(e,n){var l,i,o;if(o=new RegExp(n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"),e)return e.match&&e.replace||(e=e.toString()),l=(i=e.match(o))?e.replace(o,'<span class="'+t.matchClass+'">'+i[0]+"</span>"):e,r.trustAsHtml(l)}function F(e){t.notEmpty=e,v=t.uri,t.fieldRequired&&a&&t.inputName&&a[t.inputName].$setValidity(w,e)}function j(e){!t.overrideSuggestions||t.selectedObject&&t.selectedObject.originalObject===t.uri||(e&&e.preventDefault(),l.cancel(m),H(),M({originalObject:t.uri}),t.clearSelected&&(t.uri=null),z())}function X(){return i[0].querySelectorAll(".angucomplete-row")[t.currentIndex]}function k(e){x.scrollTop=x.scrollTop+e}function U(){var e=t.results[t.currentIndex];if(t.matchClass){var n=R(e.originalObject);n=n.replace(/<b>|<\/b>/g,""),h.val(n)}else h.val(e.title)}function O(e){return function(n,r,l,i){r||l||i||!n.data||(n=n.data),t.searching=!1,B(L(s(n),t.remoteUrlDataField),e)}}function q(e,n,r,l){0!==n&&-1!==n&&(n||r||l||(n=e.status),t.remoteUrlErrorCallback?t.remoteUrlErrorCallback(e,n,r,l):console&&console.error&&console.error("http error"))}function H(){b&&b.resolve()}function T(r){var l={},i=t.remoteUrl+encodeuriComponent(r);t.remoteUrlRequestFormatter&&(l={params:t.remoteUrlRequestFormatter(r)},i=t.remoteUrl),t.remoteUrlRequestWithCredentials&&(l.withCredentials=!0),H(),b=e.defer(),l.timeout=b.promise,n.get(i,l).success(O(r)).error(q)}function N(n){H(),b=e.defer(),t.remoteApiHandler(n,b.promise).then(O(n)).catch(q)}function z(){t.showDropdown=!1,t.results=[],x&&(x.scrollTop=0)}function E(){t.showDropdown=d,t.currentIndex=t.focusFirst?0:-1,t.results=[]}function A(e){!e||e.length<f||(t.localData?t.$apply((function(){var n;n=void 0!==t.localSearch()?t.localSearch()(e):function(e){var n,r,l,i,o=t.searchFields.split(","),a=[];for(void 0!==t.parseInput()&&(e=t.parseInput()(e)),n=0;n<t.localData.length;n++){for(r=!1,l=0;l<o.length;l++)i=L(t.localData[n],o[l])||"",r=r||i.toString().toLowerCase().indexOf(e.toString().toLowerCase())>=0;r&&(a[a.length]=t.localData[n])}return a}(e),t.searching=!1,B(n,e)})):t.remoteApiHandler?N(e):T(e))}function B(e,n){var r,l,i,o,a,u;if(e&&e.length>0)for(t.results=[],r=0;r<e.length;r++)t.titleField&&""!==t.titleField&&(o=a=R(e[r])),l="",t.descriptionField&&(l=u=L(e[r],t.descriptionField)),i="",t.imageField&&(i=L(e[r],t.imageField)),t.matchClass&&(a=D(o,n),u=D(l,n)),t.results[t.results.length]={title:a,description:u,image:i,originalObject:e[r]};else t.results=[];t.autoMatch&&1===t.results.length&&function(e,n,r){if(!r)return!1;for(var l in n)if(n[l].toLowerCase()===r.toLowerCase())return t.selectResult(e),!0;return!1}(t.results[0],{title:o,desc:l||""},t.uri)?t.showDropdown=!1:0!==t.results.length||g?t.showDropdown=!0:t.showDropdown=!1}function V(){t.localData?B(t.localData,""):t.remoteApiHandler?N(""):T("")}i.on("mousedown",(function(e){e.target.id?(S=e.target.id)===t.id+"_dropdown"&&document.body.addEventListener("click",I):S=e.target.className})),t.currentIndex=t.focusFirst?0:null,t.searching=!1,c=t.$watch("initialValue",(function(e){e&&(c(),C(e,!0))})),t.$watch("fieldRequired",(function(e,n){e!==n&&(e?v&&-1!==t.currentIndex?F(!0):F(!1):a[t.inputName].$setValidity(w,!0))})),t.$on("angucomplete-alt:clearInput",(function(e,n){n&&n!==t.id||(t.uri=null,M(),F(!1),z())})),t.$on("angucomplete-alt:changeInput",(function(e,n,r){n&&n===t.id&&C(r)})),t.onFocusHandler=function(){t.focusIn&&t.focusIn(),0!==f||t.uri&&0!==t.uri.length||(t.currentIndex=t.focusFirst?0:t.currentIndex,t.showDropdown=!0,V())},t.hideResults=function(){S&&(S===t.id+"_dropdown"||S.indexOf("angucomplete")>=0)?S=null:(u=l((function(){z(),t.$apply((function(){t.uri&&t.uri.length>0&&h.val(t.uri)}))}),200),H(),t.focusOut&&t.focusOut(),t.overrideSuggestions&&t.uri&&t.uri.length>0&&-1===t.currentIndex&&j())},t.resetHideResults=function(){u&&l.cancel(u)},t.hoverRow=function(e){t.currentIndex=e},t.selectResult=function(e){t.matchClass&&(e.title=R(e.originalObject),"string"==typeof e.title&&(e.title=e.title.replace(/<b>|<\/b>/g,"")),e.description=L(e.originalObject,t.descriptionField)),t.clearSelected?t.uri=null:t.uri=e.title,M(e),z()},t.inputChangeHandler=function(e){return e.length<f?(H(),z()):0===e.length&&0===f&&(t.searching=!1,V()),t.inputChanged&&(e=t.inputChanged(e)),e},t.fieldRequiredClass&&""!==t.fieldRequiredClass&&(w=t.fieldRequiredClass),t.minlength&&""!==t.minlength&&(f=parseInt(t.minlength,10)),t.pause||(t.pause=500),t.clearSelected||(t.clearSelected=!1),t.overrideSuggestions||(t.overrideSuggestions=!1),t.fieldRequired&&a&&(t.initialValue?F(!0):F(!1)),t.inputType=o.type?o.type:"text",t.textSearching=o.textSearching?o.textSearching:"Searching...",t.textNoResults=o.textNoResults?o.textNoResults:"No results found",d="false"!==t.textSearching,g="false"!==t.textNoResults,t.maxlength=o.maxlength?o.maxlength:524288,h.on("keydown",(function(e){var n=$(e),r=null,l=null;13===n&&t.results?(t.currentIndex>=0&&t.currentIndex<t.results.length?(e.preventDefault(),t.selectResult(t.results[t.currentIndex])):(j(e),z()),t.$apply()):40===n&&t.results?(e.preventDefault(),t.currentIndex+1<t.results.length&&t.showDropdown&&(t.$apply((function(){t.currentIndex++,U()})),y&&(r=X(),x.getBoundingClientRect().top+parseInt(getComputedStyle(x).maxHeight,10)<r.getBoundingClientRect().bottom&&k(function(e){var t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}(r))))):38===n&&t.results?(e.preventDefault(),t.currentIndex>=1?(t.$apply((function(){t.currentIndex--,U()})),y&&(l=X().getBoundingClientRect().top-(x.getBoundingClientRect().top+parseInt(getComputedStyle(x).paddingTop,10)))<0&&k(l-1)):0===t.currentIndex&&t.$apply((function(){t.currentIndex=-1,h.val(t.uri)}))):9===n?t.results&&t.results.length>0&&t.showDropdown?-1===t.currentIndex&&t.overrideSuggestions?j():(-1===t.currentIndex&&(t.currentIndex=0),t.selectResult(t.results[t.currentIndex]),t.$digest()):t.uri&&t.uri.length>0&&j():27===n&&e.preventDefault()})),h.on("keyup",(function(e){var n=$(e);if(37!==n&&39!==n)if(38===n||13===n)e.preventDefault();else if(40===n)e.preventDefault(),!t.showDropdown&&t.uri&&t.uri.length>=f&&(E(),t.searching=!0,A(t.uri));else if(27===n)z(),t.$apply((function(){h.val(t.uri)}));else{if(0===f&&!t.uri)return;t.uri&&""!==t.uri?t.uri.length>=f&&(E(),m&&l.cancel(m),t.searching=!0,m=l((function(){A(t.uri)}),t.pause)):t.showDropdown=!1,v&&v!==t.uri&&!t.clearSelected&&t.$apply((function(){M()}))}})),p="remoteUrlResponseFormatter",s=function(e){return t[p]?t[p](e):e},l((function(){var e=getComputedStyle(x);y=e.maxHeight&&"auto"===e.overflowY}))}return i.put("/angucomplete-alt/index.html",'<div class="angucomplete-holder" ng-class="{\'angucomplete-dropdown-visible\': showDropdown}"> <input id="{{id}}_value" name="{{inputName}}" tabindex="{{fieldTabindex}}" ng-class="{\'angucomplete-input-not-empty\': notEmpty}" ng-model="uri" ng-disabled="disableInput" type="{{inputType}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" ng-focus="onFocusHandler()" class="{{inputClass}}" ng-focus="resetHideResults()" ng-blur="hideResults($event)" autocapitalize="off" autocorrect="off" autocomplete="off" ng-change="inputChangeHandler(uri)" style="overflow: hidden; padding-right: .5em;"/> <div id="{{id}}_dropdown" class="angucomplete-dropdown" ng-show="disableSuggestions && showDropdown"> <div class="angucomplete-searching" ng-show="searching" ng-bind="textSearching"></div> <div class="angucomplete-searching" ng-show="!searching && (!results || results.length == 0)" ng-bind="textNoResults"></div> <div class="angucomplete-row" ng-repeat="result in results" ng-click="selectResult(result)" ng-mouseenter="hoverRow($index)" ng-class="{\'angucomplete-selected-row\': $index == currentIndex}"> <div ng-if="imageField" class="angucomplete-image-holder"> <img ng-if="result.image && result.image != \'\'" ng-src="{{result.image}}" class="angucomplete-image"/> <div ng-if="!result.image && result.image != \'\'" class="angucomplete-image-default"></div> </div> <div class="angucomplete-title" ng-if="matchClass" ng-bind-html="result.title"></div> <div class="angucomplete-title" ng-if="!matchClass">{{ result.title }}</div> <div ng-if="matchClass && result.description && result.description != \'\'" class="angucomplete-description" ng-bind-html="result.description"></div> <div ng-if="!matchClass && result.description && result.description != \'\'" class="angucomplete-description">{{result.description}}</div> </div> </div></div>'),{restrict:"EA",require:"^?form",scope:{selectedObject:"=",disableInput:"=",disableSuggestions:"=",initialValue:"=",localData:"=",localSearch:"&",remoteUrlRequestFormatter:"=",remoteUrlRequestWithCredentials:"@",remoteUrlResponseFormatter:"=",remoteUrlErrorCallback:"=",remoteApiHandler:"=",id:"@",type:"@",placeholder:"@",remoteUrl:"@",remoteUrlDataField:"@",titleField:"@",descriptionField:"@",imageField:"@",inputClass:"@",pause:"@",searchFields:"@",minlength:"@",matchClass:"@",clearSelected:"@",overrideSuggestions:"@",fieldRequired:"=",fieldRequiredClass:"@",inputChanged:"=",autoMatch:"@",focusOut:"&",focusIn:"&",fieldTabindex:"@",inputName:"@",focusFirst:"@",parseInput:"&"},templateUrl:function(e,t){return t.templateUrl||"/angucomplete-alt/index.html"},compile:function(e){var t=o.startSymbol(),n=o.endSymbol();if("{{"!==t||"}}"!==n){var r=e.html().replace(/\{\{/g,t).replace(/\}\}/g,n);e.html(r)}return u}}}])}(window.angular)}()},70:function(e,t){function n(e){return{restrict:"A",scope:{min:"=",max:"="},link:function(t,n,r){const l={debounce:_.debounce,delay:100,loadDelay:10,compressor:1,min:r.fitTextMin||"inherit",max:r.fitTextMax||"inherit",calcSize:10,lines:1},i=n.parent(),o=n[0],a=o.style,u=window.getComputedStyle(n[0],null),s=n.children().length||l.lines,c="inherit"===l.min?u["font-size"]:l.min,d="inherit"===l.max?u["font-size"]:l.max,g=u["line-height"],p=u.display;let h;function f(){const e=l.calcSize*s/o.offsetWidth/s;return Math.max(Math.min(function(e){const t=parseFloat(getComputedStyle(i[0]).paddingLeft),n=parseFloat(getComputedStyle(i[0]).paddingRight);return(i[0].offsetWidth-(t+n))*e*l.compressor}(e),parseFloat(d)),parseFloat(c))}function m(){h&&e.cancel(h),h=e((function(){o.offsetHeight*o.offsetWidth!=0&&(a.fontSize=l.calcSize+"px",a.lineHeight="1",a.display="inline-block",a.fontSize=f()+"px",a.lineHeight=g,a.display=p)}),l.loadDelay)}t.$watch((function(){return[i[0].offsetWidth,n[0].offsetWidth].join("_")}),(function(){m()})),$(window).on("resize",l.debounce((function(){t.$apply(m)}),l.delay)),t.$on("$destroy",(function(){h&&e.cancel(h),$(window).off("resize")}))}}}angular.module("graphdb.framework.core.directives.fittext",[]).directive("fitText",n),n.$inject=["$timeout"]},71:function(e,t){function n(){return{transformToTrig:function(e){let t="";const n={};for(let t=0;t<e.length;t++){const r=e[t];if(void 0===r.context?r.context="":r.context=_.trim(r.context),angular.isUndefined(n[r.context])){const e=[];e.push(r),n[r.context]=e}else n[r.context].push(r)}const r=Object.keys(n);for(let e=0;e<r.length;e++){const l=r[e];t+=""===l?"\n{":"\n<"+l+"> {";const i=n[l];for(let e=0;e<i.length;e++){const n=i[e];t+="\n\t<"+n.subject+"> <"+n.predicate+"> ","uri"===n.object.type?t+="<"+n.object.value+"> .":t+='"""'+n.object.value+'"""'+(n.object.datatype?"^^<"+n.object.datatype+">":n.object.lang?"@"+n.object.lang:"")+" ."}t+="\n}"}return t},buildStatements:function(e,t){const n=[];if(!_.isEmpty(e.data)){const r=e.data[t],l=Object.keys(r);for(let e=0;e<l.length;e++){const i=l[e],o=r[i];for(let e=0;e<o.length;e++){const r=o[e];for(let e=0;e<r.graphs.length;e++){let l=r.graphs[e];"http://www.ontotext.com/explicit"===l&&(l=""),r.lang&&(r.datatype=""),r.datatype||(r.datatype=""),n.push({subject:t,predicate:i,object:{value:r.value,type:r.type,datatype:r.datatype,lang:r.lang},context:l})}}}}return n},getDatatypeOptions:function(){return[{value:"",label:"string"},{value:"http://www.w3.org/2001/XMLSchema#boolean",label:"boolean"},{value:"http://www.w3.org/2001/XMLSchema#decimal",label:"decimal"},{value:"http://www.w3.org/2001/XMLSchema#integer",label:"integer"},{value:"http://www.w3.org/2001/XMLSchema#double",label:"double"},{value:"http://www.w3.org/2001/XMLSchema#float",label:"float"},{value:"http://www.w3.org/2001/XMLSchema#date",label:"date"},{value:"http://www.w3.org/2001/XMLSchema#time",label:"time"},{value:"http://www.w3.org/2001/XMLSchema#dateTime",label:"date time"},{value:"http://www.w3.org/2001/XMLSchema#byte",label:"byte"},{value:"http://www.w3.org/2001/XMLSchema#short",label:"short"},{value:"http://www.w3.org/2001/XMLSchema#int",label:"int"},{value:"http://www.w3.org/2001/XMLSchema#long",label:"long"},{value:"http://www.w3.org/2001/XMLSchema#unsignedByte",label:"unsigned byte"},{value:"http://www.w3.org/2001/XMLSchema#unsignedShort",label:"unsigned short"},{value:"http://www.w3.org/2001/XMLSchema#unsignedInt",label:"unsigned int"},{value:"http://www.w3.org/2001/XMLSchema#unsignedLong",label:"unsigned long"},{value:"http://www.w3.org/2001/XMLSchema#positoveInteger",label:"positive integer"},{value:"http://www.w3.org/2001/XMLSchema#nonNegativeInteger",label:"non-negative integer"},{value:"http://www.w3.org/2001/XMLSchema#negativeInteger",label:"negative integer"},{value:"http://www.w3.org/2001/XMLSchema#nonPositiveInteger",label:"non-positive integer"},{value:"http://www.w3.org/2001/XMLSchema#gYear",label:"gYear"},{value:"http://www.w3.org/2001/XMLSchema#gMonth",label:"gMonth"},{value:"http://www.w3.org/2001/XMLSchema#gDay",label:"gDay"},{value:"http://www.w3.org/2001/XMLSchema#gYearMonth",label:"gYearMonth"},{value:"http://www.w3.org/2001/XMLSchema#gMonthDay",label:"gMonthDay"},{value:"http://www.w3.org/2001/XMLSchema#duration",label:"duration"},{value:"http://www.w3.org/2001/XMLSchema#hexBinary",label:"hex binary"},{value:"http://www.w3.org/2001/XMLSchema#base64Binary",label:"base64 binary"}]}}}angular.module("graphdb.framework.explore.services",[]).factory("StatementsService",n),n.$inject=[]},72:function(e,t,n){"use strict";n.r(t);n(14);angular.module("graphdb.framework.explore.directives",["graphdb.framework.utils.uriutils"]).directive("uri",["UriUtils",function(e){return{require:"ngModel",link:function(t,n,r,l){l.$parsers.unshift((function(t){if(!angular.isUndefined(t)&&t.length>0){const n=e.validateRdfUri(t);return l.$setValidity("searchStr",n),n?t:void 0}return l.$setValidity("searchStr",!0),t})),l.$formatters.unshift((function(t){return angular.isUndefined(t)||l.$setValidity("searchStr",e.validateRdfUri),t}))}}}])}}]);
4
+ //# sourceMappingURL=19.34c180252e48207f01b4.bundle.js.map