Skip to content

Commit e1ac44b

Browse files
committed
Merge branch 'develop' into 2579-DDI-export
2 parents e7357f2 + 2935cde commit e1ac44b

66 files changed

Lines changed: 1939 additions & 1081 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.

scripts/api/setup-optional-publish-terms.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ SERVER=http://localhost:8080/api
55

66
echo "- Enabling Publish Popup Custom Text"
77
curl -s -X PUT -d true "$SERVER/admin/settings/:DatasetPublishPopupCustomTextOnAllVersions"
8-
curl -s -X PUT -d "Deposit License Requirements" "$SERVER/admin/settings/:DatasetPublishPopupCustomText"
8+
curl -X PUT -d "By default datasets are published with the CC0-“Public Domain Dedication” waiver. Learn more about the CC0 waiver <a target="_blank" href='http://creativecommons.org/choose/zero/'>here</a>. <br><br> To publish with custom Terms of Use, click the Cancel button and go to the Terms tab for this dataset." $SERVER/admin/settings/:DatasetPublishPopupCustomText
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE dataverse ADD COLUMN citationRedirectURL character varying(255);

src/main/java/Bundle.properties

Lines changed: 73 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,17 @@ header.user.selectTab.apiToken=API Token
8080

8181
head.meta.description=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.
8282
body.skip=Skip to main content
83+
84+
# dataverse_footer.xhtml
85+
8386
footer.codeAvailable=Code available at
8487
footer.dataverseOnGitHub=Dataverse On GitHub
8588
footer.dataverseProjectOn=Dataverse Project on
8689
footer.Twitter=Twitter
87-
footer.dataScienceIQSS=<a href="http://datascience.iq.harvard.edu/" title="Data Science at The Institute for Quantitative Social Science" target="_blank">Data Science</a> at <a href="http://www.iq.harvard.edu/" title="The Institute for Quantitative Social Science" target="_blank">The Institute for Quantitative Social Science</a>
90+
footer.dataScienceIQSS=Developed at the <a href="http://www.iq.harvard.edu/" title="Institute for Quantitative Social Science" target="_blank">Institute for Quantitative Social Science</a>
8891
footer.copyright=Copyright &#169; 2016, The President &#38; Fellows of Harvard College
92+
footer.widget.datastored=Data is stored at {0}.
93+
footer.widget.login=Log in to
8994
footer.privacyPolicy=Privacy Policy
9095
footer.poweredby=Powered by
9196
footer.dataverseProject=The Dataverse Project
@@ -131,7 +136,8 @@ wasPublished=, was published in
131136
wasReturnedByReviewer=, was returned by the curator of
132137
toReview=Don't forget to publish it or send it back to the contributor!
133138
worldMap.added=dataset had a WorldMap layer data added to it.
134-
notification.welcome=Welcome to {0} Dataverse! Get started by adding or finding data. Have questions? Check out the {1} or contact {2} for assistance.
139+
notification.welcome=Welcome to {0} Dataverse! Get started by adding or finding data. Have questions? Check out the {1}. Want to test out Dataverse features? Use our {2}.
140+
notification.demoSite=Demo Site
135141
notification.requestFileAccess=File access requested for dataset: {0}.
136142
notification.grantFileAccess=Access granted for files in dataset: {0}.
137143
notification.rejectFileAccess=Access rejected for requested files in dataset: {0}.
@@ -233,7 +239,7 @@ notification.email.assign.role.subject=Dataverse: You have been assigned a role
233239
notification.email.revoke.role.subject=Dataverse: Your role has been revoked
234240

