Skip to content

Commit aa1b8c6

Browse files
committed
Merge pull request #3108 from IQSS/3089-jsoup
3089 jsoup
2 parents f9b0608 + 13c89ed commit aa1b8c6

25 files changed

Lines changed: 535 additions & 321 deletions

conf/solr/4.6.0/schema.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@
290290
<field name="parentName" type="string" stored="true" indexed="false" multiValued="false"/>
291291
<field name="parentCitation" type="string" stored="true" indexed="false" multiValued="false"/>
292292
<field name="citation" type="string" stored="true" indexed="false" multiValued="false"/>
293+
<field name="citationHtml" type="string" stored="true" indexed="false" multiValued="false"/>
293294
<field name="identifier" type="string" stored="true" indexed="true" multiValued="false"/>
294295
<field name="persistentUrl" type="string" stored="true" indexed="false" multiValued="false"/>
295296
<field name="unf" type="string" stored="true" indexed="true" multiValued="false"/>

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

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Unlike the web interface, this new API is limited to *published* data until `iss
1212

1313
The parameters and JSON response are partly inspired by the `GitHub Search API <https://developer.github.com/v3/search/>`_.
1414

15+
Please note that in Dataverse 4.3 and older the "citation" field wrapped the persistent ID URL in an ``<a>`` tag but this has been changed to plaintext. If you want the old value with HTML in it, a new field called "citationHtml" can be used.
16+
1517
Parameters
1618
----------
1719

@@ -54,7 +56,7 @@ https://apitest.dataverse.org/api/search?q=trees
5456
"image_url":"https://apitest.dataverse.org/api/access/dvCardImage/7",
5557
"identifier":"trees",
5658
"description":"A tree dataverse with some birds",
57-
"published_at":"2015-01-12T16:05:12Z"
59+
"published_at":"2016-05-10T12:53:38Z"
5860
},
5961
{
6062
"name":"Chestnut Trees",
@@ -63,20 +65,21 @@ https://apitest.dataverse.org/api/search?q=trees
6365
"image_url":"https://apitest.dataverse.org/api/access/dvCardImage/9",
6466
"identifier":"chestnuttrees",
6567
"description":"A dataverse with chestnut trees and an oriole",
66-
"published_at":"2015-01-12T18:02:32Z"
68+
"published_at":"2016-05-10T12:52:38Z"
6769
},
6870
{
6971
"name":"trees.png",
7072
"type":"file",
7173
"url":"https://apitest.dataverse.org/api/access/datafile/12",
72-
"image_url":"https://apitest.dataverse.org/api/access/preview/12",
74+
"image_url":"https://apitest.dataverse.org/api/access/fileCardImage/12",
7375
"file_id":"12",
7476
"description":"",
75-
"published_at":"2015-01-12T16:05:44Z",
77+
"published_at":"2016-05-10T12:53:39Z",
7678
"file_type":"PNG Image",
79+
"file_content_type":"image/png",
7780
"size_in_bytes":8361,
7881
"md5":"0386269a5acb2c57b4eade587ff4db64",
79-
"dataset_citation":"Spruce, Sabrina, 2015, \"Spruce Goose\", http://dx.doi.org/10.5072/FK2/Y6RGTQ, Root Dataverse, V1"
82+
"dataset_citation":"Spruce, Sabrina, 2016, \"Spruce Goose\", http://dx.doi.org/10.5072/FK2/NFSEHG, Root Dataverse, V1"
8083
},
8184
{
8285
"name":"Birds",
@@ -85,7 +88,7 @@ https://apitest.dataverse.org/api/search?q=trees
8588
"image_url":"https://apitest.dataverse.org/api/access/dvCardImage/2",
8689
"identifier":"birds",
8790
"description":"A bird dataverse with some trees",
88-
"published_at":"2015-01-12T18:01:51Z"
91+
"published_at":"2016-05-10T12:57:27Z"
8992
}
9093
],
9194
"count_in_response":4
@@ -97,7 +100,7 @@ https://apitest.dataverse.org/api/search?q=trees
97100
Advanced Search Example
98101
-----------------------
99102

100-
https://apitest.dataverse.org/api/search?q=finch&show_relevance=true&show_facets=true&fq=publication_date_s:2015&subtree=birds
103+
https://apitest.dataverse.org/api/search?q=finch&show_relevance=true&show_facets=true&fq=publicationDate:2016&subtree=birds
101104

