graphdb-workbench-tests 3.5.3 → 4.0.0-RC1
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/cypress-guides.config.js +45 -0
- 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/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 +520 -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 +27 -32
- package/e2e-legacy/guides/ttyg/edit-agent/edit-ttyg-agent-guide.spec.js +12 -20
- package/e2e-legacy/help/rest-api-documentatio/rest-api-documentation-theme.spec.js +50 -0
- 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 +83 -23
- 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-user-data.spec.js +8 -8
- package/e2e-legacy/import/import-view.spec.js +2 -2
- package/e2e-legacy/import/initial-state/import-page-with-selected-repositor.js +1 -1
- package/e2e-legacy/import/initial-state/import-page-with-selected-repository-without-imported-files.js +1 -1
- package/e2e-legacy/monitor/global-operation-statuses-component.spec.js +13 -17
- package/e2e-legacy/monitor/query-and-updates/queries-and-updates-with-repository.spec.js +16 -0
- 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 +129 -0
- package/e2e-legacy/repository/repositories.spec.js +27 -10
- 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 -24
- package/e2e-legacy/sparql-editor/actions/expand-results-over-sameas.spec.js +8 -8
- package/e2e-legacy/sparql-editor/actions/include-inferred-statements.spec.js +4 -4
- package/e2e-legacy/sparql-editor/actions/inferred-sameas.spec.js +2 -2
- 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 +16 -1
- package/e2e-legacy/ttyg/chat-panel.spec.js +14 -0
- package/e2e-legacy/ttyg/chat-template-injection.spec.js +49 -0
- package/e2e-legacy/ttyg/create-chat.spec.js +1 -1
- package/e2e-legacy/ttyg/delete-agent.spec.js +14 -0
- package/e2e-legacy/ttyg/edit-agent.spec.js +8 -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/repository/url-with-repository-id-parameter.spec.js +17 -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/eslint.config.js +5 -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/fixtures/monitoring/get-active-queries-cluster-replicating.json +15 -0
- package/fixtures/ttyg/agent/get-agent-list-with-html-in-names.json +77 -0
- package/fixtures/ttyg/chats/get-chat-list-with-html-in-name.json +22 -0
- package/fixtures/ttyg/chats/get-chat-with-template-injection.json +27 -0
- package/npm-shrinkwrap.json +1264 -1265
- package/package.json +12 -2
- package/steps/application-steps.js +4 -0
- package/steps/base-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 +159 -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 +94 -23
- package/steps/import/import-test-constants.js +1 -1
- package/steps/import/import-user-data-steps.js +26 -26
- 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/monitoring/queries-and-updates-steps.js +9 -0
- 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 +64 -9
- package/steps/resource/resource-steps.js +76 -9
- package/steps/rest-api-documentation-steps.js +23 -0
- package/steps/setup/acl-management-steps.js +4 -24
- package/steps/setup/settings-steps.js +42 -0
- package/steps/toaster-steps.js +4 -0
- package/steps/ttyg/chat-panel-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 +5 -7
- package/steps/yasgui/yasr-steps.js +8 -0
- package/stubs/browser-stubs.js +40 -0
- package/stubs/graph-navigator-stubs.js +28 -0
- package/stubs/license-stubs.js +11 -3
- package/stubs/monitoring/queries-and-updates-stubs.js +5 -0
- package/stubs/repositories/repositories-stubs.js +44 -0
- package/stubs/ttyg/ttyg-stubs.js +3 -2
- package/stubs/yasgui/query-stubs.js +5 -0
- package/support/repository-commands.js +15 -0
- package/support/sparql-commands.js +2 -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,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');
|
package/eslint.config.js
CHANGED
|
@@ -35,6 +35,11 @@ export default [
|
|
|
35
35
|
rules: {
|
|
36
36
|
...pluginJs.configs.recommended.rules,
|
|
37
37
|
...pluginCypress.configs.recommended.rules,
|
|
38
|
+
// Exclusive tests (.only) silently skip the rest of the suite, so they must never be committed.
|
|
39
|
+
'no-restricted-syntax': ['error', {
|
|
40
|
+
selector: "MemberExpression[computed=false][property.name='only'][object.name=/^(describe|context|it|specify|test|suite)$/]",
|
|
41
|
+
message: 'Exclusive tests are not allowed: remove ".only" before committing.'
|
|
42
|
+
}],
|
|
38
43
|
},
|
|
39
44
|
},
|
|
40
45
|
];
|
|
@@ -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
|
+
] .
|