235241
notification.email.greeting=Hello, \n
236-
notification.email.welcome=Welcome to Dataverse! Get started by adding or finding data. Have questions? Check out the User Guide at {0}/{1}/user/ or contact Dataverse Support for assistance.
242+
notification.email.welcome=Welcome to Dataverse! Get started by adding or finding data. Have questions? Check out the User Guide at {0}/{1}/user/ or contact Dataverse Support for assistance. Want to test out Dataverse features? Use our Demo Site at https://demo.dataverse.org
237243
notification.email.requestFileAccess=File access requested for dataset: {0}. Manage permissions at {1}.
238244
notification.email.grantFileAccess=Access granted for files in dataset: {0} (view at {1}).
239245
notification.email.rejectFileAccess=Access rejected for requested files in dataset: {0} (view at {1}).
@@ -482,11 +488,28 @@ dataverse.theme.website.watermark=Your personal site, http://...
482488
dataverse.theme.website.invalidMsg=Invalid URL.
483489

484490
dataverse.widgets.title=Widgets
485-
dataverse.widgets.tip=Copy and paste this code into the HTML on your site.
491+
dataverse.widgets.notPublished.why.header=Why Use Widgets?
492+
dataverse.widgets.notPublished.why.reason1=Increases the web visibility of your data by allowing you to embed your dataverse and datasets into your personal or project website.
493+
dataverse.widgets.notPublished.why.reason2=Allows others to browse your dataverse and datasets without leaving your personal or project website.
494+
dataverse.widgets.notPublished.how.header=How To Use Widgets
495+
dataverse.widgets.notPublished.how.tip1=To use widgets, your dataverse and datasets need to be published.
496+
dataverse.widgets.notPublished.how.tip2=After publishing, code will be available on this page for you to copy and add to your personal or project website.
497+
dataverse.widgets.notPublished.how.tip3=Do you have an OpenScholar website? If so, learn more about adding the Dataverse widgets to your website <a href="{0}/{1}/user/dataverse-management.html#adding-widgets-to-an-openscholar-website" title="Adding Widgets to an OpenScholar Website - Dataverse User Guide" target="_blank">here</a>.
498+
dataverse.widgets.notPublished.getStarted=To get started, publish your dataverse. To learn more about Widgets, visit the <a href="{0}/{1}/user/dataverse-management.html#theme-widgets" title="Theme + Widgets - Dataverse User Guide" target="_blank">Theme + Widgets</a> section of the User Guide.
499+
dataverse.widgets.editAdvanced=Edit Advanced Options
500+
dataverse.widgets.editAdvanced.tip=<strong>Advanced Options</strong> &#150; Additional options for configuring your widget on your personal or project website.
501+
dataverse.widgets.tip=Copy and paste this code into the HTML on your site. To learn more about Widgets, visit the <a href="{0}/{1}/user/dataverse-management.html#theme-widgets" title="Theme + Widgets - Dataverse User Guide" target="_blank">Theme + Widgets</a> section of the User Guide.
486502
dataverse.widgets.searchBox.txt=Dataverse Search Box
487503
dataverse.widgets.searchBox.tip=Add a way for visitors on your website to be able to search Dataverse.
488504
dataverse.widgets.dataverseListing.txt=Dataverse Listing
489505
dataverse.widgets.dataverseListing.tip=Add a way for visitors on your website to be able to view your dataverses and datasets, sort, or page through them.
506+
dataverse.widgets.advanced.popup.header=Widget Advanced Options
507+
dataverse.widgets.advanced.prompt=Forward persistent URL's in your dataset citation to your personal website.
508+
dataverse.widgets.advanced.url.label=Personal Website URL
509+
dataverse.widgets.advanced.url.watermark=http://www.example.com/page-name
510+
dataverse.widgets.advanced.invalid.message=Please enter a valid URL
511+
dataverse.widgets.advanced.success.message=Successfully updated your Personal Website URL
512+
dataverse.widgets.advanced.failure.message=The dataverse Personal Website URL has not been updated.
490513

491514
# permissions-manage.xhtml
492515