102105
In this example, ``show_relevance=true`` matches per field are shown. Available facets are shown with ``show_facets=true`` and of the facets is being used with ``fq=publication_date_s:2015``. The search is being narrowed to the dataverse with the identifier "birds" with the parameter ``subtree=birds``.
103106

@@ -119,7 +122,7 @@ In this example, ``show_relevance=true`` matches per field are shown. Available
119122
"image_url":"https://apitest.dataverse.org/api/access/dvCardImage/3",
120123
"identifier":"finches",
121124
"description":"A dataverse with finches",
122-
"published_at":"2015-01-12T18:01:15Z",
125+
"published_at":"2016-05-10T12:57:38Z",
123126
"matches":[
124127
{
125128
"description":{
@@ -135,17 +138,19 @@ In this example, ``show_relevance=true`` matches per field are shown. Available
135138
]
136139
}
137140
}
138-
]
141+
],
142+
"score": 3.8500118255615234
139143
},
140144
{
141145
"name":"Darwin's Finches",
142146
"type":"dataset",
143-
"url":"http://dx.doi.org/10.5072/FK2/CE0052",
144-
"image_url":"https://apitest.dataverse.org/api/access/dsPreview/2",
145-
"global_id":"doi:10.5072/FK2/CE0052",
146-
"published_at":"2015-01-12T18:01:37Z",
147-
"citation":"Finch, Fiona, 2015, \"Darwin's Finches\", http://dx.doi.org/10.5072/FK2/CE0052, Root Dataverse, V1",
147+
"url":"http://dx.doi.org/10.5072/FK2/G2VPE7",
148+
"image_url":"https://apitest.dataverse.org/api/access/dsCardImage/2",
149+
"global_id":"doi:10.5072/FK2/G2VPE7",
148150
"description": "Darwin's finches (also known as the Galápagos finches) are a group of about fifteen species of passerine birds.",
151+
"published_at":"2016-05-10T12:57:45Z",
152+
"citationHtml":"Finch, Fiona, 2016, \"Darwin's Finches\", <a href=\"http://dx.doi.org/10.5072/FK2/G2VPE7\" target=\"_blank\">http://dx.doi.org/10.5072/FK2/G2VPE7</a>, Root Dataverse, V1",
153+
"citation":"Finch, Fiona, 2016, \"Darwin's Finches\", http://dx.doi.org/10.5072/FK2/G2VPE7, Root Dataverse, V1",
149154
"matches":[
150155
{
151156
"authorName":{
@@ -169,34 +174,35 @@ In this example, ``show_relevance=true`` matches per field are shown. Available
169174
}
170175
}
171176
],
177+
"score": 1.5033848285675049,
172178
"authors":[
173179
"Finch, Fiona"
174180
]
175181
}
176182
],
177183
"facets":[
178184
{
179-
"dvCategory_s":{
180-
"friendly":"Dataverse Category",
185+
"subject_ss":{
186+
"friendly":"Subject",
181187
"labels":[
182188
{
183-
"Uncategorized":1
189+
"Medicine, Health and Life Sciences":2
184190
}
185191
]
186192
},
187-
"affiliation_ss":{
188-
"friendly":"Affiliation",
189-
"labels":[
193+
"authorName_ss": {
194+
"friendly":"Author Name",
195+
"labels": [
190196
{
191-
"Birds Inc.":1
197+
"Finch, Fiona":1
192198
}
193199
]
194200
},
195-
"publication_date_s":{
201+
"publicationDate":{
196202
"friendly":"Publication Date",
197203
"labels":[
198204
{
199-
"2015":2
205+
"2016":2
200206
}
201207
]
202208
}

src/main/java/Bundle.properties

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -127,25 +127,27 @@ wasPublished=, was published in
127127
wasReturnedByReviewer=, was returned by the curator of
128128
toReview=Don't forget to publish it or send it back to the contributor!
129129
worldMap.added=dataset had a WorldMap layer data added to it.
130-
notification.welcome=Welcome to {0} Dataverse! Get started by adding or finding data. Have questions? Check out the <a href="{1}/{2}/user/index.html" title="{0} Dataverse User Guide" target="_blank">User Guide</a> or contact <a href="#" onclick="event.preventDefault();PF(&#39;contactForm&#39;).show();" title=\u201dContact {0} Dataverse Support\u201d>Dataverse Support</a> for assistance.
131-
notification.requestFileAccess=File access requested for dataset: <a href="/permissions-manage-files.xhtml?id={0,number,#########}" title="{1}">{1}</a>.
132-
notification.grantFileAccess=Access granted for files in dataset: <a href="/dataset.xhtml?persistentId={0}" title="{1}">{1}</a>.
133-
notification.rejectFileAccess=Access rejected for requested files in dataset: <a href="/dataset.xhtml?persistentId={0}" title="{1}">{1}</a>.
134-
notification.createDataverse=<a href="/dataverse/{0}" title="{1}">{1}</a> was created in <a href="/dataverse/{2}" title="{3}">{3}</a>. To learn more about what you can do with your dataverse, check out the <a href="{4}/{5}/user/dataverse-management.html" title="Dataverse Management - Dataverse User Guide" target="_blank">User Guide</a>.
135-
notification.createDataset=<a href="/dataset.xhtml?persistentId={0}" title="{1}"&>{1}</a> was created in <a href="/dataverse/{2}" title="{3}">{3}</a>. To learn more about what you can do with a dataset, check out the <a href="{4}/{5}/user/dataset-management.html" title="Dataset Management - Dataset User Guide" target="_blank">User Guide</a>.
136-
notification.wasSubmittedForReview=<a href="/dataset.xhtml?persistentId={0}&amp;version=DRAFT&amp;faces-redirect=true" title="{1}">{1}</a>, was submitted for review to be published in <a href="/dataverse/{2}" title="{3}">{3}</a>. Don't forget to publish it or send it back to the contributor\!
137-
notification.wasReturnedByReviewer=<a href="/dataset.xhtml?persistentId={0}&amp;version=DRAFT&amp;faces-redirect=true" title="{1}">{1}</a>, was returned by the curator of <a href="/dataverse/{2}" title="{3}">{3}</a>.
138-
notification.wasPublished=<a href="/dataset.xhtml?persistentId={0}" title="{1}">{1}</a>, was published in <a href="/dataverse/{2}" title="{3}">{3}</a>.
139-
notification.worldMap.added=<a href="/dataset.xhtml?persistentId={0}" title="{1}">{1}</a>, dataset had WorldMap layer data added to it.
130+
notification.welcome=Welcome to {0} Dataverse! Get started by adding or finding data. Have questions? Check out the {1} or contact {2} for assistance.
131+
notification.requestFileAccess=File access requested for dataset: {0}.
132+
notification.grantFileAccess=Access granted for files in dataset: {0}.
133+
notification.rejectFileAccess=Access rejected for requested files in dataset: {0}.
134+
notification.createDataverse={0} was created in {1} . To learn more about what you can do with your dataverse, check out the {2}.
135+
notification.dataverse.management.title=Dataverse Management - Dataverse User Guide
136+
notification.createDataset={0} was created in {1}. To learn more about what you can do with a dataset, check out the {2}.
137+
notification.dataset.management.title=Dataset Management - Dataset User Guide
138+
notification.wasSubmittedForReview={0}, was submitted for review to be published in {1}. Don't forget to publish it or send it back to the contributor\!
139+
notification.wasReturnedByReviewer={0}, was returned by the curator of {1}.
140+
notification.wasPublished={0}, was published in {1}.
141+
notification.worldMap.added={0}, dataset had WorldMap layer data added to it.
140142
notification.generic.objectDeleted=The dataverse, dataset, or file for this notification has been deleted.
141-
notification.access.granted.dataverse=You have been granted the {0} role for <a href="/dataverse/{1}" title="{2}">{2}</a>.
142-
notification.access.granted.dataset=You have been granted the {0} role for <a href="/dataset.xhtml?persistentId={1}" title="{2}">{2}</a>.
143-
notification.access.granted.datafile=You have been granted the {0} role for file in <a href="/dataset.xhtml?persistentId={1}" title="{2}">{2}</a>.
143+
notification.access.granted.dataverse=You have been granted the {0} role for {1}.
144+
notification.access.granted.dataset=You have been granted the {0} role for {1}.
145+
notification.access.granted.datafile=You have been granted the {0} role for file in {1}.
144146
notification.access.granted.fileDownloader.additionalDataverse={0} You now have access to all published restricted and unrestricted files in this dataverse.
145147
notification.access.granted.fileDownloader.additionalDataset={0} You now have access to all published restricted and unrestricted files in this dataset.
146-
notification.access.revoked.dataverse=You have been removed from a role in <a href="/dataverse/{1}" title="{2}">{2}</a>.
147-
notification.access.revoked.dataset=You have been removed from a role in <a href="/dataset.xhtml?persistentId={1}" title="{2}">{2}</a>.
148-
notification.access.revoked.datafile=You have been removed from a role in <a href="/dataset.xhtml?persistentId={1}" title="{2}">{2}</a>.
148+
notification.access.revoked.dataverse=You have been removed from a role in {0}.
149+
notification.access.revoked.dataset=You have been removed from a role in {0}.
150+
notification.access.revoked.datafile=You have been removed from a role in {0}.
149151
removeNotification=Remove Notification
150152
groupAndRoles.manageTips=Here is where you can access and manage all the groups you belong to, and the roles you have been assigned.
151153
user.signup.tip=Why have a Dataverse account? To create your own dataverse and customize it, add datasets, or request access to restricted files.
@@ -330,11 +332,11 @@ dataverse.savedsearch.save=Save Linked Search
330332
dataverse.savedsearch.dataverse.choose=Choose which of your dataverses you would like to link this search to.
331333
dataverse.savedsearch.no.choice=You have one dataverse to which you may add a saved search.
332334
# Bundle file editors, please note that "dataverse.savedsearch.save.success" is used in a unit test
333-
dataverse.saved.search.success=The saved search has been successfully linked to <a href="/dataverse/{0}" title="{1}">{1}</a>.
335+
dataverse.saved.search.success=The saved search has been successfully linked to {0}.
334336
dataverse.saved.search.failure=The saved search was not able to be linked.
335-
dataverse.linked.success= {0} has been successfully linked to <a href="{1}/dataverse/{2}" title="{3}">{3}</a>.
336-
dataverse.linked.success.wait= {0} has been successfully linked to <a href="{1}/dataverse/{2}" title="{3}">{3}</a>. Please wait for its contents to appear.
337-
dataverse.linked.internalerror={0} has been successfully linked to <a href="{1}/dataverse/{2}" title="{3}">{3}</a> but contents will not appear until an internal error has been fixed.
337+
dataverse.linked.success= {0} has been successfully linked to {1}.
338+
dataverse.linked.success.wait= {0} has been successfully linked to {1}. Please wait for its contents to appear.
339+
dataverse.linked.internalerror={0} has been successfully linked to {1} but contents will not appear until an internal error has been fixed.
338340
dataverse.page.pre=Previous
339341
dataverse.page.next=Next
340342
dataverse.byCategory=Dataverses by Category
@@ -777,9 +779,9 @@ dataset.majorRelease=Major Release
777779
dataset.minorRelease=Minor Release
778780
dataset.majorRelease.tip=Due to the nature of changes to the current draft this will be a major release ({0})
779781
dataset.mayNotBePublished=Cannot publish dataset.
780-
dataset.mayNotPublish.administrator= This dataset cannot be published until <a href="/dataverse.xhtml?alias={0}" title="{1}">{1}</a> is published by its administrator.
781-
dataset.mayNotPublish.both= This dataset cannot be published until <a href="/dataverse.xhtml?alias={0}" title="{1}">{1}</a> is published. Would you like to publish both right now?
782-
dataset.mayNotPublish.twoGenerations= This dataset cannot be published until <a href="/dataverse.xhtml?alias={0}" title="{1}">{1}</a> and <a href="/dataverse.xhtml?alias={2}" title="{3}">{3}</a> are published.
782+
dataset.mayNotPublish.administrator= This dataset cannot be published until {0} is published by its administrator.
783+
dataset.mayNotPublish.both= This dataset cannot be published until {0} is published. Would you like to publish both right now?
784+
dataset.mayNotPublish.twoGenerations= This dataset cannot be published until {0} and {1} are published.
783785
dataset.mayNotBePublished.both.button=Yes, Publish Both
784786
dataset.viewVersion.unpublished=View Unpublished Version
785787
dataset.viewVersion.published=View Published Version
@@ -818,7 +820,7 @@ dataset.message.uploadFiles=Upload Dataset Files - You can drag and drop files f
818820
dataset.message.editMetadata=Edit Dataset Metadata - Add more metadata about this dataset to help others easily find it.
819821
dataset.message.editTerms=Edit Dataset Terms - Update this dataset's terms of use.
820822
dataset.message.createSuccess=This dataset has been created.
821-
dataset.message.linkSuccess= {0} has been successfully linked to <a href="{1}/dataverse/{2}" title="{3}">{3}</a>.
823+
dataset.message.linkSuccess= {0} has been successfully linked to {1}.
822824
dataset.message.metadataSuccess=The metadata for this dataset has been updated.
823825
dataset.message.termsSuccess=The terms for this dataset has been updated.
824826
dataset.message.filesSuccess=The files for this dataset have been updated.

0 commit comments

Comments
 (0)