graphdb-workbench 2.7.0 → 2.7.1-RC2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{0.ce392e04e45ca4fad0ce.bundle.js → 0.77349cff52402428d9b2.bundle.js} +1 -1
- package/dist/{10.57edfec05379d783ffaa.bundle.js → 10.b578a931354c66da5421.bundle.js} +1 -1
- package/dist/{100.468b84c65c7b8c06657d.bundle.js → 100.791e6c1dd4d34f785fa1.bundle.js} +1 -1
- package/dist/{102.73ff72236ce70b195ca5.bundle.js → 102.6f9cbff52ee6b40bd8ed.bundle.js} +1 -1
- package/dist/{107.9501561f24a33fd8ac99.bundle.js → 107.7002925ebe3a8f9dc69a.bundle.js} +1 -1
- package/dist/{109.e153a8c496a21a2fd6c1.bundle.js → 109.118654b6355bb0e9daae.bundle.js} +1 -1
- package/dist/{12.34fc1969079cc9595592.bundle.js → 11.786cb1f629c5c7a70043.bundle.js} +1 -1
- package/dist/112.1c5db75d50250a44853e.bundle.js +1 -0
- package/dist/{113.632f84d1dfd1d4a6c1bc.bundle.js → 113.eb9d1c1c2f0dc26a03d2.bundle.js} +1 -1
- package/dist/{115.74fc384b158fa53b2789.bundle.js → 115.4105806b5f46baf5afb3.bundle.js} +1 -1
- package/dist/{116.44bbe19c8267478cfe47.bundle.js → 116.4bdd621e8f4121c1fb9b.bundle.js} +1 -1
- package/dist/{118.90d7cffadf0edb7dab22.bundle.js → 118.35617d9571fdd1e04280.bundle.js} +1 -1
- package/dist/12.d6c4500594aa36f119f4.bundle.js +1 -0
- package/dist/{120.3d0da2f33c1998e15059.bundle.js → 120.f8d9da3ff5443d64b7c9.bundle.js} +1 -1
- package/dist/123.5587ea39af3023b5bb34.bundle.js +1 -0
- package/dist/{128.31535237e77713023ab3.bundle.js → 128.cf87f851d1ba35fe7100.bundle.js} +1 -1
- package/dist/{13.e207ca4692eb5eafdb34.bundle.js → 13.fb659cef28f20887f1bf.bundle.js} +1 -1
- package/dist/{131.f6aec556f49c78da8665.bundle.js → 131.3c2f24f2e6abff9140c5.bundle.js} +1 -1
- package/dist/{132.bda2e1408a049ad349b2.bundle.js → 132.99311ccc8a21d3448cc2.bundle.js} +1 -1
- package/dist/{133.f9aae73e47de861bb86e.bundle.js → 133.c42e903423b4dff7fd3c.bundle.js} +1 -1
- package/dist/{134.a5c33a40d2b84ab5b624.bundle.js → 134.cb7f54514484f90eb02f.bundle.js} +1 -1
- package/dist/{135.e3e8ff0d0cce2e980f9b.bundle.js → 135.bd00a551693084ff39e6.bundle.js} +1 -1
- package/dist/{136.49d2a1a7cfb9325f793a.bundle.js → 136.b053fc49873b7ca8438a.bundle.js} +1 -1
- package/dist/{137.c66ea292a9fd631984e5.bundle.js → 137.bcc736c3b60fde444204.bundle.js} +1 -1
- package/dist/{138.cb759fc495f9ce8e21ce.bundle.js → 138.4b51b9fdc0a16e6051a5.bundle.js} +1 -1
- package/dist/{139.7537655f500bab3e9c21.bundle.js → 139.24c33f149a0bf46e5d55.bundle.js} +1 -1
- package/dist/{14.43acd2f156a53df80ef3.bundle.js → 14.e34dcd427582926b289d.bundle.js} +1 -1
- package/dist/{140.74aba9df15b050c129d9.bundle.js → 140.a13e04b4090a07f4e59b.bundle.js} +1 -1
- package/dist/{141.60071851020a1bc11595.bundle.js → 141.6bf44fe90aca025f268f.bundle.js} +1 -1
- package/dist/{142.8906dd00536438b339df.bundle.js → 142.afa43cdf98db52b553cc.bundle.js} +1 -1
- package/dist/{143.b1a2222304f8efe71776.bundle.js → 143.5f179c457fc4e9102dac.bundle.js} +1 -1
- package/dist/148.28bebc68de5695208221.bundle.js +1 -1
- package/dist/{151.ebeb15de6f8b7ab9ea57.bundle.js → 151.209c122817bdae72ca11.bundle.js} +1 -1
- package/dist/{152.fd9cb512ba8bedc15507.bundle.js → 152.20c3f763a395b9058895.bundle.js} +1 -1
- package/dist/{153.96a6ea77a2b80d4457ac.bundle.js → 153.01af8362898ed0ff4f07.bundle.js} +1 -1
- package/dist/{155.1d702ddf0b6e459a8d0a.bundle.js → 155.9b4a15ea77ec62764a32.bundle.js} +1 -1
- package/dist/{16.7ce65b3a395658afe6da.bundle.js → 16.5696bf90cca7837fd958.bundle.js} +1 -1
- package/dist/{162.f24d44c303f25e191500.bundle.js → 162.faf20ecd7edbfeb433f7.bundle.js} +1 -1
- package/dist/{165.7e2b9d659a5e3a1f6e6a.bundle.js → 165.78f7fab494d1436d90e0.bundle.js} +1 -1
- package/dist/{167.825b323360a554299ecb.bundle.js → 167.efcd257081f26115b782.bundle.js} +1 -1
- package/dist/17.6b19268cbe8c346e7bf5.bundle.js +3 -0
- package/dist/{171.9bb9c8707c4f56ff8b11.bundle.js → 171.81243c7d1f615f7c84be.bundle.js} +1 -1
- package/dist/{172.877f615f36bb4cbdf9ef.bundle.js → 172.19467709a3cfb3940ba5.bundle.js} +1 -1
- package/dist/{173.e955161ae3543b9fedb4.bundle.js → 173.c5229151bdf08623a7de.bundle.js} +1 -1
- package/dist/{174.d76a1974f66b65860804.bundle.js → 174.a2c9a9b979d7c7793177.bundle.js} +1 -1
- package/dist/{18.07f22adcb2f148d03e26.bundle.js → 18.8a4cdfd22f89998035c6.bundle.js} +1 -1
- package/dist/{182.70fe30f8b3b30e4de6ea.bundle.js → 182.5ebf0088e618b051c3ca.bundle.js} +1 -1
- package/dist/{188.be467d36c313f5bb1562.bundle.js → 188.f3e6b7eeb6822cfdc63d.bundle.js} +1 -1
- package/dist/{189.521a403e52bcfc6b77f5.bundle.js → 189.890ee3dde9a48048c9cc.bundle.js} +1 -1
- package/dist/{197.2d51b488838078a46077.bundle.js → 197.ec9eab135af5dccf29c1.bundle.js} +1 -1
- package/dist/{2.7b0a5d2579b6b7257131.bundle.js → 2.b7e2fecca27c68a4d45c.bundle.js} +2 -2
- package/dist/{20.daa5d35c7d1831cc5cf0.bundle.js → 20.2d0e2bc48bb3add4c410.bundle.js} +1 -1
- package/dist/{200.09eb722348388d27715c.bundle.js → 200.02004bd0480acf25b3a6.bundle.js} +1 -1
- package/dist/{21.5ed4dffd658de4717f41.bundle.js → 21.4021b4280d12f1035088.bundle.js} +1 -1
- package/dist/214.a1fa76d230f52433bb66.bundle.js +1 -0
- package/dist/{22.525edb90a7db895da8ac.bundle.js → 22.0962174b028cbb81e430.bundle.js} +1 -1
- package/dist/{220.935b07a3f246cb920c84.bundle.js → 220.72e8a728288f5e31c517.bundle.js} +1 -1
- package/dist/223.1ce96be3b072429a8c61.bundle.js +1 -0
- package/dist/{229.16935cb612d5df1844d8.bundle.js → 229.c9c2706fb27ba8996a18.bundle.js} +1 -1
- package/dist/{23.b50b4669edd5ad306f22.bundle.js → 23.37f61551920695a9df19.bundle.js} +1 -1
- package/dist/{230.49345c93dcd203399ccb.bundle.js → 230.547dca73ab65c62e0b2a.bundle.js} +1 -1
- package/dist/{234.c787798f5ebdf4c7a6ed.bundle.js → 234.d0049a53f16bbeffe7dd.bundle.js} +1 -1
- package/dist/{236.2b2a65dd9bc54a0d62e8.bundle.js → 236.86c994131100615bfc35.bundle.js} +1 -1
- package/dist/{239.3ee164ccaf7181916563.bundle.js → 239.d127ee50248b2e121d8a.bundle.js} +1 -1
- package/dist/{24.6e16dea04e8eb4615f6b.bundle.js → 24.a91ab44f223c1b6b1070.bundle.js} +1 -1
- package/dist/{242.283e5444cfa5e973f6b5.bundle.js → 242.2c8176c8ae8001076202.bundle.js} +1 -1
- package/dist/243.b7071f131ee27952ff5e.bundle.js +1 -0
- package/dist/{25.1c22f6ab0f20810f178d.bundle.js → 25.d61ef2611d221a63b93f.bundle.js} +1 -1
- package/dist/{254.fa34994c9c60169d7382.bundle.js → 254.d420ab9f094a0c4f0812.bundle.js} +1 -1
- package/dist/{256.8c938ce0def6439e3170.bundle.js → 256.c51cdf38904e54c493f6.bundle.js} +1 -1
- package/dist/{257.4119b121317e06d1736e.bundle.js → 257.745d505c44cac9ecbdcb.bundle.js} +1 -1
- package/dist/{26.8ad4918de5482a06b67c.bundle.js → 26.e89a3edf1799aec575ad.bundle.js} +1 -1
- package/dist/{260.0982397378caa5bedec3.bundle.js → 260.f63804cd9bd0ea074168.bundle.js} +1 -1
- package/dist/{263.918171936df6aae41cdd.bundle.js → 263.194c2168467b206f3365.bundle.js} +1 -1
- package/dist/27.2c3c2cf50952851ca7ff.bundle.js +1 -0
- package/dist/{275.f6045911522b9f4e92c1.bundle.js → 275.f1211f3e4ef13669b6d3.bundle.js} +1 -1
- package/dist/28.9085645e020f2ffa41ae.bundle.js +1 -0
- package/dist/282.2050919043366f7a299a.bundle.js +1 -0
- package/dist/{283.5746fc7ea5590204dbe5.bundle.js → 283.26d8957e2ad89aa165fa.bundle.js} +1 -1
- package/dist/{284.b9048481713e69ecab9d.bundle.js → 284.279980fb5c23a345de84.bundle.js} +1 -1
- package/dist/{285.30720353e6e956a8d6e1.bundle.js → 285.2f72f19009b7ecc33401.bundle.js} +1 -1
- package/dist/{286.27f1819fdbfb1c92bd56.bundle.js → 286.45e80221620c4e9c22b6.bundle.js} +1 -1
- package/dist/29.15213e151364f5ecfcd5.bundle.js +1 -1
- package/dist/300.cef8eccb11324bcfdb36.bundle.js +1 -1
- package/dist/302.7a5d2ba28bd6479a77be.bundle.js +1 -1
- package/dist/303.e817b957f010153de97a.bundle.js +1 -1
- package/dist/304.fd2e766c67cd966f6751.bundle.js +1 -1
- package/dist/32.018fbf8e5cf019b9ca99.bundle.js +1 -0
- package/dist/328.e26d548d2b145033b068.bundle.js +1 -0
- package/dist/{33.dc1b84f1e1837ee64a62.bundle.js → 33.1e6ea88364cfa8fc05ba.bundle.js} +1 -1
- package/dist/333.9f051c77b4c6747b320c.bundle.js +1 -1
- package/dist/{34.c5d4046c4a906590b979.bundle.js → 34.7da8829290e069aff037.bundle.js} +1 -1
- package/dist/{346.6e70020ca7edeea727be.bundle.js → 346.db062a6ace83b3b3f638.bundle.js} +1 -1
- package/dist/{347.16efd9ee41abd6f9f1e5.bundle.js → 347.1a90e8991a8b6795cd3e.bundle.js} +1 -1
- package/dist/{348.430c33b3feafbe6f4d0c.bundle.js → 348.34ef7da31e5d065e776a.bundle.js} +1 -1
- package/dist/{349.0171f3012a3a81bb4aec.bundle.js → 349.273da95e61ccec1fe506.bundle.js} +1 -1
- package/dist/{35.be4bf3d4b15b52e27211.bundle.js → 35.5b97af00fcdeaf41ef2d.bundle.js} +1 -1
- package/dist/{36.78b8f848caf7bdc9198a.bundle.js → 36.f2916aa7e189af87eb98.bundle.js} +1 -1
- package/dist/37.bc9a367f1e8abe224f75.bundle.js +2 -0
- package/dist/{38.d2aa54f612cc98de1873.bundle.js → 38.08c4827025253b675149.bundle.js} +1 -1
- package/dist/{39.11231e3f962a5f7829d3.bundle.js → 39.dffeef1d0efdff3888b1.bundle.js} +1 -1
- package/dist/{4.e5fe4357b7f37e9116d5.bundle.js → 4.18e40a8064dc2848c5cf.bundle.js} +1 -1
- package/dist/{40.ac59185f49718c365e62.bundle.js → 40.9df624642eaddfc28d27.bundle.js} +1 -1
- package/dist/42.52befbab22e69bb433f4.bundle.js +1 -1
- package/dist/{43.233285dfc7aef5be7dcd.bundle.js → 43.972408cc953fde122a4e.bundle.js} +1 -1
- package/dist/{44.9b4db47f9b4eacae74c8.bundle.js → 44.b5e94a5cd39e9f568868.bundle.js} +1 -1
- package/dist/{48.ef7c3726e21a241b4a74.bundle.js → 48.c190963649677f14948f.bundle.js} +1 -1
- package/dist/{49.9c98607bda2dc4067139.bundle.js → 49.12f733ac94997b7a6587.bundle.js} +1 -1
- package/dist/{50.c6d501eacad89e9e3c07.bundle.js → 50.ed1e3b0ecae76b0ab157.bundle.js} +1 -1
- package/dist/51.9f47ca86da95b07bc239.bundle.js +1 -0
- package/dist/{56.2e7cf8fffc6a1c47313a.bundle.js → 56.597362dd8e4081fba52d.bundle.js} +1 -1
- package/dist/{57.349e7326d2230d67b60e.bundle.js → 57.21a042b29a36836b6228.bundle.js} +1 -1
- package/dist/{58.9f4b098efc1fa6145087.bundle.js → 58.e23c2e17e61a04fdfda3.bundle.js} +1 -1
- package/dist/{59.53531269a8e4d1db4a18.bundle.js → 59.a7318e05c6563a821478.bundle.js} +1 -1
- package/dist/{6.235db10971e1a372c502.bundle.js → 6.3cf6c5925ee8369df63d.bundle.js} +1 -1
- package/dist/{60.af48672c6f42704f3299.bundle.js → 60.78d043009a5172d0a640.bundle.js} +1 -1
- package/dist/{61.a617b16ec93bbe525f65.bundle.js → 61.fff95e1f2048dae2a2e0.bundle.js} +1 -1
- package/dist/{62.42c03cc9243d6571127e.bundle.js → 62.e31d150a37b1a5512859.bundle.js} +1 -1
- package/dist/{63.64ce2b98622dbe24c7bc.bundle.js → 63.13b28570a2f93a801b50.bundle.js} +1 -1
- package/dist/{67.b59ad8f26d05ba647b4e.bundle.js → 67.17f7adfaefac8cdff3f0.bundle.js} +1 -1
- package/dist/{68.e35370ccce13710c3acb.bundle.js → 68.0026d091b11af569c3f5.bundle.js} +1 -1
- package/dist/69.0c4685cce4a07d119427.bundle.js +1 -0
- package/dist/{70.c5931f01c244a495732b.bundle.js → 70.63abbfa8ca74c2863f71.bundle.js} +1 -1
- package/dist/{72.d6e49ef2c8e28417a526.bundle.js → 72.1330d8ae6fdd10a20396.bundle.js} +1 -1
- package/dist/{73.7f80da13b41078a74843.bundle.js → 73.f109f3577c6474e0c9fb.bundle.js} +1 -1
- package/dist/{74.f4f4c73f00bb1ae4ab90.bundle.js → 74.b21ca5f5ef0407d7e1c2.bundle.js} +1 -1
- package/dist/{77.c62d489ec10cf04974d1.bundle.js → 77.244a02903dee73260510.bundle.js} +1 -1
- package/dist/8.ad0955f6558601fb56b5.bundle.js +1 -0
- package/dist/{81.e15366bb81da124add5a.bundle.js → 81.884f598d1b995fa0ed96.bundle.js} +1 -1
- package/dist/{82.0ad959010d4c00aec31a.bundle.js → 82.39fbe5a05657a14a7263.bundle.js} +1 -1
- package/dist/83.306e0c2b20b3d0da3b39.bundle.js +1 -0
- package/dist/{84.967decab8154c2144d4e.bundle.js → 84.46b05025b3f4739139b0.bundle.js} +1 -1
- package/dist/{85.4fb67b667b3cf484a9a8.bundle.js → 85.ec7aa4be6a8e01457621.bundle.js} +1 -1
- package/dist/{86.b2b35213d0ccaca8e725.bundle.js → 86.e05f38c7e151fff0c020.bundle.js} +1 -1
- package/dist/{87.61f0a5f274d87859acb0.bundle.js → 87.d63dad9244b738d59e07.bundle.js} +1 -1
- package/dist/{88.d490ef07d9ba9996c455.bundle.js → 88.0c72409e91172e285bcf.bundle.js} +1 -1
- package/dist/{89.ac54378a96143c74cd1c.bundle.js → 89.0b04f312a873a2e189ae.bundle.js} +1 -1
- package/dist/{9.dcf78d743d24c5a1dd30.bundle.js → 9.6e07267fe82ceac615ba.bundle.js} +1 -1
- package/dist/{90.5556ac56573bea09a7ff.bundle.js → 90.1e43395de7efcaead64d.bundle.js} +1 -1
- package/dist/{91.6e6421ce74a5dab21342.bundle.js → 91.f1b001eab83f572e6d8f.bundle.js} +1 -1
- package/dist/{92.2099f8e6c8bda81df23e.bundle.js → 92.f088b23db69edc7353fe.bundle.js} +1 -1
- package/dist/{93.91bcf6af4f2cb865f971.bundle.js → 93.2a3cdaac2838164951a8.bundle.js} +1 -1
- package/dist/{96.babb34b1317abe847f48.bundle.js → 96.db918dbecbef9396b01d.bundle.js} +1 -1
- package/dist/{97.885a73aa0360fd138b06.bundle.js → 97.6853aeafb525f21053b5.bundle.js} +1 -1
- package/dist/{98.4682c01b8beedb7ee99f.bundle.js → 98.a05f20feb5e16050ac66.bundle.js} +1 -1
- package/dist/{bundle.c670cd85dc33e3a033be.bundle.js → bundle.a595c1dc6fb86b4ee041.bundle.js} +20 -20
- package/dist/i18n/locale-en.json +16 -0
- package/dist/i18n/locale-fr.json +17 -1
- package/dist/index.html +4 -4
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
- package/dist/js/angular/rdfrank/templates/filter-list.html +2 -2
- package/dist/js/angular/security/templates/user.html +1 -1
- package/dist/license-checker.json +4 -4
- package/dist/pages/aclmanagement.html +2 -2
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/create-index.html +1 -1
- package/dist/pages/createConnector.html +1 -1
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +1 -1
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +8 -8
- package/dist/pages/graphs-visualizations.html +7 -7
- package/dist/pages/guides.html +1 -1
- package/dist/pages/import.html +2 -2
- package/dist/pages/info.html +4 -4
- package/dist/pages/jdbc-create.html +1 -1
- package/dist/pages/monitor/backup-and-restore.html +1 -1
- package/dist/pages/monitor/queries.html +2 -2
- package/dist/pages/monitor/resources.html +1 -1
- package/dist/pages/namespaces.html +4 -3
- package/dist/pages/plugins.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +1 -1
- package/dist/pages/repository.html +1 -1
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-editor.html +1 -1
- package/dist/pages/sparql-template-create.html +1 -1
- package/dist/pages/ux-test1.html +2 -2
- package/dist/pages/webapi.html +2 -2
- package/dist/res/swagger5/index.html +12 -12
- package/dist/{vendor.4158e85ef261380e9ea5.bundle.js → vendor.f6d3e64e5b5efe1e1f48.bundle.js} +2 -2
- package/package.json +2 -2
- package/dist/11.c2f7d275494c60861a05.bundle.js +0 -1
- package/dist/112.304a72db9cb77abefe78.bundle.js +0 -1
- package/dist/123.58e05dcc2a75e24f84ff.bundle.js +0 -1
- package/dist/17.d345f7a57e026f463d39.bundle.js +0 -3
- package/dist/214.580e11deed22042e1369.bundle.js +0 -1
- package/dist/223.d88fa4c9769b7b5d339b.bundle.js +0 -1
- package/dist/243.b952971d26ea4c4ccce0.bundle.js +0 -1
- package/dist/27.df53c5d5f2930ef08e4c.bundle.js +0 -1
- package/dist/28.0102a82041b6de2bd7eb.bundle.js +0 -1
- package/dist/282.9bda539a1ef1de2dab5d.bundle.js +0 -1
- package/dist/32.1950981de301d2897f55.bundle.js +0 -1
- package/dist/328.b5ee29711483c6cb3648.bundle.js +0 -1
- package/dist/37.d2ae2e371207ad86bec9.bundle.js +0 -2
- package/dist/51.eedd6b5923ea71c40843.bundle.js +0 -1
- package/dist/69.3bfdada10a3dacf44239.bundle.js +0 -1
- package/dist/8.ec6881a9e10b7d4c503a.bundle.js +0 -1
- package/dist/83.f404b787e86f1508f5f4.bundle.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[10,34,46,55,194,202,214,215,216,217,220,273],{104:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityQueryType",(function(){return r}));const r={DATA:"DATA",SEARCH:"SEARCH",ANALOGICAL:"ANALOGICAL"}},105:function(e,i,t){"use strict";t.r(i),t.d(i,"mapIndexesResponseToSimilarityIndex",(function(){return n}));var r=t(77);const n=e=>e.map(e=>{const i=new r.SimilarityIndex;return i.type=e.type,i.stopList=e.stopList,i.status=e.status,i.selectQuery=e.selectQuery,i.searchQuery=e.searchQuery,i.sameAs=e.sameAs,i.options=e.options,i.name=e.name,i.infer=e.infer,i.analyzer=e.analyzer,i.analogicalQuery=e.analogicalQuery,i})},221:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexError",(function(){return r}));class r extends Error{}},222:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexInfo",(function(){return y}));var r=t(77),n=t(104),s=t(65);const a=new RegExp("^[a-zA-Z0-9-_]+$");class y{constructor(){this.similarityIndex=new r.SimilarityIndex,this.isNameExist=!1,this.invalidSelectQueryType=!1,this.invalidSelectQuery=!1,this.invalidSearchQueryType=!1,this.invalidSearchQuery=!1,this.invalidAnalogicalQueryType=!1,this.invalidAnalogicalQuery=!1,this.selectedQueryType=n.SimilarityQueryType.DATA,this.selectedYasguiRenderMode=s.RenderingMode.YASQE}setQuery(e,i){const t=i||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.similarityIndex.analogicalQuery=e):this.similarityIndex.searchQuery=e:this.similarityIndex.selectQuery=e}getQuery(e){switch(e||this.selectedQueryType){case n.SimilarityQueryType.DATA:return this.similarityIndex.selectQuery;case n.SimilarityQueryType.SEARCH:return this.similarityIndex.searchQuery;case n.SimilarityQueryType.ANALOGICAL:return this.similarityIndex.analogicalQuery}}markInvalidQuery(e,i=!0){const t=e||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.invalidAnalogicalQuery=i):this.invalidSearchQuery=i:this.invalidSelectQuery=i}markInvalidQueryType(e,i=!0){const t=e||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.invalidAnalogicalQueryType=i):this.invalidSearchQueryType=i:this.invalidSelectQueryType=i}setSelectedQueryType(e){this.selectedQueryType=e}getSelectedQueryType(){return this.selectedQueryType}setSelectedYasguiRenderMode(e){this.selectedYasguiRenderMode=e}getSelectedYasguiRenderMode(){return this.selectedYasguiRenderMode}isDataQueryTypeSelected(){return n.SimilarityQueryType.DATA===this.selectedQueryType}isSearchQueryTypeSelected(){return n.SimilarityQueryType.SEARCH===this.selectedQueryType}isAnalogicalQueryTypeSelected(){return n.SimilarityQueryType.ANALOGICAL===this.selectedQueryType}isTextType(){return this.similarityIndex.isTextType()}isPredicationType(){return this.similarityIndex.isPredicationType()}isTextLiteralType(){return this.similarityIndex.isTextLiteralType()}hasName(){return!!this.similarityIndex.name}isNameValid(){return a.test(this.similarityIndex.name)}hasSelectQuery(){return!!this.similarityIndex.selectQuery}hasSearchQuery(){return!!this.similarityIndex.searchQuery}hasAnalogicalQuery(){return!!this.similarityIndex.analogicalQuery}isYasqeRenderMode(){return s.RenderingMode.YASQE===this.getSelectedYasguiRenderMode()}isYasrRenderMode(){return s.RenderingMode.YASR===this.getSelectedYasguiRenderMode()}getName(){return this.similarityIndex.name}setName(e){this.similarityIndex.name=e}setInputIndex(e){this.similarityIndex.inputIndex=e}getInputIndex(){return this.similarityIndex.inputIndex}setLiteralIndex(e=!1){this.similarityIndex.isLiteralIndex=e}getSimilarityIndex(){return this.similarityIndex}setStopList(e){this.similarityIndex.stopList=e}getStopList(){return this.similarityIndex.stopList}setAnalyzer(e="org.apache.lucene.analysis.en.EnglishAnalyzer"){this.similarityIndex.analyzer=e}getAnalyzer(){return this.similarityIndex.analyzer}setType(e){this.similarityIndex.type=e}getType(){return this.similarityIndex.type}setOptions(e){this.similarityIndex.options=e}getOptions(){return this.similarityIndex.options}getInference(){return this.similarityIndex.infer}getSameAs(){return this.similarityIndex.sameAs}}},223:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityViewMode",(function(){return r}));const r={CREATE:"CREATE",EDIT:"EDIT",CLONE:"CLONE"}},245:function(e,i,t){"use strict";t.r(i);t(68),t(10),t(15);var r=t(105),n=t(14),s=t(65),a=t(67),y=t(223),o=t(104),l=t(70),d=t(221),u=t(94),c=t(222);function I(e,i,t,I,m,S,p,h,T,x,g,Q,E,A,f,v){e.productInfo=h,e.SimilarityQueryType=o.SimilarityQueryType,e.SimilarityIndexType=l.SimilarityIndexType,e.similarityIndexInfo=void 0,e.samples=void 0,e.yasguiConfig=void 0,e.saveOrUpdateExecuted=!1,e.loadingControllerResources=!1,e.helpHidden=1===g.get(Q.HIDE_SIMILARITY_HELP);let R=!1,L=void 0,w=void 0,C=void 0,M=y.SimilarityViewMode.CREATE;e.changeSimilarityIndexType=(i,t=o.SimilarityQueryType.DATA)=>{e.similarityIndexInfo.setType(i),e.similarityIndexInfo.isPredicationType()?e.samples=w[l.SimilarityIndexType.PREDICATION]:e.samples=w[l.SimilarityIndexType.TEXT],e.changeQueryTab(t).then(i=>{P(e.similarityIndexInfo),e.setEditorQuery(e.similarityIndexInfo.getQuery())})},e.changeQueryTab=i=>{const t=e.similarityIndexInfo.getSelectedQueryType();return t===i?Promise.resolve():(e.similarityIndexInfo.setSelectedQueryType(i),D(e.similarityIndexInfo,t).then(e=>Z(e,t)).then(e=>K(e,t)).catch(e=>{e instanceof d.SimilarityIndexError||console.log(e)}).finally(()=>{const i=H();e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASQE),i.changeRenderMode(e.similarityIndexInfo.getSelectedYasguiRenderMode()),e.similarityIndexInfo.isDataQueryTypeSelected()?i.showYasqeActionButton([n.YasqeButtonName.INFER_STATEMENTS,n.YasqeButtonName.EXPANDS_RESULTS]):i.hideYasqeActionButton([n.YasqeButtonName.INFER_STATEMENTS,n.YasqeButtonName.EXPANDS_RESULTS]),i.setQuery(e.similarityIndexInfo.getQuery())}))},e.createSimilarityIndex=()=>{e.saveOrUpdateExecuted=!0,D(e.similarityIndexInfo).then(Z).then(K).then(z).then(k).then(e=>_(e.getSimilarityIndex())).catch(e=>{e instanceof d.SimilarityIndexError||i.error(getError(e),E.instant("similarity.could.not.get.indexes.error"))})},e.viewQuery=()=>{D(e.similarityIndexInfo).then(z).then(N).then(O).catch(e=>i.error(getError(e)))},e.preview=()=>{D(e.similarityIndexInfo).then(K).then(Z).then(()=>{const i=H();e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASR),i.query(e.similarityIndexInfo.getSelectedYasguiRenderMode())})},e.saveSearchQuery=function(){e.saveOrUpdateExecuted=!0,R||V(),e.saveOrUpdateExecuted=!0,D(e.similarityIndexInfo).then(F).then(Z).then(K).then(X).then(J).then(b).then(U).catch(e=>{e instanceof d.SimilarityIndexError||i.error(getError(e),E.instant("similarity.change.query.error"))})},e.setEditorQuery=i=>{e.similarityIndexInfo.markInvalidQuery(void 0,!1),e.similarityIndexInfo.markInvalidQueryType(void 0,!1),e.yasguiConfig?H().setQuery(i):q({initialQuery:i||" "})},e.similarityIndexNameChanged=()=>{e.setDirty(),e.similarityIndexInfo.isNameExist=!1},e.queryChanged=()=>{e.setDirty(),e.similarityIndexInfo.markInvalidQuery(void 0,!1),e.similarityIndexInfo.markInvalidQueryType(void 0,!1)},e.isCloneViewMode=()=>y.SimilarityViewMode.CLONE===M,e.isEditViewMode=()=>y.SimilarityViewMode.EDIT===M,e.isCreateViewMode=()=>y.SimilarityViewMode.CREATE===M,e.setDirty=()=>{R=!0},e.isYasqeShown=()=>e.similarityIndexInfo&&e.similarityIndexInfo.isYasqeRenderMode(),e.isYasrShown=()=>e.similarityIndexInfo&&e.similarityIndexInfo.isYasrRenderMode(),e.showEditor=()=>{const i=H();i.abortQuery().then(()=>i.setQuery(e.similarityIndexInfo.getQuery())).then(()=>(e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASQE),i.changeRenderMode(e.similarityIndexInfo.getSelectedYasguiRenderMode())))},e.toggleHelp=i=>{void 0===i&&(i=g.get(Q.HIDE_SIMILARITY_HELP)),1!==i?(g.set(Q.HIDE_SIMILARITY_HELP,1),e.helpHidden=!0):(g.set(Q.HIDE_SIMILARITY_HELP,0),e.helpHidden=!1)},e.getCloseBtnMsg=function(){let i=e.editSearchQuery?E.instant("similarity.query.edition.msg"):E.instant("similarity.index.creation.msg");return E.instant("similarity.close.btn.msg",{operation:i})},e.hasQueryError=()=>{const i=e.similarityIndexInfo.getSelectedQueryType();return o.SimilarityQueryType.DATA===i?e.hasSelectQueryError():o.SimilarityQueryType.SEARCH===i?e.hasSearchQueryError():o.SimilarityQueryType.ANALOGICAL===i&&e.hasAnalogicalQueryError()},e.hasSelectQueryError=()=>!e.similarityIndexInfo.hasSelectQuery()||e.similarityIndexInfo.invalidSelectQuery||e.similarityIndexInfo.invalidSelectQueryType,e.hasSearchQueryError=()=>!e.similarityIndexInfo.hasSearchQuery()||e.similarityIndexInfo.invalidSearchQuery||e.similarityIndexInfo.invalidSearchQueryType,e.hasAnalogicalQueryError=()=>!e.similarityIndexInfo.hasAnalogicalQuery()||e.similarityIndexInfo.invalidAnalogicalQuery||e.similarityIndexInfo.invalidAnalogicalQueryType,e.getQueryErrorMessage=()=>{const i=e.similarityIndexInfo.getSelectedQueryType();let t=!1,r=!1,n=!1;o.SimilarityQueryType.DATA===i?(t=!e.similarityIndexInfo.hasSelectQuery(),r=e.similarityIndexInfo.invalidSelectQueryType,n=e.similarityIndexInfo.invalidSelectQuery):o.SimilarityQueryType.SEARCH===i?(t=!e.similarityIndexInfo.hasSearchQuery(),r=e.similarityIndexInfo.invalidSearchQueryType,n=e.similarityIndexInfo.invalidSearchQuery):o.SimilarityQueryType.ANALOGICAL===i&&(t=!e.similarityIndexInfo.hasAnalogicalQuery(),r=e.similarityIndexInfo.invalidAnalogicalQueryType,n=e.similarityIndexInfo.invalidAnalogicalQuery);const s={queryType:E.instant(`similarity.query.type.${i}.name`)};return t?E.instant("similarity.error.query.empty",s):n?E.instant("similarity.error.query.invalid",s):r?E.instant("similarity.error.query.invalid_type",s):""};const D=(e,i)=>H().getQuery().then(t=>e.setQuery(t,i)).then(()=>e),N=e=>m.getQuery({indexName:e.getName(),indexOptions:e.getOptions(),query:e.getQuery(),indexStopList:e.getStopList(),queryInference:e.getInference(),querySameAs:e.getSameAs(),viewType:e.getSelectedQueryType(),indexAnalyzer:e.getAnalyzer()}).then(e=>e.data),O=e=>{e&&t.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})},P=i=>{const t=i.getType();if(!e.isEditViewMode()&&L&&(i.setQuery(L[t],o.SimilarityQueryType.SEARCH),i.setQuery(L.analogical,o.SimilarityQueryType.ANALOGICAL)),w)if(l.SimilarityIndexType.PREDICATION===t){const e=w[l.SimilarityIndexType.PREDICATION].predication;i.setQuery(e,o.SimilarityQueryType.DATA)}else{const e=w[l.SimilarityIndexType.TEXT].literals;i.setQuery(e,o.SimilarityQueryType.DATA)}},Y=()=>{const t=new c.SimilarityIndexInfo;t.setName(G()),t.setType(j()),t.setSelectedQueryType(e.isEditViewMode()?o.SimilarityQueryType.SEARCH:o.SimilarityQueryType.DATA);const n=p.search().options;n?t.setOptions(n):t.setOptions(t.isTextType()?"-termweight idf":""),P(t);const s=p.search().searchQuery;s&&t.setQuery(s,o.SimilarityQueryType.SEARCH);const a=p.search().selectQuery;a&&t.setQuery(a,o.SimilarityQueryType.DATA);const y=p.search().analogicalQuery;if(y&&t.setQuery(y,o.SimilarityQueryType.ANALOGICAL),t.isTextType()){t.setStopList(p.search().stopList),t.setAnalyzer(p.search().analyzer);const e=$(t.getSimilarityIndex(),"-literal_index");void 0!==e&&t.setLiteralIndex(e)}return t.isPredicationType()?m.getIndexes().then(i=>{const n=Object(r.mapIndexesResponseToSimilarityIndex)(i.data).filter(e=>e.isTextLiteralType()&&(e.isBuiltStatus()||e.isOutdatedStatus())).map(e=>e.name);if(e.literalIndexes=["no-index"].concat(n),void 0===t.getInputIndex()){const i=$(t.getSimilarityIndex(),"-input_index");if(void 0!==i)for(let r=0;r<e.literalIndexes.length;r++)i===e.literalIndexes[r]&&t.setInputIndex(e.literalIndexes[r])}return void 0===t.getInputIndex()&&t.setInputIndex(e.literalIndexes[0]),t}).catch((function(e){const t=getError(e);i.error(t,E.instant("similarity.could.not.get.indexes.error"))})):Promise.resolve(t)},q=i=>{const t={endpoint:B,componentId:"create-index",showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showYasqeActionButtons:!1,showQueryButton:!1,downloadAsOn:!1,showResultInfo:!1,showYasqeResizer:!1,pageSize:100,prefixes:C,render:e.similarityIndexInfo.getSelectedYasguiRenderMode(),yasqeActionButtons:e.isEditViewMode()||!e.similarityIndexInfo.isDataQueryTypeSelected()?n.DISABLE_YASQE_BUTTONS_CONFIGURATION:n.INFERRED_AND_SAME_AS_BUTTONS_CONFIGURATION,maxPersistentResponseSize:0,yasqeMode:e.canWriteActiveRepo()?a.YasqeMode.WRITE:a.YasqeMode.PROTECTED},r={};angular.extend(r,t,i),e.yasguiConfig=r},B=()=>"repositories/"+A.getActiveRepository(),_=t=>{if(void 0!==e.literalIndexes){const i=t.inputIndex;i!==e.literalIndexes[0]&&(t.options=t.options+(""===t.options?"":" ")+"-input_index "+i)}return"true"===t.isLiteralIndex&&(t.options=t.options+(""===t.options?"":" ")+"-literal_index true",t.type=l.SimilarityIndexType.TEXT_LITERAL),V(),R=!1,m.createIndex("POST",t.name,t.options,t.selectQuery,t.searchQuery,t.isPredicationType()?t.analogicalQuery:"",t.stopList,t.infer,t.sameAs,t.type,t.analyzer).then(()=>(i.success(E.instant("similarity.create.index.successfully")),t)).catch((function(e){const t=getError(e);return i.error(t,E.instant("similarity.create.index.error")),console.log(t),Promise.reject(new d.SimilarityIndexError("Could not create index."))}))},U=async e=>{await T.showToastMessageWithDelay(e?"similarity.changed.search.query.msg":"similarity.changed.analogical.query.msg"),p.url("similarity")},b=e=>{const i=e.isSearchQueryTypeSelected();let t={name:e.getSimilarityIndex().name,changedQuery:e.getQuery(),isSearchQuery:i};return m.saveSearchQuery(JSON.stringify(t)).then(()=>(R=!1,i))},V=()=>{setTimeout(()=>p.url("similarity"),100)},H=()=>n.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor"),G=()=>{const i=p.search().name||"";return e.isCloneViewMode()?`${E.instant("similarity.copy_of.prefix")}_${i}`:i},j=()=>{const e=p.search().type;return void 0===e||e.startsWith("text")?l.SimilarityIndexType.TEXT:e},$=(e,i)=>{const t=e.options.split(" ");for(let r=0;r<t.length;r++)if(t[r]===i&&r+1<t.length){const i=t[r+1];return delete t[r],delete t[r+1],e.options=t.join(" "),i}},z=e=>Promise.all([F(e).then(W).then(X).then(J).then(K).then(Z)]).then(()=>e),k=e=>m.getIndexes().then(i=>i.data.some(i=>i.name===e.getName())?(e.isNameExist=!0,Promise.reject(new d.SimilarityIndexError("Similarity index name exists."))):e),F=e=>e.getSimilarityIndex().name?e.isNameValid()?Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Invalid similarity name.")):Promise.reject(new d.SimilarityIndexError("Missing similarity name.")),W=e=>e.hasSelectQuery()?e.invalidSelectQuery?Promise.reject(new d.SimilarityIndexError("Invalid select query")):e.invalidSelectQueryType?Promise.reject(new d.SimilarityIndexError("Invalid select query type")):Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Missing select query.")),X=e=>e.hasSearchQuery()?e.invalidSearchQuery?Promise.reject(new d.SimilarityIndexError("Invalid search query")):e.invalidSearchQueryType?Promise.reject(new d.SimilarityIndexError("Invalid search query type")):Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Missing search query.")),J=e=>e.isPredicationType()&&!e.hasAnalogicalQuery()?Promise.reject(new d.SimilarityIndexError("Missing analogical query.")):e.invalidAnalogicalQuery?Promise.reject(new d.SimilarityIndexError("Invalid analogical query")):e.invalidAnalogicalQueryType?Promise.reject(new d.SimilarityIndexError("Invalid analogical query type")):Promise.resolve(e),K=(e,i)=>H().getQueryType().then(t=>u.QueryType.SELECT!==t?(e.markInvalidQueryType(i),Promise.reject(new d.SimilarityIndexError("Query type is not valid."))):(e.markInvalidQueryType(i,!1),e)),Z=(e,i)=>H().isQueryValid().then(t=>t?(e.markInvalidQuery(i,!1),e):(e.markInvalidQuery(i),Promise.reject(new d.SimilarityIndexError("Query is not valid.")))),ee=(e,i,t,r)=>{v.openSimpleModal({title:e,message:i,warning:!0}).result.then((function(){angular.isFunction(t)&&t()}),(function(){angular.isFunction(r)&&r()}))},ie=()=>{e.isYasrShown()&&e.similarityIndexInfo.isDataQueryTypeSelected()&&e.showEditor(),e.canEditActiveRepo=e.canWriteActiveRepo();const i={...e.yasguiConfig,yasqeMode:e.canWriteActiveRepo()};q(i)},te=e=>{R&&(e.returnValue=!0)},re=()=>{window.removeEventListener("beforeunload",te),ne.forEach(e=>e())},ne=[];ne.push(f.subscribe("repositoryWillChangeEvent",i=>new Promise((function(t){if(e.isCreateViewMode()||e.isCloneViewMode())return void t(i);const r=()=>{R=!1,V(),t(i)};if(R){const e=()=>{i.cancel=!0,t(i)},n=E.instant("common.confirm"),s=E.instant("similarity.warning.unsaved.changes");ee(n,s,r,e)}else r()})))),ne.push(e.$on("$locationChangeStart",(e,i)=>{if(R){e.preventDefault();const t=E.instant("common.confirm"),r=E.instant("similarity.warning.unsaved.changes");ee(t,r,()=>{re();const e=p.absUrl().length-p.url().length,t=i.substring(e);p.path(t)})}else re()})),ne.push(e.$on("$destroy",re)),window.addEventListener("beforeunload",te),M=(()=>{if(void 0===p.search().name)return y.SimilarityViewMode.CREATE;const e=p.search().editSearchQuery;return void 0===e?y.SimilarityViewMode.CLONE:"string"==typeof e?"false"===e?y.SimilarityViewMode.CLONE:y.SimilarityViewMode.EDIT:e?y.SimilarityViewMode.EDIT:y.SimilarityViewMode.CLONE})();const se=e.$watch((function(){return e.getActiveRepositoryObject()}),(function(i){i&&(e.loadingControllerResources=!0,Promise.all([m.getSearchQueries(),m.getSamples(),A.getPrefixes(i.id)]).then(([i,t,r])=>{e.canEditActiveRepo=e.canWriteActiveRepo(),L=i?i.data:[],w=t?t.data:[],C=r,Y().then(i=>{e.similarityIndexInfo=i;let t=o.SimilarityQueryType.DATA;e.isEditViewMode()&&(t=o.SimilarityQueryType.SEARCH),e.changeSimilarityIndexType(i.getType(),t)})}).catch(i=>{console.log(i),e.repositoryError=getError(i)}).finally(()=>{ne.push(e.$on("repositoryIsSet",ie)),se(),e.loadingControllerResources=!1}))}))}angular.module("graphdb.framework.similarity.controllers.create",["graphdb.framework.utils.notifications","graphdb.framework.utils.localstorageadapter"]).controller("CreateSimilarityIdxCtrl",I),I.$inject=["$scope","toastr","$uibModal","$timeout","SimilarityRestService","SparqlRestService","$location","productInfo","Notifications","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","$translate","$repositories","EventEmitterService","ModalService"]},65:function(e,i,t){"use strict";t.r(i),t.d(i,"RenderingMode",(function(){return r}));const r={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},67:function(e,i,t){"use strict";t.r(i),t.d(i,"YasqeMode",(function(){return r}));const r={WRITE:"WRITE",READ:"READ",PROTECTED:"PROTECTED"}},68:function(e,i){function t(e,i){return{showToastMessageWithDelay:function(t){return new Promise(r=>{e.success(i.instant(t)),setTimeout(r,200)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",t),t.$inject=["toastr","$translate"]},70:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexType",(function(){return r}));const r={TEXT:"text",TEXT_LITERAL:"textLiteral",PREDICATION:"predication",isTextType:e=>r.TEXT===e,isTextLiteralType:e=>r.TEXT_LITERAL===e,isPredicationType:e=>r.PREDICATION===e}},72:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexStatus",(function(){return r}));const r={CREATING:"CREATING",BUILDING:"BUILDING",BUILT:"BUILT",REBUILDING:"REBUILDING",OUTDATED:"OUTDATED",INTERRUPTED:"INTERRUPTED",OBSOLETE:"OBSOLETE",FAILED:"FAILED",isCreatingStatus:e=>r.CREATING===e,isBuildingStatus:e=>r.BUILDING===e,isBuiltStatus:e=>r.BUILT===e,isRebuildingStatus:e=>r.REBUILDING===e,isOutdatedStatus:e=>r.OUTDATED===e,isInterruptedStatus:e=>r.INTERRUPTED===e,isObsoleteStatus:e=>r.OBSOLETE===e,isFailedStatus:e=>r.FAILED===e}},77:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndex",(function(){return s}));var r=t(70),n=t(72);class s{constructor(){this.analyzer="",this.infer=!0,this.options="",this.sameAs=!0,this.searchQuery="",this.selectQuery="",this.stopList=void 0,this.name="",this.type=r.SimilarityIndexType.TEXT,this.status=void 0,this.analogicalQuery=void 0,this.inputIndex=void 0,this.isLiteralIndex=""}isTextType(){return r.SimilarityIndexType.isTextType(this.type)}isTextLiteralType(){return r.SimilarityIndexType.isTextLiteralType(this.type)}isPredicationType(){return r.SimilarityIndexType.isPredicationType(this.type)}isCreatingStatus(){return n.SimilarityIndexStatus.isCreatingStatus(this.status)}isBuildingStatus(){return n.SimilarityIndexStatus.isBuildingStatus(this.status)}isBuiltStatus(){return n.SimilarityIndexStatus.isBuiltStatus(this.status)}isRebuildingStatus(){return n.SimilarityIndexStatus.isRebuildingStatus(this.status)}isOutdatedStatus(){return n.SimilarityIndexStatus.isOutdatedStatus(this.status)}isInterruptedStatus(){return n.SimilarityIndexStatus.isInterruptedStatus(this.status)}isObsoleteStatus(){return n.SimilarityIndexStatus.isObsoleteStatus(this.status)}isFailedStatus(){return n.SimilarityIndexStatus.isFailedStatus(this.status)}}}}]);
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[10,34,46,55,194,202,214,215,216,217,220,273],{104:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityQueryType",(function(){return r}));const r={DATA:"DATA",SEARCH:"SEARCH",ANALOGICAL:"ANALOGICAL"}},105:function(e,i,t){"use strict";t.r(i),t.d(i,"mapIndexesResponseToSimilarityIndex",(function(){return n}));var r=t(77);const n=e=>e.map(e=>{const i=new r.SimilarityIndex;return i.type=e.type,i.stopList=e.stopList,i.status=e.status,i.selectQuery=e.selectQuery,i.searchQuery=e.searchQuery,i.sameAs=e.sameAs,i.options=e.options,i.name=e.name,i.infer=e.infer,i.analyzer=e.analyzer,i.analogicalQuery=e.analogicalQuery,i})},220:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexError",(function(){return r}));class r extends Error{}},221:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexInfo",(function(){return y}));var r=t(77),n=t(104),s=t(65);const a=new RegExp("^[a-zA-Z0-9-_]+$");class y{constructor(){this.similarityIndex=new r.SimilarityIndex,this.isNameExist=!1,this.invalidSelectQueryType=!1,this.invalidSelectQuery=!1,this.invalidSearchQueryType=!1,this.invalidSearchQuery=!1,this.invalidAnalogicalQueryType=!1,this.invalidAnalogicalQuery=!1,this.selectedQueryType=n.SimilarityQueryType.DATA,this.selectedYasguiRenderMode=s.RenderingMode.YASQE}setQuery(e,i){const t=i||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.similarityIndex.analogicalQuery=e):this.similarityIndex.searchQuery=e:this.similarityIndex.selectQuery=e}getQuery(e){switch(e||this.selectedQueryType){case n.SimilarityQueryType.DATA:return this.similarityIndex.selectQuery;case n.SimilarityQueryType.SEARCH:return this.similarityIndex.searchQuery;case n.SimilarityQueryType.ANALOGICAL:return this.similarityIndex.analogicalQuery}}markInvalidQuery(e,i=!0){const t=e||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.invalidAnalogicalQuery=i):this.invalidSearchQuery=i:this.invalidSelectQuery=i}markInvalidQueryType(e,i=!0){const t=e||this.selectedQueryType;n.SimilarityQueryType.DATA!==t?n.SimilarityQueryType.SEARCH!==t?n.SimilarityQueryType.ANALOGICAL===t&&(this.invalidAnalogicalQueryType=i):this.invalidSearchQueryType=i:this.invalidSelectQueryType=i}setSelectedQueryType(e){this.selectedQueryType=e}getSelectedQueryType(){return this.selectedQueryType}setSelectedYasguiRenderMode(e){this.selectedYasguiRenderMode=e}getSelectedYasguiRenderMode(){return this.selectedYasguiRenderMode}isDataQueryTypeSelected(){return n.SimilarityQueryType.DATA===this.selectedQueryType}isSearchQueryTypeSelected(){return n.SimilarityQueryType.SEARCH===this.selectedQueryType}isAnalogicalQueryTypeSelected(){return n.SimilarityQueryType.ANALOGICAL===this.selectedQueryType}isTextType(){return this.similarityIndex.isTextType()}isPredicationType(){return this.similarityIndex.isPredicationType()}isTextLiteralType(){return this.similarityIndex.isTextLiteralType()}hasName(){return!!this.similarityIndex.name}isNameValid(){return a.test(this.similarityIndex.name)}hasSelectQuery(){return!!this.similarityIndex.selectQuery}hasSearchQuery(){return!!this.similarityIndex.searchQuery}hasAnalogicalQuery(){return!!this.similarityIndex.analogicalQuery}isYasqeRenderMode(){return s.RenderingMode.YASQE===this.getSelectedYasguiRenderMode()}isYasrRenderMode(){return s.RenderingMode.YASR===this.getSelectedYasguiRenderMode()}getName(){return this.similarityIndex.name}setName(e){this.similarityIndex.name=e}setInputIndex(e){this.similarityIndex.inputIndex=e}getInputIndex(){return this.similarityIndex.inputIndex}setLiteralIndex(e=!1){this.similarityIndex.isLiteralIndex=e}getSimilarityIndex(){return this.similarityIndex}setStopList(e){this.similarityIndex.stopList=e}getStopList(){return this.similarityIndex.stopList}setAnalyzer(e="org.apache.lucene.analysis.en.EnglishAnalyzer"){this.similarityIndex.analyzer=e}getAnalyzer(){return this.similarityIndex.analyzer}setType(e){this.similarityIndex.type=e}getType(){return this.similarityIndex.type}setOptions(e){this.similarityIndex.options=e}getOptions(){return this.similarityIndex.options}getInference(){return this.similarityIndex.infer}getSameAs(){return this.similarityIndex.sameAs}}},222:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityViewMode",(function(){return r}));const r={CREATE:"CREATE",EDIT:"EDIT",CLONE:"CLONE"}},244:function(e,i,t){"use strict";t.r(i);t(68),t(10),t(15);var r=t(105),n=t(14),s=t(65),a=t(67),y=t(222),o=t(104),l=t(70),d=t(220),u=t(94),c=t(221);function I(e,i,t,I,m,S,p,h,T,x,g,Q,E,A,f,v){e.productInfo=h,e.SimilarityQueryType=o.SimilarityQueryType,e.SimilarityIndexType=l.SimilarityIndexType,e.similarityIndexInfo=void 0,e.samples=void 0,e.yasguiConfig=void 0,e.saveOrUpdateExecuted=!1,e.loadingControllerResources=!1,e.helpHidden=1===g.get(Q.HIDE_SIMILARITY_HELP);let R=!1,L=void 0,w=void 0,C=void 0,M=y.SimilarityViewMode.CREATE;e.changeSimilarityIndexType=(i,t=o.SimilarityQueryType.DATA)=>{e.similarityIndexInfo.setType(i),e.similarityIndexInfo.isPredicationType()?e.samples=w[l.SimilarityIndexType.PREDICATION]:e.samples=w[l.SimilarityIndexType.TEXT],e.changeQueryTab(t).then(i=>{P(e.similarityIndexInfo),e.setEditorQuery(e.similarityIndexInfo.getQuery())})},e.changeQueryTab=i=>{const t=e.similarityIndexInfo.getSelectedQueryType();return t===i?Promise.resolve():(e.similarityIndexInfo.setSelectedQueryType(i),D(e.similarityIndexInfo,t).then(e=>Z(e,t)).then(e=>K(e,t)).catch(e=>{e instanceof d.SimilarityIndexError||console.log(e)}).finally(()=>{const i=H();e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASQE),i.changeRenderMode(e.similarityIndexInfo.getSelectedYasguiRenderMode()),e.similarityIndexInfo.isDataQueryTypeSelected()?i.showYasqeActionButton([n.YasqeButtonName.INFER_STATEMENTS,n.YasqeButtonName.EXPANDS_RESULTS]):i.hideYasqeActionButton([n.YasqeButtonName.INFER_STATEMENTS,n.YasqeButtonName.EXPANDS_RESULTS]),i.setQuery(e.similarityIndexInfo.getQuery())}))},e.createSimilarityIndex=()=>{e.saveOrUpdateExecuted=!0,D(e.similarityIndexInfo).then(Z).then(K).then(z).then(k).then(e=>_(e.getSimilarityIndex())).catch(e=>{e instanceof d.SimilarityIndexError||i.error(getError(e),E.instant("similarity.could.not.get.indexes.error"))})},e.viewQuery=()=>{D(e.similarityIndexInfo).then(z).then(N).then(O).catch(e=>i.error(getError(e)))},e.preview=()=>{D(e.similarityIndexInfo).then(K).then(Z).then(()=>{const i=H();e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASR),i.query(e.similarityIndexInfo.getSelectedYasguiRenderMode())})},e.saveSearchQuery=function(){e.saveOrUpdateExecuted=!0,R||V(),e.saveOrUpdateExecuted=!0,D(e.similarityIndexInfo).then(F).then(Z).then(K).then(X).then(J).then(b).then(U).catch(e=>{e instanceof d.SimilarityIndexError||i.error(getError(e),E.instant("similarity.change.query.error"))})},e.setEditorQuery=i=>{e.similarityIndexInfo.markInvalidQuery(void 0,!1),e.similarityIndexInfo.markInvalidQueryType(void 0,!1),e.yasguiConfig?H().setQuery(i):q({initialQuery:i||" "})},e.similarityIndexNameChanged=()=>{e.setDirty(),e.similarityIndexInfo.isNameExist=!1},e.queryChanged=()=>{e.setDirty(),e.similarityIndexInfo.markInvalidQuery(void 0,!1),e.similarityIndexInfo.markInvalidQueryType(void 0,!1)},e.isCloneViewMode=()=>y.SimilarityViewMode.CLONE===M,e.isEditViewMode=()=>y.SimilarityViewMode.EDIT===M,e.isCreateViewMode=()=>y.SimilarityViewMode.CREATE===M,e.setDirty=()=>{R=!0},e.isYasqeShown=()=>e.similarityIndexInfo&&e.similarityIndexInfo.isYasqeRenderMode(),e.isYasrShown=()=>e.similarityIndexInfo&&e.similarityIndexInfo.isYasrRenderMode(),e.showEditor=()=>{const i=H();i.abortQuery().then(()=>i.setQuery(e.similarityIndexInfo.getQuery())).then(()=>(e.similarityIndexInfo.setSelectedYasguiRenderMode(s.RenderingMode.YASQE),i.changeRenderMode(e.similarityIndexInfo.getSelectedYasguiRenderMode())))},e.toggleHelp=i=>{void 0===i&&(i=g.get(Q.HIDE_SIMILARITY_HELP)),1!==i?(g.set(Q.HIDE_SIMILARITY_HELP,1),e.helpHidden=!0):(g.set(Q.HIDE_SIMILARITY_HELP,0),e.helpHidden=!1)},e.getCloseBtnMsg=function(){let i=e.editSearchQuery?E.instant("similarity.query.edition.msg"):E.instant("similarity.index.creation.msg");return E.instant("similarity.close.btn.msg",{operation:i})},e.hasQueryError=()=>{const i=e.similarityIndexInfo.getSelectedQueryType();return o.SimilarityQueryType.DATA===i?e.hasSelectQueryError():o.SimilarityQueryType.SEARCH===i?e.hasSearchQueryError():o.SimilarityQueryType.ANALOGICAL===i&&e.hasAnalogicalQueryError()},e.hasSelectQueryError=()=>!e.similarityIndexInfo.hasSelectQuery()||e.similarityIndexInfo.invalidSelectQuery||e.similarityIndexInfo.invalidSelectQueryType,e.hasSearchQueryError=()=>!e.similarityIndexInfo.hasSearchQuery()||e.similarityIndexInfo.invalidSearchQuery||e.similarityIndexInfo.invalidSearchQueryType,e.hasAnalogicalQueryError=()=>!e.similarityIndexInfo.hasAnalogicalQuery()||e.similarityIndexInfo.invalidAnalogicalQuery||e.similarityIndexInfo.invalidAnalogicalQueryType,e.getQueryErrorMessage=()=>{const i=e.similarityIndexInfo.getSelectedQueryType();let t=!1,r=!1,n=!1;o.SimilarityQueryType.DATA===i?(t=!e.similarityIndexInfo.hasSelectQuery(),r=e.similarityIndexInfo.invalidSelectQueryType,n=e.similarityIndexInfo.invalidSelectQuery):o.SimilarityQueryType.SEARCH===i?(t=!e.similarityIndexInfo.hasSearchQuery(),r=e.similarityIndexInfo.invalidSearchQueryType,n=e.similarityIndexInfo.invalidSearchQuery):o.SimilarityQueryType.ANALOGICAL===i&&(t=!e.similarityIndexInfo.hasAnalogicalQuery(),r=e.similarityIndexInfo.invalidAnalogicalQueryType,n=e.similarityIndexInfo.invalidAnalogicalQuery);const s={queryType:E.instant(`similarity.query.type.${i}.name`)};return t?E.instant("similarity.error.query.empty",s):n?E.instant("similarity.error.query.invalid",s):r?E.instant("similarity.error.query.invalid_type",s):""};const D=(e,i)=>H().getQuery().then(t=>e.setQuery(t,i)).then(()=>e),N=e=>m.getQuery({indexName:e.getName(),indexOptions:e.getOptions(),query:e.getQuery(),indexStopList:e.getStopList(),queryInference:e.getInference(),querySameAs:e.getSameAs(),viewType:e.getSelectedQueryType(),indexAnalyzer:e.getAnalyzer()}).then(e=>e.data),O=e=>{e&&t.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})},P=i=>{const t=i.getType();if(!e.isEditViewMode()&&L&&(i.setQuery(L[t],o.SimilarityQueryType.SEARCH),i.setQuery(L.analogical,o.SimilarityQueryType.ANALOGICAL)),w)if(l.SimilarityIndexType.PREDICATION===t){const e=w[l.SimilarityIndexType.PREDICATION].predication;i.setQuery(e,o.SimilarityQueryType.DATA)}else{const e=w[l.SimilarityIndexType.TEXT].literals;i.setQuery(e,o.SimilarityQueryType.DATA)}},Y=()=>{const t=new c.SimilarityIndexInfo;t.setName(G()),t.setType(j()),t.setSelectedQueryType(e.isEditViewMode()?o.SimilarityQueryType.SEARCH:o.SimilarityQueryType.DATA);const n=p.search().options;n?t.setOptions(n):t.setOptions(t.isTextType()?"-termweight idf":""),P(t);const s=p.search().searchQuery;s&&t.setQuery(s,o.SimilarityQueryType.SEARCH);const a=p.search().selectQuery;a&&t.setQuery(a,o.SimilarityQueryType.DATA);const y=p.search().analogicalQuery;if(y&&t.setQuery(y,o.SimilarityQueryType.ANALOGICAL),t.isTextType()){t.setStopList(p.search().stopList),t.setAnalyzer(p.search().analyzer);const e=$(t.getSimilarityIndex(),"-literal_index");void 0!==e&&t.setLiteralIndex(e)}return t.isPredicationType()?m.getIndexes().then(i=>{const n=Object(r.mapIndexesResponseToSimilarityIndex)(i.data).filter(e=>e.isTextLiteralType()&&(e.isBuiltStatus()||e.isOutdatedStatus())).map(e=>e.name);if(e.literalIndexes=["no-index"].concat(n),void 0===t.getInputIndex()){const i=$(t.getSimilarityIndex(),"-input_index");if(void 0!==i)for(let r=0;r<e.literalIndexes.length;r++)i===e.literalIndexes[r]&&t.setInputIndex(e.literalIndexes[r])}return void 0===t.getInputIndex()&&t.setInputIndex(e.literalIndexes[0]),t}).catch((function(e){const t=getError(e);i.error(t,E.instant("similarity.could.not.get.indexes.error"))})):Promise.resolve(t)},q=i=>{const t={endpoint:B,componentId:"create-index",showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showYasqeActionButtons:!1,showQueryButton:!1,downloadAsOn:!1,showResultInfo:!1,showYasqeResizer:!1,pageSize:100,prefixes:C,render:e.similarityIndexInfo.getSelectedYasguiRenderMode(),yasqeActionButtons:e.isEditViewMode()||!e.similarityIndexInfo.isDataQueryTypeSelected()?n.DISABLE_YASQE_BUTTONS_CONFIGURATION:n.INFERRED_AND_SAME_AS_BUTTONS_CONFIGURATION,maxPersistentResponseSize:0,yasqeMode:e.canWriteActiveRepo()?a.YasqeMode.WRITE:a.YasqeMode.PROTECTED},r={};angular.extend(r,t,i),e.yasguiConfig=r},B=()=>"repositories/"+A.getActiveRepository(),_=t=>{if(void 0!==e.literalIndexes){const i=t.inputIndex;i!==e.literalIndexes[0]&&(t.options=t.options+(""===t.options?"":" ")+"-input_index "+i)}return"true"===t.isLiteralIndex&&(t.options=t.options+(""===t.options?"":" ")+"-literal_index true",t.type=l.SimilarityIndexType.TEXT_LITERAL),V(),R=!1,m.createIndex("POST",t.name,t.options,t.selectQuery,t.searchQuery,t.isPredicationType()?t.analogicalQuery:"",t.stopList,t.infer,t.sameAs,t.type,t.analyzer).then(()=>(i.success(E.instant("similarity.create.index.successfully")),t)).catch((function(e){const t=getError(e);return i.error(t,E.instant("similarity.create.index.error")),console.log(t),Promise.reject(new d.SimilarityIndexError("Could not create index."))}))},U=async e=>{await T.showToastMessageWithDelay(e?"similarity.changed.search.query.msg":"similarity.changed.analogical.query.msg"),p.url("similarity")},b=e=>{const i=e.isSearchQueryTypeSelected();let t={name:e.getSimilarityIndex().name,changedQuery:e.getQuery(),isSearchQuery:i};return m.saveSearchQuery(JSON.stringify(t)).then(()=>(R=!1,i))},V=()=>{setTimeout(()=>p.url("similarity"),100)},H=()=>n.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor"),G=()=>{const i=p.search().name||"";return e.isCloneViewMode()?`${E.instant("similarity.copy_of.prefix")}_${i}`:i},j=()=>{const e=p.search().type;return void 0===e||e.startsWith("text")?l.SimilarityIndexType.TEXT:e},$=(e,i)=>{const t=e.options.split(" ");for(let r=0;r<t.length;r++)if(t[r]===i&&r+1<t.length){const i=t[r+1];return delete t[r],delete t[r+1],e.options=t.join(" "),i}},z=e=>Promise.all([F(e).then(W).then(X).then(J).then(K).then(Z)]).then(()=>e),k=e=>m.getIndexes().then(i=>i.data.some(i=>i.name===e.getName())?(e.isNameExist=!0,Promise.reject(new d.SimilarityIndexError("Similarity index name exists."))):e),F=e=>e.getSimilarityIndex().name?e.isNameValid()?Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Invalid similarity name.")):Promise.reject(new d.SimilarityIndexError("Missing similarity name.")),W=e=>e.hasSelectQuery()?e.invalidSelectQuery?Promise.reject(new d.SimilarityIndexError("Invalid select query")):e.invalidSelectQueryType?Promise.reject(new d.SimilarityIndexError("Invalid select query type")):Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Missing select query.")),X=e=>e.hasSearchQuery()?e.invalidSearchQuery?Promise.reject(new d.SimilarityIndexError("Invalid search query")):e.invalidSearchQueryType?Promise.reject(new d.SimilarityIndexError("Invalid search query type")):Promise.resolve(e):Promise.reject(new d.SimilarityIndexError("Missing search query.")),J=e=>e.isPredicationType()&&!e.hasAnalogicalQuery()?Promise.reject(new d.SimilarityIndexError("Missing analogical query.")):e.invalidAnalogicalQuery?Promise.reject(new d.SimilarityIndexError("Invalid analogical query")):e.invalidAnalogicalQueryType?Promise.reject(new d.SimilarityIndexError("Invalid analogical query type")):Promise.resolve(e),K=(e,i)=>H().getQueryType().then(t=>u.QueryType.SELECT!==t?(e.markInvalidQueryType(i),Promise.reject(new d.SimilarityIndexError("Query type is not valid."))):(e.markInvalidQueryType(i,!1),e)),Z=(e,i)=>H().isQueryValid().then(t=>t?(e.markInvalidQuery(i,!1),e):(e.markInvalidQuery(i),Promise.reject(new d.SimilarityIndexError("Query is not valid.")))),ee=(e,i,t,r)=>{v.openSimpleModal({title:e,message:i,warning:!0}).result.then((function(){angular.isFunction(t)&&t()}),(function(){angular.isFunction(r)&&r()}))},ie=()=>{e.isYasrShown()&&e.similarityIndexInfo.isDataQueryTypeSelected()&&e.showEditor(),e.canEditActiveRepo=e.canWriteActiveRepo();const i={...e.yasguiConfig,yasqeMode:e.canWriteActiveRepo()};q(i)},te=e=>{R&&(e.returnValue=!0)},re=()=>{window.removeEventListener("beforeunload",te),ne.forEach(e=>e())},ne=[];ne.push(f.subscribe("repositoryWillChangeEvent",i=>new Promise((function(t){if(e.isCreateViewMode()||e.isCloneViewMode())return void t(i);const r=()=>{R=!1,V(),t(i)};if(R){const e=()=>{i.cancel=!0,t(i)},n=E.instant("common.confirm"),s=E.instant("similarity.warning.unsaved.changes");ee(n,s,r,e)}else r()})))),ne.push(e.$on("$locationChangeStart",(e,i)=>{if(R){e.preventDefault();const t=E.instant("common.confirm"),r=E.instant("similarity.warning.unsaved.changes");ee(t,r,()=>{re();const e=p.absUrl().length-p.url().length,t=i.substring(e);p.path(t)})}else re()})),ne.push(e.$on("$destroy",re)),window.addEventListener("beforeunload",te),M=(()=>{if(void 0===p.search().name)return y.SimilarityViewMode.CREATE;const e=p.search().editSearchQuery;return void 0===e?y.SimilarityViewMode.CLONE:"string"==typeof e?"false"===e?y.SimilarityViewMode.CLONE:y.SimilarityViewMode.EDIT:e?y.SimilarityViewMode.EDIT:y.SimilarityViewMode.CLONE})();const se=e.$watch((function(){return e.getActiveRepositoryObject()}),(function(i){i&&(e.loadingControllerResources=!0,Promise.all([m.getSearchQueries(),m.getSamples(),A.getPrefixes(i.id)]).then(([i,t,r])=>{e.canEditActiveRepo=e.canWriteActiveRepo(),L=i?i.data:[],w=t?t.data:[],C=r,Y().then(i=>{e.similarityIndexInfo=i;let t=o.SimilarityQueryType.DATA;e.isEditViewMode()&&(t=o.SimilarityQueryType.SEARCH),e.changeSimilarityIndexType(i.getType(),t)})}).catch(i=>{console.log(i),e.repositoryError=getError(i)}).finally(()=>{ne.push(e.$on("repositoryIsSet",ie)),se(),e.loadingControllerResources=!1}))}))}angular.module("graphdb.framework.similarity.controllers.create",["graphdb.framework.utils.notifications","graphdb.framework.utils.localstorageadapter"]).controller("CreateSimilarityIdxCtrl",I),I.$inject=["$scope","toastr","$uibModal","$timeout","SimilarityRestService","SparqlRestService","$location","productInfo","Notifications","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","$translate","$repositories","EventEmitterService","ModalService"]},65:function(e,i,t){"use strict";t.r(i),t.d(i,"RenderingMode",(function(){return r}));const r={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},67:function(e,i,t){"use strict";t.r(i),t.d(i,"YasqeMode",(function(){return r}));const r={WRITE:"WRITE",READ:"READ",PROTECTED:"PROTECTED"}},68:function(e,i){function t(e,i){return{showToastMessageWithDelay:function(t){return new Promise(r=>{e.success(i.instant(t)),setTimeout(r,200)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",t),t.$inject=["toastr","$translate"]},70:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexType",(function(){return r}));const r={TEXT:"text",TEXT_LITERAL:"textLiteral",PREDICATION:"predication",isTextType:e=>r.TEXT===e,isTextLiteralType:e=>r.TEXT_LITERAL===e,isPredicationType:e=>r.PREDICATION===e}},72:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndexStatus",(function(){return r}));const r={CREATING:"CREATING",BUILDING:"BUILDING",BUILT:"BUILT",REBUILDING:"REBUILDING",OUTDATED:"OUTDATED",INTERRUPTED:"INTERRUPTED",OBSOLETE:"OBSOLETE",FAILED:"FAILED",isCreatingStatus:e=>r.CREATING===e,isBuildingStatus:e=>r.BUILDING===e,isBuiltStatus:e=>r.BUILT===e,isRebuildingStatus:e=>r.REBUILDING===e,isOutdatedStatus:e=>r.OUTDATED===e,isInterruptedStatus:e=>r.INTERRUPTED===e,isObsoleteStatus:e=>r.OBSOLETE===e,isFailedStatus:e=>r.FAILED===e}},77:function(e,i,t){"use strict";t.r(i),t.d(i,"SimilarityIndex",(function(){return s}));var r=t(70),n=t(72);class s{constructor(){this.analyzer="",this.infer=!0,this.options="",this.sameAs=!0,this.searchQuery="",this.selectQuery="",this.stopList=void 0,this.name="",this.type=r.SimilarityIndexType.TEXT,this.status=void 0,this.analogicalQuery=void 0,this.inputIndex=void 0,this.isLiteralIndex=""}isTextType(){return r.SimilarityIndexType.isTextType(this.type)}isTextLiteralType(){return r.SimilarityIndexType.isTextLiteralType(this.type)}isPredicationType(){return r.SimilarityIndexType.isPredicationType(this.type)}isCreatingStatus(){return n.SimilarityIndexStatus.isCreatingStatus(this.status)}isBuildingStatus(){return n.SimilarityIndexStatus.isBuildingStatus(this.status)}isBuiltStatus(){return n.SimilarityIndexStatus.isBuiltStatus(this.status)}isRebuildingStatus(){return n.SimilarityIndexStatus.isRebuildingStatus(this.status)}isOutdatedStatus(){return n.SimilarityIndexStatus.isOutdatedStatus(this.status)}isInterruptedStatus(){return n.SimilarityIndexStatus.isInterruptedStatus(this.status)}isObsoleteStatus(){return n.SimilarityIndexStatus.isObsoleteStatus(this.status)}isFailedStatus(){return n.SimilarityIndexStatus.isFailedStatus(this.status)}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[100],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[100],{253:function(e,r){PluginRegistry.add("route",{url:"/monitor/backup-and-restore",module:"graphdb.framework.monitoring.backupandrestore",path:"backup-and-restore/app",chunk:"monitor-backup-and-restore",controller:"BackupAndRestoreCtrl",templateUrl:"pages/monitor/backup-and-restore.html",title:"view.monitoring.backup_and_restore.title",helpInfo:"view.monitoring.backup_and_restore.helpInfo"}),PluginRegistry.add("main.menu",{items:[{label:"Backup and Restore",labelKey:"menu.backup_and_restore.label",href:"monitor/backup-and-restore",order:2,parent:"Monitor",guideSelector:"sub-menu-backup-and-restore"}]})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[102],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[102],{255:function(e,t){PluginRegistry.add("route",[{url:"/chatgpt",templateUrl:"js/angular/chatgpt/templates/chat.html",module:"graphdb.framework.chatgpt",path:"chatgpt/app",controller:"ChatGptCtrl",title:"menu.ttyg.label",helpInfo:"ttyg.helpInfo"}]),PluginRegistry.add("main.menu",{items:[{label:"Lab",labelKey:"menu.lab.label",href:"#",order:6,role:"IS_AUTHENTICATED_FULLY",icon:"fa fa-flask",guideSelector:"menu-lab"},{label:"Talk to Your Graph",labelKey:"menu.ttyg.label",href:"chatgpt",order:20,role:"ROLE_USER",parent:"Lab",guideSelector:"sub-menu-ttyg"}]})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[107],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[107],{257:function(e,t){PluginRegistry.add("route",[{url:"/cluster",module:"graphdb.framework.clustermanagement",chunk:"clustermanagement",path:"clustermanagement/app",controller:"ClusterManagementCtrl",templateUrl:"pages/cluster-management/clusterInfo.html",helpInfo:"view.clusterManagement.helpInfo",title:"view.clusterManagement.title"}]),PluginRegistry.add("main.menu",{items:[{label:"Cluster",labelKey:"menu.cluster.label",href:"cluster",order:20,role:"ROLE_USER",parent:"Setup",guideSelector:"sub-menu-cluster"}]})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[109],{79:function(t,r,e){"use strict";e.r(r);e(
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[109],{79:function(t,r,e){"use strict";e.r(r);e(34);function n(t,r,e,n,o){return{addLocation:function(){let t;return e.open({templateUrl:"js/angular/templates/modal/add-location.html",windowClass:"addLocationDialog",controller:"AddLocationFromClusterCtrl"}).result.then(e=>(t=e,t.isLocal=!1,t.endpoint=t.uri,function(t){let e;return n.addLocation(t).catch(t=>{const e=getError(t.data,t.status);return r.error(e,o.instant("common.error")),!1}).then(t=>!!t&&a()).then(r=>{if(!1!==r)return e=r.find(r=>r.endpoint===t.uri),e})}(t)))},getLocationsWithRpcAddresses:a};function a(){return n.getLocations().then((function(t){return t.data.map(t=>({isLocal:t.local,endpoint:t.uri,rpcAddress:t.rpcAddress||"",error:t.errorMsg}))})).catch((function(t){const e=getError(t.data,t.status);r.error(e,o.instant("common.error"))})).then(t=>{if(t)return function(t){const r=t.filter(t=>!t.isLocal&&!t.error).map(t=>function(t){return n.getLocationRpcAddress(t.endpoint)}(t).then(r=>(t.rpcAddress=r.data,t.isAvailable=!0,t)).catch(r=>{t.isAvailable=!1,t.error=getError(r.data,r.status)}));return Promise.allSettled(r).then(()=>t)}(t)})}}angular.module("graphdb.framework.clustermanagement.services.remote-locations",[]).factory("RemoteLocationsService",n),n.$inject=["$http","toastr","$uibModal","LocationsRestService","$translate"]}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[12,110,249,270],{170:function(e,t){angular.module("graphdb.framework.rest.export.service",[]).factory("ExportRestService",n),n.$inject=["$http","$repositories","$translate"];function n(e,t,n){return{getExportedStatementsAsJSONLD:function(t,n,o,r,a){const i=`repositories/${n.id}/statements?infer=false`,s={location:n.location},l={accept:a.accept};Array.isArray(t)?s.context=t.map(e=>decodeURIComponent(e)):t&&(s.context=decodeURIComponent(o[t.value].exportUri));r&&(s.authToken=r);a.link&&""!==a.link&&(l.link=a.link);return e({url:i,method:"GET",params:s,headers:l,responseType:"blob"}).then((function(e){const t=e.data;let n=e.headers()["content-disposition"].split("filename=")[1];return n=n.substring(0,n.length),{data:t,filename:n}}))}}}},241:function(e,t,n){"use strict";n.r(t);n(7),n(26),n(27),n(96),n(170);var o=n(463),r=n(0),a=n(64),i=n(86);angular.module("graphdb.framework.impex.export.controllers",["ngCookies","ui.bootstrap","toastr","graphdb.framework.core.services.repositories","graphdb.framework.core.services.jwtauth","graphdb.workbench.utils.filetypes","graphdb.framework.rest.export.service"]).controller("ExportCtrl",["$scope","$http","$location","$timeout","ModalService","filterFilter","$repositories","toastr","ExportRestService","RDF4JRepositoriesRestService","FileTypes","$translate","AuthTokenService","$uibModal",function(e,t,n,s,l,p,c,d,u,g,f,h,m,x){e.getActiveRepository=function(){return c.getActiveRepository()},e.exportFormats=f,e.deleting={},e.showExportDDTooltip=!0,e.page=1,e.pageSize=10,e.pageSizeOptions=[10,20,50,100],e.displayGraphs=[],e.exportFilter="",e.export=!0,e.exportMultipleGraphs=!1,e.repoExportFormat={name:"TriG",type:"application/x-trig",extension:".trig"},e.selectedGraphs={exportGraphs:{}},e.$watch((function(){return c.getActiveRepository()}),(function(){e.exportFilter="",e.getGraphs(),e.selectedAll=!1,s((function(){e.changePageSize(10)}),100)})),e.isShacl=function(e){return"http%3A%2F%2Frdf4j.org%2Fschema%2Frdf4j%23SHACLShapeGraph"===e},e.getGraphs=function(){e.getActiveRepository()?(e.loader=!0,g.getGraphs(e.getActiveRepository()).success((function(t){t.results.bindings.unshift({contextID:{type:"default",value:"import.default.graph"}}),e.graphsByValue={},Object.keys(t.results.bindings).forEach((function(n){const o=t.results.bindings[n];"bnode"===o.contextID.type?o.contextID.value="_:"+o.contextID.value:"default"===o.contextID.type?(o.contextID.uri=encodeURIComponent("http://www.openrdf.org/schema/sesame#nil"),o.contextID.clearUri="DEFAULT",o.contextID.exportUri="null",o.contextID.longName="default graph"):(o.contextID.uri=encodeURIComponent(o.contextID.value),o.contextID.clearUri="GRAPH <"+o.contextID.value+">",o.contextID.exportUri=encodeURIComponent("<"+o.contextID.value+">"),o.contextID.longName="named graph "+o.contextID.value),e.graphsByValue[o.contextID.value]=o.contextID})),e.graphs=t.results.bindings,e.filteredGraphs=Object(a.cloneDeep)(e.graphs),e.displayGraphs=e.filteredGraphs.slice(e.pageSize*(e.page-1),e.pageSize*e.page),e.loader=!1,e.selectedGraphs.exportGraphs={},e.matchedElements=e.graphs})).error((function(t,n){const o=getError(t,n);"There is no active location!"===o&&(c.setRepository(""),d.error(o,h.instant("common.error"))),e.loader=!1}))):e.loader=!1},e.onGraphSearch=function(){e.matchedElements=[],e.deselectAll(),e.filterResults()},e.filterResults=function(){angular.forEach(e.graphs,(function(t){-1!==t.contextID.value.indexOf(e.exportFilter)&&e.matchedElements.push(t)}))},e.downloadExport=function(e,t){let n=e+"&Accept="+encodeURIComponent(t.type);const o=m.getAuthToken();o&&(n=n+"&authToken="+encodeURIComponent(o));let r=window.open(n);s((function(){"about:blank"!==r.document.location.href&&(r.close(),d.error("Could not export graph. Check GraphDB logs for detailed reason."))}),100)},e.openExportDDTooltip=function(){e.showExportDDTooltip&&(s((function(){$("#tooltipTarget").trigger("showExportDDTooltip")}),0),s((function(){$("#tooltipTarget").trigger("showExportDDTooltip")}),3e3),e.showExportDDTooltip=!1)},e.exportRepo=function(t,n){"application/rdf+xml"===t.type||"text/plain"===t.type||"text/turtle"===t.type||"application/x-turtlestar"===t.type||"text/rdf+n3"===t.type?l.openSimpleModal({title:h.instant("common.warning"),message:Object(r.decodeHTML)(h.instant("export.format.warning.msg")),warning:!0}).result.then((function(){e.startDownload(t,n)})):e.startDownload(t,n)},e.openJSONLDExportSettings=function(t,n){x.open({templateUrl:"js/angular/core/components/export-settings-modal/exportSettingsModal.html",controller:i.ExportSettingsCtrl,size:"lg",scope:e,resolve:{format:function(){return t.name}}}).result.then((function(r){const a="framed"===r.currentMode.name?"frame":"context",i=r.link?`<${r.link}>; rel="http://www.w3.org/ns/json-ld#${a}"`:"";!function(e,t,n,r,a,i){const s={accept:e.type+";profile="+i.link,link:n};u.getExportedStatementsAsJSONLD(t,r,a,m.getAuthToken(),s).then((function({data:e,filename:t}){Object(o.saveAs)(e,t)})).catch((function(e){e.data.text().then(t=>{431===e.status?d.error(e.statusText,h.instant("common.error")):d.error(t,h.instant("common.error"))})}))}(t,n,i,c.getActiveRepositoryObject(),e.graphsByValue,r.currentMode)}))},e.startDownload=function(t,n){let o;const r=c.getActiveRepositoryObject();o=n?`repositories/${r.id}/statements?infer=false&context=${e.graphsByValue[n.value].exportUri}&location=${encodeURIComponent(r.location)}`:`repositories/${r.id}/statements?infer=false&location=${encodeURIComponent(r.location)}`,e.downloadExport(o,t)},e.hasMultipleSelected=function(){if(_.isEmpty(e.selectedGraphs.exportGraphs))return!_.isEmpty(e.selectedGraphs.exportGraphs);for(const t in e.selectedGraphs.exportGraphs)if(!0===e.selectedGraphs.exportGraphs[t])return!0;return!1},e.openJSONLDExportSettingsForSelectedGraphs=function(t){const n=Object.keys(e.selectedGraphs.exportGraphs).filter(t=>e.selectedGraphs.exportGraphs[t]).map(t=>e.graphsByValue[t].exportUri);n?e.openJSONLDExportSettings(t,n):l.openSimpleModal({title:h.instant("export.multiple.graph"),message:h.instant("export.check.graphs.msg"),warning:!0})},e.exportSelectedGraphs=function(t){let n="";for(const t in e.selectedGraphs.exportGraphs)e.selectedGraphs.exportGraphs[t]&&(n+="context="+e.graphsByValue[t].exportUri+"&");if(n){const o=function(){n=n.substring(0,n.length-1);const o="repositories/"+e.getActiveRepository()+"/statements?infer=false&"+n;e.downloadExport(o,t)};"application/rdf+xml"===t.type||"text/plain"===t.type||"text/turtle"===t.type||"application/x-turtlestar"===t.type||"text/rdf+n3"===t.type?l.openSimpleModal({title:h.instant("common.warning"),message:Object(r.decodeHTML)(h.instant("export.format.warning.msg")),warning:!0}).result.then((function(){o()})):o()}else l.openSimpleModal({title:h.instant("export.multiple.graph"),message:h.instant("export.check.graphs.msg"),warning:!0})},e.$watch("exportFilter",(function(){if(e.filteredGraphs=p(e.graphs,e.exportFilter),e.getActiveRepository()&&angular.element(document).find(".btn.btn-secondary.btn-sm.dropdown-toggle span").length){const t=angular.element(document).find(".btn.btn-secondary.btn-sm.dropdown-toggle span")[0].innerHTML.trim();let n;"All"===t&&(n=e.filteredGraphs.length),e.filteredGraphs&&e.filteredGraphs.length>e.pageSize&&"All"!==t&&(n=e.pageSize),e.changePageSize(n),e.changePagination()}})),e.changePagination=function(){e.selectedAll=!1,angular.isDefined(e.filteredGraphs)&&(e.displayGraphs=e.filteredGraphs.slice(e.pageSize*(e.page-1),e.pageSize*e.page))},e.changePageSize=function(t){$(".ot-graph-page-size").removeClass("active"),e.page=1,t&&(e.pageSize=t,e.changePagination()),e.filteredGraphs&&""!==e.exportFilter&&(e.displayGraphs=e.filteredGraphs)},e.checkAll=function(){e.selectedAll=e.selectedAll||!1,angular.forEach(e.displayGraphs,(function(t){t.contextID.uri&&(e.selectedGraphs.exportGraphs[t.contextID.value]=e.selectedAll)}))},e.deselectAll=function(){e.selectedAll=!1,angular.forEach(e.displayGraphs,(function(t){t.contextID.uri&&(e.selectedGraphs.exportGraphs[t.contextID.value]=!1)}))},e.dropRepository=function(){e.canWriteActiveRepo()&&(e.deleting["*"]=!0,l.openSimpleModal({title:h.instant("export.confirm.clear.msg"),message:h.instant("export.warning.clear.repo.msg",{repo:c.getActiveRepository()}),warning:!0}).result.then((function(){s((function(){g.addStatements(c.getActiveRepository(),"update=CLEAR ALL").then((function(){e.deleting["*"]=!1,d.success(h.instant("export.cleared.repo",{repo:c.getActiveRepository()})),e.getGraphs()}),(function(t){e.deleting["*"]=!1;const n=t.data;"string"==typeof n&&n.indexOf("Clearing all statements in the repository is incompatible with collecting history")>-1?d.error(h.instant("export.clearing.statements.warning")):d.error(h.instant("export.cleared.repo.failed.msg",{repo:c.getActiveRepository()}),t)}))}),100)})))},e.dropContext=function(t){e.canWriteActiveRepo()&&(angular.isDefined(t)?function(t){const n=t.contextID.longName;e.deleting[t]=!0,l.openSimpleModal({title:h.instant("export.confirm.clear.graph"),message:h.instant("export.clear.graph.warning",{longName:n}),warning:!0}).result.then((function(){s((function(){const o="update=CLEAR "+t.contextID.clearUri;g.addStatements(c.getActiveRepository(),o).then((function(){e.deleting[t]=!1,d.success(h.instant("export.cleared.graph",{longName:n})),e.getGraphs(),e.exportFilter="",e.filteredGraphs.length=0,e.updateResults(),e.changePageSize(e.pageSize)}),(function(o){e.deleting[t]=!1,d.error(h.instant("export.clear.graph.msg",{longName:n}),getError(o,o.status))}))}),100)}),(function(){e.deleting[t]=!1}))}(t):function(t){const n=[];angular.forEach(e.selectedGraphs.exportGraphs,(function(e,t){e&&n.push(t)})),n.length>0&&(e.deleting[t]=!0,l.openSimpleModal({title:h.instant("export.confirm.clear.graph"),message:h.instant("export.warning.clear.graph.msg"),warning:!0}).result.then((function(){s((function(){let t=0;angular.forEach(n,(function(o){const r="update=CLEAR "+e.graphsByValue[o].clearUri;g.addStatements(c.getActiveRepository(),r).then((function(){e.loader=!0,e.selectedGraphs.exportGraphs[o]=!1,delete e.selectedGraphs.exportGraphs[o],t++,n.length===t&&(e.selectedAll=!1,e.exportFilter="",e.filteredGraphs.length=0,e.getGraphs(),e.updateResults(),e.changePageSize(e.pageSize),d.success(h.instant("export.cleared.graph.msg")),e.loader=!1)}),(function(t){const n=e.graphsByValue[o].longName;d.error(h.instant("export.clear.graph.msg",{longName:n}),getError(t,t.status)),e.selectedAll=!1}))}))}),100)}),(function(){e.deleting[t]=!1})))}(t))}}])},462:function(e,t){(function(t){e.exports=t}).call(this,{})},463:function(e,t,n){var o,r=r||function(e){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var t=e.document,n=function(){return e.URL||e.webkitURL||e},o=t.createElementNS("http://www.w3.org/1999/xhtml","a"),r=e.webkitRequestFileSystem,a=e.requestFileSystem||r||e.mozRequestFileSystem,i=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},s=0,l=function(t){var o=function(){"string"==typeof t?n().revokeObjectURL(t):t.remove()};e.chrome?o():setTimeout(o,500)},p=function(e,t,n){for(var o=(t=[].concat(t)).length;o--;){var r=e["on"+t[o]];if("function"==typeof r)try{r.call(e,n||e)}catch(e){i(e)}}},c=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e},d=function(t,i){t=c(t);var d,u,g,f=this,h=t.type,m=!1,x=function(){p(f,"writestart progress write writeend".split(" "))},y=function(){(!m&&d||(d=n().createObjectURL(t)),u)?u.location.href=d:null==e.open(d,"_blank")&&"undefined"!=typeof safari&&(e.location.href=d);f.readyState=f.DONE,x(),l(d)},w=function(e){return function(){if(f.readyState!==f.DONE)return e.apply(this,arguments)}},S={create:!0,exclusive:!1};if(f.readyState=f.INIT,i||(i="download"),o)return d=n().createObjectURL(t),o.href=d,o.download=i,void setTimeout((function(){var e,t;e=o,t=new MouseEvent("click"),e.dispatchEvent(t),x(),l(d),f.readyState=f.DONE}));e.chrome&&h&&"application/octet-stream"!==h&&(g=t.slice||t.webkitSlice,t=g.call(t,0,t.size,"application/octet-stream"),m=!0),r&&"download"!==i&&(i+=".download"),("application/octet-stream"===h||r)&&(u=e),a?(s+=t.size,a(e.TEMPORARY,s,w((function(e){e.root.getDirectory("saved",S,w((function(e){var n=function(){e.getFile(i,S,w((function(e){e.createWriter(w((function(n){n.onwriteend=function(t){u.location.href=e.toURL(),f.readyState=f.DONE,p(f,"writeend",t),l(e)},n.onerror=function(){var e=n.error;e.code!==e.ABORT_ERR&&y()},"writestart progress write abort".split(" ").forEach((function(e){n["on"+e]=f["on"+e]})),n.write(t),f.abort=function(){n.abort(),f.readyState=f.DONE},f.readyState=f.WRITING})),y)})),y)};e.getFile(i,{create:!1},w((function(e){e.remove(),n()})),w((function(e){e.code===e.NOT_FOUND_ERR?n():y()})))})),y)})),y)):y()},u=d.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t){return navigator.msSaveOrOpenBlob(c(e),t)}:(u.abort=function(){this.readyState=this.DONE,p(this,"abort")},u.readyState=u.INIT=0,u.WRITING=1,u.DONE=2,u.error=u.onwritestart=u.onprogress=u.onwrite=u.onabort=u.onerror=u.onwriteend=null,function(e,t){return new d(e,t)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[11,110,249,270],{170:function(e,t){angular.module("graphdb.framework.rest.export.service",[]).factory("ExportRestService",n),n.$inject=["$http","$repositories","$translate"];function n(e,t,n){return{getExportedStatementsAsJSONLD:function(t,n,o,r,a){const i=`repositories/${n.id}/statements?infer=false`,s={location:n.location},l={accept:a.accept};Array.isArray(t)?s.context=t.map(e=>decodeURIComponent(e)):t&&(s.context=decodeURIComponent(o[t.value].exportUri));r&&(s.authToken=r);a.link&&""!==a.link&&(l.link=a.link);return e({url:i,method:"GET",params:s,headers:l,responseType:"blob"}).then((function(e){const t=e.data;let n=e.headers()["content-disposition"].split("filename=")[1];return n=n.substring(0,n.length),{data:t,filename:n}}))}}}},240:function(e,t,n){"use strict";n.r(t);n(7),n(27),n(28),n(96),n(170);var o=n(463),r=n(0),a=n(25),i=n(86);angular.module("graphdb.framework.impex.export.controllers",["ngCookies","ui.bootstrap","toastr","graphdb.framework.core.services.repositories","graphdb.framework.core.services.jwtauth","graphdb.workbench.utils.filetypes","graphdb.framework.rest.export.service"]).controller("ExportCtrl",["$scope","$http","$location","$timeout","ModalService","filterFilter","$repositories","toastr","ExportRestService","RDF4JRepositoriesRestService","FileTypes","$translate","AuthTokenService","$uibModal",function(e,t,n,s,l,p,c,d,u,g,f,h,m,x){e.getActiveRepository=function(){return c.getActiveRepository()},e.exportFormats=f,e.deleting={},e.showExportDDTooltip=!0,e.page=1,e.pageSize=10,e.pageSizeOptions=[10,20,50,100],e.displayGraphs=[],e.exportFilter="",e.export=!0,e.exportMultipleGraphs=!1,e.repoExportFormat={name:"TriG",type:"application/x-trig",extension:".trig"},e.selectedGraphs={exportGraphs:{}},e.$watch((function(){return c.getActiveRepository()}),(function(){e.exportFilter="",e.getGraphs(),e.selectedAll=!1,s((function(){e.changePageSize(10)}),100)})),e.isShacl=function(e){return"http%3A%2F%2Frdf4j.org%2Fschema%2Frdf4j%23SHACLShapeGraph"===e},e.getGraphs=function(){e.getActiveRepository()?(e.loader=!0,g.getGraphs(e.getActiveRepository()).success((function(t){t.results.bindings.unshift({contextID:{type:"default",value:"import.default.graph"}}),e.graphsByValue={},Object.keys(t.results.bindings).forEach((function(n){const o=t.results.bindings[n];"bnode"===o.contextID.type?o.contextID.value="_:"+o.contextID.value:"default"===o.contextID.type?(o.contextID.uri=encodeURIComponent("http://www.openrdf.org/schema/sesame#nil"),o.contextID.clearUri="DEFAULT",o.contextID.exportUri="null",o.contextID.longName="default graph"):(o.contextID.uri=encodeURIComponent(o.contextID.value),o.contextID.clearUri="GRAPH <"+o.contextID.value+">",o.contextID.exportUri=encodeURIComponent("<"+o.contextID.value+">"),o.contextID.longName="named graph "+o.contextID.value),e.graphsByValue[o.contextID.value]=o.contextID})),e.graphs=t.results.bindings,e.filteredGraphs=Object(a.cloneDeep)(e.graphs),e.displayGraphs=e.filteredGraphs.slice(e.pageSize*(e.page-1),e.pageSize*e.page),e.loader=!1,e.selectedGraphs.exportGraphs={},e.matchedElements=e.graphs})).error((function(t,n){const o=getError(t,n);"There is no active location!"===o&&(c.setRepository(""),d.error(o,h.instant("common.error"))),e.loader=!1}))):e.loader=!1},e.onGraphSearch=function(){e.matchedElements=[],e.deselectAll(),e.filterResults()},e.filterResults=function(){angular.forEach(e.graphs,(function(t){-1!==t.contextID.value.indexOf(e.exportFilter)&&e.matchedElements.push(t)}))},e.downloadExport=function(e,t){let n=e+"&Accept="+encodeURIComponent(t.type);const o=m.getAuthToken();o&&(n=n+"&authToken="+encodeURIComponent(o));let r=window.open(n);s((function(){"about:blank"!==r.document.location.href&&(r.close(),d.error("Could not export graph. Check GraphDB logs for detailed reason."))}),100)},e.openExportDDTooltip=function(){e.showExportDDTooltip&&(s((function(){$("#tooltipTarget").trigger("showExportDDTooltip")}),0),s((function(){$("#tooltipTarget").trigger("showExportDDTooltip")}),3e3),e.showExportDDTooltip=!1)},e.exportRepo=function(t,n){"application/rdf+xml"===t.type||"text/plain"===t.type||"text/turtle"===t.type||"application/x-turtlestar"===t.type||"text/rdf+n3"===t.type?l.openSimpleModal({title:h.instant("common.warning"),message:Object(r.decodeHTML)(h.instant("export.format.warning.msg")),warning:!0}).result.then((function(){e.startDownload(t,n)})):e.startDownload(t,n)},e.openJSONLDExportSettings=function(t,n){x.open({templateUrl:"js/angular/core/components/export-settings-modal/exportSettingsModal.html",controller:i.ExportSettingsCtrl,size:"lg",scope:e,resolve:{format:function(){return t.name}}}).result.then((function(r){const a="framed"===r.currentMode.name?"frame":"context",i=r.link?`<${r.link}>; rel="http://www.w3.org/ns/json-ld#${a}"`:"";!function(e,t,n,r,a,i){const s={accept:e.type+";profile="+i.link,link:n};u.getExportedStatementsAsJSONLD(t,r,a,m.getAuthToken(),s).then((function({data:e,filename:t}){Object(o.saveAs)(e,t)})).catch((function(e){e.data.text().then(t=>{431===e.status?d.error(e.statusText,h.instant("common.error")):d.error(t,h.instant("common.error"))})}))}(t,n,i,c.getActiveRepositoryObject(),e.graphsByValue,r.currentMode)}))},e.startDownload=function(t,n){let o;const r=c.getActiveRepositoryObject();o=n?`repositories/${r.id}/statements?infer=false&context=${e.graphsByValue[n.value].exportUri}&location=${encodeURIComponent(r.location)}`:`repositories/${r.id}/statements?infer=false&location=${encodeURIComponent(r.location)}`,e.downloadExport(o,t)},e.hasMultipleSelected=function(){if(_.isEmpty(e.selectedGraphs.exportGraphs))return!_.isEmpty(e.selectedGraphs.exportGraphs);for(const t in e.selectedGraphs.exportGraphs)if(!0===e.selectedGraphs.exportGraphs[t])return!0;return!1},e.openJSONLDExportSettingsForSelectedGraphs=function(t){const n=Object.keys(e.selectedGraphs.exportGraphs).filter(t=>e.selectedGraphs.exportGraphs[t]).map(t=>e.graphsByValue[t].exportUri);n?e.openJSONLDExportSettings(t,n):l.openSimpleModal({title:h.instant("export.multiple.graph"),message:h.instant("export.check.graphs.msg"),warning:!0})},e.exportSelectedGraphs=function(t){let n="";for(const t in e.selectedGraphs.exportGraphs)e.selectedGraphs.exportGraphs[t]&&(n+="context="+e.graphsByValue[t].exportUri+"&");if(n){const o=function(){n=n.substring(0,n.length-1);const o="repositories/"+e.getActiveRepository()+"/statements?infer=false&"+n;e.downloadExport(o,t)};"application/rdf+xml"===t.type||"text/plain"===t.type||"text/turtle"===t.type||"application/x-turtlestar"===t.type||"text/rdf+n3"===t.type?l.openSimpleModal({title:h.instant("common.warning"),message:Object(r.decodeHTML)(h.instant("export.format.warning.msg")),warning:!0}).result.then((function(){o()})):o()}else l.openSimpleModal({title:h.instant("export.multiple.graph"),message:h.instant("export.check.graphs.msg"),warning:!0})},e.$watch("exportFilter",(function(){if(e.filteredGraphs=p(e.graphs,e.exportFilter),e.getActiveRepository()&&angular.element(document).find(".btn.btn-secondary.btn-sm.dropdown-toggle span").length){const t=angular.element(document).find(".btn.btn-secondary.btn-sm.dropdown-toggle span")[0].innerHTML.trim();let n;"All"===t&&(n=e.filteredGraphs.length),e.filteredGraphs&&e.filteredGraphs.length>e.pageSize&&"All"!==t&&(n=e.pageSize),e.changePageSize(n),e.changePagination()}})),e.changePagination=function(){e.selectedAll=!1,angular.isDefined(e.filteredGraphs)&&(e.displayGraphs=e.filteredGraphs.slice(e.pageSize*(e.page-1),e.pageSize*e.page))},e.changePageSize=function(t){$(".ot-graph-page-size").removeClass("active"),e.page=1,t&&(e.pageSize=t,e.changePagination()),e.filteredGraphs&&""!==e.exportFilter&&(e.displayGraphs=e.filteredGraphs)},e.checkAll=function(){e.selectedAll=e.selectedAll||!1,angular.forEach(e.displayGraphs,(function(t){t.contextID.uri&&(e.selectedGraphs.exportGraphs[t.contextID.value]=e.selectedAll)}))},e.deselectAll=function(){e.selectedAll=!1,angular.forEach(e.displayGraphs,(function(t){t.contextID.uri&&(e.selectedGraphs.exportGraphs[t.contextID.value]=!1)}))},e.dropRepository=function(){e.canWriteActiveRepo()&&(e.deleting["*"]=!0,l.openSimpleModal({title:h.instant("export.confirm.clear.msg"),message:h.instant("export.warning.clear.repo.msg",{repo:c.getActiveRepository()}),warning:!0}).result.then((function(){s((function(){g.addStatements(c.getActiveRepository(),"update=CLEAR ALL").then((function(){e.deleting["*"]=!1,d.success(h.instant("export.cleared.repo",{repo:c.getActiveRepository()})),e.getGraphs()}),(function(t){e.deleting["*"]=!1;const n=t.data;"string"==typeof n&&n.indexOf("Clearing all statements in the repository is incompatible with collecting history")>-1?d.error(h.instant("export.clearing.statements.warning")):d.error(h.instant("export.cleared.repo.failed.msg",{repo:c.getActiveRepository()}),t)}))}),100)})))},e.dropContext=function(t){e.canWriteActiveRepo()&&(angular.isDefined(t)?function(t){const n=t.contextID.longName;e.deleting[t]=!0,l.openSimpleModal({title:h.instant("export.confirm.clear.graph"),message:h.instant("export.clear.graph.warning",{longName:n}),warning:!0}).result.then((function(){s((function(){const o="update=CLEAR "+t.contextID.clearUri;g.addStatements(c.getActiveRepository(),o).then((function(){e.deleting[t]=!1,d.success(h.instant("export.cleared.graph",{longName:n})),e.getGraphs(),e.exportFilter="",e.filteredGraphs.length=0,e.updateResults(),e.changePageSize(e.pageSize)}),(function(o){e.deleting[t]=!1,d.error(h.instant("export.clear.graph.msg",{longName:n}),getError(o,o.status))}))}),100)}),(function(){e.deleting[t]=!1}))}(t):function(t){const n=[];angular.forEach(e.selectedGraphs.exportGraphs,(function(e,t){e&&n.push(t)})),n.length>0&&(e.deleting[t]=!0,l.openSimpleModal({title:h.instant("export.confirm.clear.graph"),message:h.instant("export.warning.clear.graph.msg"),warning:!0}).result.then((function(){s((function(){let t=0;angular.forEach(n,(function(o){const r="update=CLEAR "+e.graphsByValue[o].clearUri;g.addStatements(c.getActiveRepository(),r).then((function(){e.loader=!0,e.selectedGraphs.exportGraphs[o]=!1,delete e.selectedGraphs.exportGraphs[o],t++,n.length===t&&(e.selectedAll=!1,e.exportFilter="",e.filteredGraphs.length=0,e.getGraphs(),e.updateResults(),e.changePageSize(e.pageSize),d.success(h.instant("export.cleared.graph.msg")),e.loader=!1)}),(function(t){const n=e.graphsByValue[o].longName;d.error(h.instant("export.clear.graph.msg",{longName:n}),getError(t,t.status)),e.selectedAll=!1}))}))}),100)}),(function(){e.deleting[t]=!1})))}(t))}}])},462:function(e,t){(function(t){e.exports=t}).call(this,{})},463:function(e,t,n){var o,r=r||function(e){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var t=e.document,n=function(){return e.URL||e.webkitURL||e},o=t.createElementNS("http://www.w3.org/1999/xhtml","a"),r=e.webkitRequestFileSystem,a=e.requestFileSystem||r||e.mozRequestFileSystem,i=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},s=0,l=function(t){var o=function(){"string"==typeof t?n().revokeObjectURL(t):t.remove()};e.chrome?o():setTimeout(o,500)},p=function(e,t,n){for(var o=(t=[].concat(t)).length;o--;){var r=e["on"+t[o]];if("function"==typeof r)try{r.call(e,n||e)}catch(e){i(e)}}},c=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e},d=function(t,i){t=c(t);var d,u,g,f=this,h=t.type,m=!1,x=function(){p(f,"writestart progress write writeend".split(" "))},y=function(){(!m&&d||(d=n().createObjectURL(t)),u)?u.location.href=d:null==e.open(d,"_blank")&&"undefined"!=typeof safari&&(e.location.href=d);f.readyState=f.DONE,x(),l(d)},w=function(e){return function(){if(f.readyState!==f.DONE)return e.apply(this,arguments)}},S={create:!0,exclusive:!1};if(f.readyState=f.INIT,i||(i="download"),o)return d=n().createObjectURL(t),o.href=d,o.download=i,void setTimeout((function(){var e,t;e=o,t=new MouseEvent("click"),e.dispatchEvent(t),x(),l(d),f.readyState=f.DONE}));e.chrome&&h&&"application/octet-stream"!==h&&(g=t.slice||t.webkitSlice,t=g.call(t,0,t.size,"application/octet-stream"),m=!0),r&&"download"!==i&&(i+=".download"),("application/octet-stream"===h||r)&&(u=e),a?(s+=t.size,a(e.TEMPORARY,s,w((function(e){e.root.getDirectory("saved",S,w((function(e){var n=function(){e.getFile(i,S,w((function(e){e.createWriter(w((function(n){n.onwriteend=function(t){u.location.href=e.toURL(),f.readyState=f.DONE,p(f,"writeend",t),l(e)},n.onerror=function(){var e=n.error;e.code!==e.ABORT_ERR&&y()},"writestart progress write abort".split(" ").forEach((function(e){n["on"+e]=f["on"+e]})),n.write(t),f.abort=function(){n.abort(),f.readyState=f.DONE},f.readyState=f.WRITING})),y)})),y)};e.getFile(i,{create:!1},w((function(e){e.remove(),n()})),w((function(e){e.code===e.NOT_FOUND_ERR?n():y()})))})),y)})),y)):y()},u=d.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t){return navigator.msSaveOrOpenBlob(c(e),t)}:(u.abort=function(){this.readyState=this.DONE,p(this,"abort")},u.readyState=u.INIT=0,u.WRITING=1,u.DONE=2,u.error=u.onwritestart=u.onprogress=u.onwrite=u.onabort=u.onerror=u.onwriteend=null,function(e,t){return new d(e,t)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);
|
|
2
2
|
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */e.exports?e.exports.saveAs=r:null!==n(474)&&null!=n(462)&&(void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o))},474:function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},86:function(e,t,n){"use strict";function o(e,t,n,o,r){e.JSONLDModes=[{name:"framed",link:"http://www.w3.org/ns/json-ld#framed"},{name:"expanded",link:"http://www.w3.org/ns/json-ld#expanded"},{name:"flattened",link:"http://www.w3.org/ns/json-ld#flattened"},{name:"compacted",link:"http://www.w3.org/ns/json-ld#compacted"}],e.JSONLDModesNames=e.JSONLDModes.reduce((function(e,t){return e[t.name]=t.name,e}),{}),e.JSONLDFramedModes=[e.JSONLDModesNames.framed],e.JSONLDContextModes=[e.JSONLDModesNames.compacted,e.JSONLDModesNames.flattened],e.defaultMode=e.JSONLDModes.find(e=>"expanded"===e.name),e.currentMode=e.defaultMode,e.link=null,e.fileFormat=r.toLowerCase(),e.setJSONLDSettingsToLocalStorage=function(e,t,r){n.set(o.JSONLD_EXPORT_SETTINGS,JSON.stringify({jsonldFormName:e,jsonldFormLink:t,jsonldLink:r}))},e.cancel=function(){t.dismiss()},e.reset=function(){e.currentMode=e.defaultMode,e.link="",e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link)},e.clearLinkInput=function(){e.link="",e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link)},e.exportJsonLD=function(){e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link),t.close({currentMode:e.currentMode,link:e.link})};!function(){const t=n.get(o.JSONLD_EXPORT_SETTINGS);t&&(e.currentMode=e.JSONLDModes.find(e=>e.name===t.jsonldFormName),e.link=t.jsonldLink)}()}n.r(t),n.d(t,"ExportSettingsCtrl",(function(){return o})),angular.module("graphdb.framework.core.components.export-settings-modal",["graphdb.framework.utils.localstorageadapter"]).controller("ExportSettingsCtrl",o),o.$inject=["$scope","$uibModalInstance","LocalStorageAdapter","LSKeys","format"]},96:function(e,t){angular.module("graphdb.workbench.utils.filetypes",[]).value("FileTypes",[{name:"JSON",translateKey:"download.as.json",type:"application/rdf+json",extension:".json"},{name:"JSON-LD",translateKey:"download.as.jsonld",type:"application/ld+json",extension:".jsonld"},{name:"NDJSON-LD",translateKey:"download.as.ndjsonld",type:"application/x-ld+ndjson",extension:".ndjsonld"},{name:"RDF-XML",translateKey:"download.as.rdfxml",type:"application/rdf+xml",extension:".rdf"},{name:"N3",translateKey:"download.as.n3",type:"text/rdf+n3",extension:".n3"},{name:"N-Triples",translateKey:"download.as.ntriples",type:"text/plain",extension:".nt"},{name:"N-Quads",translateKey:"download.as.nquads",type:"text/x-nquads",extension:".nq"},{name:"Turtle",translateKey:"download.as.turtle",type:"text/turtle",extension:".ttl"},{name:"Turtle*",translateKey:"download.as.turtlestar",type:"application/x-turtlestar",extension:".ttls"},{name:"TriX",translateKey:"download.as.trix",type:"application/trix",extension:".trix"},{name:"TriG",translateKey:"download.as.trig",type:"application/x-trig",extension:".trig"},{name:"TriG*",translateKey:"download.as.trigstar",type:"application/x-trigstar",extension:".trigs"},{name:"Binary RDF",translateKey:"download.as.binaryrdf",type:"application/x-binary-rdf",extension:".brf"}])}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[112],{81:function(a,n){angular.module("graphdb.framework.core.directives.paginations",[]).directive("paginations",(function(a,n,t){return{link:function(a,e){const i=()=>{const n=t('<uib-pagination class="nav navbar-right" total-items="matchedElements.length" items-per-page="pageSize" ng-model="page" ng-change="changePagination()" direction-links="false" boundary-links="true" max-size="5" rotate="true" first-text="{{\'paginator.first.page.label\' | translate}}" last-text="{{\'paginator.last.page.label\' | translate}}"></uib-pagination>')(a);e.html(n)};i();const o=n.$on("$translateChangeSuccess",i);a.$on("$destroy",o)}}}))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[113],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[113],{40:function(e,t){let a=0,o=setInterval((function(){a++,5===a&&$(".ot-splash div").text("GraphDB Workbench is still loading but it's taking longer than usual, please wait..."),10===a&&$(".ot-splash div").text("If the Workbench hasn't loaded yet, please try to clear your browser cache and reload the page."),(a>=10||"block"!==$(".ot-splash").css("display"))&&(clearInterval(o),o=void 0,a=void 0)}),2e3)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[115],{169:function(r,i,e){"use strict";e.r(i);e(
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[115],{169:function(r,i,e){"use strict";e.r(i);e(30);angular.module("graphdb.framework.explore.directives",["graphdb.framework.utils.uriutils"]).directive("uri",["UriUtils",function(r){return{require:"ngModel",link:function(i,e,t,n){n.$parsers.unshift((function(i){if(!angular.isUndefined(i)&&i.length>0){const e=r.validateRdfUri(i);return n.$setValidity("searchStr",e),e?i:void 0}return n.$setValidity("searchStr",!0),i})),n.$formatters.unshift((function(i){return angular.isUndefined(i)||n.$setValidity("searchStr",r.validateRdfUri),i}))}}}])}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[116],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[116],{259:function(e,r){PluginRegistry.add("route",[{url:"/resource",module:"graphdb.framework.explore",chunk:"explore",path:"explore/app",controller:"ExploreCtrl",templateUrl:"pages/explore.html",title:"view.resource.title"},{url:"/resource/edit",module:"graphdb.framework.explore",chunk:"explore",path:"explore/app",controller:"EditResourceCtrl",templateUrl:"pages/edit.html",title:"view.resource.title"},{url:"/resource/:any*",module:"graphdb.framework.explore",chunk:"explore",path:"explore/app",controller:"ExploreCtrl",templateUrl:"pages/explore.html",title:"view.resource.title"}]),PluginRegistry.add("main.menu",{items:[{label:"Explore",labelKey:"menu.explore.label",href:"#",order:1,role:"IS_AUTHENTICATED_FULLY",icon:"icon-data",guideSelector:"menu-explore"}]})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[118],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[118],{261:function(e,r){PluginRegistry.add("route",{url:"/graphs",module:"graphdb.framework.impex.export",path:"export/app",chunk:"export",controller:"ExportCtrl",templateUrl:"pages/export.html",title:"menu.graphs.overview.label",helpInfo:"view.export.ctr.helpInfo "}),PluginRegistry.add("main.menu",{items:[{label:"Explore",labelKey:"menu.explore.label",href:"#",order:1,role:"IS_AUTHENTICATED_FULLY",icon:"icon-data",guideSelector:"menu-explore"},{label:"Graphs overview",labelKey:"menu.graphs.overview.label",href:"graphs",order:0,role:"IS_AUTHENTICATED_FULLY",parent:"Explore",guideSelector:"sub-menu-graph-overview"}]})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[12,72,158,180,223,247,275],{122:function(e,n,t){"use strict";t.r(n);t(33),t(88);function o(e){const n=[];return Object.keys(e).forEach((function(t){n.push(encodeURIComponent(t)+"="+encodeURIComponent(e[t]))})),n.join("&")}function r(e,n){return _.reduce(e,(function(e,t){if(""===t.key&&""===t.value);else{if(""===t.key)throw new Error(n.instant("externalsync.empty.value.key.error",{value:t.value}));if(e.hasOwnProperty(t.key))throw new Error(n.instant("externalsync.duplicate.key.error",{key:t.key}));e[t.key]=t.value}return e}),{})}function a(e,n){for(let o=0;o<n.length;o++){const r=n[o];if("StringArray"===r.__type)e[r.__name]||(e[r.__name]=[""]);else if("OptionArray"===r.__type)if(e[r.__name])for(let n=0;n<r.__childOptions.length;n++){const t=r.__childOptions[n];if("Boolean"===t.__type)for(let n=0;n<e[r.__name].length;n++){const o=e[r.__name][n];!o.hasOwnProperty([t.__name])&&angular.isDefined(t.__defaultValue)&&(o[t.__name]=t.__defaultValue)}}else{e[r.__name]=[];const n={};for(let e=0;e<r.__childOptions.length;e++){const t=r.__childOptions[e];"StringArray"===t.__type?n[t.__name]=[""]:n[t.__name]=angular.isUndefined(t.__defaultValue)?"":t.__defaultValue}e[r.__name].push(n)}else"Map"===r.__type?e[r.__name]?e[r.__name]=(t=e[r.__name],_.map(t,(function(e,n){return{key:n,value:e}}))):e[r.__name]=[]:"JsonString"===r.__type?!e[r.__name]||e[r.__name]instanceof String||"string"==typeof e[r.__name]||(e[r.__name]=angular.toJson(e[r.__name],2)):angular.isUndefined(e[r.__name])&&(e[r.__name]=angular.isUndefined(r.__defaultValue)?"":r.__defaultValue)}var t;return e}function i(e,n,t){return e.post("repositories/"+n,o({query:t}),{headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/sparql-results+json","X-GraphDB-Local-Consistency":"updating"}})}function s(e){return e.substring(0,e.length-1)+"/instance#"}function c(e,n,t,o,a){const i=function e(n,t){const o={};return _.each(t,(function(t){angular.isDefined(n[t.__name])&&("OptionArray"===t.__type?(o[t.__name]=[],_.each(n[t.__name],(function(n){o[t.__name].push(e(n,t.__childOptions))}))):o[t.__name]=_.cloneDeep(n[t.__name]))})),o}(t,o);for(let e=0;e<o.length;e++)try{"Map"===o[e].__type?i[o[e].__name]=r(i[o[e].__name],$translate):"JsonString"===o[e].__type&&(i[o[e].__name]=angular.fromJson(i[o[e].__name]))}catch(n){return a(o[e].__label,n.message),null}!function e(n){Array.isArray(n)&&(n=_.filter(n,(function(e){return null!==e&&(!e.trim||""!==e.trim())})));return Object.keys(n).forEach((function(t){""!==n[t]&&null!=n[t]||!1===n[t]?"object"==typeof n[t]&&(n[t]=e(n[t])):delete n[t]})),n}(i);let c="";c+="PREFIX :<"+n+">\n";return c+="PREFIX inst:<"+s(n)+">\n",c+="INSERT DATA {\n",c+="\tinst:"+e+" :createConnector '''\n",c+=angular.toJson(i,2),c+="\n''' .\n}\n",c=c.replace(/\\/g,"\\\\\\"),c}function u(e,n,t,r,u,l,d,p,g,f){function m(n){e.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:n?f.instant("externalsync.repairing"):f.instant("externalsync.creating"),waitOnRepairStartOnce:!!n,eta:"-",inline:!1,iri:null}}function y(n,t,o){return m(o),$.extend(e.beingBuiltConnector,{iri:s(n)+t,name:t,inline:!1,doneCallback:function(){e.beingBuiltConnector.modalInstance.dismiss("cancel")}}),e.beingBuiltConnector.modalInstance=r.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:e}),e.beingBuiltConnector.modalInstance}function C(n,r,a){const i=y(n.value,r.name,!1);p.addStatements(t.getActiveRepository(),o({update:r.query})).then((function(){g.getConnectors().then((function(){g.hasConnector(encodeURIComponent(n.value)).then((function(t){e.existing[n.key]=t.data}))})),u.success(f.instant("created.connector",{name:r.name}))}),(function(e){u.error(getError(e)),a()})).finally((function(){i.dismiss("cancel")}))}e.loader=!1,e.controllers=[],e.existing={},e.definitions={},e.getLoaderMessage=function(){const n=(Date.now()-e.loaderStartTime)/1e3,t=e.getHumanReadableSeconds(n);let o="";return o=e.progressMessage?e.progressMessage+"... "+t:f.instant("common.running.operation",{timeHuman:t}),e.extraMessage&&n>10&&(o+="\n"+e.extraMessage),o},e.setLoader=function(n,t,o){n?(e.loader=!0,e.loaderStartTime=Date.now(),e.progressMessage=t,e.extraMessage=o):(e.loader=!1,e.progressMessage="",e.extraMessage="")},e.initConnector=function(n){return g.initConnector(encodeURIComponent(n.value)).then((function(t){return e.definitions[n.key]=t.data,g.hasConnector(encodeURIComponent(n.value)).then((function(t){e.existing[n.key]=t.data}))}))},e.getConnectors=function(){e.isLicenseValid()&&e.canWriteActiveRepo()&&(e.setLoader(!0,f.instant("externalsync.fetching.connectors"),f.instant("common.extra.message")),g.getConnectors().then((function(o){e.connectors=Object.keys(o.data).map((function(e){return{key:e,value:o.data[e]}})),d.all(_.map(e.connectors,(function(n){return e.initConnector(n)}))).finally((function(){m();const o=function(e){const n=_.map(e,(function(e){return"<"+e.value+"connectorStatus>"})).join("|");return n?"SELECT ?connector ?status { ?connector "+n+" ?status }":null}(e.connectors);o?function(e){return i(n,t.getActiveRepository(),e)}(o).then((function(n){const t=function(e){if(e.bindings)for(let n=0;n<e.bindings.length;n++)try{const t=JSON.parse(e.bindings[n].status.value);if("BUILDING"===t.status)return{connector:e.bindings[n].connector.value,status:t}}catch(e){console.error(e)}return{}}(n.data.results);if(t.connector){const n=t.connector.split(/#/);n[0]=n[0].replace(/\/instance$/,"#"),o=n[0],r=n[1],m(),$.extend(e.beingBuiltConnector,{iri:s(o)+r,name:r,inline:!0,doneCallback:function(){e.beingBuiltConnector.inline=!1}})}var o,r})).finally((function(){e.setLoader(!1)})):e.setLoader(!1)}))})).catch((function(n){e.setLoader(!1),u.error(getError(n),f.instant("externalsync.could.not.get.connectors.error"))})),e.existing={})},e.getOptions=function(n){return e.definitions[n.key]},e.isEmpty=function(e){return angular.isObject(e)&&0===Object.keys(e).length},e.toPrettyJson=function(e){return angular.toJson(e,2)},e.$watch((function(){return t.getActiveRepository()}),e.getConnectors),e.$watch((function(){return t.getActiveLocation()}),e.getConnectors),e.copyConnector=function(n,t){let o;angular.isUndefined(t)||(o=_.cloneDeep(t),o.name=o.name+"-copy");r.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return n},values:function(){return angular.isUndefined(o)?{name:"",values:{}}:o},options:function(){return e.getOptions(n)}}}).result.then((function(t){C(n,t,(function(){t.skipConversion=!0,e.newConnector(n,t)}))}))},e.newConnector=function(n,t){r.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return n},values:function(){return angular.isUndefined(t)?{name:"",values:{}}:t},options:function(){return e.getOptions(n)}}}).result.then((function(t){C(n,t,(function(){t.skipConversion=!0,e.newConnector(n,t)}))}))},e.repair=function(n,r){l.openSimpleModal({title:f.instant("externalsync.confirm.repair"),message:f.instant("externalsync.repair.warning.msg"),warning:!0}).result.then((function(){const a=y(r.value,n.name,!0),i=(c=n.name,"PREFIX prefix:<"+(l=r.value)+">\nINSERT DATA {\n\t<"+s(l)+c+'> prefix:repairConnector ""\n}');var c,l;p.addStatements(t.getActiveRepository(),o({update:i})).then((function(){g.getConnectors().then((function(){g.hasConnector(encodeURIComponent(r.value)).then((function(n){e.existing[r.key]=n.data}))})),u.success(f.instant("externalsync.repair.success.msg",{name:n.name}))}),(function(e){u.error(getError(e))})).finally((function(){a.dismiss("cancel")}))}))},e.delete=function(n,a){const i=a.key.indexOf("Elastic")>=0||a.key.indexOf("Solr")>=0;r.open({templateUrl:"js/angular/externalsync/templates/deleteConnector.html",controller:"DeleteConnectorCtrl",resolve:{popoverMsg:function(){return i?f.instant("delete.connector.conditional",{type:a.key}):""}}}).result.then((function(r){e.setLoader(!0,f.instant("externalsync.delete.progress.msg",{name:n.name}),f.instant("externalsync.extra.message.warning"));const s=function(e,n,t){const o=n.substring(0,n.length-1)+"/instance#";return"PREFIX prefix:<"+n+">\nINSERT DATA {\n\t<"+o+e+'> prefix:dropConnector "'+(t?"force":"")+'"\n}'}(n.name,a.value,r);p.addStatements(t.getActiveRepository(),o({update:s})).then((function(){g.getConnectors().then((function(){g.hasConnector(encodeURIComponent(a.value)).then((function(n){e.existing[a.key]=n.data}))})),r?(u.success(f.instant("externalsync.delete.force.success.msg",{name:n.name})),i&&u.warning(f.instant("externalsync.delete.remote.warning",{key:a.key}))):u.success(f.instant("externalsync.delete.success.msg",{name:n.name}))}),(function(e){u.error(getError(e))})).finally((function(){e.setLoader(!1)}))}))},e.viewQuery=function(n,t){r.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){const o=e.getOptions(n);return c(t.name,n.value,a(t.values,o),o)}}})}}function l(e,n,t){e.force=!1,e.popoverMsg=t,e.ok=function(){n.close(e.force)},e.cancel=function(){n.dismiss()}}function d(e,n,t,o,r){function a(){return c(e.name,t.value,e.values,e.options,(function(e,n){r.error(n,e)}))}e.connector=t,e.addField=function(n,t){const o=_.cloneDeep(e.defaultValues[t][0]);e.values[t].splice(n+1,0,o)},e.addOption=function(e,n){n.splice(e+1,0,"")},e.deleteOption=function(e,n){n.splice(e,1)},e.addMapOption=function(e,n){n.splice(e+1,0,{key:"",value:""})},e.deleteMapOption=function(e,n){n.splice(e,1)},e.ok=function(){if(e.form.$valid){const t=a();t&&n.close({name:e.name,values:e.values,options:e.options,query:t})}},e.viewQuery=function(){const e=a();e&&o.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})},e.cancel=function(){n.dismiss("cancel")}}function p(e,n,t,o,r,i,s,c){angular.extend(this,n("ExtendNewConnectorCtrl",{$scope:e,$uibModalInstance:o,connector:r,$uibModal:i})),e.values=s.values,e.options=c,e.name=s.name,s.skipConversion||(e.values=a(e.values,e.options)),e.defaultValues=_.cloneDeep(e.values)}function g(e,n,t,o,r){function a(){const a=function(e){const n=e.replace(/\/instance#.+$/,"#connectorStatus");let t="";return t+="SELECT ?status {\n",t+="\t<"+e+"> <"+n+"> ?status",t+="\n}",t}(e.beingBuiltConnector.iri);e.beingBuiltConnector.iri=null,e.progressInterval=n((function(){(function(e){return i(t,o.getActiveRepository(),e)})(a).then((function(t){const o=function(e){if(e.bindings&&e.bindings.length>0)try{return JSON.parse(e.bindings[0].status.value)}catch(e){console.error(e)}return{}}(t.data.results);"BUILDING"===o.status?(e.beingBuiltConnector.status=o,e.beingBuiltConnector.percentDone=(100*o.processedEntities/o.estimatedEntities).toFixed(0),e.beingBuiltConnector.eta=e.getHumanReadableSeconds(o.etaSeconds),e.beingBuiltConnector.actionName=o.repair?r.instant("externalsync.repairing"):r.instant("externalsync.creating"),e.beingBuiltConnector.waitOnRepairStartOnce=!1):"BUILT"!==o.status||e.beingBuiltConnector.waitOnRepairStartOnce||(n.cancel(e.progressInterval),e.beingBuiltConnector.doneCallback&&e.beingBuiltConnector.doneCallback())}))}),1e3),e.$on("$destroy",(function(){n.cancel(e.progressInterval)}))}e.beingBuiltConnector=e.beingBuiltConnector||{},!e.beingBuiltConnector.inline&&e.beingBuiltConnector.iri&&a(),e.$watch("beingBuiltConnector.iri",(function(n){e.beingBuiltConnector.inline&&n&&a()}))}angular.module("graphdb.framework.externalsync.controllers",["graphdb.framework.rest.rdf4j.repositories.service","graphdb.framework.rest.connectors.service"]).controller("ConnectorsCtrl",u).controller("ExtendNewConnectorCtrl",d).controller("CreateConnectorCtrl",p).controller("CreateProgressCtrl",g).controller("DeleteConnectorCtrl",l).filter("ceil",(function(){return function(e){return Math.ceil(e)}})),u.$inject=["$scope","$http","$repositories","$uibModal","toastr","ModalService","$q","RDF4JRepositoriesRestService","ConnectorsRestService","$translate"],l.$inject=["$scope","$uibModalInstance","popoverMsg"],d.$inject=["$scope","$uibModalInstance","connector","$uibModal","toastr"],p.$inject=["$scope","$controller","$http","$uibModalInstance","connector","$uibModal","values","options"],g.$inject=["$scope","$interval","$http","$repositories","$translate"]},216:function(e,n,t){"use strict";t.r(n),t.d(n,"ConnectorCommand",(function(){return o}));const o={CREATE:"create",REPAIR:"repair",DROP:"drop"}},217:function(e,n,t){"use strict";t.r(n),t.d(n,"BeforeUpdateQueryResult",(function(){return o})),t.d(n,"BeforeUpdateQueryResultStatus",(function(){return r}));class o{constructor(e,n,t,o){this.status=e,this.mesage=o,this.messageLabelKey=n,this.parameters=t}}const r={ERROR:"error",SUCCESS:"success"}},223:function(e,n,t){"use strict";t.r(n),t.d(n,"CancelAbortingQuery",(function(){return o}));class o extends Error{}},245:function(e,n,t){"use strict";t.r(n);var o=t(108),r=t(92),a=(t(88),t(122),t(14)),i=t(94),s=t(216),c=t(217),u=t(87),l=t(0),d=t(71),p=t(95),g=t(223),f=t(12);t(15);function m(e,n,t,m,y,C,h,_,v,b,S,R,E,w,x,A,$,O){this.repository="";let U=h.getActiveRepository(),k=h.isActiveRepoOntopType();n.yasguiConfig=void 0,n.savedQueryConfig=void 0,n.prefixes={},n.inferUserSetting=!0,n.sameAsUserSetting=!0;const q=new Map;let B=!1;n.updateConfig=e=>{n.yasguiConfig={endpoint:M,componentId:p.VIEW_SPARQL_EDITOR,prefixes:n.prefixes,infer:k||n.inferUserSetting,sameAs:k||n.sameAsUserSetting,yasrToolbarPlugins:[J],beforeUpdateQuery:X(),outputHandlers:new Map([[u.EventDataType.QUERY_EXECUTED,Q],[u.EventDataType.REQUEST_ABORTED,T]]),clearState:void 0!==e&&e}},n.getActiveRepositoryNoError=()=>U;const M=e=>{const n=(e=>{const n=e.getTab();if(n)return n.getYasqe()})(e);if(n)return h.resolveSparqlEndpoint(n.getQueryMode())},Q=e=>{const n=q.get(e.tabId);n&&(n.dismiss(),q.delete(e.tabId))},T=e=>{if(e&&f.QueryMode.UPDATE!==e.queryMode){const n=e.getRepository(),t=e.getQueryTrackAlias();n&&t&&x.deleteQuery(t,n)}},I=e=>{const n=e[r.RouteConstants.savedQueryName],t=e[r.RouteConstants.savedQueryOwner];S.getSavedQuery(n,t).then(e=>{const n=Object(o.savedQueryResponseMapper)(e);L(n).then(j).finally(P)}).catch(e=>{v.error(b.instant("query.editor.missing.saved.query.data.error",{savedQueryName:n,error:getError(e)}))})},D=e=>{const n=e[r.RouteConstants.name],t=e[r.RouteConstants.query],a=e[r.RouteConstants.owner],i=Object(o.buildQueryModel)(t,n,a,!0);L(i).then(j).finally(P)},L=e=>a.YasguiComponentDirectiveUtil.getOntotextYasguiElementAsync("#query-editor").then(n=>n.openTab(e)).then(e=>a.YasguiComponentDirectiveUtil.highlightTabName(e)),P=()=>{B=!0,m.search({}),m.replace()},j=()=>Object(d.toBoolean)(m.search().execute)?a.YasguiComponentDirectiveUtil.getOntotextYasguiElementAsync("#query-editor").then(N).then(V):Promise.resolve(),N=e=>e.getQueryMode().then(n=>({yasguiComponent:e,queryMode:n})),V=({yasguiComponent:e,queryMode:n})=>"update"!==n?e.query():new Promise(n=>{const t=b.instant("confirm.execute"),o=Object(l.decodeHTML)(b.instant("query.editor.automatically.execute.update.warning"));w.openConfirmation(t,o,()=>n(e.query()),()=>n())}),J={createElement:e=>{const n=document.createElement("span");n.classList.add("explore-visual-graph-button-name");const t=document.createElement("button");return t.classList.add("explore-visual-graph-button"),t.classList.add("icon-data"),t.onclick=function(){const n={query:e.yasqe.getValue(),sameAs:e.yasqe.getSameAs(),inference:e.yasqe.getInfer()};m.path("graphs-visualizations").search(n)},t.appendChild(n),t},updateElement:(e,n)=>{if(e.classList.add("hidden"),!n.hasResults())return;const t=n.yasqe.getQueryType();i.QueryType.CONSTRUCT!==t&&i.QueryType.DESCRIBE!==t||e.classList.remove("hidden"),e.querySelector(".explore-visual-graph-button-name").innerText=b.instant("query.editor.visual.btn")},getOrder:()=>2},F=(e,n)=>({key:e,value:n}),Y=e=>[F("name",e.data.name)],H=(e,t,o)=>{const r=n.$new(!0);r.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:e,eta:"-",inline:!1,iri:t,name:o,doneCallback:function(){a.dismiss("cancel")}},r.getHumanReadableSeconds=n.getHumanReadableSeconds;const a=_.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:r});return a},X=()=>(e,n)=>R.checkConnector(e).then(e=>e.data.command?e.data.hasSupport?s.ConnectorCommand.CREATE===e.data.command?((e,n)=>{const t=H(b.instant("externalsync.creating"),e.data.iri,e.data.name);return q.set(n,t),new c.BeforeUpdateQueryResult(c.BeforeUpdateQueryResultStatus.SUCCESS,"created.connector",Y(e))})(e,n):s.ConnectorCommand.REPAIR===e.data.command?((e,n)=>{const t=H(b.instant("externalsync.repairing"),e.data.iri,e.data.name);return q.set(n,t),new c.BeforeUpdateQueryResult(c.BeforeUpdateQueryResultStatus.SUCCESS,"query.editor.repaired.connector",Y(e))})(e,n):s.ConnectorCommand.DROP===e.data.command?(e=>new c.BeforeUpdateQueryResult(c.BeforeUpdateQueryResultStatus.SUCCESS,"externalsync.delete.success.msg",Y(e)))(e):void 0:(e=>{const n=[F("connectorName",e.data.connectorName),F("pluginName",e.data.pluginName)];return new c.BeforeUpdateQueryResult(c.BeforeUpdateQueryResultStatus.ERROR,"query.editor.inactive.plugin.warning.msg",n)})(e):new c.BeforeUpdateQueryResult(c.BeforeUpdateQueryResultStatus.SUCCESS)).catch(e=>{console.log("Checking connector error: ",e)}),z=e=>{const t=document.querySelectorAll('script[src*="https://www.gstatic.com/"]');if(t.length>0){const e=y.getLanguage();let n="module.js";if("en"!==e&&(n=`module__${e}.js`),!Array.prototype.some.call(t,e=>e.src.includes(n)))return void location.reload()}Promise.all([C.getPrincipal(),h.getPrefixes(U)]).then(([t,o])=>{n.prefixes=o,(e=>{n.inferUserSetting=e.appSettings.DEFAULT_INFERENCE,n.sameAsUserSetting=e.appSettings.DEFAULT_SAMEAS})(t),((e=!1)=>{n.updateConfig(e);const t=m.search();t.hasOwnProperty(r.RouteConstants.savedQueryName)?I(t):t.hasOwnProperty(r.RouteConstants.query)?D(t):E.isActive()&&L()})(e)})},G=[],K=e=>{const n=a.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor");n&&n.abortAllRequests().then(()=>{})};window.addEventListener("beforeunload",K);const W=e=>new Promise((n,t)=>{if(!e||e.queriesCount<1&&e.updatesCount<1)return void n();const o=b.instant("common.confirm"),r=Object(l.decodeHTML)((e=>{let n="view.sparql-editor.leave_page.run_queries.confirmation.";!e||e.queriesCount<1?n+="none_queries_":1===e.queriesCount?n+="one_query_":n+="queries_",e.updatesCount&&0!==e.updatesCount?1===e.updatesCount?n+="one_update":n+="updates":n+="non_updates",n+=".message";const t={queriesCount:e.queriesCount,updatesCount:e.updatesCount};return b.instant(n,t)})(e));w.openSimpleModal({title:o,message:r,warning:!0}).result.then((function(){n()}),(function(){t(new g.CancelAbortingQuery)}))});let Z=void 0;G.push(e.$on("$locationChangeStart",e=>{if(B)return void(B=!1);const n=a.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor");if(!n||Z)return;e.preventDefault();const t=m.path(),o=m.search();n.getOngoingRequestsInfo().then(e=>W(e)).then(()=>n.abortAllRequests()).then(()=>{Z=!0,m.path(t).search(o)}).catch(e=>{if(!(e instanceof g.CancelAbortingQuery))throw e})}));const ee=()=>{$.set(O.SPARQL_LAST_REPO,U)};G.push(n.$on("language-changed",(function(){location.reload()}))),G.push(A.subscribe("before-language-change",(function(e){return new Promise(n=>{w.openSimpleModal({title:b.instant("query.editor.language.change.warning.title"),message:b.instant("query.editor.reload.page.warning"),warning:!0}).result.then((function(){n(e)}),(function(){e.cancel=!0,n(e)}))})}))),G.push(n.$on("$destroy",()=>{ee(),G.forEach(e=>e()),window.removeEventListener("beforeunload",K)})),G.push(n.$watch(n.getActiveRepositoryObject,e=>{e&&(U=h.getActiveRepository(),k=h.isActiveRepoOntopType(e),$.get(O.SPARQL_LAST_REPO)!==U?(z(!0),ee()):z(!1))}))}angular.module("graphdb.framework.sparql-editor.controllers",["ui.bootstrap","graphdb.framework.rest.connectors.service","graphdb.framework.externalsync.controllers","graphdb.framework.utils.event-emitter-service","graphdb.framework.utils.localstorageadapter"]).controller("SparqlEditorCtrl",m),m.$inject=["$rootScope","$scope","$q","$location","$languageService","$jwtAuth","$repositories","$uibModal","toastr","$translate","SparqlRestService","ConnectorsRestService","GuidesService","ModalService","MonitoringRestService","EventEmitterService","LocalStorageAdapter","LSKeys"]},71:function(e,n,t){"use strict";t.r(n),t.d(n,"removeSpecialChars",(function(){return r})),t.d(n,"toBoolean",(function(){return a})),t.d(n,"toTitleCase",(function(){return i}));var o=t(25);const r=e=>e.replace(/[()']/g,""),a=e=>"string"==typeof e?"true"===e:Boolean(e),i=e=>e?Object(o.upperFirst)(e.toLowerCase()):e},88:function(e,n){angular.module("graphdb.framework.rest.connectors.service",[]).factory("ConnectorsRestService",t),t.$inject=["$http"];function t(e){return{getConnectors:function(){return e.get("rest/connectors")},initConnector:function(n){return e.get("rest/connectors/options?prefix="+n)},hasConnector:function(n){return e.get("rest/connectors/existing?prefix="+n)},checkConnector:function(n){return e.post("rest/connectors/check",n,{headers:{"Content-Type":"text/plain"}})}}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[120],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[120],{263:function(e,n){PluginRegistry.add("route",{url:"/connectors",module:"graphdb.framework.externalsync",path:"externalsync/app",chunk:"externalsync",controller:"ConnectorsCtrl",templateUrl:"pages/connectorsInfo.html",title:"view.connector.management.title",helpInfo:"view.connector.management.helpInfo"}),PluginRegistry.add("main.menu",{items:[{label:"Setup",labelKey:"menu.setup.label",href:"#",order:5,role:"IS_AUTHENTICATED_FULLY",icon:"icon-settings",guideSelector:"menu-setup"},{label:"Connectors",labelKey:"menu.connectors.label",href:"connectors",order:10,parent:"Setup",role:"IS_AUTHENTICATED_FULLY",guideSelector:"sub-menu-connectors"}]})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[123],{176:function(e,r,n){"use strict";n.r(r);n(10);function t(e,r,n,t,s,a,o,i,c,l,u,p,d,h,g,f,m){e.classHierarchyData={},e.instancesObj={},e.instancesQueryObj={},e.instancesObj.items=[],e.instancesNotFiltered=[],e.isWarningShowed=!1,e.onopen=e.onclose=()=>angular.noop(),e.currentBrowserLimit=2e3,d.firefox?e.currentBrowserLimit=50:(d.safari||d.msie||d.msedge)&&(e.currentBrowserLimit=400);const C={};let y=0,S=0;r.key="",C.get=function(r,n,t){return c.initLazyList(r,n,t,y,e.instancesObj.items)};let w=allGraphs;const b=function(){if(e.getActiveRepository())return f.resolveGraphs(t.getActiveRepository()).success((function(r){e.graphsInRepo=r.results.bindings.length>1002?r.results.bindings.slice(0,1002):r.results.bindings,R()})).error((function(r){e.repositoryError=getError(r),o.error(getError(r),m.instant("graphexplore.error.getting.graphs"))}))},R=function(){const r=h.get("classHierarchy-selectedGraph-"+t.getActiveRepository());null!==r&&e.graphsInRepo.some(e=>e.contextID.uri===r.contextID.uri)?w=r:h.set("classHierarchy-selectedGraph-"+t.getActiveRepository(),w)},v=function(){return e.instancesObj.items.length<1e3?m.instant("graphexplore.search.class.instances"):m.instant("graphexplore.search.first.class.instances")};r.$watch((function(){return r.key}),(function(){y=0,_.each(e.instancesObj.items,(function(e){r.key>e&&y++})),S++})),C.revision=function(){return S},e.adapterContainer={adapter:{remain:!0}};const E=[];E.push(e.$on("goToDomainRangeGraphView",(function(e,r){A(r)}))),E.push(e.$on("classCount",x)),E.push(e.$on("repositoryIsSet",(function(){if(!s.isLicenseValid())return;if(D===t.getActiveRepository())return;D=t.getActiveRepository();if(e.repositoryError=null,!D)return;w=allGraphs,b().then(O)}))),E.push(r.$on("$translateChangeSuccess",()=>{e.instancesSearchPlaceholder=v()}));function x(r,n,t){e.classCountSlider.options&&e.classCountSlider.options.ceil!==n&&(e.classCountSlider={});var s;e.classCountSlider.value||(e.showExternalElements=!0,e.classCountSlider={value:n,options:{floor:1,ceil:n,vertical:!0,showSelectionBar:!0,onChange:function(){u(L,100,!0)}}},null===h.get(g.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE)&&n>e.currentBrowserLimit&&(s=e.currentBrowserLimit,d.chrome?o.warning(m.instant("graphexplore.disabling.animations",{classLimit:s}),m.instant("graphexplore.reducing.visual.effects")):o.warning(m.instant("graphexplore.browser.performance",{browser:d.name,classLimit:s}),m.instant("graphexplore.reducing.visual.effects"))));const a=h.get(g.CLASS_HIERARCHY_SWITCH_PREFIXES);null!=a&&"true"!==a&&(e.showExternalElements=!0),t?e.classCountSlider.value=t:n>=1500&&(e.classCountSlider.value=1500,o.warning(m.instant("graphexplore.class.count.slider",{count:1500}),m.instant("graphexplore.reducing.class.count"))),n>=25&&!window.ActiveXObject&&"ActiveXObject"in window&&!e.isWarningShowed&&(e.classCountSlider.value=25,e.isWarningShowed=!0,o.warning(m.instant("graphexplore.class.count.browser",{count:25}),m.instant("graphexplore.reducing.class.count"))),u((function(){e.$broadcast("reCalcViewDimensions")}),200),L();let i=0;$("rzslider").on("wheel",(function(r){r.preventDefault(),r.stopPropagation();const n=(new Date).getTime();if(!(n-i>100))return;i=n,r=r.originalEvent;let t=e.classCountSlider.value;r.deltaY<=-1?t+=1:r.deltaY>=1&&(t-=1),t!==e.classCountSlider.value&&t>=e.classCountSlider.options.floor&&t<=e.classCountSlider.options.ceil&&e.$apply((function(){e.classCountSlider.value=t,u(L,100,!0)}))}))}function L(){e.currentSliderValue=e.classCountSlider.value}function A(e){const r=e.data.fullName,t=e.data.name;i.checkDomainRangeData(r).success((function(e,s){204===s?o.warning(m.instant("graphexplore.no.domain.range",{name:t})):(h.set(g.CLASS_HIERARCHY_LAST_SELECTED_CLASS,n.hash()),n.hash("").path("domain-range-graph").search("uri",r).search("name",t))})).error((function(){o.error(m.instant("graphexplore.error.request.failed",{name:t}))}))}function I(){n.replace().hash("1"),e.instancesObj.items=[],e.showExternalElements=!1,e.showClassInfoPanel=!1,h.clearClassHieararchyState(),e.hidePrefixes="true"===h.get(g.CLASS_HIERARCHY_HIDE_PREFIXES),e.currentSliderValue=void 0,e.classHierarchyData={},r.$broadcast("angucomplete-alt:clearInput")}function H(){e.hasClassHierarchy()&&u((function(){$("#toolbar").removeClass("ng-hide")}),0)}E.push(e.$on("$destroy",()=>{E.forEach(e=>e())})),e.datasource=C,e.goToDomainRangeGraphView=A,e.toggleClassInfoSidePanel=function(){e.showClassInfoPanel=!e.showClassInfoPanel,r.$broadcast("sidePanelClosed")},e.getActiveRepositoryNoError=function(){if(!e.repositoryError)return t.getActiveRepository()},e.isSystemRepository=function(){return t.isSystemRepository()},e.confirmReloadClassHierarchy=function(){p.openSimpleModal({title:m.instant("confirm.operation"),message:m.instant("graphexplore.calculating.hierarchy"),warning:!0}).result.then((function(){I(),e.loader=!0,e.hierarchyError=!1,i.reloadClassHierarchy(w.contextID.uri).success((function(r){e.loader=!1,e.classHierarchyData=r,H(),x()})).error((function(r){e.loader=!1,e.hierarchyError=getError(r),o.error(getError(r),m.instant("graphexplore.error.rdf.class.request"))}))}))},e.focusOnRoot=function(){e.$broadcast("rootFocus")},e.copyToClipboard=function(e){p.openCopyToClipboardModal(e)},e.searchedClassCallback=function(e){if(e){const n={name:e.title};r.$broadcast("searchedClass",n)}},e.instancesQueryObj.query="",e.instancesFilterFunc=function(r){return r.resolvedUri.toLowerCase().indexOf(e.instancesQueryObj.query.toLowerCase())>=0},b(),e.$watch("instancesObj.items",(function(){e.instancesObj.items.length>0&&u((function(){e.adapterContainer.adapter.reload()}),30)})),e.$watch("selectedClass",(function(){e.showClassInfoPanel&&function(r){const n=r.data.fullName;let t=r.data.name;if(t===n){const e=t.lastIndexOf("#");t=t.substring(e+1)}e.encodedUri=encodeURIComponent(n);const s=encodeURIComponent("prefix onto:<http://www.ontotext.com/>\nselect ?s {\n ?s a <"+n+"> .\n}");e.viewInstancesUri="sparql?name="+t+"&infer=true&sameAs=false&query="+s+"&execute=true",i.getRdfsLabelAndComment(n).success((function(r){e.rdfsLabel=r.label,e.rdfsComment=r.comment,e.expanded=!1})).error((function(){o.error("Error getting rdfs:label and rdfs:comment")})),e.instancesQueryObj.query="",e.instancesLoader=!0,i.getClassInstances(n).success((function(r){e.instancesObj.items=[],_.each(r,(function(r,n){const t={};t.type=r.startsWith("<<")&&r.endsWith(">>")?"triple":"uri",t.absUri=encodeURIComponent(r),t.absUriNonEncoded=r,t.resolvedUri=n,e.instancesObj.items.push(t)})),e.instancesLoader=!1,e.instancesSearchPlaceholder=v(),e.instancesNotFiltered=e.instancesObj.items})).error((function(){o.error(m.instant("graphexplore.error.instances.request"))}))}(e.selectedClass)})),$(document).ready((function(){$(".prefix-toggle").click((function(){$(".tooltip").hide()}))}));let D=t.getActiveRepository();function O(){I(),!e.isSystemRepository()&&e.isLicenseValid()&&(e.hierarchyError=!1,e.loader=!0,i.getClassHierarchyData(w.contextID.uri).success((function(r,n){e.showExternalElements=!0,e.loader=!1,e.classHierarchyData=r,207===n&&o.warning(m.instant("graphexplore.update.diagram"),m.instant("graphexplore.repository.data.changed")),H()})).error((function(r){e.loader=!1,e.hierarchyError=getError(r),o.error(getError(r),m.instant("graphexplore.error.rdf.class.request"))})))}e.hasClassHierarchy=function(){return e.classHierarchyData.classCount&&e.getActiveRepositoryNoError()&&!e.isSystemRepository()},e.isLicenseValid=function(){return s.isLicenseValid()},e.chosenGraph=function(e){w=e,O(),h.set("classHierarchy-selectedGraph-"+t.getActiveRepository(),w)},e.getSelGraphValue=function(){return w.contextID.value},e.isAllGraphsSelected=function(){return"all.graphs.label"===e.getSelGraphValue()}}angular.module("graphdb.framework.graphexplore.controllers.class",["pageslide-directive","ngAnimate","ui.scroll.jqlite","ui.scroll","angucomplete-alt","rzSlider","toastr","graphdb.framework.utils.localstorageadapter"]).controller("RdfClassHierarchyCtlr",t),t.$inject=["$scope","$rootScope","$location","$repositories","$licenseService","$window","toastr","GraphDataRestService","UiScrollService","RdfsLabelCommentService","$timeout","ModalService","bowser","LocalStorageAdapter","LSKeys","RDF4JRepositoriesRestService","$translate"]}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[128],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[128],{265:function(e,a){PluginRegistry.add("route",[{url:"/hierarchy",module:"graphdb.framework.graphexplore",path:"graphexplore/app",chunk:"hierarchy",controller:"RdfClassHierarchyCtlr",templateUrl:"pages/rdfClassHierarchyInfo.html",title:"view.class.hierarchy.title",reloadOnSearch:!1,helpInfo:"view.class.hierarchy.helpInfo"},{url:"/domain-range-graph",module:"graphdb.framework.graphexplore",path:"graphexplore/app",chunk:"domain-range-graph",controller:"DomainRangeGraphCtlr",templateUrl:"pages/domainRangeInfo.html",title:"view.domain.range.graph.title",helpInfo:"view.domain.range.graph.helpInfo"},{url:"/relationships",module:"graphdb.framework.graphexplore",path:"graphexplore/app",chunk:"relationships",controller:"DependenciesChordCtrl",templateUrl:"pages/dependencies.html",title:"view.class.relationships.title",helpInfo:"view.class.relationships.helpInfo"},{url:"/graphs-visualizations",module:"graphdb.framework.graphexplore",path:"graphexplore/app",chunk:"graphs-visualizations",controller:"GraphsVisualizationsCtrl",templateUrl:"pages/graphs-visualizations.html",title:"visual.graph.label",reloadOnSearch:!1,helpInfo:"view.visual.graph.helpInfo"},{url:"/graphs-visualizations/config/save/:configName?",module:"graphdb.framework.graphexplore",path:"graphexplore/app",chunk:"graph-config",controller:"GraphConfigCtrl",templateUrl:"pages/graph-config/saveGraphConfig.html",title:"view.create.visual.graph.title",helpInfo:"view.create.visual.graph.helpInfo"}]),PluginRegistry.add("main.menu",{items:[{label:"Explore",labelKey:"menu.explore.label",href:"#",order:1,role:"IS_AUTHENTICATED_FULLY",icon:"icon-data",guideSelector:"menu-explore"},{label:"Class relationships",labelKey:"menu.class.relationships.label",href:"relationships",order:2,parent:"Explore",guideSelector:"sub-menu-class-relationships"},{label:"Class hierarchy",labelKey:"menu.class.hierarchy.label",href:"hierarchy",order:1,parent:"Explore",guideSelector:"menu-class-hierarchy"},{label:"Visual graph",labelKey:"visual.graph.label",href:"graphs-visualizations",order:5,parent:"Explore",children:[{href:"graphs-visualizations/config/save",children:[]}],guideSelector:"sub-menu-visual-graph"}]})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[13,145,149],{102:function(e,t,s){"use strict";s.r(t),s.d(t,"ImportResourceTreeElement",(function(){return i}));var r=s(66),o=s(64);class i{constructor(){this.importResource=void 0,this.parent=void 0,this.partialSelected=!1,this.indent=0,this.isImportable=!1,this.hasOngoingImport=!1,this.hasStatusInfo=!1,this.canResetStatus=!1,this.name="",this.shortenedName="",this.path="",this.shortenedContext="",this.selected=!1,this.directories=[],this.files=[],this.isImportedBiggerThanModified=!1,this.isModifiedBiggerThanImported=!1,this.isEditable=!1,this.iconClass="",this.shortenedMessage=""}addResource(e){if(e.isFile())this.files.push(e);else{if(!e.isDirectory())throw new Error("Unsupported resource type!");this.directories.push(e)}}removeResource(e){e.isFile()?this.files=this.files.filter(t=>e.importResource.name!==t.importResource.name):this.directories=this.directories.filter(t=>e.importResource.name!==t.importResource.name)}remove(){this.isRoot()||this.parent.removeResource(this)}getOrCreateDirectory(e){let t=this.directories.find(t=>t.name===e);return t||(t=new i,t.name=e,this.directories.push(t)),t}getRoot(){return this.isRoot()?this:this.parent.getRoot()}isRoot(){return void 0===this.parent}isDirectory(){return this.importResource.isDirectory()}isFile(){return!this.isRoot()&&this.importResource.isFile()}isEmpty(){return 0===this.directories.length&&0===this.files.length}toList(){const e=[];return this.parent&&e.push(this),this.directories.forEach(t=>{e.push(...t.toList())}),e.push(...this.files),e}setSelection(e,t=!0){this.selected=e,this.files.forEach(t=>t.setSelection(e,!1)),this.directories.forEach(t=>t.setSelection(e,!1)),t&&this.getRoot().updateSelectionState()}updateSelectionState(){if(this.directories.forEach(e=>e.updateSelectionState()),this.parent&&this.isDirectory()){const e=this.hasUnselectedChildren(),t=this.hasSelectedChildren();this.selected=t&&!e,this.partialSelected=t&&e}}hasUnselectedChildren(){return this.files.some(e=>!e.selected)||this.directories.some(e=>!e.selected||e.hasUnselectedChildren())}hasSelectedChildren(){return this.files.some(e=>e.selected)||this.directories.some(e=>e.selected||e.hasSelectedChildren())}selectAllWithStatus(e){this.importResource&&e.indexOf(this.importResource.status)>-1&&(this.selected=!0),this.files.forEach(t=>t.selectAllWithStatus(e)),this.directories.forEach(t=>t.selectAllWithStatus(e))}getAllSelectedForImport(){const e=[],t=this.isRoot();return!t&&this.selected&&e.push(this),(t||this.isDirectory()&&!this.selected)&&(this.files.forEach(t=>e.push(...t.getAllSelectedForImport())),this.directories.forEach(t=>e.push(...t.getAllSelectedForImport()))),Object(o.cloneDeep)(e)}getAllSelected(){const e=[];return!this.isRoot()&&this.selected&&e.push(this),this.files.forEach(t=>e.push(...t.getAllSelected())),this.directories.forEach(t=>e.push(...t.getAllSelected())),Object(o.cloneDeep)(e)}getSelectedImportedResources(){return this.getAllSelected().some(e=>e.importResource.status===r.ImportResourceStatus.DONE)}deselectAll(){this.files.forEach(e=>e.deselectAll()),this.directories.forEach(e=>e.deselectAll()),this.selected=!1,this.partialSelected=!1}getAllSelectedFiles(){const e=[];return!this.isRoot()&&this.selected&&e.push(this.importResource),this.files.forEach(t=>e.push(...t.getAllSelectedFiles())),this.directories.forEach(t=>e.push(...t.getAllSelectedFiles())),e}getAllSelectedFilesNames(){return this.getAllSelectedFiles().map(e=>e.name)}getResourceByName(e){if(this.importResource&&this.importResource.name===e)return this;const t=this.files.find(t=>t.importResource.name===e);if(t)return t;for(const t of this.directories){const s=t.getResourceByName(e);if(s)return s}return null}hasTextInResourcesName(e){return!!this.importResource.name.toLowerCase().includes(e.toLowerCase())||(!!this.files.some(t=>t.importResource.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInDirectoriesName(e)))}hasTextInDirectoriesName(e){return!(!this.isDirectory()||!this.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInDirectoriesName(e))}hasTextInFilesName(e){return!(!this.isFile()||!this.name.toLowerCase().includes(e.toLowerCase()))||(!!this.files.some(t=>t.importResource.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInFilesName(e)))}sort(e){this.directories.sort(e),this.files.sort(e),this.directories.forEach(t=>t.sort(e))}getSize(){return this.toList().length}}},126:function(e,t){function s(e,t,s,r,o){e.message=o,e.close=()=>{t.dismiss()},e.copyToClipboard=()=>{navigator.clipboard.writeText(e.message).then(()=>{r.success(s.instant("import.help.messages.copied_to_clipboard")),e.close()},e=>{console.error("Could not copy text: ",e)})}}angular.module("graphdb.framework.impex.import.controllers.import-resource-message-dialog",[]).controller("ImportResourceMessageDialogController",s),s.$inject=["$scope","$uibModalInstance","$translate","toastr","message"]},202:function(e,t,s){"use strict";s.r(t);s(126);var r=s(66),o=s(71);function i(e){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-message.html",scope:{resource:"="},link:t=>{t.ImportResourceStatus=r.ImportResourceStatus,t.toTitleCase=e=>o.toTitleCase(e),t.showMessage=t=>{e.open({templateUrl:"js/angular/import/templates/import-resource-message-dialog.html",controller:"ImportResourceMessageDialogController",size:"lg",windowClass:"import-resource-message-dialog",backdrop:"static",resolve:{message:function(){return t?t.importResource.message:""}}})}}}}angular.module("graphdb.framework.import.directives.import-resource-message",["graphdb.framework.impex.import.controllers.import-resource-message-dialog"]).directive("importResourceMessage",i),i.$inject=["$uibModal"]},203:function(e,t){function s(e,t){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-status-info.html",scope:{resource:"="},link:s=>{const r=[];s.popoverTemplate="resourceStatusInfoTemplate.html",s.popoverIsOpen=!1,s.context=s.resource.importResource.context,s.replaceGraphs=s.resource.importResource.replaceGraphs,s.baseUrl=decodeURIComponent(s.resource.importResource.baseURI),s.forceSerial=s.resource.importResource.forceSerial,s.importedOn=s.resource.importResource.importedOn,s.parserSettings=s.resource.importResource.parserSettings,s.open=()=>{s.closeAllDialogs(),s.popoverIsOpen=!0},s.closeAllDialogs=()=>{e.$broadcast("closePopovers")},s.close=()=>{s.popoverIsOpen=!1};const o=e=>{"Escape"===e.key&&s.$apply(()=>{s.close()})};r.push(s.$on("closePopovers",s.close)),t.on("keydown",o),s.$on("$destroy",()=>{t.off("keydown",o),r.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-status-info",[]).directive("importResourceStatusInfo",s),s.$inject=["$rootScope","$document"]},204:function(e,t,s){"use strict";s.r(t),s.d(t,"INDENT",(function(){return c})),s.d(t,"serverImportResourceTypeToIconMapping",(function(){return a})),s.d(t,"userImportResourceTypeToIconMapping",(function(){return n})),s.d(t,"ImportResourceTreeService",(function(){return u}));var r=s(76),o=s(102),i=s(66);const c=30,a=new Map;a.set(r.ImportResourceType.DIRECTORY,"icon-folder"),a.set(r.ImportResourceType.FILE,"icon-file");const n=new Map;n.set(r.ImportResourceType.DIRECTORY,"icon-folder"),n.set(r.ImportResourceType.FILE,"icon-upload"),n.set(r.ImportResourceType.URL,"icon-link"),n.set(r.ImportResourceType.TEXT,"icon-sparql");class u{static toImportResourceTree(e,t){const s=new o.ImportResourceTreeElement;return e.forEach(e=>{u.addResourceToTree(s,e,t)}),s}static mergeResourceTree(e,t,s){e.getRoot().toList().forEach(e=>{t.find(t=>t.name===e.importResource.name)||e.remove()}),t.forEach(t=>{const r=e.getResourceByName(t.name);r?r.importResource=t:u.addResourceToTree(e,t,s)})}static addResourceToTree(e,t,s){const r=u.getPath(t);let i;i=t.isDirectory()?r:r.slice(0,r.length-1);const c=u.getOrCreateParent(e,i);if(t.isFile()){const e=new o.ImportResourceTreeElement;return e.parent=c,e.importResource=t,e.path=r.join("/"),e.name=r[r.length-1],c.addResource(e),u.setIcon(e,s),e}return c.importResource=t,c.path=r.join("/"),u.setIcon(c,s),c}static setIcon(e,t){e.iconClass=t?n.get(e.importResource.type):a.get(e.importResource.type)}static getOrCreateParent(e,t){let s=e;return t.forEach(e=>{const t=s.getOrCreateDirectory(e);t.parent=s,s=t}),s}static getPath(e){if(e.isURL())return[e.name];const t=/[/\\]/;return t.test(e.name)?e.name.split(t):[e.name]}static calculateElementIndent(e){e.indent=8+u.getParentsCount(e)*c+"px",e.directories.forEach(e=>u.calculateElementIndent(e)),e.files.forEach(e=>u.calculateElementIndent(e))}static setupAfterTreeInitProperties(e){e.isRoot()||(e.isImportable=u.isImportable(e.importResource),e.hasOngoingImport=u.hasOngoingImport(e.importResource),e.canResetStatus=u.canResetStatus(e.importResource),e.hasStatusInfo="DONE"===e.importResource.status||"ERROR"===e.importResource.status,e.isEditable=e.importResource.isText(),u.setupShortenedMessage(e),u.setupShortenedContext(e),u.setupShortenedName(e),u.setupImportedAndModifiedComparableProperties(e)),e.directories.forEach(e=>u.setupAfterTreeInitProperties(e)),e.files.forEach(e=>u.setupAfterTreeInitProperties(e))}static setupShortenedMessage(e){const t=e.importResource?e.importResource.message:"";t.length>150&&(e.shortenedMessage=t.substring(0,150)+"...")}static setupShortenedContext(e){const t=e.importResource?e.importResource.context:"";t.length>63&&(e.shortenedContext=t.substring(0,30)+"..."+t.substring(t.length-30))}static setupShortenedName(e){const t=e.name||"";t.length>123&&(e.shortenedName=t.substring(0,30)+"..."+t.substring(t.length-30))}static setupImportedAndModifiedComparableProperties(e){const t=e.importResource;if(t){if(0===t.importedOn||0===t.modifiedOn||t.importedOn===t.modifiedOn)return;e.isImportedBiggerThanModified=t.importedOn>t.modifiedOn,e.isModifiedBiggerThanImported=!e.isImportedBiggerThanModified}}static isImportable(e){return e.status!==i.ImportResourceStatus.IMPORTING&&e.status!==i.ImportResourceStatus.UPLOADING&&e.status!==i.ImportResourceStatus.PENDING&&e.status!==i.ImportResourceStatus.INTERRUPTING}static hasOngoingImport(e){return e.status===i.ImportResourceStatus.IMPORTING||e.status===i.ImportResourceStatus.UPLOADING||e.status===i.ImportResourceStatus.PENDING||e.status===i.ImportResourceStatus.INTERRUPTING}static canResetStatus(e){return e.status===i.ImportResourceStatus.DONE||e.status===i.ImportResourceStatus.ERROR}static getParentsCount(e){let t=0;if(void 0===e.parent)return t;let s=e.parent;for(;s;)s=s.parent,t++;return t-1}}},243:function(e,t,s){"use strict";s.r(t);var r=s(66),o=(s(202),s(203),s(125)),i=s(102),c=s(73),a=s(204);const n={FILE:"FILE",DIRECTORY:"DIRECTORY",ALL:"ALL"},u={ALL:"ALL",NONE:"NONE",IMPORTED:"IMPORTED",NOT_IMPORTED:"NOT_IMPORTED"};function l(e,t){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-tree.html",scope:{columnKeys:"=",showTypeFilter:"=",sortBy:"=",asc:"=",onImport:"&",onImportAll:"&",onReset:"&",onRemove:"&",onStopImport:"&",onEditResource:"&"},link:(s,l,p)=>{s.resources=new i.ImportResourceTreeElement,s.displayResources=[],s.TYPE_FILTER_OPTIONS=n,s.filterByType=n.ALL,s.filterByFileName="",s.STATUS_OPTIONS=u,s.selectedByStatus=void 0,s.areAllDisplayedImportResourcesSelected=!1,s.areAllDisplayedImportResourcesPartialSelected=!1,s.ImportResourceStatus=r.ImportResourceStatus,s.canRemoveResource=angular.isDefined(p.onRemove),s.canResetSelectedResources=!1,s.SORTING_TYPES=o.SortingType,s.sortAsc=!angular.isDefined(p.asc)||s.asc,s.sortedBy=s.sortBy,s.showLoader=t.getShowLoader(),s.hasSelection=!1,s.selectionChanged=e=>{e.setSelection(e.selected),R(),m(),h()},s.selectResourceWithStatus=e=>{s.selectedByStatus=e,s.resources.setSelection(!1),u.ALL===s.selectedByStatus?s.resources.setSelection(!0):u.IMPORTED===s.selectedByStatus?s.resources.selectAllWithStatus([r.ImportResourceStatus.DONE]):u.NOT_IMPORTED===s.selectedByStatus&&s.resources.selectAllWithStatus([r.ImportResourceStatus.IMPORTING,r.ImportResourceStatus.NONE,r.ImportResourceStatus.ERROR,r.ImportResourceStatus.PENDING,r.ImportResourceStatus.INTERRUPTING]),d(),m()},s.filterByTypeChanged=e=>{s.filterByType=e,d()},s.filterByFileNameChanged=e=>{s.filterByFileName=e,A(d,100)},s.onResetStatus=()=>{const e=s.resources.getAllSelected().map(e=>e.path);e.length>0&&s.onReset({resources:e})},s.resetStatus=e=>{s.onReset({resources:[e.path]})},s.onRemoveResources=()=>{const e=s.resources.getAllSelected();e&&e.length>0&&s.onRemove({resources:e})},s.removeResource=e=>{s.onRemove({resources:[e]})},s.importAll=e=>{const t=s.resources.getAllSelectedForImport();t.length>0&&s.onImportAll({selectedResources:t,withoutChangingSettings:e})},s.stopImport=e=>{s.onStopImport({resource:e})},s.sort=e=>{s.sortedBy===e?s.sortAsc=!s.sortAsc:s.sortAsc=!0,s.sortedBy=e,d()},s.editResource=e=>{s.onEditResource({resource:e})};const m=()=>{s.canResetSelectedResources=s.resources.getSelectedImportedResources()},d=()=>{s.resources.getRoot().updateSelectionState(),I(),s.displayResources=s.resources.toList().filter(y).filter(O),h(),R()},h=()=>{const e=s.resources.getAllSelectedFilesNames();s.hasSelection=e.length>0,t.updateSelectedFilesNames(e)},R=()=>{const e=s.displayResources.some(e=>!e.selected),t=s.displayResources.some(e=>e.selected);s.areAllDisplayedImportResourcesSelected=t&&!e,s.areAllDisplayedImportResourcesPartialSelected=t&&e},I=()=>{o.SortingType.NAME===s.sortedBy?s.resources.sort(g(s.sortAsc)):o.SortingType.SIZE===s.sortedBy?s.resources.sort(f(s.sortAsc)):o.SortingType.MODIFIED===s.sortedBy?s.resources.sort(S(s.sortAsc)):o.SortingType.IMPORTED===s.sortedBy?s.resources.sort(T(s.sortAsc)):o.SortingType.CONTEXT===s.sortedBy&&s.resources.sort(E(s.sortAsc))},g=e=>(t,s)=>e?t.importResource.name.localeCompare(s.importResource.name):s.importResource.name.localeCompare(t.importResource.name),f=e=>(t,s)=>{const r=0|t.importResource.size,o=0|s.importResource.size;return e?r-o:o-r},S=e=>(t,s)=>{const r=0|t.importResource.modifiedOn,o=0|s.importResource.modifiedOn;return e?r-o:o-r},T=e=>(t,s)=>{const r=0|t.importResource.importedOn,o=0|s.importResource.importedOn;return e?r-o:o-r},E=e=>(t,s)=>e?t.importResource.context.localeCompare(s.importResource.context):s.importResource.context.localeCompare(t.importResource.context),y=e=>n.ALL===s.filterByType||(s.filterByType===n.FILE?e.isFile():s.filterByType===n.DIRECTORY&&e.isDirectory()),O=e=>!s.filterByFileName||(s.filterByType===n.DIRECTORY?e.hasTextInDirectoriesName(s.filterByFileName):s.filterByType===n.FILE?e.hasTextInFilesName(s.filterByFileName):e.hasTextInResourcesName(s.filterByFileName));let N;const A=(t,s)=>{N&&e.cancel(N),N=e(t,s)},C=[];C.push(t.onResourcesUpdated((e=[])=>{const r=c.TABS.USER===t.getActiveTabId();s.resources.isEmpty()?(s.resources=a.ImportResourceTreeService.toImportResourceTree(e,r),r&&(s.sortedBy=o.SortingType.MODIFIED)):a.ImportResourceTreeService.mergeResourceTree(s.resources,e,r),a.ImportResourceTreeService.calculateElementIndent(s.resources),a.ImportResourceTreeService.setupAfterTreeInitProperties(s.resources),d(),m()})),C.push(t.onShowLoaderUpdated(e=>s.showLoader=e)),C.push(t.onActiveTabIdUpdated(()=>s.resources=new i.ImportResourceTreeElement));s.$on("$destroy",()=>{C.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-tree",["graphdb.framework.import.directives.import-resource-message","graphdb.framework.import.directives.import-resource-status-info"]).directive("importResourceTree",l),l.$inject=["$timeout","ImportContextService"]}}]);
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[13,145,149],{102:function(e,t,s){"use strict";s.r(t),s.d(t,"ImportResourceTreeElement",(function(){return i}));var r=s(66),o=s(25);class i{constructor(){this.importResource=void 0,this.parent=void 0,this.partialSelected=!1,this.indent=0,this.isImportable=!1,this.hasOngoingImport=!1,this.hasStatusInfo=!1,this.canResetStatus=!1,this.name="",this.shortenedName="",this.path="",this.shortenedContext="",this.selected=!1,this.directories=[],this.files=[],this.isImportedBiggerThanModified=!1,this.isModifiedBiggerThanImported=!1,this.isEditable=!1,this.iconClass="",this.shortenedMessage=""}addResource(e){if(e.isFile())this.files.push(e);else{if(!e.isDirectory())throw new Error("Unsupported resource type!");this.directories.push(e)}}removeResource(e){e.isFile()?this.files=this.files.filter(t=>e.importResource.name!==t.importResource.name):this.directories=this.directories.filter(t=>e.importResource.name!==t.importResource.name)}remove(){this.isRoot()||this.parent.removeResource(this)}getOrCreateDirectory(e){let t=this.directories.find(t=>t.name===e);return t||(t=new i,t.name=e,this.directories.push(t)),t}getRoot(){return this.isRoot()?this:this.parent.getRoot()}isRoot(){return void 0===this.parent}isDirectory(){return this.importResource.isDirectory()}isFile(){return!this.isRoot()&&this.importResource.isFile()}isEmpty(){return 0===this.directories.length&&0===this.files.length}toList(){const e=[];return this.parent&&e.push(this),this.directories.forEach(t=>{e.push(...t.toList())}),e.push(...this.files),e}setSelection(e,t=!0){this.selected=e,this.files.forEach(t=>t.setSelection(e,!1)),this.directories.forEach(t=>t.setSelection(e,!1)),t&&this.getRoot().updateSelectionState()}updateSelectionState(){if(this.directories.forEach(e=>e.updateSelectionState()),this.parent&&this.isDirectory()){const e=this.hasUnselectedChildren(),t=this.hasSelectedChildren();this.selected=t&&!e,this.partialSelected=t&&e}}hasUnselectedChildren(){return this.files.some(e=>!e.selected)||this.directories.some(e=>!e.selected||e.hasUnselectedChildren())}hasSelectedChildren(){return this.files.some(e=>e.selected)||this.directories.some(e=>e.selected||e.hasSelectedChildren())}selectAllWithStatus(e){this.importResource&&e.indexOf(this.importResource.status)>-1&&(this.selected=!0),this.files.forEach(t=>t.selectAllWithStatus(e)),this.directories.forEach(t=>t.selectAllWithStatus(e))}getAllSelectedForImport(){const e=[],t=this.isRoot();return!t&&this.selected&&e.push(this),(t||this.isDirectory()&&!this.selected)&&(this.files.forEach(t=>e.push(...t.getAllSelectedForImport())),this.directories.forEach(t=>e.push(...t.getAllSelectedForImport()))),Object(o.cloneDeep)(e)}getAllSelected(){const e=[];return!this.isRoot()&&this.selected&&e.push(this),this.files.forEach(t=>e.push(...t.getAllSelected())),this.directories.forEach(t=>e.push(...t.getAllSelected())),Object(o.cloneDeep)(e)}getSelectedImportedResources(){return this.getAllSelected().some(e=>e.importResource.status===r.ImportResourceStatus.DONE)}deselectAll(){this.files.forEach(e=>e.deselectAll()),this.directories.forEach(e=>e.deselectAll()),this.selected=!1,this.partialSelected=!1}getAllSelectedFiles(){const e=[];return!this.isRoot()&&this.selected&&e.push(this.importResource),this.files.forEach(t=>e.push(...t.getAllSelectedFiles())),this.directories.forEach(t=>e.push(...t.getAllSelectedFiles())),e}getAllSelectedFilesNames(){return this.getAllSelectedFiles().map(e=>e.name)}getResourceByName(e){if(this.importResource&&this.importResource.name===e)return this;const t=this.files.find(t=>t.importResource.name===e);if(t)return t;for(const t of this.directories){const s=t.getResourceByName(e);if(s)return s}return null}hasTextInResourcesName(e){return!!this.importResource.name.toLowerCase().includes(e.toLowerCase())||(!!this.files.some(t=>t.importResource.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInDirectoriesName(e)))}hasTextInDirectoriesName(e){return!(!this.isDirectory()||!this.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInDirectoriesName(e))}hasTextInFilesName(e){return!(!this.isFile()||!this.name.toLowerCase().includes(e.toLowerCase()))||(!!this.files.some(t=>t.importResource.name.toLowerCase().includes(e.toLowerCase()))||this.directories.some(t=>t.hasTextInFilesName(e)))}sort(e){this.directories.sort(e),this.files.sort(e),this.directories.forEach(t=>t.sort(e))}getSize(){return this.toList().length}}},126:function(e,t){function s(e,t,s,r,o){e.message=o,e.close=()=>{t.dismiss()},e.copyToClipboard=()=>{navigator.clipboard.writeText(e.message).then(()=>{r.success(s.instant("import.help.messages.copied_to_clipboard")),e.close()},e=>{console.error("Could not copy text: ",e)})}}angular.module("graphdb.framework.impex.import.controllers.import-resource-message-dialog",[]).controller("ImportResourceMessageDialogController",s),s.$inject=["$scope","$uibModalInstance","$translate","toastr","message"]},202:function(e,t,s){"use strict";s.r(t);s(126);var r=s(66),o=s(71);function i(e){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-message.html",scope:{resource:"="},link:t=>{t.ImportResourceStatus=r.ImportResourceStatus,t.toTitleCase=e=>o.toTitleCase(e),t.showMessage=t=>{e.open({templateUrl:"js/angular/import/templates/import-resource-message-dialog.html",controller:"ImportResourceMessageDialogController",size:"lg",windowClass:"import-resource-message-dialog",backdrop:"static",resolve:{message:function(){return t?t.importResource.message:""}}})}}}}angular.module("graphdb.framework.import.directives.import-resource-message",["graphdb.framework.impex.import.controllers.import-resource-message-dialog"]).directive("importResourceMessage",i),i.$inject=["$uibModal"]},203:function(e,t){function s(e,t){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-status-info.html",scope:{resource:"="},link:s=>{const r=[];s.popoverTemplate="resourceStatusInfoTemplate.html",s.popoverIsOpen=!1,s.context=s.resource.importResource.context,s.replaceGraphs=s.resource.importResource.replaceGraphs,s.baseUrl=decodeURIComponent(s.resource.importResource.baseURI),s.forceSerial=s.resource.importResource.forceSerial,s.importedOn=s.resource.importResource.importedOn,s.parserSettings=s.resource.importResource.parserSettings,s.open=()=>{s.closeAllDialogs(),s.popoverIsOpen=!0},s.closeAllDialogs=()=>{e.$broadcast("closePopovers")},s.close=()=>{s.popoverIsOpen=!1};const o=e=>{"Escape"===e.key&&s.$apply(()=>{s.close()})};r.push(s.$on("closePopovers",s.close)),t.on("keydown",o),s.$on("$destroy",()=>{t.off("keydown",o),r.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-status-info",[]).directive("importResourceStatusInfo",s),s.$inject=["$rootScope","$document"]},204:function(e,t,s){"use strict";s.r(t),s.d(t,"INDENT",(function(){return c})),s.d(t,"serverImportResourceTypeToIconMapping",(function(){return a})),s.d(t,"userImportResourceTypeToIconMapping",(function(){return n})),s.d(t,"ImportResourceTreeService",(function(){return u}));var r=s(76),o=s(102),i=s(66);const c=30,a=new Map;a.set(r.ImportResourceType.DIRECTORY,"icon-folder"),a.set(r.ImportResourceType.FILE,"icon-file");const n=new Map;n.set(r.ImportResourceType.DIRECTORY,"icon-folder"),n.set(r.ImportResourceType.FILE,"icon-upload"),n.set(r.ImportResourceType.URL,"icon-link"),n.set(r.ImportResourceType.TEXT,"icon-sparql");class u{static toImportResourceTree(e,t){const s=new o.ImportResourceTreeElement;return e.forEach(e=>{u.addResourceToTree(s,e,t)}),s}static mergeResourceTree(e,t,s){e.getRoot().toList().forEach(e=>{t.find(t=>t.name===e.importResource.name)||e.remove()}),t.forEach(t=>{const r=e.getResourceByName(t.name);r?r.importResource=t:u.addResourceToTree(e,t,s)})}static addResourceToTree(e,t,s){const r=u.getPath(t);let i;i=t.isDirectory()?r:r.slice(0,r.length-1);const c=u.getOrCreateParent(e,i);if(t.isFile()){const e=new o.ImportResourceTreeElement;return e.parent=c,e.importResource=t,e.path=r.join("/"),e.name=r[r.length-1],c.addResource(e),u.setIcon(e,s),e}return c.importResource=t,c.path=r.join("/"),u.setIcon(c,s),c}static setIcon(e,t){e.iconClass=t?n.get(e.importResource.type):a.get(e.importResource.type)}static getOrCreateParent(e,t){let s=e;return t.forEach(e=>{const t=s.getOrCreateDirectory(e);t.parent=s,s=t}),s}static getPath(e){if(e.isURL())return[e.name];const t=/[/\\]/;return t.test(e.name)?e.name.split(t):[e.name]}static calculateElementIndent(e){e.indent=8+u.getParentsCount(e)*c+"px",e.directories.forEach(e=>u.calculateElementIndent(e)),e.files.forEach(e=>u.calculateElementIndent(e))}static setupAfterTreeInitProperties(e){e.isRoot()||(e.isImportable=u.isImportable(e.importResource),e.hasOngoingImport=u.hasOngoingImport(e.importResource),e.canResetStatus=u.canResetStatus(e.importResource),e.hasStatusInfo="DONE"===e.importResource.status||"ERROR"===e.importResource.status,e.isEditable=e.importResource.isText(),u.setupShortenedMessage(e),u.setupShortenedContext(e),u.setupShortenedName(e),u.setupImportedAndModifiedComparableProperties(e)),e.directories.forEach(e=>u.setupAfterTreeInitProperties(e)),e.files.forEach(e=>u.setupAfterTreeInitProperties(e))}static setupShortenedMessage(e){const t=e.importResource?e.importResource.message:"";t.length>150&&(e.shortenedMessage=t.substring(0,150)+"...")}static setupShortenedContext(e){const t=e.importResource?e.importResource.context:"";t.length>63&&(e.shortenedContext=t.substring(0,30)+"..."+t.substring(t.length-30))}static setupShortenedName(e){const t=e.name||"";t.length>123&&(e.shortenedName=t.substring(0,30)+"..."+t.substring(t.length-30))}static setupImportedAndModifiedComparableProperties(e){const t=e.importResource;if(t){if(0===t.importedOn||0===t.modifiedOn||t.importedOn===t.modifiedOn)return;e.isImportedBiggerThanModified=t.importedOn>t.modifiedOn,e.isModifiedBiggerThanImported=!e.isImportedBiggerThanModified}}static isImportable(e){return e.status!==i.ImportResourceStatus.IMPORTING&&e.status!==i.ImportResourceStatus.UPLOADING&&e.status!==i.ImportResourceStatus.PENDING&&e.status!==i.ImportResourceStatus.INTERRUPTING}static hasOngoingImport(e){return e.status===i.ImportResourceStatus.IMPORTING||e.status===i.ImportResourceStatus.UPLOADING||e.status===i.ImportResourceStatus.PENDING||e.status===i.ImportResourceStatus.INTERRUPTING}static canResetStatus(e){return e.status===i.ImportResourceStatus.DONE||e.status===i.ImportResourceStatus.ERROR}static getParentsCount(e){let t=0;if(void 0===e.parent)return t;let s=e.parent;for(;s;)s=s.parent,t++;return t-1}}},242:function(e,t,s){"use strict";s.r(t);var r=s(66),o=(s(202),s(203),s(125)),i=s(102),c=s(73),a=s(204);const n={FILE:"FILE",DIRECTORY:"DIRECTORY",ALL:"ALL"},u={ALL:"ALL",NONE:"NONE",IMPORTED:"IMPORTED",NOT_IMPORTED:"NOT_IMPORTED"};function l(e,t){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-tree.html",scope:{columnKeys:"=",showTypeFilter:"=",sortBy:"=",asc:"=",onImport:"&",onImportAll:"&",onReset:"&",onRemove:"&",onStopImport:"&",onEditResource:"&"},link:(s,l,p)=>{s.resources=new i.ImportResourceTreeElement,s.displayResources=[],s.TYPE_FILTER_OPTIONS=n,s.filterByType=n.ALL,s.filterByFileName="",s.STATUS_OPTIONS=u,s.selectedByStatus=void 0,s.areAllDisplayedImportResourcesSelected=!1,s.areAllDisplayedImportResourcesPartialSelected=!1,s.ImportResourceStatus=r.ImportResourceStatus,s.canRemoveResource=angular.isDefined(p.onRemove),s.canResetSelectedResources=!1,s.SORTING_TYPES=o.SortingType,s.sortAsc=!angular.isDefined(p.asc)||s.asc,s.sortedBy=s.sortBy,s.showLoader=t.getShowLoader(),s.hasSelection=!1,s.selectionChanged=e=>{e.setSelection(e.selected),R(),m(),h()},s.selectResourceWithStatus=e=>{s.selectedByStatus=e,s.resources.setSelection(!1),u.ALL===s.selectedByStatus?s.resources.setSelection(!0):u.IMPORTED===s.selectedByStatus?s.resources.selectAllWithStatus([r.ImportResourceStatus.DONE]):u.NOT_IMPORTED===s.selectedByStatus&&s.resources.selectAllWithStatus([r.ImportResourceStatus.IMPORTING,r.ImportResourceStatus.NONE,r.ImportResourceStatus.ERROR,r.ImportResourceStatus.PENDING,r.ImportResourceStatus.INTERRUPTING]),d(),m()},s.filterByTypeChanged=e=>{s.filterByType=e,d()},s.filterByFileNameChanged=e=>{s.filterByFileName=e,A(d,100)},s.onResetStatus=()=>{const e=s.resources.getAllSelected().map(e=>e.path);e.length>0&&s.onReset({resources:e})},s.resetStatus=e=>{s.onReset({resources:[e.path]})},s.onRemoveResources=()=>{const e=s.resources.getAllSelected();e&&e.length>0&&s.onRemove({resources:e})},s.removeResource=e=>{s.onRemove({resources:[e]})},s.importAll=e=>{const t=s.resources.getAllSelectedForImport();t.length>0&&s.onImportAll({selectedResources:t,withoutChangingSettings:e})},s.stopImport=e=>{s.onStopImport({resource:e})},s.sort=e=>{s.sortedBy===e?s.sortAsc=!s.sortAsc:s.sortAsc=!0,s.sortedBy=e,d()},s.editResource=e=>{s.onEditResource({resource:e})};const m=()=>{s.canResetSelectedResources=s.resources.getSelectedImportedResources()},d=()=>{s.resources.getRoot().updateSelectionState(),I(),s.displayResources=s.resources.toList().filter(y).filter(O),h(),R()},h=()=>{const e=s.resources.getAllSelectedFilesNames();s.hasSelection=e.length>0,t.updateSelectedFilesNames(e)},R=()=>{const e=s.displayResources.some(e=>!e.selected),t=s.displayResources.some(e=>e.selected);s.areAllDisplayedImportResourcesSelected=t&&!e,s.areAllDisplayedImportResourcesPartialSelected=t&&e},I=()=>{o.SortingType.NAME===s.sortedBy?s.resources.sort(g(s.sortAsc)):o.SortingType.SIZE===s.sortedBy?s.resources.sort(f(s.sortAsc)):o.SortingType.MODIFIED===s.sortedBy?s.resources.sort(S(s.sortAsc)):o.SortingType.IMPORTED===s.sortedBy?s.resources.sort(T(s.sortAsc)):o.SortingType.CONTEXT===s.sortedBy&&s.resources.sort(E(s.sortAsc))},g=e=>(t,s)=>e?t.importResource.name.localeCompare(s.importResource.name):s.importResource.name.localeCompare(t.importResource.name),f=e=>(t,s)=>{const r=0|t.importResource.size,o=0|s.importResource.size;return e?r-o:o-r},S=e=>(t,s)=>{const r=0|t.importResource.modifiedOn,o=0|s.importResource.modifiedOn;return e?r-o:o-r},T=e=>(t,s)=>{const r=0|t.importResource.importedOn,o=0|s.importResource.importedOn;return e?r-o:o-r},E=e=>(t,s)=>e?t.importResource.context.localeCompare(s.importResource.context):s.importResource.context.localeCompare(t.importResource.context),y=e=>n.ALL===s.filterByType||(s.filterByType===n.FILE?e.isFile():s.filterByType===n.DIRECTORY&&e.isDirectory()),O=e=>!s.filterByFileName||(s.filterByType===n.DIRECTORY?e.hasTextInDirectoriesName(s.filterByFileName):s.filterByType===n.FILE?e.hasTextInFilesName(s.filterByFileName):e.hasTextInResourcesName(s.filterByFileName));let N;const A=(t,s)=>{N&&e.cancel(N),N=e(t,s)},C=[];C.push(t.onResourcesUpdated((e=[])=>{const r=c.TABS.USER===t.getActiveTabId();s.resources.isEmpty()?(s.resources=a.ImportResourceTreeService.toImportResourceTree(e,r),r&&(s.sortedBy=o.SortingType.MODIFIED)):a.ImportResourceTreeService.mergeResourceTree(s.resources,e,r),a.ImportResourceTreeService.calculateElementIndent(s.resources),a.ImportResourceTreeService.setupAfterTreeInitProperties(s.resources),d(),m()})),C.push(t.onShowLoaderUpdated(e=>s.showLoader=e)),C.push(t.onActiveTabIdUpdated(()=>s.resources=new i.ImportResourceTreeElement));s.$on("$destroy",()=>{C.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-tree",["graphdb.framework.import.directives.import-resource-message","graphdb.framework.import.directives.import-resource-status-info"]).directive("importResourceTree",l),l.$inject=["$timeout","ImportContextService"]}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[131],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[131],{267:function(e,i){PluginRegistry.add("route",[{url:"/guides",module:"graphdb.framework.guides",path:"guides/app",templateUrl:"pages/guides.html",title:"view.guides.title",controller:"GuidesCtrl",helpInfo:"view.guides.helpInfo"}]),PluginRegistry.add("main.menu",{items:[{label:"Guides",labelKey:"menu.guides.label",order:0,parent:"Help",icon:"paste",href:"guides",role:"ROLE_USER",guideSelector:"sub-menu-guide"}]})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[132],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[132],{268:function(e,t){const n=(e,t)=>(e.$location.path("/hierarchy").search({}),e.GuideUtils.waitFor(t,3).then(()=>(e.GuideUtils.classHierarchyFocus(t),e.GuideUtils.deferredShow(500)())));PluginRegistry.add("guide.step",[{guideBlockName:"class-hierarchy",getSteps:(e,t)=>{const n=t.GuideUtils;e.mainAction="class-hierarchy";const l=[{guideBlockName:"click-main-menu",options:angular.extend({},{menu:"class-hierarchy",showIntro:!0},e)},{guideBlockName:"read-only-element",options:angular.extend({},{content:"guide.step_plugin.class_hierarchy_intro.content",url:"/hierarchy",elementSelector:"#classChart",placement:"left"},e)}];return e.introExtraContent&&l.push({guideBlockName:"read-only-element",options:angular.extend({},{content:"",extraContent:e.introExtraContent,url:"/hierarchy",elementSelector:"#classChart #main-group",class:"clas-hierarchy-intro-guide-dialog",placement:"left"},e)}),angular.isArray(e.zoomIris)&&e.zoomIris.forEach(t=>{const i=n.getGuideElementSelector("class-"+t.iri);l.push({guideBlockName:"clickable-element",options:angular.extend({},{content:"guide.step_plugin.class_hierarchy_zoom.content",url:"/hierarchy",placement:"left",elementSelector:i,class:"class-hierarchy-zoom-content-guide-dialog",onNextClick:(e,t)=>{n.classHierarchyZoom(t.elementSelector),e.next()}},e,t)}),t.postExtraContent&&l.push({guideBlockName:"read-only-element",options:angular.extend({},{content:"",extraContent:t.postExtraContent,url:"/hierarchy",placement:"left",beforeShowPromise:n.deferredShow(800),elementSelector:i,class:"class-hierarchy-instances-guide-dialog"},e)})}),l}},{guideBlockName:"class-hierarchy-instances",getSteps:(e,t)=>{const l=t.GuideUtils,i=t.$location,a=t.$route;e.title="guide.step_plugin.class-hierarchy-instances.title";const s=l.getGuideElementSelector("close-info-panel"),c=l.getGuideElementSelector("class-"+e.iri),o=[{guideBlockName:"clickable-element",options:angular.extend({},{content:"guide.step_plugin.class-hierarchy-instances.content",url:"/hierarchy",elementSelector:c,class:"class-hierarchy-instance-guide-dialog",placement:"top",onNextClick:e=>{l.classHierarchyFocus(c),e.next()},initPreviousStep:()=>l.isVisible(s)?Promise.resolve():n({$location:i,$route:a,GuideUtils:l},c)},e)},{guideBlockName:"read-only-element",options:angular.extend({},{content:"guide.step_plugin.class-hierarchy-instances-side-panel.content",url:"/hierarchy",elementSelector:".rdf-info-side-panel div",class:"class-hierarchy-side-panel-info-guide-dialog",canBePaused:!1,placement:"left",beforeShowPromise:l.deferredShow(800),onPreviousClick:()=>new Promise((function(e){l.waitFor(s,1).then(()=>$(s).trigger("click")),e()}))},e)}];angular.isArray(e.focusInstances)&&e.focusInstances.forEach(t=>{angular.isObject(t)||(t={instance:t}),o.push({guideBlockName:"read-only-element",options:angular.extend({},{content:"guide.step_plugin.class-hierarchy-instances-focus.content",url:"/hierarchy",canBePaused:!1,elementSelector:l.getGuideElementSelector("instance-"+t.instance),class:"class-hierarchy-side-bar-instance-info-guide-dialog",focusInstance:t.instance,extraContent:t.message},e)})});const r=l.getGuideElementSelector("instances-count");return e.followCountLink&&(o.push({guideBlockName:"clickable-element",options:angular.extend({},{content:"guide.step_plugin.class-hierarchy-instances-count.content",url:"/hierarchy",canBePaused:!1,elementSelector:r,class:"class-hierarchy-side-panel-instances-count-guide-dialog",onNextClick:(e,t)=>{l.waitFor(t.elementSelector,3).then(()=>$(t.elementSelector).trigger("click")),e.next()}},e)}),o.push({guideBlockName:"read-only-element",options:angular.extend({},{content:"guide.step_plugin.class-hierarchy-instances-query.content",url:"/sparql",elementSelector:l.CSS_SELECTORS.SPARQL_EDITOR_SELECTOR,beforeShowPromise:()=>l.waitFor(l.CSS_SELECTORS.SPARQL_EDITOR_SELECTOR,3).then(()=>l.deferredShow(500)()),class:"class-hierarchy-instances-query-guide-dialog",scrollToHandler:l.scrollToTop},e)}),o.push({guideBlockName:"read-only-element",options:angular.extend({},{content:"guide.step_plugin.class-hierarchy-instances-results.content",extraContent:!1!==e.showExtraCommentSparql?"guide.step_plugin.class-hierarchy-instances-results.extraContent":null,url:"/sparql",placement:"top",elementSelector:l.CSS_SELECTORS.SPARQL_RESULTS_SELECTOR,class:"class-hierarchy-instances-results-guide-dialog",fileName:e.fileName,scrollToHandler:l.scrollToTop,onNextClick:e=>{window.history.back(),e.next()},initPreviousStep:()=>Promise.resolve()},e)})),o.push({guideBlockName:"clickable-element",options:angular.extend({},{content:"guide.step_plugin.class-hierarchy-instances-side-panel-close.content",url:"/hierarchy",canBePaused:!1,elementSelector:s,class:"class-hierarchy-side-panel-close-guide-dialog",placement:"left",beforeShowPromise:e.followCountLink?l.deferredShow(1500):Promise.resolve(),advanceOn:{selector:s,event:"click"},onNextClick:()=>l.waitFor(s,3).then(()=>$(s).trigger("click")),initPreviousStep:(t,s)=>t.ShepherdService.getCurrentStepId()===s&&e.followCountLink?l.waitFor(r,3).then(()=>($(r).trigger("click"),l.waitFor(l.CSS_SELECTORS.SPARQL_RESULTS_SELECTOR,3).then(()=>l.deferredShow(50)()))):n({$location:i,$route:a,GuideUtils:l},c)},e)}),o}}])}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[133],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[133],{269:function(e,t){PluginRegistry.add("guide.step",[{guideBlockName:"create-repository",getSteps:(e,t)=>{const o=t.GuideUtils;e.mainAction="create-repository";const r=o.getGuideElementSelector("graphDBRepositoryIdInput"),i=e.repositoryId,n=[{guideBlockName:"click-main-menu",options:angular.extend({},{menu:"repositories",showIntro:!0},e)},{guideBlockName:"clickable-element",options:angular.extend({},{content:"guide.step_plugin.create_repository.create_repository_button.content",class:"create-repository-guide-dialog",url:"/repository",elementSelector:o.getGuideElementSelector("createRepository"),onNextClick:e=>o.clickOnGuideElement("createRepository")().then(()=>e.next())},e)},{guideBlockName:"clickable-element",options:angular.extend({},{content:"guide.step_plugin.create_repository.graph_db_repository.content",class:"create-gdb-repository-guide-dialog",url:"/repository/create",elementSelector:o.getGuideElementSelector("createGraphDBRepository"),onNextClick:o.clickOnGuideElement("createGraphDBRepository")},e)},{guideBlockName:"input-element",options:angular.extend({},{content:"guide.step_plugin.create_repository.repository_id.content",class:"gdb-repository-id-input-guide-dialog",url:"/repository/create/graphdb",elementSelector:r,onNextValidate:()=>Promise.resolve(o.validateTextInput(r,i))},e)}];return e.rulesetName&&n.push({guideBlockName:"clickable-element",options:angular.extend({},{content:"guide.step_plugin.create_repository.ruleset_dropdown.content",url:"/repository/create/graphdb",class:"gdb-repository-ruleset-select-guide-dialog",elementSelector:o.getGuideElementSelector("graphDBRepositoryRulesetSelect"),show:()=>()=>{o.validateTextInput(r,i)},rulesetName:e.rulesetName},e)}),n.push({guideBlockName:"clickable-element",options:angular.extend({},{content:"guide.step_plugin.create_repository.save_button.content",url:"/repository/create/graphdb",class:"create-repository-button-guide-dialog",elementSelector:o.getGuideElementSelector("graphDBRepositoryCrateButton"),show:()=>()=>{o.validateTextInput(r,i)},onNextClick:o.clickOnGuideElement("graphDBRepositoryCrateButton")},e)}),n}}])}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[134],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[134],{270:function(e,o){PluginRegistry.add("guide.step",[{guideBlockName:"download-guide-resource",getSteps:(e,o)=>({guideBlockName:"info-message",options:angular.extend({},{title:"guide.step_plugin.download-guide-resource.title",content:"guide.step_plugin.download-guide-resource.content",canBePaused:!0,forceReload:!0,resourceUrl:o.GuideUtils.toResourceDownloadUrl(e)},e)})}])}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[135],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[135],{271:function(e,t){PluginRegistry.add("guide.step",[{guideBlockName:"enable-autocomplete",getSteps:(e,t)=>{const o=t.GuideUtils;e.mainAction="enable-autocomplete";const n=o.getGuideElementSelector("autocompleteCheckbox");return[{guideBlockName:"click-main-menu",options:angular.extend({},{menu:"autocomplete",showIntro:!0},e)},{guideBlockName:"clickable-element",options:angular.extend({},{content:"guide.step_plugin.enable-autocomplete.content",url:"/autocomplete",elementSelector:n,class:"enable-autocomplete-checkbox-guide-dialog",advanceOn:void 0,beforeShowPromise:()=>o.deferredShow(500)(),show:e=>()=>{$(n).on("mouseup.autocompleteCheckboxClick",(function(){o.deferredShow(20)().then(()=>{o.isGuideElementChecked("autocompleteCheckbox"," input")&&e.next()})}))},onNextClick:e=>{o.isGuideElementChecked("autocompleteCheckbox"," input")||$(n).trigger("click"),e.next()},hide:()=>()=>{$(n).off("mouseup.autocompleteCheckboxClick")}},e)},{guideBlockName:"read-only-element",options:angular.extend({},{content:"guide.step_plugin.enable-autocomplete.status_info.content",url:"/autocomplete",elementSelector:o.getGuideElementSelector("autocompleteStatus"),class:"autocomplete-status-info-guide-dialog",canBePaused:!1},e)}]}}])}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[136],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[136],{272:function(e,t){PluginRegistry.add("guide.step",[{guideBlockName:"execute-sparql-query",getSteps:(e,t)=>{const r=t.GuideUtils,n=t.YasguiComponentDirectiveUtil,o=t.toastr,u=t.$translate,i=t.$interpolate,s=t.$location;e.mainAction="execute-sparql-query";const l=document.createElement("code"),a=document.createElement("button");a.className="btn btn-sm btn-secondary",a.innerText=u.instant("guide.step_plugin.execute-sparql-query.copy-to-editor.button"),a.setAttribute("ng-click","copyQuery()");const c=[{guideBlockName:"click-main-menu",options:angular.extend({},{menu:"sparql",showIntro:!0},e)}],p={"-1":'PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nselect * where { \n\t?s ?p ?o .\n?o rdf:type ""\n} limit 100 '};let d=!1;return e.queries.forEach((S,y)=>{const g=S.query;p[y]=g,l.innerText=g,e.queryAsHtmlCodeElement='<div class="shepherd-code">'+l.outerHTML+a.outerHTML+"</div>",c.push({guideBlockName:"input-element",options:angular.extend({},{content:"guide.step_plugin.execute-sparql-query.query-editor.content",url:"/sparql",elementSelector:r.CSS_SELECTORS.SPARQL_EDITOR_SELECTOR,class:"yasgui-query-editor-guide-dialog",beforeShowPromise:()=>n.getOntotextYasguiElementAsync("#query-editor").then(()=>r.waitFor(r.CSS_SELECTORS.SPARQL_EDITOR_SELECTOR,3)).then(()=>r.deferredShow(500)()).catch(e=>{throw t.toastr.error(t.$translate.instant("guide.unexpected.error.message")),e}),onNextValidate:()=>n.getOntotextYasguiElementAsync("#query-editor").then(e=>e.getQuery().then(t=>({yasgui:e,queryFromEditor:t}))).then(({yasgui:t,queryFromEditor:n})=>{const s=r.removeWhiteSpaces(n);if(s!==r.removeWhiteSpaces(g)){if("select*where{?s?p?o.}limit100"!==s&&!d)return r.noNextErrorToast(o,u,i,"guide.step_plugin.execute-sparql-query.query-not-same.error",e),!1;t.setQuery(g)}return d=!0,!0}),initPreviousStep:()=>{if(0===y)return n.setQuery("#query-editor","select * where { \n\t?s ?p ?o .\n} limit 100 \n");return"/sparql"!==s.url()&&s.path("/sparql").search({}),r.waitFor(r.CSS_SELECTORS.SPARQL_EDITOR_SELECTOR).then(()=>n.executeSparqlQuery("#query-editor",g))},scrollToHandler:r.scrollToTop,extraContent:S.queryExtraContent,onScope:e=>{e.copyQuery=()=>n.setQuery("#query-editor",g).then(()=>{})}},e)}),c.push({guideBlockName:"clickable-element",options:angular.extend({},{content:"guide.step_plugin.execute-sparql-query.run-sparql-query.content",url:"/sparql",elementSelector:r.CSS_SELECTORS.SPARQL_RUN_BUTTON_SELECTOR,class:"yasgui-run-button-guide-dialog",onNextClick:e=>n.getOntotextYasguiElementAsync("#query-editor").then(t=>{t.query(),e.next()}),scrollToHandler:r.scrollToTop,canBePaused:!1,initPreviousStep:(e,t)=>{const r=e.ShepherdService.getPreviousStepFromHistory(t);return r.options.initPreviousStep(e,r.options.id).then(()=>e.ShepherdService.getCurrentStepId()===t?Promise.resolve():n.executeSparqlQuery("#query-editor",g))}},e)}),c.push({guideBlockName:"read-only-element",options:angular.extend({},{content:"guide.step_plugin.execute-sparql-query.result-explain.content",url:"/sparql",placement:"top",elementSelector:r.CSS_SELECTORS.SPARQL_RESULTS_SELECTOR,class:"yasgui-query-results-guide-dialog",fileName:e.fileName,scrollToHandler:r.scrollToTop,extraContent:S.resultExtraContent,canBePaused:!1,initPreviousStep:(e,t)=>{if("/sparql"!==s.url())return s.path("/sparql").search({}),r.waitFor(r.CSS_SELECTORS.SPARQL_EDITOR_SELECTOR).then(()=>r.deferredShow(500)()).then(()=>n.executeSparqlQuery("#query-editor",g));const o=e.ShepherdService.getPreviousStepFromHistory(t);return o.options.initPreviousStep(e,o.options.id).then(()=>n.setQuery("#query-editor",g))}},e)})}),c}}])}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[137],{
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[137],{273:function(e,t){PluginRegistry.add("guide.step",[{guideBlockName:"import-rdf-file",getSteps:(e,t)=>{const i=t.GuideUtils,o=t.toastr,l=t.$translate,n=t.$interpolate,r=t.EventEmitterService;e.mainAction="import-file";const c=[{guideBlockName:"click-main-menu",options:angular.extend({},{menu:"import",showIntro:!0},e)}];e.resourcePath&&c.push({guideBlockName:"download-guide-resource",options:angular.extend({},{title:""},e)});const s=i.getGuideElementSelector("import-settings-import-button");let a;return c.push({guideBlockName:"clickable-element",options:angular.extend({},{content:"guide.step_plugin.import_rdf_file.content",url:"/import",elementSelector:i.getGuideElementSelector("uploadRdfFileButton"),class:"upload-rdf-file-button-guide-dialog",advanceOn:void 0,show:t=>()=>{a=r.subscribe("filesForUploadSelected",o=>{(o.files||[]).some(t=>t.name===e.resourceFile)?i.isVisible(i.getGuideElementSelector("import-file-"+e.resourceFile))?i.getOrWaiteFor(".confirm-duplicate-files-dialog").then(()=>t.next()):i.getOrWaiteFor(s).then(()=>t.next()):o.cancel=!0})},hide:()=>()=>{a&&a()},onNextValidate:()=>Promise.allSettled([i.getOrWaiteFor(".confirm-duplicate-files-dialog"),i.getOrWaiteFor(i.getGuideElementSelector("import-file-"+e.resourceFile))]).then(([t,r])=>"rejected"!==t.status||"rejected"!==r.status||(i.noNextErrorToast(o,l,n,"guide.step_plugin.import_rdf_file.file-must-be-uploaded",e),!1)),onNextClick:t=>{i.getOrWaiteFor(i.getGuideElementSelector("import-file-"+e.resourceFile)).then(e=>{e.click()}).catch(e=>{console.log(e)}).finally(()=>t.next())}},e)},{guideBlockName:"clickable-element",options:angular.extend({},{content:"guide.step_plugin.import_rdf_file.confirm_duplicate_files_dialog.content",elementSelector:i.getElementSelector(".confirm-duplicate-files-dialog .confirm-overwrite-btn"),url:"/import",placement:"bottom",class:"import-file-button-guide-dialog",skipFromHistory:!0,showOn:()=>i.isVisible(i.getElementSelector(".confirm-duplicate-files-dialog")),onNextClick:()=>i.clickOnElement(".confirm-duplicate-files-dialog .confirm-overwrite-btn")(),onPreviousClick:()=>i.isVisible(i.getElementSelector(".confirm-duplicate-files-dialog"))?i.clickOnElement(".confirm-duplicate-files-dialog .cancel-btn"):Promise.resolve()},e)},{guideBlockName:"clickable-element",options:angular.extend({},{content:"guide.step_plugin.import_rdf_file.import-settings.import.button.content",elementSelector:s,placement:"top",class:"import-settings-import-file-button-guide-dialog",onPreviousClick:()=>new Promise((function(e){i.clickOnGuideElement("import-settings-cancel-button")().then(()=>e())})),beforeShowPromise:()=>t.GuideUtils.deferredShow(300)().then(()=>i.getOrWaiteFor(s,3).catch(e=>(t.toastr.error(t.$translate.instant("guide.unexpected.error.message")),Promise.reject(e)))),onNextClick:()=>i.clickOnGuideElement("import-settings-import-button")(),canBePaused:!1},e)},{guideBlockName:"read-only-element",options:angular.extend({},{content:"guide.step_plugin.import_status_info.content",url:"/import",elementSelector:".import-resource-message",class:"import-status-info-guide-dialog",beforeShowPromise:()=>i.isVisible(".import-resource-message")?Promise.resolve():i.waitFor(".import-resource-message",10),onPreviousClick:()=>i.getOrWaiteFor(i.getGuideElementSelector("import-file-"+e.resourceFile),10).then(e=>{e.click()})},e)}),c}}])}}]);
|