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.
Files changed (93) hide show
  1. package/deps/hdt-it/.cproject +42 -0
  2. package/deps/hdt-it/.project +27 -0
  3. package/deps/hdt-it/Camera.cpp +249 -0
  4. package/deps/hdt-it/Camera.h +77 -0
  5. package/deps/hdt-it/Color.cpp +157 -0
  6. package/deps/hdt-it/Color.h +49 -0
  7. package/deps/hdt-it/Info.plist +58 -0
  8. package/deps/hdt-it/LICENSE +280 -0
  9. package/deps/hdt-it/README.md +73 -0
  10. package/deps/hdt-it/StopWatch.cpp +170 -0
  11. package/deps/hdt-it/StopWatch.hpp +61 -0
  12. package/deps/hdt-it/abouthdt.cpp +14 -0
  13. package/deps/hdt-it/abouthdt.hpp +22 -0
  14. package/deps/hdt-it/abouthdt.ui +173 -0
  15. package/deps/hdt-it/colors.hpp +29 -0
  16. package/deps/hdt-it/constants.h +39 -0
  17. package/deps/hdt-it/createdmg.sh +72 -0
  18. package/deps/hdt-it/dictionarysuggestions.cpp +186 -0
  19. package/deps/hdt-it/dictionarysuggestions.hpp +39 -0
  20. package/deps/hdt-it/doc/hdtit.png +0 -0
  21. package/deps/hdt-it/doc/manual.html +88 -0
  22. package/deps/hdt-it/doc/matrix.png +0 -0
  23. package/deps/hdt-it/editreset.png +0 -0
  24. package/deps/hdt-it/hdt-it.pro +135 -0
  25. package/deps/hdt-it/hdt-it_es.qm +0 -0
  26. package/deps/hdt-it/hdt-it_es.ts +906 -0
  27. package/deps/hdt-it/hdtcachedinfo.cpp +155 -0
  28. package/deps/hdt-it/hdtcachedinfo.hpp +38 -0
  29. package/deps/hdt-it/hdtcontroller.cpp +369 -0
  30. package/deps/hdt-it/hdtcontroller.hpp +103 -0
  31. package/deps/hdt-it/hdtico.icns +0 -0
  32. package/deps/hdt-it/hdtico.rc +1 -0
  33. package/deps/hdt-it/hdtit.cpp +400 -0
  34. package/deps/hdt-it/hdtit.hpp +78 -0
  35. package/deps/hdt-it/hdtit.ui +875 -0
  36. package/deps/hdt-it/hdtoperation.cpp +284 -0
  37. package/deps/hdt-it/hdtoperation.hpp +71 -0
  38. package/deps/hdt-it/hdtresources.qrc +7 -0
  39. package/deps/hdt-it/hdtspecform.cpp +180 -0
  40. package/deps/hdt-it/hdtspecform.hpp +38 -0
  41. package/deps/hdt-it/hdtspecform.ui +361 -0
  42. package/deps/hdt-it/hdtsummarygenerator.cpp +109 -0
  43. package/deps/hdt-it/hdtsummarygenerator.hpp +15 -0
  44. package/deps/hdt-it/hdtwinico.ico +0 -0
  45. package/deps/hdt-it/hdtwinico2.ico +0 -0
  46. package/deps/hdt-it/headermodel.cpp +174 -0
  47. package/deps/hdt-it/headermodel.hpp +38 -0
  48. package/deps/hdt-it/loading.gif +0 -0
  49. package/deps/hdt-it/logo-hdt.png +0 -0
  50. package/deps/hdt-it/logo-hdt2.png +0 -0
  51. package/deps/hdt-it/main.cpp +39 -0
  52. package/deps/hdt-it/matrixviewwidget.cpp +501 -0
  53. package/deps/hdt-it/matrixviewwidget.hpp +81 -0
  54. package/deps/hdt-it/myapplication.cpp +45 -0
  55. package/deps/hdt-it/myapplication.hpp +24 -0
  56. package/deps/hdt-it/predicatestatus.cpp +97 -0
  57. package/deps/hdt-it/predicatestatus.hpp +39 -0
  58. package/deps/hdt-it/qclearlineedit.cpp +48 -0
  59. package/deps/hdt-it/qclearlineedit.hpp +30 -0
  60. package/deps/hdt-it/regexmodel.cpp +132 -0
  61. package/deps/hdt-it/regexmodel.hpp +37 -0
  62. package/deps/hdt-it/resultcounter.cpp +47 -0
  63. package/deps/hdt-it/resultcounter.hpp +30 -0
  64. package/deps/hdt-it/searchresultsmodel.cpp +179 -0
  65. package/deps/hdt-it/searchresultsmodel.hpp +39 -0
  66. package/deps/hdt-it/sparqlform.cpp +27 -0
  67. package/deps/hdt-it/sparqlform.hpp +28 -0
  68. package/deps/hdt-it/sparqlform.ui +112 -0
  69. package/deps/hdt-it/sparqlmodel.cpp +155 -0
  70. package/deps/hdt-it/sparqlmodel.hpp +32 -0
  71. package/deps/hdt-it/stringutils.cpp +48 -0
  72. package/deps/hdt-it/stringutils.hpp +18 -0
  73. package/deps/hdt-it/triplecomponentmodel.cpp +146 -0
  74. package/deps/hdt-it/triplecomponentmodel.hpp +33 -0
  75. package/deps/libcds/Doxyfile +307 -0
  76. package/deps/libcds/tutorial/tutorial.pdf +0 -0
  77. package/deps/libhdt/.cproject +304 -0
  78. package/deps/libhdt/Doxyfile +1630 -0
  79. package/package.json +7 -1
  80. package/.eslintrc +0 -178
  81. package/.github/workflows/ci.yml +0 -73
  82. package/.gitmodules +0 -4
  83. package/.idea/codeStyles/Project.xml +0 -38
  84. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  85. package/.idea/hdt.iml +0 -12
  86. package/.idea/inspectionProfiles/Project_Default.xml +0 -7
  87. package/.idea/jsLinters/jshint.xml +0 -16
  88. package/.idea/modules.xml +0 -8
  89. package/.idea/vcs.xml +0 -7
  90. package/.jshintignore +0 -1
  91. package/.jshintrc +0 -10
  92. package/perf/run.js +0 -43
  93. package/replace-in-file.json +0 -5
