From 5c9d01e31ccf918f7232c8cfcef4945ed235d782 Mon Sep 17 00:00:00 2001 From: matthew-a-dunlap Date: Mon, 11 Feb 2019 14:49:04 -0500 Subject: [PATCH 1/4] Add dataset info to file search #5339 --- .../harvard/iq/dataverse/search/SolrSearchResult.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/edu/harvard/iq/dataverse/search/SolrSearchResult.java b/src/main/java/edu/harvard/iq/dataverse/search/SolrSearchResult.java index 549ddf32070..ed70095998a 100644 --- a/src/main/java/edu/harvard/iq/dataverse/search/SolrSearchResult.java +++ b/src/main/java/edu/harvard/iq/dataverse/search/SolrSearchResult.java @@ -449,6 +449,9 @@ public JsonObjectBuilder json(boolean showRelevance, boolean showEntityIds, bool String identifierLabel = null; String datasetCitation = null; + String datasetName = null; + String datasetId = null; + String datasetPersistentId = null; String preferredUrl = null; String apiUrl = null; if (this.type.equals(SearchConstants.DATAVERSES)) { @@ -471,6 +474,9 @@ public JsonObjectBuilder json(boolean showRelevance, boolean showEntityIds, bool * title of the dataset it belongs to. */ datasetCitation = parent.get("citation"); + datasetName = parent.get("name"); + datasetId = parent.get("id"); + datasetPersistentId = parent.get(SolrSearchResult.PARENT_IDENTIFIER); } //displayName = null; // testing NullSafeJsonBuilder @@ -521,6 +527,9 @@ public JsonObjectBuilder json(boolean showRelevance, boolean showEntityIds, bool .add("md5", getFileMd5()) .add("checksum", JsonPrinter.getChecksumTypeAndValue(getFileChecksumType(), getFileChecksumValue())) .add("unf", getUnf()) + .add("dataset_name", datasetName) + .add("dataset_id", datasetId) + .add("dataset_persistent_id", datasetPersistentId) .add("dataset_citation", datasetCitation) .add("deaccession_reason", this.deaccessionReason) .add("citationHtml", this.citationHtml) @@ -537,6 +546,7 @@ public JsonObjectBuilder json(boolean showRelevance, boolean showEntityIds, bool nullSafeJsonBuilder.add("entity_id", this.entityId); } } + if (showApiUrls) { /** * @todo We should probably have a metadata_url or api_url concept From 3ee27276724a6a1e98184e89f02294d065faf1b6 Mon Sep 17 00:00:00 2001 From: matthew-a-dunlap Date: Mon, 11 Feb 2019 16:50:47 -0500 Subject: [PATCH 2/4] Add filePID when exists to file search #5339 --- .../iq/dataverse/search/SearchServiceBean.java | 4 ++++ .../iq/dataverse/search/SolrSearchResult.java | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java b/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java index 45fa189787a..77a5e3ef563 100644 --- a/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java +++ b/src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java @@ -576,6 +576,10 @@ public SolrQueryResponse search(DataverseRequest dataverseRequest, List Date: Mon, 11 Feb 2019 17:06:42 -0500 Subject: [PATCH 3/4] Doc changes for search file attributes #5339 --- doc/sphinx-guides/source/api/search.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/api/search.rst b/doc/sphinx-guides/source/api/search.rst index b2b37e71425..8ea51b24ce4 100755 --- a/doc/sphinx-guides/source/api/search.rst +++ b/doc/sphinx-guides/source/api/search.rst @@ -85,7 +85,11 @@ https://demo.dataverse.org/api/search?q=trees "file_content_type":"image/png", "size_in_bytes":8361, "md5":"0386269a5acb2c57b4eade587ff4db64", - "dataset_citation":"Spruce, Sabrina, 2016, \"Spruce Goose\", http://dx.doi.org/10.5072/FK2/NFSEHG, Root Dataverse, V1" + "file_persistent_id": "doi:10.5072/FK2/XTT5BV/PCCHV7", + "dataset_name": "Dataset One", + "dataset_id": "32", + "dataset_persistent_id": "doi:10.5072/FK2/XTT5BV", + "dataset_citation":"Spruce, Sabrina, 2016, \"Spruce Goose\", http://dx.doi.org/10.5072/FK2/XTT5BV, Root Dataverse, V1" }, { "name":"Birds", From 129f1d2ac00b948a755960c153f1114a14901a45 Mon Sep 17 00:00:00 2001 From: matthew-a-dunlap Date: Mon, 11 Feb 2019 17:07:03 -0500 Subject: [PATCH 4/4] Fix existing rst errors in develop #5339 --- doc/sphinx-guides/source/api/dataaccess.rst | 2 +- doc/sphinx-guides/source/developers/workflows.rst | 4 ++-- doc/sphinx-guides/source/installation/config.rst | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/sphinx-guides/source/api/dataaccess.rst b/doc/sphinx-guides/source/api/dataaccess.rst index 5e7c013c0d9..3a91dca5024 100755 --- a/doc/sphinx-guides/source/api/dataaccess.rst +++ b/doc/sphinx-guides/source/api/dataaccess.rst @@ -87,7 +87,7 @@ original "Saved Original", the proprietary (SPSS, Stata, R, etc.) file fr "All Formats" bundled download for Tabular Files. ------------------------------------------------ +------------------------------------------------- ``/api/access/datafile/bundle/$id`` diff --git a/doc/sphinx-guides/source/developers/workflows.rst b/doc/sphinx-guides/source/developers/workflows.rst index 5346237ab39..b9090b86be3 100644 --- a/doc/sphinx-guides/source/developers/workflows.rst +++ b/doc/sphinx-guides/source/developers/workflows.rst @@ -8,7 +8,7 @@ Dataverse has a flexible workflow mechanism that can be used to trigger actions Introduction ---------- +------------ Dataverse can perform two sequences of actions when datasets are published: one prior to publishing (marked by a ``PrePublishDataset`` trigger), and one after the publication has succeeded (``PostPublishDataset``). The pre-publish workflow is useful for having an external system prepare a dataset for being publicly accessed (a possibly lengthy activity that requires moving files around, uploading videos to a streaming server, etc.), or to start an approval process. A post-publish workflow might be used for sending notifications about the newly published dataset. @@ -104,7 +104,7 @@ Available variables are: * ``releaseStatus`` archiver -+++++++ +++++++++ A step that sends an archival copy of a Dataset Version to a configured archiver, e.g. the DuraCloud interface of Chronopolis. See the `DuraCloud/Chronopolis Integration documentation `_ for further detail. diff --git a/doc/sphinx-guides/source/installation/config.rst b/doc/sphinx-guides/source/installation/config.rst index 035d00b668d..94c16e2f81a 100644 --- a/doc/sphinx-guides/source/installation/config.rst +++ b/doc/sphinx-guides/source/installation/config.rst @@ -606,7 +606,7 @@ In the Chronopolis case, since the transfer from the DuraCloud front-end to arch **PostPublication Workflow** -To automate the submission of archival copies to an archive as part of publication, one can setup a Dataverse Workflow using the "archiver" workflow step - see the :doc:`developers/workflows` guide. +To automate the submission of archival copies to an archive as part of publication, one can setup a Dataverse Workflow using the "archiver" workflow step - see the :doc:`/developers/workflows` guide. . The archiver step uses the configuration information discussed above including the :ArchiverClassName setting. The workflow step definition should include the set of properties defined in \:ArchiverSettings in the workflow definition. To active this workflow, one must first install a workflow using the archiver step. A simple workflow that invokes the archiver step configured to submit to DuraCloud as its only action is included in dataverse at /scripts/api/data/workflows/internal-archiver-workflow.json.