graphdb-workbench-tests 4.0.0-TR2 → 4.0.0-TR21
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/e2e-flaky/import/import-server-files-operations.spec.js +8 -30
- package/e2e-flaky/import/import-user-data-batch-operations.spec.js +7 -7
- package/e2e-flaky/import/import-user-data-url.spec.js +1 -1
- package/e2e-flaky/sparql-editor/lucene-connector.spec.js +1 -1
- package/e2e-legacy/cluster/cluster-configuration/cluster-configuration-multi-region.spec.js +27 -0
- package/e2e-legacy/cluster/edit-cluster-nodes-modal.spec.js +1 -1
- package/e2e-legacy/explore/graphs-overview/graphs.overview.spec.js +31 -2
- package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +35 -4
- package/e2e-legacy/graph-navigator/graph-navigator-restrictions.spec.js +216 -0
- package/e2e-legacy/graph-navigator/graph-navigator.spec.js +447 -0
- package/e2e-legacy/guides/import-rdf-file/confirm-duplicate-rdf-file.spec.js +1 -1
- package/e2e-legacy/guides/main-menu/main-menu-guide.spec.js +6 -14
- package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +26 -30
- package/e2e-legacy/guides/ttyg/edit-agent/edit-ttyg-agent-guide.spec.js +12 -20
- package/e2e-legacy/home/home-page-without-repositories.spec.js +3 -1
- package/e2e-legacy/home/home-page-without-selected-repository.spec.js +2 -1
- package/e2e-legacy/import/import-server-files-batch-operations.spec.js +38 -5
- package/e2e-legacy/import/import-server-files.spec.js +39 -23
- package/e2e-legacy/import/import-user-data-file-upload.spec.js +47 -22
- package/e2e-legacy/import/import-user-data-settings-dialog.spec.js +81 -10
- package/e2e-legacy/import/import-user-data-text-snippet.spec.js +6 -45
- package/e2e-legacy/import/import-user-data-url.spec.js +9 -5
- package/e2e-legacy/import/import-view.spec.js +2 -2
- package/e2e-legacy/monitor/global-operation-statuses-component.spec.js +13 -17
- package/e2e-legacy/rdf-version/rdf-version-accept-header.spec.js +145 -0
- package/e2e-legacy/repository/attach-remote-location.spec.js +7 -15
- package/e2e-legacy/repository/fedx-deprecation.spec.js +178 -0
- package/e2e-legacy/repository/ontop-repository.spec.js +25 -34
- package/e2e-legacy/repository/rename-repository-restrictions.spec.js +5 -1
- package/e2e-legacy/repository/repositories.spec.js +3 -3
- package/e2e-legacy/repository/repository-picker-tooltip.spec.js +72 -0
- package/e2e-legacy/repository/repository-selector-tooltip.spec.js +55 -0
- package/e2e-legacy/resource/resource.spec.js +177 -40
- package/e2e-legacy/setup/aclmanagement/create-rule.spec.js +14 -25
- package/e2e-legacy/setup/aclmanagement/delete-rule.spec.js +6 -6
- package/e2e-legacy/setup/aclmanagement/edit-rule.spec.js +15 -15
- package/e2e-legacy/setup/aclmanagement/render-rules.spec.js +1 -1
- package/e2e-legacy/setup/aclmanagement/reorder-rules.spec.js +2 -2
- package/e2e-legacy/setup/aclmanagement/revert-rules.spec.js +2 -2
- package/e2e-legacy/setup/aclmanagement/update-rules.spec.js +3 -3
- package/e2e-legacy/setup/aclmanagement/validate-uri.spec.js +152 -0
- package/e2e-legacy/setup/connectors/connectors-initial-state-with-selected-repository.spec.js +1 -1
- package/e2e-legacy/setup/plugins/plugins-without-repository.spec.js +1 -1
- package/e2e-legacy/setup/settings/my-settings.spec.js +25 -15
- package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +34 -25
- package/e2e-legacy/sparql-editor/saved-query/abort-query.spec.js +1 -1
- package/e2e-legacy/sparql-editor/sparql-editor-navigation.spec.js +219 -0
- package/e2e-legacy/sparql-editor/yasgui-tabs.spec.js +1 -1
- package/e2e-legacy/sparql-editor/yasr/download-as.spec.js +4 -7
- package/e2e-legacy/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +8 -8
- package/e2e-legacy/ttyg/chat-list.spec.js +1 -1
- package/e2e-legacy/ttyg/create-agent.spec.js +6 -4
- package/e2e-legacy/ttyg/create-chat.spec.js +1 -1
- package/e2e-legacy/ttyg/edit-agent.spec.js +57 -0
- package/e2e-legacy/ttyg/ttyg-initial-state-with-configured-api-key.spec.js +1 -1
- package/e2e-legacy/ttyg/ttyg-initial-state-with-selected-repository.spec.js +1 -1
- package/e2e-legacy/ttyg/ttyg-initial-state-without-repositories.spec.js +1 -1
- package/e2e-security/explore/visual-graph/graph-config-owner-actions.spec.js +52 -0
- package/e2e-security/setup/home/cookie-policy.spec.js +4 -0
- package/e2e-security/setup/license/license-loading.spec.js +57 -0
- package/e2e-security/setup/license/license-logout.spec.js +38 -0
- package/e2e-security/setup/users-and-access/create-user-permissions.spec.js +1 -1
- package/e2e-security/setup/users-and-access/repo-admin-role.spec.js +1 -1
- package/e2e-security/setup/users-and-access/user-and-access.spec.js +0 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-no-leader.json +41 -0
- package/fixtures/cluster/cluster-config-with-tag.json +17 -0
- package/fixtures/connectors/get-connectors.json +0 -1
- package/fixtures/graph-navigator/graph-navigator-settings-invalid.ttl +149 -0
- package/fixtures/graph-navigator/graph-navigator-settings.ttl +148 -0
- package/fixtures/graphdb-import/wine.rdf +279 -285
- package/npm-shrinkwrap.json +1283 -1643
- package/package.json +10 -1
- package/steps/base-steps.js +4 -0
- package/steps/cluster/cluster-configuration-steps.js +4 -0
- package/steps/cookie-policy/cookie-consent-banner-steps.js +2 -2
- package/steps/error-steps.js +2 -2
- package/steps/explore/graphs-overview-steps.js +44 -0
- package/steps/graph-navigator-steps.js +145 -0
- package/steps/header-steps.js +5 -1
- package/steps/home-steps.js +3 -6
- package/steps/import/import-server-files-steps.js +8 -0
- package/steps/import/import-settings-dialog-steps.js +16 -0
- package/steps/import/import-steps.js +88 -17
- package/steps/import/import-test-constants.js +1 -1
- package/steps/import/import-user-data-steps.js +24 -24
- package/steps/language-selector-steps.js +4 -0
- package/steps/layout-steps.js +6 -0
- package/steps/login-steps.js +7 -3
- package/steps/main-menu-steps.js +14 -14
- package/steps/ontop-repository-steps.js +4 -0
- package/steps/page-restrictions-steps.js +24 -0
- package/steps/repositories/attach-repository-steps.js +2 -10
- package/steps/repository-picker-list-steps.js +58 -0
- package/steps/repository-selector-steps.js +20 -0
- package/steps/repository-steps.js +48 -9
- package/steps/resource/resource-steps.js +76 -9
- package/steps/setup/acl-management-steps.js +4 -24
- package/steps/setup/settings-steps.js +42 -0
- package/steps/setup/user-and-access-steps.js +18 -14
- package/steps/toaster-steps.js +4 -0
- package/steps/ttyg/ttyg-view-steps.js +1 -14
- package/steps/visual-graph-steps.js +8 -0
- package/steps/widgets/repository-errors-widget-steps.js +15 -2
- package/steps/yasgui/yasqe-steps.js +3 -1
- package/steps/yasgui/yasr-steps.js +8 -0
- package/stubs/browser-stubs.js +40 -0
- package/stubs/cluster/cluster-stubs.js +15 -1
- package/stubs/graph-navigator-stubs.js +27 -0
- package/stubs/license-stubs.js +11 -3
- package/stubs/repositories/repositories-stubs.js +44 -0
- package/stubs/yasgui/query-stubs.js +5 -0
- package/support/visual-graph-commands.js +19 -0
- package/e2e-legacy/home/solr-banner/solr-banner.spec.js +0 -137
- package/fixtures/graphdb-import/test-trigstar.trigs +0 -32
- package/fixtures/graphdb-import/test_turtlestar.ttls +0 -6
- package/fixtures/graphdb-import/turtlestar-data.ttls +0 -77
- package/steps/deprecation-banner/deprecation-banner-steps.js +0 -13
- package/steps/deprecation-steps.js +0 -13
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {LoginSteps} from "../../../steps/login-steps";
|
|
2
|
+
import {HeaderSteps} from "../../../steps/header-steps";
|
|
3
|
+
import {MainMenuSteps} from "../../../steps/main-menu-steps";
|
|
4
|
+
import {VisualGraphSteps} from "../../../steps/visual-graph-steps";
|
|
5
|
+
import {ActiveRepositoryWidgetSteps} from "../../../steps/widgets/active-repository-widget-steps";
|
|
6
|
+
|
|
7
|
+
describe('Graph config owner actions', () => {
|
|
8
|
+
const password = 'Admin123!';
|
|
9
|
+
let repositoryId;
|
|
10
|
+
let username;
|
|
11
|
+
let graphConfigName;
|
|
12
|
+
|
|
13
|
+
beforeEach(() => {
|
|
14
|
+
repositoryId = 'graph-config-owner-' + Date.now();
|
|
15
|
+
username = 'graph-config-user-' + Date.now();
|
|
16
|
+
graphConfigName = 'graph-config-owner-' + Date.now();
|
|
17
|
+
cy.createRepository({id: repositoryId});
|
|
18
|
+
cy.presetRepository(repositoryId);
|
|
19
|
+
cy.createUser({username, password}, true);
|
|
20
|
+
cy.switchOnSecurity();
|
|
21
|
+
cy.loginAsAdmin();
|
|
22
|
+
cy.createGraphConfig(graphConfigName, repositoryId, true);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
afterEach(() => {
|
|
26
|
+
cy.loginAsAdmin();
|
|
27
|
+
cy.switchOffSecurity(true);
|
|
28
|
+
cy.deleteGraphConfig(graphConfigName);
|
|
29
|
+
cy.deleteUser(username);
|
|
30
|
+
cy.deleteRepository(repositoryId);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('should show edit and delete for own graph configs after switching users', () => {
|
|
34
|
+
// Given I am logged in as a basic user
|
|
35
|
+
LoginSteps.visitLoginPage();
|
|
36
|
+
LoginSteps.loginWithUser(username, password);
|
|
37
|
+
// Wait for the home page to load for the basic user. Cypress is fast and would log out before the page has
|
|
38
|
+
// loaded, so the page would never have the basic user and the test would not reproduce the problem.
|
|
39
|
+
ActiveRepositoryWidgetSteps.getActiveRepository().should('contain.text', repositoryId);
|
|
40
|
+
// And I log out
|
|
41
|
+
HeaderSteps.logout();
|
|
42
|
+
|
|
43
|
+
// When I log in as admin, without reloading the page
|
|
44
|
+
LoginSteps.loginWithUser('admin', 'root');
|
|
45
|
+
// And I open the Visual Graph page from the main menu
|
|
46
|
+
MainMenuSteps.clickOnVisualGraph();
|
|
47
|
+
|
|
48
|
+
// Then I expect to see the edit and delete buttons of the graph config I own
|
|
49
|
+
VisualGraphSteps.getEditConfigButton(graphConfigName).should('be.visible');
|
|
50
|
+
VisualGraphSteps.getDeleteConfigButton(graphConfigName).should('be.visible');
|
|
51
|
+
});
|
|
52
|
+
});
|
|
@@ -133,6 +133,10 @@ describe('Cookie policy', () => {
|
|
|
133
133
|
cy.reload();
|
|
134
134
|
// Then I expect the banner to be hidden
|
|
135
135
|
CookieConsentBannerSteps.getCookieConsentBanner().should('not.exist');
|
|
136
|
+
// Wait for the page to be fully loaded.
|
|
137
|
+
// Cypress executes actions very quickly, and without this wait the logout subscribers may not be registered yet.
|
|
138
|
+
// As a result, the logout event is not handled correctly and the logout operation may fail.
|
|
139
|
+
SettingsSteps.getCookiePolicyButton().should('be.visible');
|
|
136
140
|
// When I logout
|
|
137
141
|
LoginSteps.logout();
|
|
138
142
|
// Then I should see the login page
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {LicenseStubs} from '../../../stubs/license-stubs';
|
|
2
|
+
import {LoginSteps} from '../../../steps/login-steps';
|
|
3
|
+
import {HeaderSteps} from '../../../steps/header-steps';
|
|
4
|
+
|
|
5
|
+
Cypress.env('set_default_user_data', false);
|
|
6
|
+
|
|
7
|
+
describe('License loading', () => {
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
cy.switchOnSecurity();
|
|
10
|
+
cy.loginAsAdmin();
|
|
11
|
+
LicenseStubs.spyGetLicense();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
context('when free access is off', () => {
|
|
15
|
+
it('should load the license only for a logged in user', () => {
|
|
16
|
+
// Given I am on the login page and I am not logged in
|
|
17
|
+
LoginSteps.visitInProdMode();
|
|
18
|
+
LoginSteps.getLoginPage().should('be.visible');
|
|
19
|
+
// Then the license is not requested
|
|
20
|
+
cy.get('@get-license.all').should('have.length', 0);
|
|
21
|
+
|
|
22
|
+
// When I log in
|
|
23
|
+
LoginSteps.loginWithUser('admin', 'root');
|
|
24
|
+
// Then the license is requested
|
|
25
|
+
cy.wait('@get-license');
|
|
26
|
+
|
|
27
|
+
// When I reload the page
|
|
28
|
+
cy.reload();
|
|
29
|
+
// Then the license is requested again
|
|
30
|
+
cy.wait('@get-license');
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
context('when free access is on', () => {
|
|
35
|
+
beforeEach(() => {
|
|
36
|
+
cy.switchOnFreeAccess(true);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('should load the license for the free access user and after each login state change', () => {
|
|
40
|
+
// When I open the login page without logging in
|
|
41
|
+
LoginSteps.visitInProdMode();
|
|
42
|
+
// Then the license is requested
|
|
43
|
+
cy.wait('@get-license');
|
|
44
|
+
|
|
45
|
+
// When I log in
|
|
46
|
+
HeaderSteps.login();
|
|
47
|
+
LoginSteps.loginWithUser('admin', 'root');
|
|
48
|
+
// Then the license is requested again
|
|
49
|
+
cy.wait('@get-license');
|
|
50
|
+
|
|
51
|
+
// When I log out
|
|
52
|
+
HeaderSteps.logout();
|
|
53
|
+
// Then the license is requested again for the free access user
|
|
54
|
+
cy.wait('@get-license');
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {LicenseStubs} from '../../../stubs/license-stubs';
|
|
2
|
+
import {LoginSteps} from '../../../steps/login-steps';
|
|
3
|
+
import {MainMenuSteps} from '../../../steps/main-menu-steps';
|
|
4
|
+
import ImportSteps from '../../../steps/import/import-steps';
|
|
5
|
+
|
|
6
|
+
Cypress.env('set_default_user_data', false);
|
|
7
|
+
|
|
8
|
+
describe('License on logout', () => {
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
cy.switchOnSecurity();
|
|
11
|
+
cy.loginAsAdmin();
|
|
12
|
+
LicenseStubs.spyGetLicense();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('should not request the license when logging out from a legacy page', () => {
|
|
16
|
+
// Given I am logged in and I am on a legacy page
|
|
17
|
+
LoginSteps.visitInProdMode();
|
|
18
|
+
LoginSteps.loginWithUser('admin', 'root');
|
|
19
|
+
cy.wait('@get-license');
|
|
20
|
+
MainMenuSteps.clickOnMenuImport();
|
|
21
|
+
ImportSteps.getView().should('be.visible');
|
|
22
|
+
// And the legacy workbench has loaded the license
|
|
23
|
+
cy.wait('@get-license');
|
|
24
|
+
// And the license is not accessible without a session
|
|
25
|
+
LicenseStubs.stubLicenseUnauthorized();
|
|
26
|
+
|
|
27
|
+
// When I log out
|
|
28
|
+
LoginSteps.logout();
|
|
29
|
+
LoginSteps.getLoginPage().should('be.visible');
|
|
30
|
+
// And I log in again, which proves that the logout has been fully processed
|
|
31
|
+
LicenseStubs.spyGetLicenseFromServer();
|
|
32
|
+
LoginSteps.loginWithUser('admin', 'root');
|
|
33
|
+
cy.wait('@get-license');
|
|
34
|
+
|
|
35
|
+
// Then no license request was sent without a session
|
|
36
|
+
cy.get('@unauthorizedLicense.all').should('have.length', 0);
|
|
37
|
+
});
|
|
38
|
+
});
|
|
@@ -133,7 +133,7 @@ describe('User Management – Creation, Validation, Permissions & Deletion', ()
|
|
|
133
133
|
'ex:greeting ex:text "Hello, world!" .\n' +
|
|
134
134
|
'}';
|
|
135
135
|
cy.pasteIntoCodeMirror('.CodeMirror', prefix + query);
|
|
136
|
-
YasqeSteps.
|
|
136
|
+
YasqeSteps.executeQueryWithoutWaitingForResult();
|
|
137
137
|
// Verify read access
|
|
138
138
|
YasrSteps.getResponseInfo()
|
|
139
139
|
.should('not.have.class', 'hidden')
|
|
@@ -55,7 +55,7 @@ describe('Repository Admin – Permissions and Access Control', () => {
|
|
|
55
55
|
'ex:greeting ex:text "Hello, world!" .\n' +
|
|
56
56
|
'}';
|
|
57
57
|
cy.pasteIntoCodeMirror('.CodeMirror', prefix + query);
|
|
58
|
-
YasqeSteps.
|
|
58
|
+
YasqeSteps.executeQueryWithoutWaitingForResult();
|
|
59
59
|
// Verify read access
|
|
60
60
|
YasrSteps.getResponseInfo()
|
|
61
61
|
.should('not.have.class', 'hidden')
|
|
@@ -19,7 +19,6 @@ describe('User and Access', () => {
|
|
|
19
19
|
repositoryId2 = 'user-access-repo2-' + Date.now();
|
|
20
20
|
cy.createRepository({id: repositoryId1});
|
|
21
21
|
cy.createRepository({id: repositoryId2});
|
|
22
|
-
cy.presetRepository(repositoryId1);
|
|
23
22
|
UserAndAccessSteps.visit();
|
|
24
23
|
// Users table should be visible
|
|
25
24
|
UserAndAccessSteps.getUsersTable().should('be.visible');
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"address": "pc-desktop:7300",
|
|
4
|
+
"nodeState": "FOLLOWER",
|
|
5
|
+
"term": 2,
|
|
6
|
+
"syncStatus": {},
|
|
7
|
+
"lastLogTerm": 0,
|
|
8
|
+
"lastLogIndex": 0,
|
|
9
|
+
"endpoint": "http://pc-desktop:7200",
|
|
10
|
+
"recoveryStatus": {},
|
|
11
|
+
"topologyStatus": {
|
|
12
|
+
"state": "PRIMARY_NODE"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"address": "pc-desktop:7301",
|
|
17
|
+
"nodeState": "FOLLOWER",
|
|
18
|
+
"term": 2,
|
|
19
|
+
"syncStatus": {},
|
|
20
|
+
"lastLogTerm": 0,
|
|
21
|
+
"lastLogIndex": 0,
|
|
22
|
+
"endpoint": "http://pc-desktop:7201",
|
|
23
|
+
"recoveryStatus": {},
|
|
24
|
+
"topologyStatus": {
|
|
25
|
+
"state": "PRIMARY_NODE"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"address": "pc-desktop:7302",
|
|
30
|
+
"nodeState": "FOLLOWER",
|
|
31
|
+
"term": 2,
|
|
32
|
+
"syncStatus": {},
|
|
33
|
+
"lastLogTerm": 0,
|
|
34
|
+
"lastLogIndex": 0,
|
|
35
|
+
"endpoint": "http://pc-desktop:7202",
|
|
36
|
+
"recoveryStatus": {},
|
|
37
|
+
"topologyStatus": {
|
|
38
|
+
"state": "PRIMARY_NODE"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"electionMinTimeout": 8000,
|
|
3
|
+
"electionRangeTimeout": 6000,
|
|
4
|
+
"heartbeatInterval": 2000,
|
|
5
|
+
"messageSizeKB": 64,
|
|
6
|
+
"verificationTimeout": 1500,
|
|
7
|
+
"transactionLogMaximumSizeGB": 50.0,
|
|
8
|
+
"batchUpdateInterval": 5000,
|
|
9
|
+
"nodes": [
|
|
10
|
+
"pc-desktop:7302",
|
|
11
|
+
"pc-desktop:7300",
|
|
12
|
+
"pc-desktop:7301"
|
|
13
|
+
],
|
|
14
|
+
"primaryTags": [
|
|
15
|
+
"test"
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Elasticsearch": "http://www.ontotext.com/connectors/elasticsearch#",
|
|
3
3
|
"OpenSearch": "http://www.ontotext.com/connectors/opensearch#",
|
|
4
|
-
"Solr": "http://www.ontotext.com/connectors/solr#",
|
|
5
4
|
"Lucene": "http://www.ontotext.com/connectors/lucene#",
|
|
6
5
|
"Kafka": "http://www.ontotext.com/connectors/kafka#",
|
|
7
6
|
"ChatGPT Retrieval": "http://www.ontotext.com/connectors/retrieval#"
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
@prefix gn: <http://www.ontotext.com/graph-navigator#> .
|
|
2
|
+
|
|
3
|
+
gn:settings gn:defaultPrefix """PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
|
4
|
+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
|
5
|
+
PREFIX owl: <http://www.w3.org/2002/07/owl#>
|
|
6
|
+
""";
|
|
7
|
+
gn:schemaLabelProperty "rdfs:label";
|
|
8
|
+
gn:dataLabelProperty "rdfs:label";
|
|
9
|
+
gn:classTreeQuery """
|
|
10
|
+
SELECT ?class ?label ?parent
|
|
11
|
+
WHERE {
|
|
12
|
+
{
|
|
13
|
+
?class a rdfs:Class
|
|
14
|
+
} UNION {
|
|
15
|
+
?class a owl:Class
|
|
16
|
+
}
|
|
17
|
+
FILTER ISIRI(?class)
|
|
18
|
+
OPTIONAL {
|
|
19
|
+
?class rdfs:label ?label
|
|
20
|
+
${labelLanguageFilter}
|
|
21
|
+
}
|
|
22
|
+
OPTIONAL {?class rdfs:subClassOf ?parent. FILTER ISIRI(?parent)}
|
|
23
|
+
}
|
|
24
|
+
""";
|
|
25
|
+
gn:classInfoQuery """SELECT ?class ?label ?instcount WHERE {
|
|
26
|
+
VALUES(?class) {${ids}}
|
|
27
|
+
OPTIONAL {
|
|
28
|
+
?class ${schemaLabelProperty} ?label
|
|
29
|
+
${labelLanguageFilter}
|
|
30
|
+
}
|
|
31
|
+
BIND(\"\" as ?instcount)
|
|
32
|
+
}""";
|
|
33
|
+
gn:linkTypesQuery """SELECT DISTINCT ?link ?instcount ?label WHERE {
|
|
34
|
+
${linkTypesPattern}
|
|
35
|
+
OPTIONAL {
|
|
36
|
+
?link ${schemaLabelProperty} ?label
|
|
37
|
+
${labelLanguageFilter}
|
|
38
|
+
}
|
|
39
|
+
}""";
|
|
40
|
+
gn:linkTypesPattern """
|
|
41
|
+
{ ?link a rdf:Property }
|
|
42
|
+
UNION
|
|
43
|
+
{ ?link a owl:ObjectProperty }
|
|
44
|
+
BIND('' as ?instcount)
|
|
45
|
+
""";
|
|
46
|
+
gn:linkTypesInfoQuery """SELECT ?link ?label WHERE {
|
|
47
|
+
VALUES(?link) {${ids}}
|
|
48
|
+
OPTIONAL {
|
|
49
|
+
?link ${schemaLabelProperty} ?label
|
|
50
|
+
${labelLanguageFilter}
|
|
51
|
+
}
|
|
52
|
+
}""";
|
|
53
|
+
gn:propertyInfoQuery """SELECT ?property ?label WHERE {
|
|
54
|
+
VALUES(?property) {${ids}}
|
|
55
|
+
OPTIONAL {
|
|
56
|
+
?property ${schemaLabelProperty} ?label
|
|
57
|
+
${labelLanguageFilter}
|
|
58
|
+
}
|
|
59
|
+
}""";
|
|
60
|
+
gn:elementInfoQuery """
|
|
61
|
+
CONSTRUCT {
|
|
62
|
+
?inst <urn:reactodia:sparql:type> ?class .
|
|
63
|
+
?inst <urn:reactodia:sparql:label> ?label .
|
|
64
|
+
?inst ?propType ?propValue.
|
|
65
|
+
} WHERE {
|
|
66
|
+
VALUES (?inst) {${ids}}
|
|
67
|
+
OPTIONAL { ?inst a ?class }
|
|
68
|
+
OPTIONAL {
|
|
69
|
+
?inst ${dataLabelProperty} ?label
|
|
70
|
+
${labelLanguageFilter}
|
|
71
|
+
}
|
|
72
|
+
OPTIONAL {
|
|
73
|
+
${propertyConfigurations}
|
|
74
|
+
FILTER (isLiteral(?propValue))
|
|
75
|
+
${valueLanguageFilter}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
""";
|
|
79
|
+
gn:linksInfoQuery """SELECT ?source ?type ?target
|
|
80
|
+
WHERE {
|
|
81
|
+
${linkConfigurations}
|
|
82
|
+
VALUES (?source) {${sourceIris}}
|
|
83
|
+
VALUES (?target) {${targetIris}}
|
|
84
|
+
}""";
|
|
85
|
+
gn:imageQueryPattern "{ ?inst ?linkType ?image } UNION { [] ?linkType ?inst. BIND(?inst as ?image) }";
|
|
86
|
+
gn:linkTypesOfQuery """
|
|
87
|
+
SELECT DISTINCT ?link ?direction
|
|
88
|
+
WHERE {
|
|
89
|
+
${linkConfigurations}
|
|
90
|
+
}
|
|
91
|
+
""";
|
|
92
|
+
gn:linkTypesStatisticsQuery """
|
|
93
|
+
SELECT ?link ?outCount ?inCount
|
|
94
|
+
WHERE {
|
|
95
|
+
{
|
|
96
|
+
SELECT (${linkId} as ?link) (count(?outObject) as ?outCount) WHERE {
|
|
97
|
+
${linkConfigurationOut}
|
|
98
|
+
${navigateElementFilterOut}
|
|
99
|
+
} LIMIT 101
|
|
100
|
+
} {
|
|
101
|
+
SELECT (${linkId} as ?link) (count(?inObject) as ?inCount) WHERE {
|
|
102
|
+
${linkConfigurationIn}
|
|
103
|
+
${navigateElementFilterIn}
|
|
104
|
+
} LIMIT 101
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
""";
|
|
108
|
+
gn:lookupQuery """SELECT ${outerProjection} WHERE {
|
|
109
|
+
${filterInnerPrelude}
|
|
110
|
+
{
|
|
111
|
+
SELECT DISTINCT ${innerProjection} WHERE {
|
|
112
|
+
${filterByType}
|
|
113
|
+
${filterByRefElementLink}
|
|
114
|
+
${filterByText}
|
|
115
|
+
${filterAdditionalRestriction}
|
|
116
|
+
} ${orderBy} ${limit}
|
|
117
|
+
}
|
|
118
|
+
${queryTypes}
|
|
119
|
+
${queryElementInfo}
|
|
120
|
+
} ${orderBy}""";
|
|
121
|
+
gn:filterInnerPrelude "";
|
|
122
|
+
gn:filterRefElementLinkPattern "";
|
|
123
|
+
gn:filterTypePattern "?inst a ?instType. ?instType rdfs:subClassOf* ?class";
|
|
124
|
+
gn:filterElementInfoPattern """
|
|
125
|
+
OPTIONAL {?inst rdf:type ?foundClass}
|
|
126
|
+
BIND (coalesce(?foundClass, owl:Thing) as ?class)
|
|
127
|
+
OPTIONAL {
|
|
128
|
+
?inst ${dataLabelProperty} ?label
|
|
129
|
+
${labelLanguageFilter}
|
|
130
|
+
}
|
|
131
|
+
""";
|
|
132
|
+
gn:filterAdditionalRestriction "";
|
|
133
|
+
gn:openWorldLinks false;
|
|
134
|
+
gn:openWorldProperties "no";
|
|
135
|
+
gn:acceptBlankNodes "no";
|
|
136
|
+
gn:unknownSetting "x";
|
|
137
|
+
gn:blankNodeStatementLimit "20"^^<http://www.w3.org/2001/XMLSchema#int>;
|
|
138
|
+
gn:filterOnlyLanguages [ a <http://www.w3.org/1999/02/22-rdf-syntax-ns#List>;
|
|
139
|
+
<http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "en";
|
|
140
|
+
<http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>
|
|
141
|
+
];
|
|
142
|
+
gn:fullTextSearch [
|
|
143
|
+
gn:prefix "";
|
|
144
|
+
gn:queryPattern """?inst ${dataLabelProperty} ?search1
|
|
145
|
+
FILTER regex(COALESCE(str(?search1)), \"${text}\", \"i\")
|
|
146
|
+
BIND(0 as ?score)
|
|
147
|
+
""";
|
|
148
|
+
gn:extractLabel true
|
|
149
|
+
] .
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
@prefix gn: <http://www.ontotext.com/graph-navigator#> .
|
|
2
|
+
|
|
3
|
+
gn:settings gn:defaultPrefix """PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
|
4
|
+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
|
5
|
+
PREFIX owl: <http://www.w3.org/2002/07/owl#>
|
|
6
|
+
""";
|
|
7
|
+
gn:schemaLabelProperty "rdfs:label";
|
|
8
|
+
gn:dataLabelProperty "rdfs:label";
|
|
9
|
+
gn:classTreeQuery """
|
|
10
|
+
SELECT ?class ?label ?parent
|
|
11
|
+
WHERE {
|
|
12
|
+
{
|
|
13
|
+
?class a rdfs:Class
|
|
14
|
+
} UNION {
|
|
15
|
+
?class a owl:Class
|
|
16
|
+
}
|
|
17
|
+
FILTER ISIRI(?class)
|
|
18
|
+
OPTIONAL {
|
|
19
|
+
?class rdfs:label ?label
|
|
20
|
+
${labelLanguageFilter}
|
|
21
|
+
}
|
|
22
|
+
OPTIONAL {?class rdfs:subClassOf ?parent. FILTER ISIRI(?parent)}
|
|
23
|
+
}
|
|
24
|
+
""";
|
|
25
|
+
gn:classInfoQuery """SELECT ?class ?label ?instcount WHERE {
|
|
26
|
+
VALUES(?class) {${ids}}
|
|
27
|
+
OPTIONAL {
|
|
28
|
+
?class ${schemaLabelProperty} ?label
|
|
29
|
+
${labelLanguageFilter}
|
|
30
|
+
}
|
|
31
|
+
BIND(\"\" as ?instcount)
|
|
32
|
+
}""";
|
|
33
|
+
gn:linkTypesQuery """SELECT DISTINCT ?link ?instcount ?label WHERE {
|
|
34
|
+
${linkTypesPattern}
|
|
35
|
+
OPTIONAL {
|
|
36
|
+
?link ${schemaLabelProperty} ?label
|
|
37
|
+
${labelLanguageFilter}
|
|
38
|
+
}
|
|
39
|
+
}""";
|
|
40
|
+
gn:linkTypesPattern """
|
|
41
|
+
{ ?link a rdf:Property }
|
|
42
|
+
UNION
|
|
43
|
+
{ ?link a owl:ObjectProperty }
|
|
44
|
+
BIND('' as ?instcount)
|
|
45
|
+
""";
|
|
46
|
+
gn:linkTypesInfoQuery """SELECT ?link ?label WHERE {
|
|
47
|
+
VALUES(?link) {${ids}}
|
|
48
|
+
OPTIONAL {
|
|
49
|
+
?link ${schemaLabelProperty} ?label
|
|
50
|
+
${labelLanguageFilter}
|
|
51
|
+
}
|
|
52
|
+
}""";
|
|
53
|
+
gn:propertyInfoQuery """SELECT ?property ?label WHERE {
|
|
54
|
+
VALUES(?property) {${ids}}
|
|
55
|
+
OPTIONAL {
|
|
56
|
+
?property ${schemaLabelProperty} ?label
|
|
57
|
+
${labelLanguageFilter}
|
|
58
|
+
}
|
|
59
|
+
}""";
|
|
60
|
+
gn:elementInfoQuery """
|
|
61
|
+
CONSTRUCT {
|
|
62
|
+
?inst <urn:reactodia:sparql:type> ?class .
|
|
63
|
+
?inst <urn:reactodia:sparql:label> ?label .
|
|
64
|
+
?inst ?propType ?propValue.
|
|
65
|
+
} WHERE {
|
|
66
|
+
VALUES (?inst) {${ids}}
|
|
67
|
+
OPTIONAL { ?inst a ?class }
|
|
68
|
+
OPTIONAL {
|
|
69
|
+
?inst ${dataLabelProperty} ?label
|
|
70
|
+
${labelLanguageFilter}
|
|
71
|
+
}
|
|
72
|
+
OPTIONAL {
|
|
73
|
+
${propertyConfigurations}
|
|
74
|
+
FILTER (isLiteral(?propValue))
|
|
75
|
+
${valueLanguageFilter}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
""";
|
|
79
|
+
gn:linksInfoQuery """SELECT ?source ?type ?target
|
|
80
|
+
WHERE {
|
|
81
|
+
${linkConfigurations}
|
|
82
|
+
VALUES (?source) {${sourceIris}}
|
|
83
|
+
VALUES (?target) {${targetIris}}
|
|
84
|
+
}""";
|
|
85
|
+
gn:imageQueryPattern "{ ?inst ?linkType ?image } UNION { [] ?linkType ?inst. BIND(?inst as ?image) }";
|
|
86
|
+
gn:linkTypesOfQuery """
|
|
87
|
+
SELECT DISTINCT ?link ?direction
|
|
88
|
+
WHERE {
|
|
89
|
+
${linkConfigurations}
|
|
90
|
+
}
|
|
91
|
+
""";
|
|
92
|
+
gn:linkTypesStatisticsQuery """
|
|
93
|
+
SELECT ?link ?outCount ?inCount
|
|
94
|
+
WHERE {
|
|
95
|
+
{
|
|
96
|
+
SELECT (${linkId} as ?link) (count(?outObject) as ?outCount) WHERE {
|
|
97
|
+
${linkConfigurationOut}
|
|
98
|
+
${navigateElementFilterOut}
|
|
99
|
+
} LIMIT 101
|
|
100
|
+
} {
|
|
101
|
+
SELECT (${linkId} as ?link) (count(?inObject) as ?inCount) WHERE {
|
|
102
|
+
${linkConfigurationIn}
|
|
103
|
+
${navigateElementFilterIn}
|
|
104
|
+
} LIMIT 101
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
""";
|
|
108
|
+
gn:lookupQuery """SELECT ${outerProjection} WHERE {
|
|
109
|
+
${filterInnerPrelude}
|
|
110
|
+
{
|
|
111
|
+
SELECT DISTINCT ${innerProjection} WHERE {
|
|
112
|
+
${filterByType}
|
|
113
|
+
${filterByRefElementLink}
|
|
114
|
+
${filterByText}
|
|
115
|
+
${filterAdditionalRestriction}
|
|
116
|
+
} ${orderBy} ${limit}
|
|
117
|
+
}
|
|
118
|
+
${queryTypes}
|
|
119
|
+
${queryElementInfo}
|
|
120
|
+
} ${orderBy}""";
|
|
121
|
+
gn:filterInnerPrelude "";
|
|
122
|
+
gn:filterRefElementLinkPattern "";
|
|
123
|
+
gn:filterTypePattern "?inst a ?instType. ?instType rdfs:subClassOf* ?class";
|
|
124
|
+
gn:filterElementInfoPattern """
|
|
125
|
+
OPTIONAL {?inst rdf:type ?foundClass}
|
|
126
|
+
BIND (coalesce(?foundClass, owl:Thing) as ?class)
|
|
127
|
+
OPTIONAL {
|
|
128
|
+
?inst ${dataLabelProperty} ?label
|
|
129
|
+
${labelLanguageFilter}
|
|
130
|
+
}
|
|
131
|
+
""";
|
|
132
|
+
gn:filterAdditionalRestriction "";
|
|
133
|
+
gn:openWorldLinks false;
|
|
134
|
+
gn:openWorldProperties false;
|
|
135
|
+
gn:acceptBlankNodes false;
|
|
136
|
+
gn:blankNodeStatementLimit "20"^^<http://www.w3.org/2001/XMLSchema#int>;
|
|
137
|
+
gn:filterOnlyLanguages [ a <http://www.w3.org/1999/02/22-rdf-syntax-ns#List>;
|
|
138
|
+
<http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "en";
|
|
139
|
+
<http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>
|
|
140
|
+
];
|
|
141
|
+
gn:fullTextSearch [
|
|
142
|
+
gn:prefix "";
|
|
143
|
+
gn:queryPattern """?inst ${dataLabelProperty} ?search1
|
|
144
|
+
FILTER regex(COALESCE(str(?search1)), \"${text}\", \"i\")
|
|
145
|
+
BIND(0 as ?score)
|
|
146
|
+
""";
|
|
147
|
+
gn:extractLabel true
|
|
148
|
+
] .
|