@@ -0,0 +1,173 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ui version="4.0">
3
+ <class>Abouthdt</class>
4
+ <widget class="QDialog" name="Abouthdt">
5
+ <property name="geometry">
6
+ <rect>
7
+ <x>0</x>
8
+ <y>0</y>
9
+ <width>557</width>
10
+ <height>377</height>
11
+ </rect>
12
+ </property>
13
+ <property name="sizePolicy">
14
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
15
+ <horstretch>0</horstretch>
16
+ <verstretch>0</verstretch>
17
+ </sizepolicy>
18
+ </property>
19
+ <property name="minimumSize">
20
+ <size>
21
+ <width>557</width>
22
+ <height>377</height>
23
+ </size>
24
+ </property>
25
+ <property name="maximumSize">
26
+ <size>
27
+ <width>557</width>
28
+ <height>377</height>
29
+ </size>
30
+ </property>
31
+ <property name="windowTitle">
32
+ <string>About HDT-it!</string>
33
+ </property>
34
+ <widget class="QDialogButtonBox" name="buttonBox">
35
+ <property name="geometry">
36
+ <rect>
37
+ <x>200</x>
38
+ <y>340</y>
39
+ <width>341</width>
40
+ <height>32</height>
41
+ </rect>
42
+ </property>
43
+ <property name="orientation">
44
+ <enum>Qt::Horizontal</enum>
45
+ </property>
46
+ <property name="standardButtons">
47
+ <set>QDialogButtonBox::Close</set>
48
+ </property>
49
+ <property name="centerButtons">
50
+ <bool>false</bool>
51
+ </property>
52
+ </widget>
53
+ <widget class="QGraphicsView" name="graphicsView">
54
+ <property name="geometry">
55
+ <rect>
56
+ <x>10</x>
57
+ <y>10</y>
58
+ <width>91</width>
59
+ <height>81</height>
60
+ </rect>
61
+ </property>
62
+ <property name="sizePolicy">
63
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
64
+ <horstretch>0</horstretch>
65
+ <verstretch>0</verstretch>
66
+ </sizepolicy>
67
+ </property>
68
+ <property name="minimumSize">
69
+ <size>
70
+ <width>91</width>
71
+ <height>81</height>
72
+ </size>
73
+ </property>
74
+ <property name="maximumSize">
75
+ <size>
76
+ <width>91</width>
77
+ <height>81</height>
78
+ </size>
79
+ </property>
80
+ <property name="styleSheet">
81
+ <string notr="true">border-image: url(:/images/logo-hdt.png);
82
+ </string>
83
+ </property>
84
+ </widget>
85
+ <widget class="QTextBrowser" name="textBrowser">
86
+ <property name="geometry">
87
+ <rect>
88
+ <x>110</x>
89
+ <y>10</y>
90
+ <width>431</width>
91
+ <height>321</height>
92
+ </rect>
93
+ </property>
94
+ <property name="font">
95
+ <font>
96
+ <pointsize>12</pointsize>
97
+ </font>
98
+ </property>
99
+ <property name="html">
100
+ <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
101
+ &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
102
+ p, li { white-space: pre-wrap; }
103
+ &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'.Lucida Grande UI'; font-size:12pt; font-weight:400; font-style:normal;&quot;&gt;
104
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande'; font-size:16pt; font-weight:600;&quot;&gt;HDT-it! version 1.1&lt;/span&gt;&lt;/p&gt;
105
+ &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Lucida Grande'; font-size:16pt; font-weight:600;&quot;&gt;&lt;/p&gt;
106
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;HDT (Header, Dictionary, Triples) is a binary representation for RDF that compresses big datasets in order to store and share big RDF files.&lt;/span&gt;&lt;/p&gt;
107
+ &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Lucida Grande';&quot;&gt;&lt;/p&gt;
108
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;HDT-it is a tool that allows generating and consuming HDT files. As an example, the tool allows to search for basic graph patterns, and shows a global 3D Matrix of the RDF distribution.&lt;/span&gt;&lt;/p&gt;
109
+ &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Lucida Grande';&quot;&gt;&lt;/p&gt;
110
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;For more information about the tool and our research, please visit:&lt;/span&gt;&lt;/p&gt;
111
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;HDT Web page: &lt;/span&gt;&lt;a href=&quot;http://www.rdfhdt.org&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande'; font-size:13pt; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.rdfhdt.org&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
112
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;Research group: &lt;/span&gt;&lt;a href=&quot;http://dataweb.infor.uva.es&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande'; font-size:13pt; text-decoration: underline; color:#0000ff;&quot;&gt;http://dataweb.infor.uva.es&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
113
+ &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Lucida Grande';&quot;&gt;&lt;/p&gt;
114
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande'; font-size:14pt; font-weight:600;&quot;&gt;HDT was possible thanks to:&lt;/span&gt;&lt;/p&gt;
115
+ &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Lucida Grande';&quot;&gt;&lt;/p&gt;
116
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;Mario Arias Gallego &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:mario.arias@insight-centre.org&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;mario.arias@insight-centre.org&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
117
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;Javier D. Fernández García &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:jfergar@infor.uva.es&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;jfergar@infor.uva.es&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
118
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;Miguel A. Martínez-Prieto &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:migumar2@infor.uva.es&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;migumar2@infor.uva.es&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
119
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;Claudio Gutierrez &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:cgutierr@dcc.uchile.cl&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;cgutierr@dcc.uchile.cl&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
120
+ &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Lucida Grande';&quot;&gt;&lt;/p&gt;
121
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande'; font-size:14pt; font-weight:600;&quot;&gt;And the following organizations:&lt;/span&gt;&lt;/p&gt;
122
+ &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Lucida Grande';&quot;&gt;&lt;/p&gt;
123
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;University of Valladolid. &lt;/span&gt;&lt;a href=&quot;http://www.uva.es&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.uva.es&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
124
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;University of Chile. &lt;/span&gt;&lt;a href=&quot;http://dcc.uchile.cl&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://dcc.uchile.cl&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
125
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;Insight Centre for Data Analytics &lt;/span&gt;&lt;a href=&quot;http://www.insight-centre.org&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.insight-centre.org&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
126
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;(Formerly known as Digital Enterprise Research Insitute. &lt;/span&gt;&lt;a href=&quot;http://www.deri.ie&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.deri.ie&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
127
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;National University of Ireland Galway. &lt;/span&gt;&lt;a href=&quot;http://www.nuigalway.ie&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.nuigalway.ie&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
128
+ &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; text-decoration: underline; color:#0000ff;&quot;&gt;&lt;/p&gt;
129
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande'; font-size:14pt; font-weight:600;&quot;&gt;Acknowledgemens:&lt;/span&gt;&lt;/p&gt;
130
+ &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; text-decoration: underline; color:#0000ff;&quot;&gt;&lt;/p&gt;
131
+ &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Lucida Grande';&quot;&gt;RDF/HDT is a project funded by the Spanish Ministry of Economy and Competitiveness (TIN2009-14009-C02-02); Science Foundation Ireland: Grant No. SFI/08/CE/I1380, Lion-II; Chilean Fondecyt's 1110287 and 1-110066&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
132
+ </property>
133
+ <property name="openExternalLinks">
134
+ <bool>true</bool>
135
+ </property>
136
+ </widget>
137
+ </widget>
138
+ <resources/>
139
+ <connections>
140
+ <connection>
141
+ <sender>buttonBox</sender>
142
+ <signal>accepted()</signal>
143
+ <receiver>Abouthdt</receiver>
144
+ <slot>accept()</slot>
145
+ <hints>
146
+ <hint type="sourcelabel">
147
+ <x>248</x>
148
+ <y>254</y>
149
+ </hint>
150
+ <hint type="destinationlabel">
151
+ <x>157</x>
152
+ <y>274</y>
153
+ </hint>
154
+ </hints>
155
+ </connection>
156
+ <connection>
157
+ <sender>buttonBox</sender>
158
+ <signal>rejected()</signal>
159
+ <receiver>Abouthdt</receiver>
160
+ <slot>reject()</slot>
161
+ <hints>
162
+ <hint type="sourcelabel">
163
+ <x>316</x>
164
+ <y>260</y>
165
+ </hint>
166
+ <hint type="destinationlabel">
167
+ <x>286</x>
168
+ <y>274</y>
169
+ </hint>
170
+ </hints>
171
+ </connection>
172
+ </connections>
173
+ </ui>
@@ -0,0 +1,29 @@
1
+ #ifndef COLORS_HPP
2
+ #define COLORS_HPP
3
+
4
+ #define SCREEN
5
+
6
+ #ifndef SCREEN
7
+ #define TEXT_COLOR 0.0, 0.0, 0.0, 1.0
8
+ #define CROSS_COLOR 1.0, 0.0, 0.0, 1.0
9
+ #define TEXT_BACKGROUND_COLOR 1.0, 1.0, 1.0, 0.9
10
+ #define BACKGROUND_COLOR 1, 1, 1, 1
11
+ #define SHARED_AREA_COLOR 0.9, 0.9, 0.9, 1.0
12
+ #define SHARED_AREA_BORDER_COLOR 0.1, 0.1, 0.1, 1.0
13
+ #define AXIS_COLOR 0.1, 0.1, 0.1, 1.0
14
+ #define GRID_COLOR 0.3, 0.3, 0.3, 1.0
15
+ #define RDF_POINT_SIZE 1.5
16
+ #else
17
+ #define TEXT_COLOR 1.0, 1.0, 1.0, 1.0
18
+ #define CROSS_COLOR 1.0, 1.0, 1.0, 1.0
19
+ #define TEXT_BACKGROUND_COLOR 0.0, 0.0, 0.0, 0.7
20
+ #define BACKGROUND_COLOR 0, 0, 0, 1
21
+ #define SHARED_AREA_COLOR 0.2, 0.2, 0.2, 1.0
22
+ #define SHARED_AREA_BORDER_COLOR 0.3, 0.3, 0.3, 1.0
23
+ #define AXIS_COLOR 0.8, 0.8, 0.8, 1.0
24
+ #define GRID_COLOR 0.2, 0.2, 0.2, 1.0
25
+ #define RDF_POINT_SIZE 1
26
+ #endif
27
+
28
+
29
+ #endif // COLORS_HPP
@@ -0,0 +1,39 @@
1
+ /*
2
+ * constants.h
3
+ *
4
+ * Created on: 04/03/2011
5
+ * Author: mck
6
+ */
7
+
8
+ #ifndef CONSTANTS_H_
9
+ #define CONSTANTS_H_
10
+
11
+ #define TIMER_DELAY 50
12
+ #define RENDER_NUM_POINTS 100000
13
+
14
+ #define SCREEN
15
+
16
+ #ifndef SCREEN
17
+ #define TEXT_COLOR 0.0, 0.0, 0.0, 1.0
18
+ #define CROSS_COLOR 1.0, 0.0, 0.0, 1.0
19
+ #define TEXT_BACKGROUND_COLOR 1.0, 1.0, 1.0, 0.9
20
+ #define BACKGROUND_COLOR 1, 1, 1, 1
21
+ #define SHARED_AREA_COLOR 0.9, 0.9, 0.9, 1.0
22
+ #define SHARED_AREA_BORDER_COLOR 0.1, 0.1, 0.1, 1.0
23
+ #define AXIS_COLOR 0.1, 0.1, 0.1, 1.0
24
+ #define GRID_COLOR 0.3, 0.3, 0.3, 1.0
25
+ #define RDF_POINT_SIZE 1.5
26
+ #else
27
+ #define TEXT_COLOR 1.0, 1.0, 1.0, 1.0
28
+ #define CROSS_COLOR 0.0, 0.0, 0.0, 1.0
29
+ #define TEXT_BACKGROUND_COLOR 0.0, 0.0, 0.0, 0.7
30
+ #define BACKGROUND_COLOR 0, 0, 0, 1
31
+ #define SHARED_AREA_COLOR 0.1, 0.1, 0.1, 1.0
32
+ #define SHARED_AREA_BORDER_COLOR 0.2, 0.2, 0.2, 1.0
33
+ #define AXIS_COLOR 0.8, 0.8, 0.8, 1.0
34
+ #define GRID_COLOR 0.2, 0.2, 0.2, 1.0
35
+ #define RDF_POINT_SIZE 1
36
+ #endif
37
+
38
+
39
+ #endif /* CONSTANTS_H_ */
@@ -0,0 +1,72 @@
1
+ #!/bin/bash
2
+
3
+ SRCAPP="macx/HDT-it.app"
4
+ FOLDER="macdmg"
5
+ VOL="HDT-it"
6
+ NAME="HDT-it!"
7
+ VERS="1.1"
8
+ DMG="$VOL-$VERS.dmg"
9
+
10
+ FRAMEWORK_BASE="$SRCAPP/Contents/Frameworks/"
11
+ REMOVE="QtSql.framework QtXmlPatterns.framework QtDeclarative.framework QtNetwork.framework QtScript.framework QtSvg.framework QtGui.framework/Versions/4/QtGui.strip"
12
+
13
+ DATASETBASE="$HOME/rdf/dataset/"
14
+ DATASETS="test.nt"
15
+ DATASETHDTBASE="$HOME/hdt/"
16
+ DATASETSHDT="3kbo.hdt aaronland.hdt 3dnews.hdt aisricom.hdt"
17
+ #DATASETSHDT="aifb.hdt apex.hdt 2blog.hdt 3kbo.hdt aaronland.hdt 3dnews.hdt aisricom.hdt"
18
+
19
+ mkdir -p $FOLDER
20
+ rm -Rf $FOLDER/*
21
+
22
+ # ADD LIBRARIES
23
+ echo macdeployqt $SRCAPP
24
+ macdeployqt $SRCAPP
25
+
26
+ # ADD Translation files
27
+ cp -Rf *.qm $SRCAPP/Contents/Resources
28
+
29
+ # ADD License and documentation
30
+ cp -Rf LICENSE $FOLDER
31
+
32
+ mkdir -p $FOLDER/doc
33
+ cp -Rf doc/* $FOLDER/doc
34
+
35
+ # REMOVE UNNEDED FILES
36
+ for i in $REMOVE
37
+ do
38
+ echo rm -Rf $FRAMEWORK_BASE$i;
39
+ rm -Rf $FRAMEWORK_BASE$i;
40
+ done
41
+
42
+ echo rm -Rf "$SRCAPP/Contents/PlugIns/*"
43
+ rm -Rf "$SRCAPP/Contents/PlugIns/*"
44
+
45
+ # CREATE TMP FOLDER
46
+ echo mkdir -p $FOLDER/datasets
47
+ mkdir -p $FOLDER/datasets
48
+
49
+ echo "Fill moredatasets.txt"
50
+ echo "You can download more datasets from http://www.rdfhdt.org/datasets or import your own ones using the 'Import RDF' option!" > $FOLDER/datasets/moredatasets.txt
51
+
52
+ # COPY APP to folder
53
+ echo cp -R $SRCAPP $FOLDER
54
+ cp -R $SRCAPP $FOLDER
55
+
56
+ # COPY DATASETS
57
+ for i in $DATASETS
58
+ do
59
+ echo cp $DATASETBASE$i $FOLDER/datasets
60
+ cp $DATASETBASE$i $FOLDER/datasets
61
+ done
62
+
63
+ for i in $DATASETSHDT
64
+ do
65
+ echo cp $DATASETHDTBASE$i $FOLDER/datasets
66
+ cp $DATASETHDTBASE$i $FOLDER/datasets
67
+ done
68
+
69
+ # CREATE DMG
70
+ rm -Rf "$DMG"
71
+ echo hdiutil create -srcfolder "$FOLDER" -volname "$VOL" -format UDZO -imagekey zlib-level=9 "$DMG"
72
+ hdiutil create -srcfolder "$FOLDER" -volname "$NAME" -format UDZO -imagekey zlib-level=9 "$DMG"
@@ -0,0 +1,186 @@
1
+
2
+ #include <QHeaderView>
3
+ #include <QTreeWidget>
4
+ #include <QLineEdit>
5
+
6
+ #include "dictionarysuggestions.hpp"
7
+
8
+ #include "stringutils.hpp"
9
+
10
+ #include <HDTVocabulary.hpp>
11
+
12
+ #define NUM_SUGGESTIONS 10
13
+
14
+ DictionarySuggestions::DictionarySuggestions(QLineEdit *parent) :
15
+ QObject(parent),
16
+ editor(parent),
17
+ controller(NULL)
18
+ {
19
+ popup = new QTreeWidget;
20
+ popup->setWindowFlags(Qt::Popup);
21
+ popup->setFocusPolicy(Qt::NoFocus);
22
+ popup->setFocusProxy(parent);
23
+ popup->setMouseTracking(true);
24
+
25
+ popup->setColumnCount(1);
26
+ popup->setUniformRowHeights(true);
27
+ popup->setRootIsDecorated(false);
28
+ popup->setEditTriggers(QTreeWidget::NoEditTriggers);
29
+ popup->setSelectionBehavior(QTreeWidget::SelectRows);
30
+ popup->setFrameStyle(QFrame::Box | QFrame::Plain);
31
+ popup->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
32
+ popup->header()->hide();
33
+
34
+ popup->installEventFilter(this);
35
+
36
+ connect(popup, SIGNAL(itemClicked(QTreeWidgetItem*,int)),
37
+ SLOT(doneCompletion()));
38
+
39
+ timer = new QTimer(this);
40
+ timer->setSingleShot(true);
41
+ timer->setInterval(100);
42
+ connect(timer, SIGNAL(timeout()), SLOT(autoSuggest()));
43
+ connect(editor, SIGNAL(textEdited(QString)), timer, SLOT(start()));
44
+ }
45
+
46
+ DictionarySuggestions::~DictionarySuggestions(){
47
+ delete popup;
48
+ }
49
+
50
+ bool DictionarySuggestions::eventFilter(QObject *obj, QEvent *ev)
51
+ {
52
+ if (obj != popup)
53
+ return false;
54
+
55
+ if (ev->type() == QEvent::MouseButtonPress) {
56
+ popup->hide();
57
+ editor->setFocus();
58
+ return true;
59
+ }
60
+
61
+ if (ev->type() == QEvent::KeyPress) {
62
+ bool consumed = false;
63
+ int key = static_cast<QKeyEvent*>(ev)->key();
64
+ switch (key) {
65
+ case Qt::Key_Enter:
66
+ case Qt::Key_Return:
67
+ doneCompletion();
68
+ consumed = true;
69
+
70
+ case Qt::Key_Escape:
71
+ editor->setFocus();
72
+ popup->hide();
73
+ consumed = true;
74
+
75
+ case Qt::Key_Up:
76
+ case Qt::Key_Down:
77
+ case Qt::Key_Home:
78
+ case Qt::Key_End:
79
+ case Qt::Key_PageUp:
80
+ case Qt::Key_PageDown:
81
+ case Qt::Key_Shift:
82
+ break;
83
+
84
+ default:
85
+ editor->setFocus();
86
+ editor->event(ev);
87
+ popup->hide();
88
+ break;
89
+ }
90
+
91
+ return consumed;
92
+ }
93
+
94
+ return false;
95
+ }
96
+
97
+ void DictionarySuggestions::showCompletion(const vector<string> &choices)
98
+ {
99
+ if (choices.size()==0)
100
+ return;
101
+
102
+ popup->setUpdatesEnabled(false);
103
+ popup->clear();
104
+ int maxWidth=0;
105
+ QFontMetrics metrics(popup->font());
106
+
107
+ for (int i = 0; i < choices.size(); ++i) {
108
+ QTreeWidgetItem * item;
109
+ item = new QTreeWidgetItem(popup);
110
+ item->setText(0, stringutils::toQString(choices[i].c_str()));
111
+ maxWidth = qMax(maxWidth, metrics.boundingRect(item->text(0)).width());
112
+ }
113
+ popup->setCurrentItem(popup->topLevelItem(0));
114
+ popup->resizeColumnToContents(0);
115
+ popup->adjustSize();
116
+ popup->setUpdatesEnabled(true);
117
+
118
+ int h = popup->sizeHintForRow(0) * qMin(NUM_SUGGESTIONS, (int)choices.size()) + 3;
119
+ popup->resize( qMax(popup->width(), qMin(maxWidth+20, 600)), h);
120
+
121
+ popup->move(editor->mapToGlobal(QPoint(0, editor->height())));
122
+ popup->setFocus();
123
+ popup->show();
124
+ }
125
+
126
+ void DictionarySuggestions::doneCompletion()
127
+ {
128
+ timer->stop();
129
+ popup->hide();
130
+ editor->setFocus();
131
+ QTreeWidgetItem *item = popup->currentItem();
132
+ if (item) {
133
+ editor->setText(item->text(0));
134
+ QMetaObject::invokeMethod(editor, "returnPressed");
135
+ }
136
+ }
137
+
138
+ void DictionarySuggestions::autoSuggest()
139
+ {
140
+ if(!controller ||!controller->hasHDT() ) {
141
+ return;
142
+ }
143
+
144
+ try {
145
+ QString str = editor->text();
146
+ if(str.length()<1) {
147
+ return;
148
+ }
149
+
150
+ // If not URI, Literal, Blank
151
+ if( str.at(0)!='"' && str.at(0)!='_' && str.left(4)!="http") {
152
+ // Assume literal otherwise
153
+ str.prepend("\"");
154
+ }
155
+ vector<string> choices;
156
+
157
+ // FETCH RESULTS FROM DICTIONARY
158
+ controller->getHDT()->getDictionary()->getSuggestions(str.toUtf8(), role, choices, NUM_SUGGESTIONS);
159
+
160
+ if(choices.size()==1 && choices[0]==string(str.toUtf8())) {
161
+ return;
162
+ }
163
+
164
+ // show
165
+ showCompletion(choices);
166
+ } catch (const char *ex) {
167
+ #ifndef WIN32
168
+ } catch (char *ex) {
169
+ #endif
170
+ }
171
+ }
172
+
173
+ void DictionarySuggestions::preventSuggest()
174
+ {
175
+ timer->stop();
176
+ }
177
+
178
+ void DictionarySuggestions::setRole(hdt::TripleComponentRole role)
179
+ {
180
+ this->role = role;
181
+ }
182
+
183
+ void DictionarySuggestions::setController(HDTController *controller)
184
+ {
185
+ this->controller = controller;
186
+ }
@@ -0,0 +1,39 @@
1
+ #ifndef DICTIONARYSUGGESTIONS_HPP
2
+ #define DICTIONARYSUGGESTIONS_HPP
3
+
4
+ #include <QtGui>
5
+ #include <QObject>
6
+
7
+ #include <hdtcontroller.hpp>
8
+
9
+ QT_BEGIN_NAMESPACE
10
+ class QLineEdit;
11
+ class QTimer;
12
+ class QTreeWidget;
13
+ QT_END_NAMESPACE
14
+
15
+ class DictionarySuggestions : public QObject
16
+ {
17
+ Q_OBJECT
18
+ public:
19
+ explicit DictionarySuggestions(QLineEdit *parent = 0);
20
+ ~DictionarySuggestions();
21
+ bool eventFilter(QObject *obj, QEvent *ev);
22
+ void showCompletion(const vector<string> &choices);
23
+ void setController(HDTController *controller);
24
+ void setRole(hdt::TripleComponentRole role);
25
+
26
+ public slots:
27
+ void doneCompletion();
28
+ void preventSuggest();
29
+ void autoSuggest();
30
+
31
+ private:
32
+ QLineEdit *editor;
33
+ QTreeWidget *popup;
34
+ QTimer *timer;
35
+ HDTController *controller;
36
+ hdt::TripleComponentRole role;
37
+ };
38
+
39
+ #endif // DICTIONARYSUGGESTIONS_HPP
Binary file
@@ -0,0 +1,88 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html>
3
+ <head>
4
+ <title>HDT-it! 0.9Beta User Manual</title>
5
+ </head>
6
+ <body>
7
+
8
+ <h1>HDT-it! 0.9Beta User Manual</h1>
9
+
10
+ <h2>Purpose</h2>
11
+
12
+ <p>HDT (Header, Dictionary, Triples) is a binary representation for RDF that compresses big datasets to save space while maintaining search and browse operations. This makes it an ideal format for storing and sharing RDF datasets.</p>
13
+ <p>HDT-it! is a tool that allows generating and consuming HDT files. As an example, the tool allows to search basic graph patterns, and shows a global 3D Matrix of the RDF distribution to understand the organization of the information.</p>
14
+ <p>This document teaches how to use the tool to create and browse HDT files. There is also a <a href="http://www.rdfhdt.org/screencast/">screencast</a> demonstrating visually all the features of HDT-it available at the <a href="http://www.rdfhdt.org">RDF HDT Web page.</a> </p>
15
+
16
+ <h2>Installation.</h2>
17
+ <h3>Windows</h3>
18
+ <p>To install HDT-it! on Microsoft Windows, download the binary package for Windows from the <a href="http://www.rdfhdt.org/download">RDF-HDT Download page</a>. Uncompress the zip file using any appropriate software (Such as <a href="http://http://www.izarc.org/">IZarc</a>) to any folder of your choice. To launch the application, just double click on <b>HDT-it.exe</b>. You might find usefull to have a shortcut on your desktop. To do so, drag the hdt-it.exe file to your desktop using the right button of the mouse, and select "Create shortcut".</p>
19
+
20
+ <p>Should you want to uninstall HDT-it!, just delete the folder on your hard drive.</p>
21
+
22
+ <h3>MacOSX</h3>
23
+ <p>To install HDT-it! on MacOSX, download the binary package for MacOSX from <a href="http://www.rdfhdt.org/download">RDF-HDT Download page</a>. Launch the dmg file and drag the HDT-it! app to your Applications folder. Then you can launch HDT-it! the same way as any MacOSX application. You can create a shortcut to it by droping the app from the Applications folder to your dock.</p>
24
+
25
+ <p>Note that HDT-it! is a Universal binary, and can run on 32 and 64 bit Intel platforms, but cannot run on PowerPC.</p>
26
+
27
+ <p>Should you want to uninstall HDT-it!, just drag the App from the Applications folder to the Trash.</p>
28
+
29
+ <h3>Linux</h3>
30
+ <p>To install HDT-it! on Linux, download the binary package for Linux from <a href="http://www.rdfhdt.org/download">RDF-HDT Download page</a>. Untar the package on your home (tar jxfv HDT-it-0.9beta-linux.tbz2) and launch it using the HDT-it.sh script (./HDT-it.sh). The package contains all the needed libraries: namely Qt 4.7.</p>
31
+
32
+ <h2>HDT-it Usage</h2>
33
+
34
+ <p>After opening HDT-it, you can see the following view:</p>
35
+
36
+ <img src="hdtit.png" />
37
+
38
+ <h3>Managing datasets:</h3>
39
+ <p>The first step when using HDT-it is loading a dataset. It uses the HDT format to keep all the information in a compact but at the same time accessible manner.
40
+ <h3>Load HDT</h3>
41
+ <p>If you have any dataset in HDT, you can load it using the "Open HDT" option from the toolbar. The instalation distribution package contains several example datasets that you can play with. You can also download bigger datasets from the <a href="http://dataweb.infor.uva.es">Dataweb page</a>.
42
+ <h3>Import RDF</h3>
43
+ <p>You also probably want to load your own dataset. HDT-it! is able to load RDF data in several well-known RDF formats (NTriples, N3, Turtle and RDF-XML) and convert it to HDT. To import data, select Import RDF and follow the instructions. You need to specify some information, namely:</p>
44
+ <ul>
45
+ <li>The file source of RDF</li>
46
+ <li>The base URI used for loading the RDF.</li>
47
+ <li>The specific format of the different sections of HDT. Depending on this options we can obtain a compromise between compression ratio and search capabilities. The default options will provide a fair balance between the two.
48
+ </ul>
49
+
50
+ <p>The process of importing the RDF file will take a while. We recommend using "NTriples" as input format since it can be processed statement by statement therefore using fewer RAM memory. For really big datasets, you may need a powerfull computer with a high amount of RAM memory, since the conversion process needs to construct intermediate data structures. In these cases, we recommend using the commandline tools available in <a href="http://www.rdfhdt.org">HDT-lib</a> on a server machine. Then the resulting HDT file can be loaded using a more modest computer since it is already compressed and ready to be used.</p>
51
+
52
+ <h3>Save HDT</h3>
53
+ <p>This option allows saving the HDT file. It is specially useful when you just imported a RDF file and want to keep an HDT version for faster loading and consumption.</p>
54
+ <h3>Export RDF</h3>
55
+ <p>You can export any HDT search back to RDF to consume it using traditional tools or loading it to any RDF database. Just select export and by default the tool will serialize it to NTriples. If you want to export the whole dataset, just left empty all the fields in the triple search pattern.</p>
56
+
57
+ <h3>Browsing</h3>
58
+ <h3>Triple Search Pattern</h3>
59
+ <p>On the top left, you can insert a triple search pattern to filter the results. It allows searching for a specific subject, predicate or object. Any field left blank means "any", so the default empty option will show all triples. In order to simplify the typing task, options are proposed as the user types thanks to the dictionary.
60
+ <h3>Dataset Information</h3>
61
+ <p>On the bottom left part of the window, all the information available about the dataset is shown. Namely the size of the original dataset and the compressed HDT version (to highlight the savings of using HDT). It also shows the details about the dictionary (the number of entries in the dictionary and the number of triples). It is also interesting to see the relative size of the dictionary against the triples.</p>
62
+ <h3>List of Components.</h3>
63
+ <p>Also on the bottom left you can select any of the components (Subjects, predicates, or objects). It will show a list of all the different elements available. The user can double click on any item to add it to the search box.</p>
64
+ <h3>Metadata</h3>
65
+ <p>The Metadata tab on the top right allows browsing all the information about the HDT's header in plain RDF format.</p>
66
+ <h3>Search Results</h3>
67
+ <p>The Search Results Tab shows the list of all triples that match the specified query in the triple search pattern block. You can double-click on any element to add it to the search pattern box. Also, you can right-click on it and select "Search as Subject/Predicate/Object".</p>
68
+ <h3>Visualization.</h3>
69
+ <p>The visualization widget allows the developer to have an overall view of the dataset. It allows understanding the structure of the RDF data.</p>
70
+
71
+ <p>The matrix view is based on an Adjacency Matrix. The dictionary part of the HDT assigns numerical ID to each of the different subject, predicate and object. Then, each RDF triple can be referred as a triple of numerical IDs, such as 234,5,3425. This ID can be interpreted as a point in a 3-Dimensional space, therefore it can be plotted as a point in a 3D graph axis. The matrix view is just a scatter-plot of all the triples of the dataset.</p>
72
+
73
+ <img src="matrix.png" />
74
+
75
+ <p>To better see the details, you can rotate the view by holding the mouse's left button, or pan using the right one. To increase/decrease the zoom the mouse wheel shall be used. There are three predefined views: Top, Left, and 3D, that can be selected on the top bar. You can also select <em>reset</em> to go back to the initial view.</p>
76
+ <p>In order to understand the information underlying each area of the visualization, the application reveals information about the nearest triple under the cursor when the user hovers the mouse over each area. Note that this feature is only available for the Front view.</p>
77
+
78
+ <h2>Acknowledgements</h2>
79
+ <p>HDT was possible thanks to:
80
+ <ul>
81
+ <li>Javier D. Fernández García &lt;<a href="mailto:jfergar@infor.uva.es">jfergar@infor.uva.es</a>&gt;</li>
82
+ <li>Miguel Ángel Martínez-Prieto &lt;<a href="mailto:migumar2@infor.uva.es">migumar2@infor.uva.es</a>&gt;</li>
83
+ <li>Mario Arias Gallego &lt;<a href="mailto:mario.arias@deri.org">mario.arias@deri.org</a>&gt;</li>
84
+ <li>Claudio Gutierrez &lt;<a href="mailto:cgutierr@dcc.uchile.cl">cgutierr@dcc.uchile.cl</a>&gt;</li>
85
+ <li>Alejandro Andrés &lt;<a href="mailto:fuzzy.alej@gmail.com">fuzzy.alej@gmail.com</a>&gt;</li>
86
+ </ul>
87
+ </body>
88
+ </html>
Binary file
Binary file