Skip to content

Commit c913662

Browse files
authored
Merge pull request #3524 from IQSS/develop
v4.6
2 parents 7e5e8c9 + 52e9ec3 commit c913662

158 files changed

Lines changed: 10214 additions & 5126 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Dataverse
22
==========
33

4-
Dataverse is an open source web application for sharing, citing, analyzing, and preserving research data (developed by the [Data Science team] (http://datascience.iq.harvard.edu/about-dataverse) at the [Institute for Quantitative Social Science] (http://iq.harvard.edu/)).
4+
Dataverse is an open source web application for sharing, citing, analyzing, and preserving research data (developed by the [Data Science and Products team] (http://www.iq.harvard.edu/people/people/data-science-products) at the [Institute for Quantitative Social Science] (http://iq.harvard.edu/)).
55

66
Institutions and organizations can choose to install the Dataverse software for their own use.
77
In this case, the institution will be responsible for maintaining the application; installing upgrades,

conf/httpd/conf.d/dataverse.conf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ ProxyPassMatch ^/error-documents !
99
# pass everything else to Glassfish
1010
ProxyPass / ajp://localhost:8009/
1111

12-
<Location /shib.xhtml>
13-
AuthType shibboleth
14-
ShibRequestSetting requireSession 1
15-
require valid-user
16-
</Location>
12+
#<Location /shib.xhtml>
13+
# AuthType shibboleth
14+
# ShibRequestSetting requireSession 1
15+
# require valid-user
16+
#</Location>
1717

1818
ErrorDocument 503 /error-documents/503.html
1919
Alias /error-documents /var/www/dataverse/error-documents

conf/solr/4.6.0/schema.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@
298298
<field name="unf" type="string" stored="true" indexed="true" multiValued="false"/>
299299
<field name="fileSizeInBytes" type="long" stored="true" indexed="true" multiValued="false"/>
300300
<field name="fileMd5" type="string" stored="true" indexed="true" multiValued="false"/>
301+
<field name="fileChecksumType" type="string" stored="true" indexed="true" multiValued="false"/>
302+
<field name="fileChecksumValue" type="string" stored="true" indexed="true" multiValued="false"/>
301303
<field name="fileContentType" type="string" stored="true" indexed="true" multiValued="false"/>
302304
<field name="deaccessionReason" type="string" stored="true" indexed="false" multiValued="false"/>
303305

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "Scientific Research",
3+
"alias": "science",
4+
"dataverseContacts": [
5+
{
6+
"contactEmail": "[email protected]"
7+
},
8+
{
9+
"contactEmail": "[email protected]"
10+
}
11+
],
12+
"affiliation": "Scientific Research University",
13+
"description": "We do all the science.",
14+
"dataverseType": "LABORATORY"
15+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "Scientific Research",
3+
"alias": "science",
4+
"dataverseContacts": [
5+
{
6+
"contactEmail": "[email protected]"
7+
}
8+
]
9+
}
15.4 KB
Loading
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
<?xml version='1.0' encoding='UTF-8' ?>
2+
<!DOCTYPE html>
3+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
4+
<head>
5+
<title>Harvard Dataverse</title>
6+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7+
<meta http-equiv="Content-Language" content="en" />
8+
<meta name="viewport" content="width=device-width, initial-scale=1" />
9+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
10+
<meta name="description" content="The Dataverse Project is an open source software application to share, cite and archive data. Dataverse provides a robust infrastructure for data stewards to host and archive data, while offering researchers an easy way to share and get credit for their data." />
11+
12+
<link type="image/png" rel="icon" href="https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/src/main/webapp/resources/images/favicondataverse.png.xhtml" />
13+
14+
<link type="image/png" rel="image_src" href="https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/src/main/webapp/resources/images/dataverseproject.png.xhtml" />
15+
16+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" />
17+
18+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css" />
19+
20+
<link rel="stylesheet" href="https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/src/main/webapp/resources/css/fontcustom.css" />
21+
22+
<link rel="stylesheet" href="https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/src/main/webapp/resources/css/socicon.css" />
23+
24+
<link rel="stylesheet" href="https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/src/main/webapp/resources/css/structure.css" />
25+
26+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
27+
28+
<style type="text/css">
29+
@font-face {
30+
font-family: "fontcustom";
31+
src: url("https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/src/main/webapp/resources/fontcustom/fontcustom_0cdeefae934823416d24b6c2132ac702.eot");
32+
src: url("https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/src/main/webapp/resources/fontcustom/fontcustom_0cdeefae934823416d24b6c2132ac702.eot?#iefix") format("embedded-opentype"),
33+
url("https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/src/main/webapp/resources/fontcustom/fontcustom_0cdeefae934823416d24b6c2132ac702.woff") format("woff"),
34+
url("https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/src/main/webapp/resources/fontcustom/fontcustom_0cdeefae934823416d24b6c2132ac702.ttf") format("truetype"),
35+
url("https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/src/main/webapp/resources/fontcustom/fontcustom_0cdeefae934823416d24b6c2132ac702.svg#fontcustom") format("svg");
36+
font-weight: normal;
37+
font-style: normal;
38+
}
39+
40+
@font-face {
41+
font-family: 'socicon';
42+
src: url('https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/src/main/webapp/resources/socicon-font/socicon-webfont.eot');
43+
src: url('https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/src/main/webapp/resources/socicon-font/socicon-webfont.eot?#iefix') format('embedded-opentype'),
44+
url('https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/src/main/webapp/resources/socicon-font/socicon-webfont.woff') format('woff'),
45+
url('https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/src/main/webapp/resources/socicon-font/socicon-webfont.woff2') format('woff2'),
46+
url('https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/src/main/webapp/resources/socicon-font/socicon-webfont.ttf') format('truetype'),
47+
url('https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/src/main/webapp/resources/socicon-font/socicon-webfont.svg#sociconregular') format('svg');
48+
font-weight: normal;
49+
font-style: normal;
50+
text-transform: initial;
51+
}
52+
53+
@media screen and (-webkit-min-device-pixel-ratio:0) {
54+
@font-face {
55+
font-family: "fontcustom";
56+
src: url("https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/src/main/webapp/resources/fontcustom/fontcustom_0cdeefae934823416d24b6c2132ac702.svg#fontcustom") format("svg");
57+
}
58+
}
59+
</style>
60+
</head>
61+
<body>
62+
<div id="dataverse-header-block">
63+
<!-- Navbar Panel -->
64+
<nav id="navbarFixed" class="navbar navbar-default navbar-fixed-top" role="navigation">
65+
<div class="container">
66+
<div class="navbar-header">
67+
<span class="navbar-brand"><i id="icon-dataverse" class="icon-dataverse"></i> Dataverse</span>
68+
</div>
69+
<div class="collapse navbar-collapse" id="topNavBar">
70+
<ul class="nav navbar-nav navbar-right">
71+
<li>
72+
&#160;
73+
</li>
74+
</ul>
75+
</div>
76+
</div>
77+
</nav>
78+
79+
<!-- Header Panel -->
80+
<div style="background:#F5F5F5;" class="container bg-muted" id="dataverseHeader">
81+
<div class="dataverseHeaderBlock">
82+
<div class="dataverseHeaderCell dataverseHeaderLogo">
83+
<img alt="Harvard Dataverse" src="https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/doc/sphinx-guides/source/_static/installation/files/etc/maintenance/HarvardShield_RGB.png"/>
84+
</div>
85+
<div class="dataverseHeaderCell dataverseHeaderName">
86+
<span class="dataverseHeaderDataverseName" style="color:#000000;">Harvard Dataverse</span>
87+
</div>
88+
<div class="dataverseHeaderCell dataverseHeaderTagline">
89+
<span style="color:#a51c30;">A collaboration with Harvard Library, Harvard University IT, and IQSS</span>
90+
</div>
91+
</div>
92+
</div>
93+
</div>
94+
<div class="container" id="content">
95+
<div class="jumbotron" style="margin-top:20px;">
96+
<h2><em>We apologize for the service interruption.</em></h2>
97+
<p>The Harvard Dataverse is currently undergoing maintenance. At this time both the application and APIs are not able to be used. However, the datasets stored in the Harvard Dataverse are fine and not impacted by this maintenance.</p>
98+
<p>If you have any comments, questions or concerns, please reach out to [email protected].</p>
99+
</div>
100+
</div>
101+
<div class="container" id="footer">
102+
<div class="row">
103+
<div class="col-sm-8 small">
104+
<p>Developed at the <a href="http://www.iq.harvard.edu/" title="Institute for Quantitative Social Science" target="_blank">Institute for Quantitative Social Science</a> &#160;|&#160; Dataverse Project on <a href="https://twitter.com/dataverseorg" target="_blank" title="Dataverse Project on Twitter"><span class="socicon socicon-twitter" title="Dataverse Project on Twitter"></span></a> &#160;|&#160; Code available at <a href="https://github.com/IQSS/dataverse" target="_blank" title="Dataverse On GitHub"><span class="socicon socicon-github" title="Dataverse On GitHub"></span></a>
105+
</p>
106+
<p>Copyright &#169; 2016, The President &#38; Fellows of Harvard College | <a href="http://best-practices.dataverse.org/harvard-policies/harvard-privacy-policy.html" target="_blank">Privacy Policy</a>
107+
</p>
108+
</div>
109+
<div class="col-sm-4 text-right">
110+
<div class="poweredbylogo">
111+
<span>Powered by</span>
112+
<a href="http://dataverse.org/" title="The Dataverse Project" target="_blank"><img src="https://cdn.rawgit.com/IQSS/dataverse/87cf58b5c3e8e01cf0f4891465df02334852eed3/src/main/webapp/resources/images/dataverseproject_logo.jpg" alt="The Dataverse Project" /></a>
113+
</div>
114+
</div>
115+
</div>
116+
</div>
117+
</body>
118+
</html>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module shibboleth 1.0;
2+
3+
require {
4+
class file {open read};
5+
class sock_file write;
6+
class unix_stream_socket connectto;
7+
type httpd_t;
8+
type initrc_t;
9+
type var_run_t;
10+
type var_t;
11+
}
12+
13+
allow httpd_t initrc_t:unix_stream_socket connectto;
14+
allow httpd_t var_run_t:sock_file write;
15+
allow httpd_t var_t:file {open read};
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Client Libraries
22
================
33

4-
Currently there are client libraries for Python and R that can be used to develop against Dataverse APIs.
4+
Currently there are client libraries for Python, R, and Java that can be used to develop against Dataverse APIs. We use the term "client library" on this page but "Dataverse SDK" (software development kit) is another way of describing these resources. They are designed to help developers express Dataverse concepts more easily in the languages listed below. For support on any of these client libraries, please consult each project's README.
55

66
Because Dataverse is a SWORD server, additional client libraries exist for Java, Ruby, and PHP per the :doc:`/api/sword` page.
77

@@ -10,11 +10,18 @@ Python
1010

1111
https://github.com/IQSS/dataverse-client-python is the offical Python package for Dataverse APIs.
1212

13-
`Robert Liebowitz <https://github.com/rliebz>`_ from the `Center for Open Science <http://centerforopenscience.org>`_ heads its development and the library is used to integrate the `Open Science Framework (OSF) <http://osf.io>`_ with Dataverse via an add-on which itself is open source and listed on the :doc:`/api/apps` page.
13+
`Robert Liebowitz <https://github.com/rliebz>`_ created this library while at the `Center for Open Science (COS) <https://centerforopenscience.org>`_ and the COS uses it to integrate the `Open Science Framework (OSF) <https://osf.io>`_ with Dataverse via an add-on which itself is open source and listed on the :doc:`/api/apps` page.
1414

1515
R
1616
-
1717

1818
https://github.com/IQSS/dataverse-client-r is the official R package for Dataverse APIs.
1919

2020
It was created by `Thomas Leeper <http://thomasleeper.com>`_ whose dataverse can be found at https://dataverse.harvard.edu/dataverse/leeper
21+
22+
Java
23+
----
24+
25+
https://github.com/IQSS/dataverse-client-java is the offical Java library for Dataverse APIs.
26+
27+
`Richard Adams <http://www.researchspace.com/electronic-lab-notebook/about_us_team.html>`_ from `ResearchSpace <http://www.researchspace.com>`_ created and maintains this library.

doc/sphinx-guides/source/api/native-api.rst

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,24 @@ Endpoints
1212

1313
Dataverses
1414
~~~~~~~~~~~
15-
Generates a new dataverse under ``$id``. Expects a json content describing the dataverse.
15+
Generates a new dataverse under ``$id``. Expects a JSON content describing the dataverse, as in the example below.
1616
If ``$id`` is omitted, a root dataverse is created. ``$id`` can either be a dataverse id (long) or a dataverse alias (more robust). ::
1717

1818
POST http://$SERVER/api/dataverses/$id?key=$apiKey
1919

20+
The following JSON example can be `downloaded <../_static/api/dataverse-complete.json>`_ and modified to create dataverses to suit your needs. The fields ``name``, ``alias``, and ``dataverseContacts`` are required. The controlled vocabulary for ``dataverseType`` is
21+
22+
- ``JOURNALS``
23+
- ``LABORATORY``
24+
- ``ORGANIZATIONS_INSTITUTIONS``
25+
- ``RESEARCHERS``
26+
- ``RESEARCH_GROUP``
27+
- ``RESEARCH_PROJECTS``
28+
- ``TEACHING_COURSES``
29+
- ``UNCATEGORIZED``
30+
31+
.. literalinclude:: ../_static/api/dataverse-complete.json
32+
2033
View data about the dataverse identified by ``$id``. ``$id`` can be the id number of the dataverse, its alias, or the special value ``:root``. ::
2134

2235
GET http://$SERVER/api/dataverses/$id
@@ -70,12 +83,15 @@ Sets the metadata blocks of the dataverse. Makes the dataverse a metadatablock r
7083

7184
Get whether the dataverse is a metadata block root, or does it uses its parent blocks::
7285

73-
GET http://$SERVER/api/dataverses/$id/metadatablocks/:isRoot?key=$apiKey
86+
GET http://$SERVER/api/dataverses/$id/metadatablocks/isRoot?key=$apiKey
7487

7588
Set whether the dataverse is a metadata block root, or does it uses its parent blocks. Possible
7689
values are ``true`` and ``false`` (both are valid JSON expressions). ::
7790

78-
POST http://$SERVER/api/dataverses/$id/metadatablocks/:isRoot?key=$apiKey
91+
PUT http://$SERVER/api/dataverses/$id/metadatablocks/isRoot?key=$apiKey
92+
93+
.. note:: Previous endpoints ``GET http://$SERVER/api/dataverses/$id/metadatablocks/:isRoot?key=$apiKey`` and ``POST http://$SERVER/api/dataverses/$id/metadatablocks/:isRoot?key=$apiKey`` are deprecated, but supported.
94+
7995

8096
Create a new dataset in dataverse ``id``. The post data is a Json object, containing the dataset fields and an initial dataset version, under the field of ``"datasetVersion"``. The initial versions version number will be set to ``1.0``, and its state will be set to ``DRAFT`` regardless of the content of the json object. Example json can be found at ``data/dataset-create-new.json``. ::
8197

@@ -131,8 +147,7 @@ Export the metadata of the current published version of a dataset in various for
131147

132148
GET http://$SERVER/api/datasets/export?exporter=ddi&persistentId=$persistentId
133149

134-
Note: Supported exporters (export formats) are ddi, oai_ddi, dcterms, oai_dc, and dataverse_json.
135-
150+
.. note:: Supported exporters (export formats) are ``ddi``, ``oai_ddi``, ``dcterms``, ``oai_dc``, and ``dataverse_json``.
136151

137152
Lists all the file metadata, for the given dataset and version::
138153

@@ -268,6 +283,14 @@ Management of Shibboleth groups via API is documented in the :doc:`/installation
268283
Info
269284
~~~~
270285

286+
Get the Dataverse version. The response contains the version and build numbers::
287+
288+
GET http://$SERVER/api/info/version
289+
290+
Get the server name. This is useful when a Dataverse system is composed of multiple Java EE servers behind a load balancer::
291+
292+
GET http://$SERVER/api/info/server
293+
271294
For now, only the value for the ``:DatasetPublishPopupCustomText`` setting from the :doc:`/installation/config` section of the Installation Guide is exposed::
272295

273296
GET http://$SERVER/api/info/settings/:DatasetPublishPopupCustomText
@@ -286,7 +309,7 @@ Return data about the block whose ``identifier`` is passed. ``identifier`` can e
286309

287310
Admin
288311
~~~~~~~~~~~~~~~~
289-
This is the administrative part of the API. It is probably a good idea to block it before allowing public access to a Dataverse installation. Blocking can be done using settings. See the ``post-install-api-block.sh`` script in the ``scripts/api`` folder for details.
312+
This is the administrative part of the API. For security reasons, it is absolutely essential that you block it before allowing public access to a Dataverse installation. Blocking can be done using settings. See the ``post-install-api-block.sh`` script in the ``scripts/api`` folder for details. See also "Blocking API Endpoints" under "Securing Your Installation" in the :doc:`/installation/config` section of the Installation Guide.
290313

291314
List all settings::
292315

@@ -374,6 +397,18 @@ List all role assignments of a role assignee (i.e. a user or a group)::
374397

375398
Note that ``identifier`` can contain slashes (e.g. ``&ip/localhost-users``).
376399

400+
List permissions a user (based on API Token used) has on a dataverse or dataset::
401+
402+
GET http://$SERVER/api/admin/permissions/$identifier
403+
404+
The ``$identifier`` can be a dataverse alias or database id or a dataset persistent ID or database id.
405+
406+
List a role assignee (i.e. a user or a group)::
407+
408+
GET http://$SERVER/api/admin/assignee/$identifier
409+
410+
The ``$identifier`` should start with an ``@`` if it's a user. Groups start with ``&``. "Built in" users and groups start with ``:``. Private URL users start with ``#``.
411+
377412
IpGroups
378413
^^^^^^^^
379414

0 commit comments

Comments
 (0)