Skip to content

Commit

Permalink
Merge branch 'develop' into 6524-dataset-size-api
Browse files Browse the repository at this point in the history
  • Loading branch information
sekmiller committed Feb 4, 2020
2 parents 8669089 + 3e4481d commit 770192b
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 6 deletions.
87 changes: 85 additions & 2 deletions doc/sphinx-guides/source/api/search.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ https://demo.dataverse.org/api/search?q=trees
.. _advancedsearch-example:

Advanced Search Example
-----------------------
Advanced Search Examples
------------------------

https://demo.dataverse.org/api/search?q=finch&show_relevance=true&show_facets=true&fq=publicationDate:2016&subtree=birds

Expand Down Expand Up @@ -261,6 +261,89 @@ In this example, ``show_relevance=true`` matches per field are shown. Available
}
}
https://demo.dataverse.org/api/search?q=finch&fq=publicationStatus:Published&type=dataset

The above example ``fq=publicationStatus:Published`` retrieves only "RELEASED" versions of datasets. The same could be done to retrieve "DRAFT" versions, ``fq=publicationStatus:Draft``

.. code-block:: json
{
"status": "OK",
"data": {
"q": "finch",
"total_count": 2,
"start": 0,
"spelling_alternatives": {},
"items": [
{
"name": "Darwin's Finches",
"type": "dataset",
"url": "https://doi.org/10.70122/FK2/GUAS41",
"global_id": "doi:10.70122/FK2/GUAS41",
"description": "Darwin's finches (also known as the Galápagos finches) are a group of about fifteen species of passerine birds.",
"published_at": "2019-12-24T08:05:02Z",
"publisher": "mdmizanur rahman Dataverse",
"citationHtml": "Finch, Fiona, 2019, \"Darwin's Finches\", <a href=\"https://doi.org/10.70122/FK2/GUAS41\" target=\"_blank\">https://doi.org/10.70122/FK2/GUAS41</a>, Demo Dataverse, V1",
"identifier_of_dataverse": "rahman",
"name_of_dataverse": "mdmizanur rahman Dataverse",
"citation": "Finch, Fiona, 2019, \"Darwin's Finches\", https://doi.org/10.70122/FK2/GUAS41, Demo Dataverse, V1",
"storageIdentifier": "file://10.70122/FK2/GUAS41",
"subjects": [
"Medicine, Health and Life Sciences"
],
"versionId": 53001,
"versionState": "RELEASED",
"majorVersion": 1,
"minorVersion": 0,
"createdAt": "2019-12-05T09:18:30Z",
"updatedAt": "2019-12-24T08:38:00Z",
"contacts": [
{
"name": "Finch, Fiona",
"affiliation": ""
}
],
"authors": [
"Finch, Fiona"
]
},
{
"name": "Darwin's Finches",
"type": "dataset",
"url": "https://doi.org/10.70122/FK2/7ZXYRH",
"global_id": "doi:10.70122/FK2/7ZXYRH",
"description": "Darwin's finches (also known as the Galápagos finches) are a group of about fifteen species of passerine birds.",
"published_at": "2020-01-22T21:47:34Z",
"publisher": "Demo Dataverse",
"citationHtml": "Finch, Fiona, 2020, \"Darwin's Finches\", <a href=\"https://doi.org/10.70122/FK2/7ZXYRH\" target=\"_blank\">https://doi.org/10.70122/FK2/7ZXYRH</a>, Demo Dataverse, V1",
"identifier_of_dataverse": "demo",
"name_of_dataverse": "Demo Dataverse",
"citation": "Finch, Fiona, 2020, \"Darwin's Finches\", https://doi.org/10.70122/FK2/7ZXYRH, Demo Dataverse, V1",
"storageIdentifier": "file://10.70122/FK2/7ZXYRH",
"subjects": [
"Medicine, Health and Life Sciences"
],
"versionId": 53444,
"versionState": "RELEASED",
"majorVersion": 1,
"minorVersion": 0,
"createdAt": "2020-01-22T21:23:43Z",
"updatedAt": "2020-01-22T21:47:34Z",
"contacts": [
{
"name": "Finch, Fiona",
"affiliation": ""
}
],
"authors": [
"Finch, Fiona"
]
}
],
"count_in_response": 2
}
}
.. _search-date-range:

