Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit e19a346
Author: Ruben Andreassen <rubean85@gmail.com>
Date:   Mon Dec 4 12:20:54 2017 +0100

    Forgot username

commit 0d478a7
Merge: 45288aa 8aa4150
Author: Ruben Andreassen <rubean85@gmail.com>
Date:   Mon Dec 4 10:56:10 2017 +0100

    Merge dataporten into 4334-oauth-dataporten

commit 45288aa
Merge: caf6371 4648b6a
Author: Ruben <rubean85@gmail.com>
Date:   Fri Dec 1 14:45:44 2017 +0100

    Merge pull request #1 from IQSS/develop

    test

commit 4648b6a
Merge: 0f36aa0 fff836c
Author: kcondon <kcondon@hmdc.harvard.edu>
Date:   Thu Nov 30 18:44:35 2017 -0500

    Merge pull request IQSS#4331 from IQSS/4330-no-affiliation

    add null check for datasetAuthor.getAffiliation() IQSS#4330

commit fff836c
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Thu Nov 30 16:39:26 2017 -0500

    add null check for datasetAuthor.getAffiliation() IQSS#4330

commit 0f36aa0
Merge: e2878ce fad8669
Author: kcondon <kcondon@hmdc.harvard.edu>
Date:   Thu Nov 30 15:07:54 2017 -0500

    Merge pull request IQSS#4325 from IQSS/4324-header-padding

    Fixed padding layout issue with dataverse name text link in header IQSS#4324