@@ -772,6 +795,7 @@ dataset.editBtn.itemLabel.upload=Files (Upload)
772795
dataset.editBtn.itemLabel.metadata=Metadata
773796
dataset.editBtn.itemLabel.terms=Terms
774797
dataset.editBtn.itemLabel.permissions=Permissions
798+
dataset.editBtn.itemLabel.widgets=Widgets
775799
dataset.editBtn.itemLabel.deleteDataset=Delete Dataset
776800
dataset.editBtn.itemLabel.deleteDraft=Delete Draft Version
777801
dataset.editBtn.itemLabel.deaccession=Deaccession Dataset
@@ -821,11 +845,11 @@ dataset.versionUI.deaccessioned=Deaccessioned
821845
dataset.cite.title.released=DRAFT VERSION will be replaced in the citation with V1 once the dataset has been published.
822846
dataset.cite.title.draft=DRAFT VERSION will be replaced in the citation with the selected version once the dataset has been published.
823847
dataset.cite.title.deassessioned=DEACCESSIONED VERSION has been added to the citation for this version since it is no longer available.
824-
dataset.cite.standards.tip=If you use these data, please add this citation to your scholarly resources. Learn about <a href="http://best-practices.dataverse.org/data-citation/" title="Get Recognition: Data Citation - Dataverse Best Practices" target="_blank">Data Citation Standards</a>.
825-
dataset.cite.downloadBtn=Download Citation
848+
dataset.cite.standards.tip=Learn about <a href="http://best-practices.dataverse.org/data-citation/" title="Get Recognition: Data Citation - Dataverse Best Practices" target="_blank">Data Citation Standards</a>.
849+
dataset.cite.downloadBtn=Cite Data
826850
dataset.cite.downloadBtn.xml=EndNote XML
827-
dataset.cite.downloadBtn.ris=RIS Format
828-
dataset.cite.downloadBtn.bib=BibTeX Format
851+
dataset.cite.downloadBtn.ris=RIS
852+
dataset.cite.downloadBtn.bib=BibTeX
829853
dataset.create.authenticatedUsersOnly=Only authenticated users can create datasets.
830854
dataset.deaccession.reason=Deaccession Reason
831855
dataset.beAccessedAt=The dataset can now be accessed at:
@@ -887,7 +911,8 @@ dataset.requestAccessToRestrictedFiles=You may request access to the restricted
887911
file.count={0} {0, choice, 0#Files|1#File|2#Files}
888912
file.count.selected={0} {0, choice, 0#Files Selected|1#File Selected|2#Files Selected}
889913
file.selectToAddBtn=Select Files to Add
890-
file.selectToAdd.tip=File upload limit is 2GB per file. For more information about supported file formats, please refer to the <a href="{0}/{1}/user/dataset-management.html#file-handling-and-uploading" title="File Handling and Uploading - Dataverse User Guide" target="_blank">User Guide</a>.
914+
file.selectToAdd.tipLimit=File upload limit is {0} bytes per file.
915+
file.selectToAdd.tipMoreInformation=For more information about supported file formats, please refer to the <a href="{0}/{1}/user/dataset-management.html#file-handling-and-uploading" title="File Handling and Uploading - Dataverse User Guide" target="_blank">User Guide</a>.
891916
file.fromDropbox=Upload from Dropbox
892917
file.fromDropbox.tip=Files can also be uploaded directly from Dropbox.
893918
file.fromDropbox.description=Drag and drop files here.
@@ -962,8 +987,8 @@ file.downloadBtn.format.citation=Data File Citation
962987
file.more.information.link=Link to more file information for
963988

964989
file.requestAccess=Request Access
965-
file.requestAccess.dialog.msg=You need to <a href="/loginpage.xhtml{0}" title="Log into your Dataverse Account">Log In</a> to request access to this file.
966-
file.requestAccess.dialog.msg.signup=You need to <a href="/dataverseuser.xhtml{0}&amp;editMode=CREATE" title="Sign Up for a Dataverse Account">Sign Up</a> or <a href="/loginpage.xhtml{0}" title="Log into your Dataverse Account">Log In</a> to request access to this file.
990+
file.requestAccess.dialog.msg=You need to <a href="/loginpage.xhtml{0}" target="{1}" title="Log into your Dataverse Account">Log In</a> to request access to this file.
991+
file.requestAccess.dialog.msg.signup=You need to <a href="/dataverseuser.xhtml{0}&amp;editMode=CREATE" target="{1}" title="Sign Up for a Dataverse Account">Sign Up</a> or <a href="/loginpage.xhtml{0}" target="{1}" title="Log into your Dataverse Account">Log In</a> to request access to this file.
967992
file.accessRequested=Access Requested
968993

969994
file.ingestInproGress=Ingest in progress...
@@ -1111,6 +1136,31 @@ file.results.btn.sort.option.oldest=Oldest
11111136
file.results.btn.sort.option.size=Size
11121137
file.results.btn.sort.option.type=Type
11131138

1139+
# dataset-widgets.xhtml
1140+
dataset.widgets.title=Dataset Widgets
1141+
dataset.widgets.notPublished.why.header=Why Use Widgets?
1142+
dataset.widgets.notPublished.why.reason1=Increases the web visibility of your data by allowing you to embed your dataverse and datasets into your personal or project website.
1143+
dataset.widgets.notPublished.why.reason2=Allows others to browse your dataverse and datasets without leaving your personal or project website.
1144+
dataset.widgets.notPublished.how.header=How To Use Widgets
1145+
dataset.widgets.notPublished.how.tip1=To use widgets, your dataverse and datasets need to be published.
1146+
dataset.widgets.notPublished.how.tip2=After publishing, code will be available on this page for you to copy and add to your personal or project website.
1147+
dataset.widgets.notPublished.how.tip3=Do you have an OpenScholar website? If so, learn more about adding the Dataverse widgets to your website <a href="{0}/{1}/user/dataverse-management.html#adding-widgets-to-an-openscholar-website" title="Adding Widgets to an OpenScholar Website - Dataverse User Guide" target="_blank">here</a>.
1148+
dataset.widgets.notPublished.getStarted=To get started, publish your dataset. To learn more about Widgets, visit the <a href="{0}/{1}/user/dataset-management.html#widgets" title="Widgets - Dataverse User Guide" target="_blank">Widgets</a> section of the User Guide.
1149+
dataset.widgets.editAdvanced=Edit Advanced Options
1150+
dataset.widgets.editAdvanced.tip=<strong>Advanced Options</strong> &#150; Additional options for configuring your widget on your personal or project website.
1151+
dataset.widgets.tip=Copy and paste this code into the HTML on your site. To learn more about Widgets, visit the <a href="{0}/{1}/user/dataset-management.html#widgets" title="Widgets - Dataverse User Guide" target="_blank">Widgets</a> section of the User Guide.
1152+
dataset.widgets.citation.txt=Dataset Citation
1153+
dataset.widgets.citation.tip=Add a citation for your dataset to your personal or project website.
1154+
dataset.widgets.datasetFull.txt=Dataset
1155+
dataset.widgets.datasetFull.tip=Add a way for visitors on your website to be able to view your datasets, download files, etc.
1156+
dataset.widgets.advanced.popup.header=Widget Advanced Options
1157+
dataset.widgets.advanced.prompt=Forward persistent URL's in your dataset citation to your personal website.
1158+
dataset.widgets.advanced.url.label=Personal Website URL
1159+
dataset.widgets.advanced.url.watermark=http://www.example.com/page-name
1160+
dataset.widgets.advanced.invalid.message=Please enter a valid URL
1161+
dataset.widgets.advanced.success.message=Successfully updated your Personal Website URL
1162+
dataset.widgets.advanced.failure.message=The dataverse Personal Website URL has not been updated.
1163+
11141164
# file.xhtml
11151165
file.title.label=Title
11161166
file.citation.label=Citation
@@ -1135,8 +1185,18 @@ error.500.message=<strong>Internal Server Error</strong> - An unexpected error w
11351185

11361186
# 404.xhtml
11371187
error.404.page.title=404 Not Found
1138-
error.404.message=<strong>Page Not Found</strong> - The page you are looking for was not found. To contact support, please press the Support link above.
1188+
error.404.message=<strong>Page Not Found</strong> - The page you are looking for was not found.
11391189

11401190
# 403.xhtml
11411191
error.403.page.title=403 Not Authorized
1142-
error.403.message=<strong>Not Authorized</strong> - You are not authorized to view this page. To contact support, please press the Support link above.
1192+
error.403.message=<strong>Not Authorized</strong> - You are not authorized to view this page.
1193+
1194+
# general error - support message
1195+
error.support.message= If you believe this is an error, please contact {0} for assistance.
1196+
1197+
# citation-frame.xhtml
1198+
citationFrame.banner.message=If the site below does not load, the archived data can be found in the {0} {1}. {2}
1199+
citationFrame.banner.message.here=here
1200+
citationFrame.banner.closeIcon=Close this message, go to dataset
1201+
citationFrame.banner.countdownMessage= This message will close in
1202+
citationFrame.banner.countdownMessage.seconds=seconds
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
/*
2+
* To change this license header, choose License Headers in Project Properties.
3+
* To change this template file, choose Tools | Templates
4+
* and open the template in the editor.
5+
*/
6+
package edu.harvard.iq.dataverse;
7+
8+
import java.net.URL;
9+
import java.text.ParseException;
10+
import java.text.SimpleDateFormat;
11+
import java.util.ArrayList;
12+
import java.util.Date;
13+
import java.util.List;
14+
import java.util.stream.Collectors;
15+
import org.apache.commons.lang.StringEscapeUtils;
16+
import org.apache.commons.lang.StringUtils;
17+
18+
/**
19+
*
20+
* @author gdurand
21+
*/
22+
public class BibtexCitation {
23+
24+
private List<String> authors = new ArrayList();
25+
private String title;
26+
private String year;
27+
private GlobalId persistentId;
28+
private String publisher;
29+
30+
public BibtexCitation(DatasetVersion dsv) {
31+
//authors
32+
dsv.getDatasetAuthors().stream().forEach((author) -> {
33+
authors.add(author.getName().getDisplayValue());
34+
});
35+
36+
// year
37+
year = dsv.getVersionYear();
38+
39+
// title
40+
title = dsv.getTitle();
41+
42+
// The Global Identifier:
43+
persistentId = new GlobalId(dsv.getDataset());
44+
45+
// publisher
46+
publisher = dsv.getRootDataverseNameforCitation();
47+
}
48+
49+
public List<String> getAuthors() {
50+
return authors;
51+
}
52+
53+
public String getTitle() {
54+
return title;
55+
}
56+
57+
public String getYear() {
58+
return year;
59+
}
60+
61+
public GlobalId getPersistentId() {
62+
return persistentId;
63+
}
64+
65+
public String getPublisher() {
66+
return publisher;
67+
}
68+
69+
70+
@Override
71+
public String toString() {
72+
StringBuilder citation = new StringBuilder("@data{");
73+
citation.append(persistentId.getIdentifier() + "_" + year + "," + "\r\n");
74+
citation.append("author = {").append(String.join("; ", authors)).append("},\r\n");
75+
citation.append("publisher = {").append(publisher).append("},\r\n");
76+
citation.append("title = {").append(title).append("},\r\n");
77+
citation.append("year = {").append(year).append("},\r\n");
78+
citation.append("doi = {").append(persistentId.getAuthority()).append("/").append(persistentId.getIdentifier()).append("},\r\n");
79+
citation.append("url = {").append(persistentId.toURL().toString()).append("}\r\n");
80+
citation.append("}");
81+
82+
return citation.toString();
83+
}
84+
85+
}
86+

0 commit comments

Comments
 (0)