Date Range Search Example
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/dataverse.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<ui:composition template="/dataverse_template.xhtml">
<ui:param name="pageTitle" value="#{empty DataversePage.dataverse.name ? bundle.new : DataversePage.dataverse.name}"/>
<ui:param name="dataverse" value="#{DataversePage.dataverse}"/>
<ui:param name="editModeDataverse" value="#{DataversePage.editMode}"/>
<ui:define name="meta_header">
<meta name="description" content="#{MarkupChecker:stripAllTags(DataversePage.dataverse.description)}"/>
</ui:define>
Expand Down
8 changes: 4 additions & 4 deletions src/main/webapp/dataverse_header.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,14 @@
<div class="dataverseHeaderCell dataverseHeaderLogo" jsf:rendered="#{!empty dataverse.dataverseTheme.logo and dataverse.dataverseTheme.logoFormat == 'SQUARE'}">
<img src="/logos/#{dataverse.logoOwnerId}/#{dataverse.dataverseTheme.logo}" alt="#{of:format1(bundle['alt.logo'], dataverse.name)}"/>
</div>
<div class="dataverseHeaderCell dataverseHeaderName" jsf:rendered="#{!empty dataverse.name}">
<div class="dataverseHeaderCell dataverseHeaderName" jsf:rendered="#{editModeDataverse == 'CREATE'}">
<h:outputText styleClass="dataverseHeaderDataverseName" value="#{bundle.newDataverse}"/>
</div>
<div class="dataverseHeaderCell dataverseHeaderName" jsf:rendered="#{editModeDataverse != 'CREATE'}">
<a href="/dataverse/#{dataverse.alias}" class="dataverseHeaderDataverseName" style="color:##{!empty dataverse.dataverseTheme.linkColor ? dataverse.dataverseTheme.linkColor : '428bca'};">#{dataverse.name}</a>
<h:outputText style="color:##{!empty dataverse.dataverseTheme.textColor ? dataverse.dataverseTheme.textColor : '888888'};" value=" (#{dataverse.affiliation})" rendered="#{!empty dataverse.affiliation}"/>
<h:outputText value="#{bundle.unpublished}" styleClass="label label-warning label-unpublished" rendered="#{!dataverse.released}"/>
</div>
<div class="dataverseHeaderCell dataverseHeaderName" jsf:rendered="#{empty dataverse.name}">
<h:outputText styleClass="dataverseHeaderDataverseName" value="#{bundle.newDataverse}"/>
</div>
<div class="dataverseHeaderCell dataverseHeaderTagline" jsf:rendered="#{!empty dataverse.dataverseTheme.tagline and empty dataverse.dataverseTheme.linkUrl}">
<h:outputText escape="false" style="color:##{!empty dataverse.dataverseTheme.textColor ? dataverse.dataverseTheme.textColor : '888888'};" value="#{StringEscapeUtils:escapeHtml(dataverse.dataverseTheme.tagline)}" />
</div>
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/dataverse_template.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
<a href="#content" class="sr-only">#{bundle['body.skip']}</a>
<ui:include src="dataverse_header.xhtml">
<ui:param name="dataverse" value="#{dataverse != null ? dataverse : dataverseServiceBean.findRootDataverse()}"/>
<ui:param name="editModeDataverse" value="#{editModeDataverse}"/>
<ui:param name="showDataverseHeader" value="#{showDataverseHeader != null ? showDataverseHeader : true}"/>
<ui:param name="showMessagePanel" value="#{showMessagePanel != null ? showMessagePanel : true}"/>
<ui:param name="loginRedirectPage" value="#{loginRedirectPage != null ? '?redirectPage='.concat(loginRedirectPage) : navigationWrapper.redirectPage}"/>
Expand Down

0 comments on commit 770192b

Please sign in to comment.