commit fad8669
Author: Michael Heppler <mheppler@hmdc.harvard.edu>
Date:   Thu Nov 30 10:14:53 2017 -0500

    Fixed padding layout issue with dataverse name text link in header. [ref IQSS#4324]

commit e2878ce
Merge: d785c5c cb9647f
Author: kcondon <kcondon@hmdc.harvard.edu>
Date:   Wed Nov 29 18:22:53 2017 -0500

    Merge pull request IQSS#4305 from IQSS/4304-navbar-search

    use "?" (`&IQSS#63;`) rather than "&" (`&IQSS#38;`) before "q" IQSS#4304

commit d785c5c
Merge: a881f36 3cc02d0
Author: kcondon <kcondon@hmdc.harvard.edu>
Date:   Wed Nov 29 18:19:25 2017 -0500

    Merge pull request IQSS#4302 from IQSS/3700-export-schema.org

    implement export of schema.org JSON-LD IQSS#3700

commit 3cc02d0
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Wed Nov 29 12:53:04 2017 -0500

    have dataset page get cached JSON-LD, if available IQSS#3700

commit 84224bd
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Wed Nov 29 12:45:53 2017 -0500

    guard against null terms.getTermsOfUse() IQSS#3700

commit ba9c6bd
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Wed Nov 29 12:28:16 2017 -0500

    API: document "schema.org" as a supported export format IQSS#3700

commit e5c2528
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Wed Nov 29 12:11:17 2017 -0500

    capitalize Schema.org in guides IQSS#3700

commit 086824d
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Wed Nov 29 10:57:32 2017 -0500

    note that we know "affliation" throws a warning IQSS#3700

commit a881f36
Merge: b20ab14 23b865c
Author: kcondon <kcondon@hmdc.harvard.edu>
Date:   Tue Nov 28 16:28:04 2017 -0500

    Merge pull request IQSS#4312 from IQSS/4197-bundle-error

    Fixed bundle reference to "parent" dataverse for Theme + Widget pg IQSS#4197

commit 34859e7
Merge: 2f278cc b20ab14
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Tue Nov 28 16:24:56 2017 -0500

    Merge branch 'develop' into 3700-export-schema.org IQSS#3700

commit 23b865c
Author: Michael Heppler <mheppler@hmdc.harvard.edu>
Date:   Tue Nov 28 14:42:12 2017 -0500

    Fixed bundle reference to "parent" dataverse for Theme + Widget pg. [ref IQSS#4197]

commit b20ab14
Merge: caf6371 8e6354a
Author: kcondon <kcondon@hmdc.harvard.edu>
Date:   Tue Nov 28 14:01:39 2017 -0500

    Merge pull request IQSS#4277 from IQSS/4197-dv-header

    4197 dv header

commit 8e6354a
Author: Michael Heppler <mheppler@hmdc.harvard.edu>
Date:   Tue Nov 28 13:23:15 2017 -0500

    Changed references from "customization" to "theme" in Theme + Widgets pg. [ref IQSS#4197]

commit c312a85
Author: Derek Murphy <dlmurphy@g.harvard.edu>
Date:   Tue Nov 28 13:05:39 2017 -0500

    Doc rewrites [IQSS#4197]

    Rewrote some text on the config page for clarity, changed terminology
    usage in dataverse management page to make it more consistent

commit f68b81d
Author: Michael Heppler <mheppler@hmdc.harvard.edu>
Date:   Tue Nov 28 12:15:40 2017 -0500

    Removed commented out theme logic found in QA. [ref IQSS#4197]

commit 624922f
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Tue Nov 28 11:09:26 2017 -0500

    when adding row to dataversetheme, use white instead of gray IQSS#4197

commit cb9647f
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Mon Nov 27 10:27:30 2017 -0500

    use "?" (&IQSS#63;) rather than "&" (&IQSS#38;) before "q" IQSS#4304

commit d8028f1
Merge: 36d9228 caf6371
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Mon Nov 27 09:33:03 2017 -0500

    Merge branch 'develop' into 4197-dv-header IQSS#4197

commit 2f278cc
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Wed Nov 22 12:33:56 2017 -0500

    cleanup IQSS#3700

commit b00d4d6
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Wed Nov 22 12:28:25 2017 -0500

    capitalize "Schema.org" IQSS#3700

commit 8f52663
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Wed Nov 22 11:06:41 2017 -0500

    implement export of schema.org JSON-LD IQSS#3700

commit caf6371
Merge: c67a39f d80b9d1
Author: kcondon <kcondon@hmdc.harvard.edu>
Date:   Tue Nov 21 16:29:07 2017 -0500

    Merge pull request IQSS#4297 from IQSS/orcid_v21

    orcid v2.1 changes (mainly https for profile page link)

commit c67a39f
Merge: 0918fae a756751
Author: kcondon <kcondon@hmdc.harvard.edu>
Date:   Mon Nov 20 15:48:37 2017 -0500

    Merge pull request IQSS#4252 from IQSS/2243-schema.org-json-ld

    2243 schema.org json ld

commit d80b9d1
Author: Pete Meyer <pameyer@crystal.harvard.edu>
Date:   Mon Nov 20 14:32:09 2017 -0500

    orcid v2.1 changes (mainly https for profile page link)

commit 0918fae
Merge: 3013c0d dcfcbaf
Author: kcondon <kcondon@hmdc.harvard.edu>
Date:   Mon Nov 20 14:31:41 2017 -0500

    Merge pull request IQSS#4276 from IQSS/4250-ingest-failed

    make it clear that file upload is complete IQSS#4250

commit 3013c0d
Merge: b4cea62 3f0f7e8
Author: kcondon <kcondon@hmdc.harvard.edu>
Date:   Mon Nov 20 14:21:37 2017 -0500

    Merge pull request IQSS#4275 from IQSS/4262-describe-method

    move `describe` from EjbDataverseEngine to Command interface IQSS#4262

commit 36d9228
Merge: d612189 b4cea62
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Fri Nov 17 16:38:34 2017 -0500

    Merge branch 'develop' into 4197-dv-header IQSS#4197

commit dcfcbaf
Merge: 268c3dc b4cea62
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Fri Nov 17 16:36:21 2017 -0500

    Merge branch 'develop' into 4250-ingest-failed IQSS#4250

commit 3f0f7e8
Merge: 633a19d b4cea62
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Fri Nov 17 16:33:37 2017 -0500

    Merge branch 'develop' into 4262-describe-method IQSS#4262

commit a756751
Merge: eec1163 b4cea62
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Fri Nov 17 16:32:43 2017 -0500

    Merge branch 'develop' into 2243-schema.org-json-ld IQSS#2243

    Conflicts (just imports:
    src/main/java/edu/harvard/iq/dataverse/DatasetPage.java

commit eec1163
Author: Leonid Andreev <leonid@hmdc.harvard.edu>
Date:   Fri Nov 17 15:58:38 2017 -0500

    Per conversation with jgautier stipped the '@type="person"' attribute in the author fragment;
    since it can be a person or an organization; this results in a warning from google validation tool
    (because "Thing" is not supposed to have an affiliation) but it appears to be ok to live with it.

commit 0801d56
Author: Leonid Andreev <leonid@hmdc.harvard.edu>
Date:   Fri Nov 17 15:36:04 2017 -0500

    ldjson should will only be embedded into the page if this is the LATEST PUBLISHED version (IQSS#2243)

commit a2742c5
Author: Leonid Andreev <leonid@hmdc.harvard.edu>
Date:   Fri Nov 17 15:08:40 2017 -0500

    latest changest to ld json formatting, making the fragment pass the google validation tool test. (IQSS#2243)

commit d612189
Author: Derek Murphy <dlmurphy@g.harvard.edu>
Date:   Fri Nov 17 13:01:55 2017 -0500

    Docs: extremely nitpicky word change [IQSS#4197]

    Changed a couple words in the config page.

commit d277669
Author: Michael Heppler <mheppler@hmdc.harvard.edu>
Date:   Thu Nov 16 16:21:29 2017 -0500

    Added tip to Installation Guide > Configuration > Custom Header related to disable root theme. [ref IQSS#4197]

commit 80219c5
Author: Derek Murphy <dlmurphy@g.harvard.edu>
Date:   Thu Nov 16 11:43:59 2017 -0500

    Syntax + typo fix

    Small edit, fixed a typo and a syntax error in (ironically) a header in
    the docs

commit e0399c1
Author: Leonid Andreev <leonid@hmdc.harvard.edu>
Date:   Wed Nov 15 19:50:54 2017 -0500

    ...and a quick fix for the "temporalCoverage" entry (IQSS#2243)

commit 67882ff
Author: Leonid Andreev <leonid@hmdc.harvard.edu>
Date:   Wed Nov 15 19:41:05 2017 -0500

    the ld json fragment should now be structured as specified in the issue IQSS#2243.

commit 8b8391f
Author: Leonid Andreev <leonid@hmdc.harvard.edu>
Date:   Wed Nov 15 13:24:22 2017 -0500

    added topicClassifications and kewords to JSONLD. (IQSS#2243)

commit 28f705c
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Wed Nov 15 12:58:11 2017 -0500

    implement :DisableRootDataverseTheme db setting IQSS#4197

commit 268c3dc
Author: Michael Heppler <mheppler@hmdc.harvard.edu>
Date:   Wed Nov 15 12:54:50 2017 -0500

    Revised ingest error popover message text. Fixed icon spacing issue. [ref IQSS#4250]

commit 7cd2fea
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Wed Nov 15 12:01:57 2017 -0500

    Revert "stub out UI for disabling root dataverse theme IQSS#4197 "

    This reverts commit b9c3c56.

    We're going to use a database setting instead.

commit b9c3c56
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Wed Nov 15 08:53:36 2017 -0500

    stub out UI for disabling root dataverse theme IQSS#4197

commit 1f938e9
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Wed Nov 15 08:18:25 2017 -0500

    Revert "only show header for non-root dataverses IQSS#4197 "

    This reverts commit 8eccacd.

commit 633a19d
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Tue Nov 14 19:02:10 2017 -0500

    affectedDvObjects is a better name for this field IQSS#4262

commit 9a3f4a3
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Tue Nov 14 17:10:06 2017 -0500

    add the role to the message IQSS#4262

commit 7cfc8ba
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Tue Nov 14 10:09:18 2017 -0500

    override `describe` in AssignRoleCommand IQSS#4262

commit 023cb8f
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Mon Nov 13 16:09:43 2017 -0500

    remove parameters since the Command has them IQSS#4262

commit 8eccacd
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Mon Nov 13 15:52:37 2017 -0500

    only show header for non-root dataverses IQSS#4197

commit 7795e70
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Mon Nov 13 15:22:08 2017 -0500

    change header background from gray to white IQSS#4197

commit e434dd0
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Mon Nov 13 14:28:23 2017 -0500

    make it clear that file upload is complete IQSS#4250

commit 26eb11d
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Mon Nov 13 14:18:57 2017 -0500

    move `describe` from EjbDataverseEngine to Command interface IQSS#4262

commit 7d03e70
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Tue Nov 7 16:21:37 2017 -0500

    consistency between DC.subject and JSON-LD keywords IQSS#2243

commit 9f1d057
Author: Leonid Andreev <leonid@hmdc.harvard.edu>
Date:   Mon Nov 6 21:58:32 2017 -0500

    one more addition for IQSS#2243 - added temporalCoverage.

commit 8c74e37
Author: Leonid Andreev <leonid@hmdc.harvard.edu>
Date:   Mon Nov 6 21:28:06 2017 -0500

    A few quick fixes for getJsonLd() (and the corresponding test in DatasetVersionTest());
    (ref IQSS#2243)

commit c941781
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Fri Nov 3 12:21:12 2017 -0400

    explain why ui:insert lines are in the template IQSS#2243

commit 1aa323a
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Fri Nov 3 12:20:52 2017 -0400

    remove unused imports used in this branch IQSS#2243

commit f8ca59f
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Fri Nov 3 12:13:05 2017 -0400

    add tests for getJsonLd and getPublicationDateAsString IQSS#2243

commit b1db8ee
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Fri Nov 3 11:26:37 2017 -0400

    rename to publicationDateAsString and improve javadoc IQSS#2243

commit 8f3083c
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Fri Nov 3 11:14:13 2017 -0400

    delete cruft (unused method) IQSS#2243

commit 6c5f044
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Thu Nov 2 15:41:12 2017 -0400

    use dateModified and proper schemaVersion URL IQSS#2243

commit 171c8f3
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Thu Nov 2 15:29:35 2017 -0400

    move getJsonLd method to DatasetVersion entity IQSS#2243

commit 485a5ca
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Thu Nov 2 15:25:37 2017 -0400

    don't even try to figure out if the author is a person or not IQSS#2243

commit 80b5a88
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Thu Nov 2 15:19:49 2017 -0400

    limit to non-published, not just non-drafts IQSS#2243

    Also add helper method.

commit ad71c6a
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Thu Nov 2 15:17:32 2017 -0400

    use same date format as meta name="DC.date" IQSS#2243

commit 2cc958d
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Wed Nov 1 13:30:15 2017 -0400

    fix a number of issues (listed below) IQSS#3793 IQSS#2243

    - only show published versions
    - show URL to DOI dynamically (was hard coded)
    - show publication date
    - show correct publisher
    - show correct provider

commit 5ad88fc
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Wed Nov 1 13:15:00 2017 -0400

    better author name parsing (could be an org!) IQSS#3793 IQSS#2243

commit 1b62596
Author: Philip Durbin <philip_durbin@harvard.edu>
Date:   Tue Oct 31 14:57:01 2017 -0400

    stub out dataset in json-ld format IQSS#3793
  • Loading branch information
xibriz committed Dec 4, 2017
1 parent 8aa4150 commit 3d66c37
Show file tree
Hide file tree
Showing 30 changed files with 847 additions and 77 deletions.
9 changes: 7 additions & 2 deletions doc/sphinx-guides/source/admin/metadataexport.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ Metadata Export
Automatic Exports
-----------------

Unlike in DVN v3, publishing a dataset in Dataverse 4 automaticalliy starts a metadata export job, that will run in the background, asynchronously. Once completed, it will make the dataset metadata exported and cached in all the supported formats (Dublin Core, Data Documentation Initiative (DDI), and native JSON). There is no need to run the export manually.
Publishing a dataset automatically starts a metadata export job, that will run in the background, asynchronously. Once completed, it will make the dataset metadata exported and cached in all the supported formats:

- Dublin Core
- Data Documentation Initiative (DDI)
- Schema.org JSON-LD
- native JSON (Dataverse-specific)

A scheduled timer job that runs nightly will attempt to export any published datasets that for whatever reason haven't been exported yet. This timer is activated automatically on the deployment, or restart, of the application. So, again, no need to start or configure it manually. (See the "Application Timers" section of this guide for more information)

Expand All @@ -28,4 +33,4 @@ Note, that creating, modifying, or re-exporting an OAI set will also attempt to
Export Failures
---------------

An export batch job, whether started via the API, or by the application timer, will leave a detailed log in your configured logs directory. This is the same location where your main Glassfish server.log is found. The name of the log file is ``export_[timestamp].log`` - for example, *export_2016-08-23T03-35-23.log*. The log will contain the numbers of datasets processed successfully and those for which metadata export failed, with some information on the failures detected. Please attach this log file if you need to contact Dataverse support about metadata export problems.
An export batch job, whether started via the API, or by the application timer, will leave a detailed log in your configured logs directory. This is the same location where your main Glassfish server.log is found. The name of the log file is ``export_[timestamp].log`` - for example, *export_2016-08-23T03-35-23.log*. The log will contain the numbers of datasets processed successfully and those for which metadata export failed, with some information on the failures detected. Please attach this log file if you need to contact Dataverse support about metadata export problems.
2 changes: 1 addition & 1 deletion doc/sphinx-guides/source/api/native-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Delete the dataset whose id is passed::

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

.. note:: Supported exporters (export formats) are ``ddi``, ``oai_ddi``, ``dcterms``, ``oai_dc``, and ``dataverse_json``.
.. note:: Supported exporters (export formats) are ``ddi``, ``oai_ddi``, ``dcterms``, ``oai_dc``, ``schema.org`` , and ``dataverse_json``.

|CORS| Lists all the file metadata, for the given dataset and version::

Expand Down
12 changes: 12 additions & 0 deletions doc/sphinx-guides/source/installation/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,13 @@ Once you have the location of your custom header HTML file, run this curl comman

``curl -X PUT -d '/var/www/dataverse/branding/custom-header.html' http://localhost:8080/api/admin/settings/:HeaderCustomizationFile``

If you have enabled a custom header or navbar logo, you might prefer to disable the theme of the root dataverse. You can do so by setting ``:DisableRootDataverseTheme`` to ``true`` like this:

``curl -X PUT -d 'true' http://localhost:8080/api/admin/settings/:DisableRootDataverseTheme``

Please note: Disabling the display of the root dataverse theme also disables your ability to edit it. Remember that dataverse owners can set their dataverses to "inherit theme" from the root. Those dataverses will continue to inherit the root dataverse theme (even though it no longer displays on the root). If you would like to edit the root dataverse theme in the future, you will have to re-enable it first.


Custom Footer
+++++++++++++

Expand Down Expand Up @@ -679,6 +686,11 @@ See :ref:`Branding Your Installation` above.

See :ref:`Branding Your Installation` above.

:DisableRootDataverseTheme
++++++++++++++++++++++++++

See :ref:`Branding Your Installation` above.

:FooterCustomizationFile
++++++++++++++++++++++++

Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx-guides/source/user/dataverse-management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Tip: The metadata fields you select as required will appear on the Create Datase
Theme
====================================================

The Theme feature provides you with a way to customize the look of your dataverse. You can decide either to use the customization from the dataverse above yours or upload your own image file. Supported image types are JPEG, TIFF, or PNG and should be no larger than 500 KB. The maximum display size for an image file in a dataverse's theme is 940 pixels wide by 120 pixels high. Additionally, you can select the colors for the header of your dataverse and the text that appears in your dataverse. You can also add a link to your personal website, the website for your organization or institution, your department, journal, etc.
The Theme feature provides you with a way to customize the look of your dataverse. You can decide either to use the theme from the dataverse containing your dataverse (even up to the root dataverse, AKA the homepage), or upload your own image file. Supported image types are JPEG, TIFF, or PNG and should be no larger than 500 KB. The maximum display size for an image file in a dataverse's theme is 940 pixels wide by 120 pixels high. Additionally, you can select the colors for the header of your dataverse and the text that appears in your dataverse. You can also add a link to your personal website, the website for your organization or institution, your department, journal, etc.

.. _dataverse-widgets:

Expand Down
11 changes: 7 additions & 4 deletions src/main/java/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -753,9 +753,9 @@ dataverse.results.cards.foundInMetadata=Found in Metadata Fields:
dataverse.results.cards.files.tabularData=Tabular Data
dataverse.results.solrIsDown=Please note: Due to an internal error, browsing and searching is not available.
dataverse.theme.title=Theme
dataverse.theme.inheritCustomization.title=Check this to use the existing theme.
dataverse.theme.inheritCustomization.label=Inherit Customization
dataverse.theme.inheritCustomization.checkbox=Inherit customization from {0}
dataverse.theme.inheritCustomization.title=For this dataverse, use the same theme as the parent dataverse.
dataverse.theme.inheritCustomization.label=Inherit Theme
dataverse.theme.inheritCustomization.checkbox=Inherit theme from {0}
dataverse.theme.logo=Logo
dataverse.theme.logo.tip=Supported image types are JPG, TIF, or PNG and should be no larger than 500 KB. The maximum display size for an image file in a dataverse's theme is 940 pixels wide by 120 pixels high.
dataverse.theme.logo.format=Logo Format
Expand Down Expand Up @@ -798,6 +798,7 @@ dataverse.theme.website.title=URL for your personal website, institution, or any
dataverse.theme.website.tip=The website will be linked behind the tagline. To have a website listed, you must also provide a tagline.
dataverse.theme.website.watermark=Your personal site, http://...
dataverse.theme.website.invalidMsg=Invalid URL.
dataverse.theme.disabled=The theme for the root dataverse has been administratively disabled with the :DisableRootDataverseTheme database setting.
dataverse.widgets.title=Widgets
dataverse.widgets.notPublished.why.header=Why Use Widgets?
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.
Expand Down Expand Up @@ -1110,6 +1111,7 @@ dataset.editBtn.itemLabel.deaccession=Deaccession Dataset
dataset.exportBtn=Export Metadata
dataset.exportBtn.itemLabel.ddi=DDI
dataset.exportBtn.itemLabel.dublinCore=Dublin Core
dataset.exportBtn.itemLabel.schemaDotOrg=Schema.org JSON-LD
dataset.exportBtn.itemLabel.json=JSON
metrics.title=Metrics
metrics.title.tip=View more metrics information
Expand Down Expand Up @@ -1344,7 +1346,8 @@ file.spss-savEncoding.current=Current Selection:
file.spss-porExtraLabels=Variable Labels
file.spss-porExtraLabels.title=Upload an additional text file with extra variable labels.
file.spss-porExtraLabels.selectToAddBtn=Select File to Add
file.ingestFailed=Tabular Data Ingest Failed
file.ingestFailed.header=Upload Completed with Errors
file.ingestFailed.message=Tabular data ingest failed.
file.explore.twoRavens=TwoRavens
file.map=Map
file.mapData=Map Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public String generateXML() {
if (author.getIdType() != null && author.getIdValue() != null && !author.getIdType().isEmpty() && !author.getIdValue().isEmpty() && author.getAffiliation() != null && !author.getAffiliation().getDisplayValue().isEmpty()) {

if (author.getIdType().equals("ORCID")) {
creatorsElement.append("<nameIdentifier schemeURI=\"http://orcid.org/\" nameIdentifierScheme=\"ORCID\">" + author.getIdValue() + "</nameIdentifier>");
creatorsElement.append("<nameIdentifier schemeURI=\"https://orcid.org/\" nameIdentifierScheme=\"ORCID\">" + author.getIdValue() + "</nameIdentifier>");
}
if (author.getIdType().equals("ISNI")) {
creatorsElement.append("<nameIdentifier schemeURI=\"http://isni.org/isni/\" nameIdentifierScheme=\"ISNI\">" + author.getIdValue() + "</nameIdentifier>");
Expand Down
69 changes: 42 additions & 27 deletions src/main/java/edu/harvard/iq/dataverse/DatasetPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,13 @@
import edu.harvard.iq.dataverse.datasetutility.TwoRavensHelper;
import edu.harvard.iq.dataverse.datasetutility.WorldMapPermissionHelper;
import edu.harvard.iq.dataverse.engine.command.exception.IllegalCommandException;
import edu.harvard.iq.dataverse.engine.command.impl.GetLatestPublishedDatasetVersionCommand;
import edu.harvard.iq.dataverse.engine.command.impl.RequestRsyncScriptCommand;
import edu.harvard.iq.dataverse.engine.command.impl.PublishDatasetResult;
import edu.harvard.iq.dataverse.engine.command.impl.RestrictFileCommand;
import edu.harvard.iq.dataverse.engine.command.impl.ReturnDatasetToAuthorCommand;
import edu.harvard.iq.dataverse.engine.command.impl.SubmitDatasetForReviewCommand;
import edu.harvard.iq.dataverse.export.SchemaDotOrgExporter;
import java.util.Collections;

import javax.faces.event.AjaxBehaviorEvent;
Expand Down Expand Up @@ -3944,23 +3946,6 @@ public String getDescription() {
return workingVersion.getDescriptionPlainText();
}

/**
* dataset publication date unpublished datasets will return an empty
* string.
*
* @return String dataset publication date (dd MMM yyyy).
*/
public String getPublicationDate() {
assert (null != workingVersion);
if (DatasetVersion.VersionState.DRAFT == workingVersion.getVersionState()) {
return "";
}
Date rel_date = workingVersion.getReleaseTime();
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
String r = fmt.format(rel_date.getTime());
return r;
}

/**
* dataset authors
*
Expand All @@ -3971,16 +3956,6 @@ public List<String> getDatasetAuthors() {
return workingVersion.getDatasetAuthorNames();
}

/**
* dataset subjects
*
* @return array of String containing the subjects for a page
*/
public List<String> getDatasetSubjects() {
assert (null != workingVersion);
return workingVersion.getDatasetSubjects();
}

/**
* publisher (aka - name of root dataverse)
*
Expand Down Expand Up @@ -4066,4 +4041,44 @@ public List<DatasetField> getDatasetSummaryFields() {
return DatasetUtil.getDatasetSummaryFields(workingVersion, customFields);
}

Boolean thisLatestReleasedVersion = null;

public boolean isThisLatestReleasedVersion() {
if (thisLatestReleasedVersion != null) {
return thisLatestReleasedVersion;
}

if (!workingVersion.isPublished()) {
thisLatestReleasedVersion = false;
return false;
}

DatasetVersion latestPublishedVersion = null;
Command<DatasetVersion> cmd = new GetLatestPublishedDatasetVersionCommand(dvRequestService.getDataverseRequest(), dataset);
try {
latestPublishedVersion = commandEngine.submit(cmd);
} catch (Exception ex) {
// whatever...
}

thisLatestReleasedVersion = workingVersion.equals(latestPublishedVersion);

return thisLatestReleasedVersion;

}

public String getJsonLd() {
if (isThisLatestReleasedVersion()) {
ExportService instance = ExportService.getInstance(settingsService);
String jsonLd = instance.getExportAsString(dataset, SchemaDotOrgExporter.NAME);
if (jsonLd != null) {
logger.fine("Returning cached schema.org JSON-LD.");
return jsonLd;
} else {
logger.fine("No cached schema.org JSON-LD available. Going to the database.");
return workingVersion.getJsonLd();
}
}
return "";
}
}
Loading

0 comments on commit 3d66c37

Please sign in to comment.