hdt 3.2.0 → 3.2.1
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/deps/hdt-it/.cproject +42 -0
- package/deps/hdt-it/.project +27 -0
- package/deps/hdt-it/Camera.cpp +249 -0
- package/deps/hdt-it/Camera.h +77 -0
- package/deps/hdt-it/Color.cpp +157 -0
- package/deps/hdt-it/Color.h +49 -0
- package/deps/hdt-it/Info.plist +58 -0
- package/deps/hdt-it/LICENSE +280 -0
- package/deps/hdt-it/README.md +73 -0
- package/deps/hdt-it/StopWatch.cpp +170 -0
- package/deps/hdt-it/StopWatch.hpp +61 -0
- package/deps/hdt-it/abouthdt.cpp +14 -0
- package/deps/hdt-it/abouthdt.hpp +22 -0
- package/deps/hdt-it/abouthdt.ui +173 -0
- package/deps/hdt-it/colors.hpp +29 -0
- package/deps/hdt-it/constants.h +39 -0
- package/deps/hdt-it/createdmg.sh +72 -0
- package/deps/hdt-it/dictionarysuggestions.cpp +186 -0
- package/deps/hdt-it/dictionarysuggestions.hpp +39 -0
- package/deps/hdt-it/doc/hdtit.png +0 -0
- package/deps/hdt-it/doc/manual.html +88 -0
- package/deps/hdt-it/doc/matrix.png +0 -0
- package/deps/hdt-it/editreset.png +0 -0
- package/deps/hdt-it/hdt-it.pro +135 -0
- package/deps/hdt-it/hdt-it_es.qm +0 -0
- package/deps/hdt-it/hdt-it_es.ts +906 -0
- package/deps/hdt-it/hdtcachedinfo.cpp +155 -0
- package/deps/hdt-it/hdtcachedinfo.hpp +38 -0
- package/deps/hdt-it/hdtcontroller.cpp +369 -0
- package/deps/hdt-it/hdtcontroller.hpp +103 -0
- package/deps/hdt-it/hdtico.icns +0 -0
- package/deps/hdt-it/hdtico.rc +1 -0
- package/deps/hdt-it/hdtit.cpp +400 -0
- package/deps/hdt-it/hdtit.hpp +78 -0
- package/deps/hdt-it/hdtit.ui +875 -0
- package/deps/hdt-it/hdtoperation.cpp +284 -0
- package/deps/hdt-it/hdtoperation.hpp +71 -0
- package/deps/hdt-it/hdtresources.qrc +7 -0
- package/deps/hdt-it/hdtspecform.cpp +180 -0
- package/deps/hdt-it/hdtspecform.hpp +38 -0
- package/deps/hdt-it/hdtspecform.ui +361 -0
- package/deps/hdt-it/hdtsummarygenerator.cpp +109 -0
- package/deps/hdt-it/hdtsummarygenerator.hpp +15 -0
- package/deps/hdt-it/hdtwinico.ico +0 -0
- package/deps/hdt-it/hdtwinico2.ico +0 -0
- package/deps/hdt-it/headermodel.cpp +174 -0
- package/deps/hdt-it/headermodel.hpp +38 -0
- package/deps/hdt-it/loading.gif +0 -0
- package/deps/hdt-it/logo-hdt.png +0 -0
- package/deps/hdt-it/logo-hdt2.png +0 -0
- package/deps/hdt-it/main.cpp +39 -0
- package/deps/hdt-it/matrixviewwidget.cpp +501 -0
- package/deps/hdt-it/matrixviewwidget.hpp +81 -0
- package/deps/hdt-it/myapplication.cpp +45 -0
- package/deps/hdt-it/myapplication.hpp +24 -0
- package/deps/hdt-it/predicatestatus.cpp +97 -0
- package/deps/hdt-it/predicatestatus.hpp +39 -0
- package/deps/hdt-it/qclearlineedit.cpp +48 -0
- package/deps/hdt-it/qclearlineedit.hpp +30 -0
- package/deps/hdt-it/regexmodel.cpp +132 -0
- package/deps/hdt-it/regexmodel.hpp +37 -0
- package/deps/hdt-it/resultcounter.cpp +47 -0
- package/deps/hdt-it/resultcounter.hpp +30 -0
- package/deps/hdt-it/searchresultsmodel.cpp +179 -0
- package/deps/hdt-it/searchresultsmodel.hpp +39 -0
- package/deps/hdt-it/sparqlform.cpp +27 -0
- package/deps/hdt-it/sparqlform.hpp +28 -0
- package/deps/hdt-it/sparqlform.ui +112 -0
- package/deps/hdt-it/sparqlmodel.cpp +155 -0
- package/deps/hdt-it/sparqlmodel.hpp +32 -0
- package/deps/hdt-it/stringutils.cpp +48 -0
- package/deps/hdt-it/stringutils.hpp +18 -0
- package/deps/hdt-it/triplecomponentmodel.cpp +146 -0
- package/deps/hdt-it/triplecomponentmodel.hpp +33 -0
- package/deps/libcds/Doxyfile +307 -0
- package/deps/libcds/tutorial/tutorial.pdf +0 -0
- package/deps/libhdt/.cproject +304 -0
- package/deps/libhdt/Doxyfile +1630 -0
- package/package.json +7 -1
- package/.eslintrc +0 -178
- package/.github/workflows/ci.yml +0 -73
- package/.gitmodules +0 -4
- package/.idea/codeStyles/Project.xml +0 -38
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/hdt.iml +0 -12
- package/.idea/inspectionProfiles/Project_Default.xml +0 -7
- package/.idea/jsLinters/jshint.xml +0 -16
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -7
- package/.jshintignore +0 -1
- package/.jshintrc +0 -10
- package/perf/run.js +0 -43
- package/replace-in-file.json +0 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hdt",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "Native bindings to access HDT compressed triple files.",
|
|
5
5
|
"author": "Ruben Verborgh <ruben.verborgh@gmail.com>",
|
|
6
6
|
"keywords": [
|
|
@@ -15,6 +15,12 @@
|
|
|
15
15
|
"main": "./lib/hdt",
|
|
16
16
|
"bin": "./bin/hdt",
|
|
17
17
|
"types": "./lib/hdt.d.ts",
|
|
18
|
+
"files": [
|
|
19
|
+
"bin",
|
|
20
|
+
"binding.gyp",
|
|
21
|
+
"deps",
|
|
22
|
+
"lib"
|
|
23
|
+
],
|
|
18
24
|
"repository": {
|
|
19
25
|
"type": "git",
|
|
20
26
|
"url": "https://github.com/RubenVerborgh/HDT-Node.git"
|
package/.eslintrc
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
env: {
|
|
3
|
-
node: true,
|
|
4
|
-
},
|
|
5
|
-
parserOptions: {
|
|
6
|
-
ecmaVersion: 6
|
|
7
|
-
},
|
|
8
|
-
globals: {
|
|
9
|
-
Promise: true
|
|
10
|
-
},
|
|
11
|
-
rules: {
|
|
12
|
-
// Possible Errors
|
|
13
|
-
comma-dangle: [2, "always-multiline"],
|
|
14
|
-
no-cond-assign: 0,
|
|
15
|
-
no-console: 2,
|
|
16
|
-
no-constant-condition: 0,
|
|
17
|
-
no-debugger: 2,
|
|
18
|
-
no-dupe-args: 2,
|
|
19
|
-
no-dupe-keys: 2,
|
|
20
|
-
no-duplicate-case: 2,
|
|
21
|
-
no-empty: 2,
|
|
22
|
-
no-empty-character-class: 2,
|
|
23
|
-
no-ex-assign: 0,
|
|
24
|
-
no-extra-boolean-cast: 2,
|
|
25
|
-
no-extra-parens: 0,
|
|
26
|
-
no-extra-semi: 2,
|
|
27
|
-
no-func-assign: 2,
|
|
28
|
-
no-inner-declarations: 0,
|
|
29
|
-
no-invalid-regexp: 2,
|
|
30
|
-
no-irregular-whitespace: 2,
|
|
31
|
-
no-negated-in-lhs: 2,
|
|
32
|
-
no-obj-calls: 2,
|
|
33
|
-
no-regex-spaces: 2,
|
|
34
|
-
no-sparse-arrays: 2,
|
|
35
|
-
no-unreachable: 2,
|
|
36
|
-
use-isnan: 2,
|
|
37
|
-
valid-jsdoc: 0,
|
|
38
|
-
valid-typeof: 2,
|
|
39
|
-
no-unexpected-multiline: 2,
|
|
40
|
-
|
|
41
|
-
// Best Practices
|
|
42
|
-
accessor-pairs: 2,
|
|
43
|
-
block-scoped-var: 2,
|
|
44
|
-
complexity: 0,
|
|
45
|
-
consistent-return: 0,
|
|
46
|
-
curly: [2, "multi-or-nest"],
|
|
47
|
-
default-case: 0,
|
|
48
|
-
dot-notation: 2,
|
|
49
|
-
dot-location: [2, "property"],
|
|
50
|
-
eqeqeq: 2,
|
|
51
|
-
guard-for-in: 0,
|
|
52
|
-
no-alert: 2,
|
|
53
|
-
no-caller: 2,
|
|
54
|
-
no-div-regex: 2,
|
|
55
|
-
no-else-return: 0,
|
|
56
|
-
no-labels: 2,
|
|
57
|
-
no-eq-null: 2,
|
|
58
|
-
no-eval: 2,
|
|
59
|
-
no-extend-native: 2,
|
|
60
|
-
no-extra-bind: 2,
|
|
61
|
-
no-fallthrough: 2,
|
|
62
|
-
no-floating-decimal: 2,
|
|
63
|
-
no-implicit-coercion: 0,
|
|
64
|
-
no-implied-eval: 2,
|
|
65
|
-
no-invalid-this: 2,
|
|
66
|
-
no-iterator: 2,
|
|
67
|
-
no-lone-blocks: 2,
|
|
68
|
-
no-loop-func: 0,
|
|
69
|
-
no-multi-spaces: 0,
|
|
70
|
-
no-multi-str: 2,
|
|
71
|
-
no-native-reassign: 2,
|
|
72
|
-
no-new-func: 2,
|
|
73
|
-
no-new-wrappers: 2,
|
|
74
|
-
no-new: 2,
|
|
75
|
-
no-octal-escape: 2,
|
|
76
|
-
no-octal: 2,
|
|
77
|
-
no-param-reassign: 0,
|
|
78
|
-
no-process-env: 2,
|
|
79
|
-
no-proto: 2,
|
|
80
|
-
no-redeclare: 2,
|
|
81
|
-
no-return-assign: 0,
|
|
82
|
-
no-script-url: 2,
|
|
83
|
-
no-self-compare: 2,
|
|
84
|
-
no-sequences: 0, // allow the comma operator
|
|
85
|
-
no-throw-literal: 2,
|
|
86
|
-
no-unused-expressions: 0,
|
|
87
|
-
no-useless-call: 2,
|
|
88
|
-
no-void: 2,
|
|
89
|
-
no-warning-comments: 0,
|
|
90
|
-
no-with: 2,
|
|
91
|
-
radix: 2,
|
|
92
|
-
vars-on-top: 0,
|
|
93
|
-
wrap-iife: [2, "inside"],
|
|
94
|
-
yoda: 2,
|
|
95
|
-
|
|
96
|
-
// Strict Mode
|
|
97
|
-
strict: [2, "never"],
|
|
98
|
-
|
|
99
|
-
// Variables
|
|
100
|
-
init-declarations: 0,
|
|
101
|
-
no-catch-shadow: 0,
|
|
102
|
-
no-delete-var: 2,
|
|
103
|
-
no-label-var: 2,
|
|
104
|
-
no-shadow-restricted-names: 2,
|
|
105
|
-
no-shadow: 0,
|
|
106
|
-
no-undef-init: 2,
|
|
107
|
-
no-undef: 2,
|
|
108
|
-
no-undefined: 0,
|
|
109
|
-
no-unused-vars: [ 2, { args: "none" }],
|
|
110
|
-
no-use-before-define: [2, "nofunc"],
|
|
111
|
-
|
|
112
|
-
// Node.js
|
|
113
|
-
callback-return: 0,
|
|
114
|
-
handle-callback-err: 2,
|
|
115
|
-
no-mixed-requires: 0,
|
|
116
|
-
no-new-require: 2,
|
|
117
|
-
no-path-concat: 2,
|
|
118
|
-
no-process-exit: 0,
|
|
119
|
-
no-restricted-modules: 2,
|
|
120
|
-
no-sync: 0,
|
|
121
|
-
|
|
122
|
-
// Stylistic Issues
|
|
123
|
-
array-bracket-spacing: 2,
|
|
124
|
-
block-spacing: 2,
|
|
125
|
-
brace-style: [2, "stroustrup", { allowSingleLine: true }],
|
|
126
|
-
camelcase: 2,
|
|
127
|
-
comma-spacing: 2,
|
|
128
|
-
comma-style: 2,
|
|
129
|
-
computed-property-spacing: 2,
|
|
130
|
-
consistent-this: 0,
|
|
131
|
-
eol-last: 2,
|
|
132
|
-
func-names: 0,
|
|
133
|
-
func-style: [2, "declaration"],
|
|
134
|
-
id-length: 0,
|
|
135
|
-
id-match: 2,
|
|
136
|
-
indent-legacy: [2, 2, { VariableDeclarator: 2 }],
|
|
137
|
-
key-spacing: 0,
|
|
138
|
-
lines-around-comment: 2,
|
|
139
|
-
linebreak-style: 2,
|
|
140
|
-
max-nested-callbacks: [2, 3],
|
|
141
|
-
new-cap: 2,
|
|
142
|
-
new-parens: 2,
|
|
143
|
-
newline-after-var: 0,
|
|
144
|
-
no-array-constructor: 2,
|
|
145
|
-
no-continue: 2,
|
|
146
|
-
no-inline-comments: 0,
|
|
147
|
-
no-lonely-if: 2,
|
|
148
|
-
no-mixed-spaces-and-tabs: 2,
|
|
149
|
-
no-multiple-empty-lines: 0,
|
|
150
|
-
no-nested-ternary: 0,
|
|
151
|
-
no-new-object: 2,
|
|
152
|
-
no-spaced-func: 2,
|
|
153
|
-
no-ternary: 0,
|
|
154
|
-
no-trailing-spaces: 2,
|
|
155
|
-
no-underscore-dangle: 0,
|
|
156
|
-
no-unneeded-ternary: 2,
|
|
157
|
-
object-curly-spacing: [2, "always"],
|
|
158
|
-
object-curly-newline: 0,
|
|
159
|
-
object-property-newline: 0,
|
|
160
|
-
one-var: 0,
|
|
161
|
-
operator-assignment: 2,
|
|
162
|
-
operator-linebreak: [2, "after", { overrides: { ":": "ignore" } }],
|
|
163
|
-
padded-blocks: [2, "never"],
|
|
164
|
-
quote-props: [2, "consistent-as-needed"],
|
|
165
|
-
quotes: [2, "single", "avoid-escape"],
|
|
166
|
-
semi-spacing: 2,
|
|
167
|
-
semi: 2,
|
|
168
|
-
sort-vars: 0,
|
|
169
|
-
keyword-spacing: 2,
|
|
170
|
-
space-before-blocks: 2,
|
|
171
|
-
space-before-function-paren: [2, {"anonymous": "always", "named": "never"}],
|
|
172
|
-
space-in-parens: 2,
|
|
173
|
-
space-infix-ops: 2,
|
|
174
|
-
space-unary-ops: 2,
|
|
175
|
-
spaced-comment: [2, "always", { block: { markers: ["!"] } }],
|
|
176
|
-
wrap-regex: 0,
|
|
177
|
-
},
|
|
178
|
-
}
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
on: [push, pull_request]
|
|
3
|
-
|
|
4
|
-
concurrency:
|
|
5
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
|
6
|
-
cancel-in-progress: true
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
|
|
10
|
-
test:
|
|
11
|
-
runs-on: ${{ matrix.os }}
|
|
12
|
-
strategy:
|
|
13
|
-
fail-fast: false
|
|
14
|
-
matrix:
|
|
15
|
-
os:
|
|
16
|
-
- ubuntu-20.04
|
|
17
|
-
- ubuntu-22.04
|
|
18
|
-
- ubuntu-24.04
|
|
19
|
-
- ubuntu-latest
|
|
20
|
-
- macos-13
|
|
21
|
-
- macos-14
|
|
22
|
-
- macos-15
|
|
23
|
-
- macos-latest
|
|
24
|
-
node-version:
|
|
25
|
-
- 18.x
|
|
26
|
-
- 20.x
|
|
27
|
-
- 22.x
|
|
28
|
-
steps:
|
|
29
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
30
|
-
uses: actions/setup-node@v3
|
|
31
|
-
with:
|
|
32
|
-
node-version: ${{ matrix.node-version }}
|
|
33
|
-
- name: Ensure line endings are consistent
|
|
34
|
-
run: git config --global core.autocrlf input
|
|
35
|
-
- name: Check out repository
|
|
36
|
-
uses: actions/checkout@v3
|
|
37
|
-
with:
|
|
38
|
-
submodules: 'recursive'
|
|
39
|
-
- name: Load cache
|
|
40
|
-
uses: actions/cache@v3
|
|
41
|
-
with:
|
|
42
|
-
path: |
|
|
43
|
-
**/node_modules
|
|
44
|
-
.rdf-test-suite-cache
|
|
45
|
-
.rdf-test-suite-ldf-cache
|
|
46
|
-
key: ${{ runner.os }}-${{ runner.node-version }}-test-modules-${{ hashFiles('**/package-lock.json') }}
|
|
47
|
-
- name: Install dependencies
|
|
48
|
-
run: npm install
|
|
49
|
-
- name: Run tests
|
|
50
|
-
run: npm run test
|
|
51
|
-
- name: Run bin
|
|
52
|
-
run: bin/hdt test/test.hdt --format turtle --query 'http://example.org/s1 ?p ?o' | grep 'http://example.org/p1'
|
|
53
|
-
|
|
54
|
-
lint:
|
|
55
|
-
runs-on: ubuntu-latest
|
|
56
|
-
steps:
|
|
57
|
-
- name: Use Node.js
|
|
58
|
-
uses: actions/setup-node@v3
|
|
59
|
-
with:
|
|
60
|
-
node-version: 18.x
|
|
61
|
-
- name: Check out repository
|
|
62
|
-
uses: actions/checkout@v3
|
|
63
|
-
with:
|
|
64
|
-
submodules: 'recursive'
|
|
65
|
-
- name: Load cache
|
|
66
|
-
uses: actions/cache@v3
|
|
67
|
-
with:
|
|
68
|
-
path: '**/node_modules'
|
|
69
|
-
key: ${{ runner.os }}-lint-modules-${{ hashFiles('**/package-lock.json') }}
|
|
70
|
-
- name: Install dependencies
|
|
71
|
-
run: npm install
|
|
72
|
-
- name: Run linter
|
|
73
|
-
run: npm run lint
|
package/.gitmodules
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<component name="ProjectCodeStyleConfiguration">
|
|
2
|
-
<code_scheme name="Project" version="173">
|
|
3
|
-
<JSCodeStyleSettings version="0">
|
|
4
|
-
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
5
|
-
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
6
|
-
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
7
|
-
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
|
8
|
-
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
9
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
10
|
-
</JSCodeStyleSettings>
|
|
11
|
-
<TypeScriptCodeStyleSettings version="0">
|
|
12
|
-
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
13
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
14
|
-
</TypeScriptCodeStyleSettings>
|
|
15
|
-
<codeStyleSettings language="JavaScript">
|
|
16
|
-
<option name="BLOCK_COMMENT_ADD_SPACE" value="true" />
|
|
17
|
-
<option name="ELSE_ON_NEW_LINE" value="true" />
|
|
18
|
-
<option name="INDENT_CASE_FROM_SWITCH" value="false" />
|
|
19
|
-
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
|
|
20
|
-
<option name="ALIGN_MULTILINE_FOR" value="false" />
|
|
21
|
-
<option name="IF_BRACE_FORCE" value="1" />
|
|
22
|
-
<option name="DOWHILE_BRACE_FORCE" value="1" />
|
|
23
|
-
<option name="WHILE_BRACE_FORCE" value="1" />
|
|
24
|
-
<option name="FOR_BRACE_FORCE" value="1" />
|
|
25
|
-
<indentOptions>
|
|
26
|
-
<option name="INDENT_SIZE" value="2" />
|
|
27
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
28
|
-
</indentOptions>
|
|
29
|
-
</codeStyleSettings>
|
|
30
|
-
<codeStyleSettings language="TypeScript">
|
|
31
|
-
<indentOptions>
|
|
32
|
-
<option name="INDENT_SIZE" value="2" />
|
|
33
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
34
|
-
<option name="TAB_SIZE" value="2" />
|
|
35
|
-
</indentOptions>
|
|
36
|
-
</codeStyleSettings>
|
|
37
|
-
</code_scheme>
|
|
38
|
-
</component>
|
package/.idea/hdt.iml
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="WEB_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager">
|
|
4
|
-
<content url="file://$MODULE_DIR$">
|
|
5
|
-
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
6
|
-
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
7
|
-
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
-
</content>
|
|
9
|
-
<orderEntry type="inheritedJdk" />
|
|
10
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
-
</component>
|
|
12
|
-
</module>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<component name="InspectionProjectProfileManager">
|
|
2
|
-
<profile version="1.0">
|
|
3
|
-
<option name="myName" value="Project Default" />
|
|
4
|
-
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
5
|
-
<inspection_tool class="JSHint" enabled="true" level="ERROR" enabled_by_default="true" />
|
|
6
|
-
</profile>
|
|
7
|
-
</component>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="JSHintConfiguration" version="2.13.6" use-config-file="true" use-custom-config-file="true" custom-config-file-path="$PROJECT_DIR$/.jshintrc">
|
|
4
|
-
<option bitwise="true" />
|
|
5
|
-
<option browser="true" />
|
|
6
|
-
<option curly="true" />
|
|
7
|
-
<option eqeqeq="true" />
|
|
8
|
-
<option forin="true" />
|
|
9
|
-
<option maxerr="50" />
|
|
10
|
-
<option noarg="true" />
|
|
11
|
-
<option noempty="true" />
|
|
12
|
-
<option nonew="true" />
|
|
13
|
-
<option strict="true" />
|
|
14
|
-
<option undef="true" />
|
|
15
|
-
</component>
|
|
16
|
-
</project>
|
package/.idea/modules.xml
DELETED
package/.idea/vcs.xml
DELETED
package/.jshintignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
node_modules
|
package/.jshintrc
DELETED
package/perf/run.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
const hdt = require('../lib/hdt');
|
|
2
|
-
const DF = require('n3').DataFactory;
|
|
3
|
-
const BF = new (require('@comunica/utils-bindings-factory').BindingsFactory)(DF);
|
|
4
|
-
|
|
5
|
-
const REPLICATION = 100000;
|
|
6
|
-
hdt.fromFile('../test/test.hdt').then(runForDocument);
|
|
7
|
-
|
|
8
|
-
async function runForDocument(document) {
|
|
9
|
-
console.time('warmup');
|
|
10
|
-
await iterate(document, 10000, searchTriples);
|
|
11
|
-
await iterate(document, 10000, searchBindings);
|
|
12
|
-
console.timeEnd('warmup');
|
|
13
|
-
|
|
14
|
-
console.time('searchTriples');
|
|
15
|
-
await iterate(document, REPLICATION, searchTriples);
|
|
16
|
-
console.timeEnd('searchTriples');
|
|
17
|
-
|
|
18
|
-
console.time('searchBindings');
|
|
19
|
-
await iterate(document, REPLICATION, searchBindings);
|
|
20
|
-
console.timeEnd('searchBindings');
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async function iterate(document, replication, fun) {
|
|
24
|
-
for (let i = 0; i < replication; i++) {
|
|
25
|
-
await fun(document);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
async function searchTriples(document) {
|
|
30
|
-
const { triples } = await document.searchTriples(DF.namedNode('http://example.org/s2'), null, null);
|
|
31
|
-
assert(triples.length == 10);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
async function searchBindings(document) {
|
|
35
|
-
const { bindings } = await document.searchBindings(BF, DF.namedNode('http://example.org/s2'), DF.variable('p'), DF.variable('o'));
|
|
36
|
-
assert(bindings.length == 10);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function assert(condition, message) {
|
|
40
|
-
if (!condition) {
|
|
41
|
-
throw message || "Assertion failed";
|
|
42
|
-
}
|
|
43
|
-
}
|