-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblog.html
executable file
·410 lines (357 loc) · 24.6 KB
/
blog.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Grassroots Infrastructure</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom fonts for this template -->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet"
type="text/css">
<!-- Custom styles for this template -->
<link href="css/site.css" rel="stylesheet">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-21666189-16"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-21666189-16');
</script>
</head>
<body id="page-top">
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-light fixed-top navbar-shrink" id="mainNav">
<div class="container">
<a class="navbar-brand js-scroll-trigger" href="index.html" style="text-transform: none ! important;">Grassroots
Infrastructure</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse"
data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false"
aria-label="Toggle navigation">
Menu
<i class="fa fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="index.html#services">Services</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="index.html#data">Data</a>
</li>
<!-- <li class="nav-item">-->
<!-- <a class="nav-link js-scroll-trigger" href="index.html#about">About</a>-->
<!-- </li>-->
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="docs/">Docs</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger active" href="blog.html">Blog</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="index.html#contact">Contact</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="dfw">DFW</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="public/service/search">Search</a>
</li>
</ul>
<img class="navbar-nav navbar-right" style="height:50px;margin-left:50px;" src="img/logo-white.png"/>
</div>
</div>
</nav>
<section class="success" id="blog">
<div class="container">
<br/>
<h2 class="text-center">Blog:</h2>
<hr class="star-light">
<!--<div onclick="location.href='#blog1'" style="cursor:pointer;" data-toggle="modal">-->
<p>19-09-2017: <a class="darker" href="blog.html?blog=blog19092017">Davrods Enhancements as part of the
Grassroots
Infrastructure</a></p>
<p>One of the major aims of the Grassroots Infrastructure is to allow users to share their wheat data as easily
and seamlessly as possible. To do this, we use <a class="darker" href="https://irods.org/"
title="iRODS: Open Source Data Management Software">iRODS</a>
which is a system allowing users to create files and directories as normal with extra features such as
distributed storage viewable across different institutions and the ability to add metadata to all of the
files and directories. </p>
<p>iRODS comes with command-line clients to allow access to its storage and Chris Smeele and Ton Smeele
developed an <a class="darker" href="http://httpd.apache.org/">Apache httpd</a> module, <a class="darker"
href="https://github.com/UtrechtUniversity/davrods"
title="Davrods - An Apache WebDAV interface to iRODS">Davrods</a>
to allow access to it using
standard WebDAV commands. There were still some functionality that we wanted to add that was missing from
Davrods, namely:</p>
<ul>
<li>Themeable listings</li>
<li>Public access</li>
<li>Metadata display</li>
</ul>
<p><a class="darker" href="blog.html?blog=blog19092017" >(Read more...)</a></p>
<!--</div>-->
</div>
</section>
<!-- Footer -->
<footer class="text-center">
<div class="footer-above">
<div class="container">
<div class="row">
<div class="footer-col col-md-4" style="text-align: left ! important;">
<h3>Earlham Institute</h3>
<p>Norwich Research Park<br/>
Norwich<br/>
NR4 7UZ<br/>
UK</p>
</div>
<div class="footer-col col-md-4">
<h3>Project Code</h3>
<p>The project is fully open source and the source code is available on <a
href="https://github.com/TGAC?q=grassroots" target="_blank">GitHub</a>:</p>
<ul class="list-inline">
<li class="list-inline-item">
<a class="btn-social btn-outline" href="https://github.com/TGAC?q=grassroots"
target="_blank">
<i class="fa fa-fw fa-github"></i>
</a>
</li>
<!--<li class="list-inline-item">-->
<!--<a class="btn-social btn-outline" href="#">-->
<!--<i class="fa fa-fw fa-twitter"></i>-->
<!--</a>-->
<!--</li>-->
</ul>
</div>
<div class="footer-col col-md-4" style="text-align: left ! important;">
<h3>Funding</h3>
<p>The Grassroots project is strategically funded through the BBSRC Designing Future Wheat programme
grant, BB/P016855/1, and aims to develop a lightweight reusable set of open source software
tools
to allow researchers to share and federate life science datasets.</p>
</div>
</div>
</div>
</div>
<div class="footer-below">
<div class="container">
<div class="row">
<div class="col-lg-12">
© 2017 - 2019 Brought to you by <a href="http://www.earlham.ac.uk/" target="_blank">Earlham
Institute</a>, powered by <a href="http://cyverseuk.org" target="_blank">CyVerse UK</a>
</div>
</div>
</div>
</div>
</footer>
<!-- Scroll to Top Button (Only visible on small and extra-small screen sizes) -->
<div class="scroll-top d-lg-none">
<a class="btn btn-primary js-scroll-trigger" href="#page-top">
<i class="fa fa-chevron-up"></i>
</a>
</div>
<div class="portfolio-modal modal fade" id="blog19092017" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="close-modal" data-dismiss="modal">
<div class="lr">
<div class="rl"></div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-lg-10 mx-auto">
<div class="modal-body" style="text-align: justify ! important;">
<h2 style="text-align: center ! important;">Davrods Enhancements as part of the Grassroots
Infrastructure</h2>
<hr class="star-primary">
<h3 id="toc_1">Introduction</h3>
<p>One of the major aims of the Grassroots Infrastructure is to allow users to share their
wheat data as easily and seamlessly as possible. To do this, we use <a
href="https://irods.org/" title="iRODS: Open Source Data Management Software">iRODS</a>
which is a system allowing users to create files and directories as normal with extra
features such as distributed storage viewable across different institutions and the
ability to add metadata to all of the files and directories. </p>
<p>iRODS comes with command-line clients to allow access to its storage and Chris Smeele and
Ton Smeele developed an <a href="http://httpd.apache.org/">Apache httpd</a> module, <a
href="https://github.com/UtrechtUniversity/davrods"
title="Davrods - An Apache WebDAV interface to iRODS">Davrods</a> to allow
access to it using standard WebDAV commands. There were still some functionality that we
wanted to add that was missing from Davrods, namely:</p>
<ul>
<li>Themeable listings</li>
<li>Public access</li>
<li>Metadata display</li>
</ul>
<h3 id="toc_2">Themeable listings</h3>
<p>The standard web pages produced by Davrods resembled the basic directory listings
produced by Apache and we wanted to increase the functionality of these pages as well as
making their look and feel customisable. To do this we based our approach upon that used
by the <a href="https://httpd.apache.org/docs/2.4/mod/mod_autoindex.html">autoindex
module</a>[4]. We added the ability to customise the HTML that would go in the head
section of the web page as well as the parts before and after the iRODS directory
listings. Along with this, the columns of the listings table were marked up to allow for
easy styling. The link to get to the parent collection was replaced with a full
navigation element with a full set of breadcrumbs.</p>
<p>Another concept that we replicated from the autoindex module was the ability to specify
default icons to use for the data objects and collections along with more difficult
icons depending upon their file types.</p>
<p><img src="img/edit_metadata.png" width="100%" title="Edit metadata"
alt="Editing the metadata in a browser"/>
Figure 1: Editing the metadata within a browser.</p>
<h3 id="toc_3">Public access</h3>
<p>iRODS workflow is based around the idea that users log in to see the data that they have
permissions to access. Often for websites, there is a desire to give public access to
browse a list of files and directories without the need to log in. So another feature
that we added to Davrods was the ability to have a default user to be specified in the
Apache server configuration that would be used to log into the iRODS system without the
need for any user intervention. In effect, creating a public-facing website
indistinguishable from one that allows a user to browse regular files and
directories.</p>
<h3 id="toc_4">Metadata display</h3>
<p>One of the major benefits of iRODS is its ability to add metadata as attribute-value
pairs to any of the data objects or collections stored within it. The ability to view,
edit and search across this data is a really useful feature for end users and so we
wanted to add these capabilities to Davrods too. Two features we wanted available were
to expose each of the metadata attribute-value pairs as hyperlinks to find data objects
or collections also containing the same pair, as well as having a general search
functionality to search across the entire metadata collection. Going further, adding the
ability to add, edit or delete metadata from within in a web browser was another really
useful feature that we wanted.</p>
<p>To do this we created a Representational state transfer (REST) API for querying and
manipulating the iRODS metadata. The base address for this API is at
/davrods/api/metadata though this can be changed to be anything you would like by
altering the parameter in the Apache configuration. It contains the following
functions:</p>
<ul>
<li><p><strong>get</strong>: This is for getting all of the associated metadata for an
iRODS item. It takes two parameter, the first is <em>id</em>, which is the iRODS id
of the data object or collection that you wish to get the metadata pairs for. The
second parameter is <em>output_format</em> which specifies the format that the
metadata will be returned in. It currently can take one of the following values:</p>
<ul>
<li><strong>json</strong>: This will return the metadata as a <a
href="http://www.json.org/">JSON (JavaScript Object Notation)</a> array
with each entry in the array having <em>attribute</em>, <em>value</em>, and
where appropriate, <em>units</em> keys for its key-value pairs.
</li>
<li><strong>csv</strong>: This will return the metadata as a table of
comma-separated values with the order of the columns being attribute, value,
units. Each of these entries will be contained within double quotes to allow
for commas within their values without causing errors.
</li>
<li><strong>tsv</strong>: This will return the metadata as a table of
tab-separated values with the order of the columns being attribute, value,
units. Each of these entries will be contained within double quotes to allow
for commas within their values without causing errors.
</li>
</ul>
<p>For example to get the metadata for a data object with the id of 1.10021 in a
JSON output format, the URL to call would be </p>
<p><code>/davrods/api/metadata/get?id=1.10021&output_format=json</code></p></li>
<li><p><strong>search</strong>: This API call is for getting a list of all data objects
and collections that have a given metadata attribute-value pair. It takes two
parameters: <em>key</em>, which is the attribute to search for and, <em>value</em>,
which specifies the metadata value. There is a third optional parameter,
<em>units</em> for specifying the units that the metadata attribute-value pair must
also have. So to search for all of the data objects and collections that have an
attribute called <em>volume</em> with a value of <em>11</em>, the URL to call would
be </p>
<p><code>/davrods/api/metadata/search?key=volume&value=11</code></p></li>
<li><p><strong>add</strong>: This API call is for adding a metadata attribute-value pair
to a data object of collection. It takes three parameters: <em>id</em>, which is the
iRODS id of the data object or collection to add the metadata to, <em>key</em>,
which is the attribute to add and, <em>value</em>, which specifies the metadata
value to be added. As with the <em>search</em> call listed above, there is a fourth
optional parameter, <em>units</em> for specifying the units that the metadata
attribute-value pair will have. So to add an attribute called <em>volume</em> with a
value of <em>11</em> to a data object with the id of 1.10021, the URL to call would
be </p>
<p><code>/davrods/api/metadata/add?id=1.10021&key=volume&value=11</code></p>
</li>
<li><p><strong>edit</strong>: This API call is for editing a metadata attribute-value
pair for a data object of collection and replacing one or more of its attribute,
value or units. It takes the following required parameters: <em>id</em>, which is
the iRODS id of the data object or collection to delete the metadata from,
<em>key</em>, which is the attribute to edit, <em>value</em>, which specifies the
metadata value to edit. Again, there is an optional parameter, <em>units</em> for
specifying the units that the metadata attribute-value pair must also have to match.
There must also be one or more of the following parameters to specify how the
metadata will be altered: <em>new_key</em>, which is for specifying the new name for
the attribute, <em>new_value</em>, for specifying the new metadata value and <em>new_units</em>
for specifying the units that the metadata attribute-value pair will now have. So to
edit an attribute called <em>volume</em> with a value of <em>11</em> and units of
<em>decibels</em> for a data object with the id of 1.10021 and give it a new value
of 8 and units of litres, the URL to call would be </p>
<p><code>/davrods/api/metadata/edit?id=1.10021&key=volume&value=11&units=decibels&new_value=8&new_units=litres</code>
</p></li>
<li><p><strong>delete</strong>: This API call is for deleting a metadata attribute-value
pair from a data object of collection. It takes three parameters: <em>id</em>, which
is the iRODS id of the data object or collection to delete the metadata from, <em>key</em>,
which is the attribute to delete for and, <em>value</em>, which specifies the
metadata value to delete. As before, there is a third optional parameter,
<em>units</em> for specifying the units that the metadata attribute-value pair must
also have to match. So to delete an attribute called <em>volume</em> with a value of
<em>11</em> and units of <em>decibels</em> from a data object with the id of
1.10021, the URL to call would be </p>
<p><code>/davrods/api/metadata/delete?id=1.10021&key=volume&value=11&units=decibels</code>
</p></li>
</ul>
<p>To demonstrate this REST API, we have developed some client-side JavaScript functions so
that users can call all of these routines comfortably and intuitively from within their
web browser.</p>
<p>We have two example sites to show the enhancements that we have made. The first demo site
<a href="https://wheatis.tgac.ac.uk/davrods/browse/reads/">https://wheatis.tgac.ac.uk/davrods/browse/reads/</a>
is a website showcasing the anonymous access among with theming and read-only access to
the metadata. The second demo site at <a href="davrods/">https://grassroots.tools/davrods/</a>
showcases the ability to add, edit and delete metadata attribute-value pairs for the
available data objects and collections.</p>
<h1 id="toc_5">Download</h1>
<p>The Davrods software is available to download at <a
href="https://github.com/billyfish/davrods">https://github.com/billyfish/davrods</a>.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/popper/popper.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<!-- Plugin JavaScript -->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!--<!– Contact Form JavaScript –>-->
<!--<script src="js/jqBootstrapValidation.js"></script>-->
<!--<script src="js/contact_me.js"></script>-->
<!-- Custom scripts for this template -->
<script src="js/site.js"></script>
<script type="text/javascript">
$(document).ready(function () {
if (getUrlParameter('blog') != null) {
var modalid = getUrlParameter('blog');
$('#' + modalid).modal('show');
}
});
var getUrlParameter = function getUrlParameter(sParam) {
var sPageURL = decodeURIComponent(window.location.search.substring(1)),
sURLVariables = sPageURL.split('&'),
sParameterName,
i;
for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] === sParam) {
return sParameterName[1] === undefined ? true : sParameterName[1];
}
}
};
</script>
</body>
</html>