Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDCC/HDC 3B-Bi-directional LDN messaging, Template Instructions #8775

Merged
merged 84 commits into from
Aug 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
c193ae2
initial POC to send email when inbox msgs are received
qqmyers May 20, 2021
a889282
bug fixes
qqmyers May 20, 2021
5d0c5f4
git doi: style pid
qqmyers May 20, 2021
9e10844
fix email message
qqmyers May 20, 2021
3573185
text tweaks
qqmyers May 20, 2021
c757be2
Merge remote-tracking branch 'IQSS/develop'
qqmyers Feb 2, 2022
6c5d26d
Add a DASH idType in the template
qqmyers Feb 24, 2022
d2d4bdc
Merge branch 'IQSS/7882-messaging' into GDCC/DC-3B
qqmyers Feb 24, 2022
9ac2083
add additionalInfo to UserNotification
qqmyers Mar 2, 2022
b0ec225
Add LDN Announce message handling with email and notification
qqmyers Mar 2, 2022
d219f92
cleanup
qqmyers Mar 2, 2022
035d5b0
local updated titanium library
qqmyers Mar 2, 2022
7591138
titanium 1.2+ update
qqmyers Mar 2, 2022
55d65fb
update to use our example format
qqmyers Mar 2, 2022
45f6547
fix consumes mimetype
qqmyers Mar 3, 2022
7a69aa9
update DASH type to DASH-NRS
qqmyers Mar 4, 2022
e46b568
Merge remote-tracking branch 'IQSS/develop' into GDCC/DC-3B
qqmyers Mar 16, 2022
7c5e0bb
refactor OREMap, start LDN workflow step
qqmyers Mar 17, 2022
5ec0679
Add a centralized method that can replace lots of others
qqmyers Mar 18, 2022
fa2cf31
sample workflow file
qqmyers Mar 18, 2022
19e78af
completed class
qqmyers Mar 18, 2022
7cc96a1
add step to internal spi
qqmyers Mar 18, 2022
18c7de1
Merge remote-tracking branch 'IQSS/develop' into GDCC/DC-3B
qqmyers Mar 21, 2022
b4e39ee
name should be inbox
qqmyers Mar 24, 2022
7fd93c2
temporary setting for custom instructions
qqmyers Apr 4, 2022
5f3f913
display custom instructions
qqmyers Apr 4, 2022
ccae650
can't job.build twice
qqmyers Apr 4, 2022
3ae929f
typos
qqmyers Apr 4, 2022
4c6cf3e
Merge remote-tracking branch 'IQSS/develop' into GDCC/DC-3B
qqmyers Apr 12, 2022
6e19a19
typos - don't make variable a string :-)
qqmyers Apr 12, 2022
8c4c3d3
put message to right of title for primitive and compound fields
qqmyers Apr 12, 2022
51b743e
protect against null TermsOfUseAndAccess
qqmyers Apr 12, 2022
cd6bf58
remove extra copy of instructions
qqmyers Apr 12, 2022
b846a96
Merge remote-tracking branch 'IQSS/develop' into GDCC/DC-3B
qqmyers Apr 26, 2022
27c112e
Merge remote-tracking branch 'IQSS/develop' into GDCC/DC-3B
qqmyers May 16, 2022
e440236
update for #8592 semantic mapping update
qqmyers May 16, 2022
874de76
add missing method
qqmyers May 16, 2022
810486b
Merge remote-tracking branch 'IQSS/develop' into
qqmyers May 27, 2022
381d180
initial changes to store/use template instructions
qqmyers Jun 2, 2022
6975f5c
add DASh-NRS to properties file
qqmyers Jun 2, 2022
4110bc1
initial working edit in place in template
qqmyers Jun 2, 2022
af0aace
start adding support to see instructions in template view mode
qqmyers Jun 2, 2022
de5adc7
add template in correct include
qqmyers Jun 2, 2022
2226fa5
formatting/text changes, tooltip
qqmyers Jun 3, 2022
37a82ec
further formatting/text changes
qqmyers Jun 3, 2022
cf0c784
set template to default/selected during create
qqmyers Jun 3, 2022
2e7563d
comment typo
qqmyers Jun 3, 2022
5f1d2b4
add template param in metadata view mode
qqmyers Jun 3, 2022
be574c3
Merge remote-tracking branch 'IQSS/develop' into GDCC/DC-3B
qqmyers Jun 3, 2022
d984405
adjust spacing
qqmyers Jun 3, 2022
31e721b
show instructions on template page view mode
qqmyers Jun 3, 2022
afdc9ea
update close to clone instructions
qqmyers Jun 3, 2022
c132c8e
expand width of editor
qqmyers Jun 3, 2022
3a8f005
cleanup - remove temp setting
qqmyers Jun 6, 2022
944aa4e
fix display width in dataset md edit mode
qqmyers Jun 8, 2022
1e72823
flyway for instructions column in template
qqmyers Jun 8, 2022
c6517f8
Merge remote-tracking branch 'IQSS/develop' into GDCC/DC-3B
qqmyers Jun 8, 2022
67c215b
update flyway
qqmyers Jun 14, 2022
63a2020
OK when metadata doesn't exist and won't send message
qqmyers Jun 14, 2022
444ab38
Merge remote-tracking branch 'IQSS/develop' into GDCC/DC-3B
qqmyers Jun 24, 2022
70b38b3
fix missing field check
qqmyers Jun 24, 2022
1bca044
missing property
qqmyers Jul 5, 2022
a21c7c5
Merge remote-tracking branch 'IQSS/develop' into GDCC/DC-3B
qqmyers Jul 19, 2022
9aa7dd0
Merge remote-tracking branch 'IQSS/develop' into GDCC/DC-3B
qqmyers Jul 21, 2022
b9c4bba
update script names
qqmyers Jul 27, 2022
ff8eec0
Merge remote-tracking branch 'IQSS/develop' into GDCC/DC-3B
qqmyers Jul 28, 2022
2169a43
Merge remote-tracking branch 'IQSS/develop' into GDCC/DC-3B
qqmyers Aug 3, 2022
c9c6f86
rename scripts per review
qqmyers Aug 3, 2022
0ced73a
change setting to use LDN, flip default to no hosts allowed
qqmyers Aug 4, 2022
84a4826
docs for receive api and send workflow
qqmyers Aug 4, 2022
378ad35
Merge branch 'GDCC/DC-3B' of https://github.com/GlobalDataverseCommun…
qqmyers Aug 4, 2022
7438794
Merge branch 'develop' into GDCC/DC-3B #7882
pdurbin Aug 4, 2022
6fa670a
add indent
qqmyers Aug 5, 2022
7532103
Merge branch 'GDCC/DC-3B' of https://github.com/GlobalDataverseCommun…
qqmyers Aug 5, 2022
b0a6af9
typos
qqmyers Aug 5, 2022
fc2d67d
missing spaces
qqmyers Aug 5, 2022
99300ae
add to toc
qqmyers Aug 5, 2022
e137a9b
change test that counts citation block elements
qqmyers Aug 8, 2022
95d8ffa
add workflow settings to main list per qa
qqmyers Aug 11, 2022
1d76db0
add template custom instructions info
qqmyers Aug 11, 2022
80bd84d
Merge remote-tracking branch 'IQSS/develop' into GDCC/DC-3B
qqmyers Aug 12, 2022
45a35dd
get blocks from metadataroot
qqmyers Aug 12, 2022
b35b28a
Merge remote-tracking branch 'IQSS/develop' into GDCC/DC-3B
qqmyers Aug 12, 2022
3e0416a
added a cvv entry so test should check for one more
qqmyers Aug 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/sphinx-guides/source/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ API Guide
client-libraries
external-tools
curation-labels
linkeddatanotification
apps
faq
65 changes: 65 additions & 0 deletions doc/sphinx-guides/source/api/linkeddatanotification.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
Linked Data Notification API
============================

Dataverse has a limited, experimental API implementing a Linked Data Notification inbox allowing it to receive messages indicating a link between an external resource and a Dataverse dataset.
The motivating use case is to support a use case where Dataverse administrators may wish to create back-links to the remote resource (e.g. as a Related Publication, Related Material, etc.).

Upon receipt of a relevant message, Dataverse will create Announcement Received notifications for superusers, who can edit the dataset involved. (In the motivating use case, these users may then add an appropriate relationship and use the Update Curent Version publishing option to add it to the most recently published version of the dataset.)

The ``:LDNMessageHosts`` setting is a comma-separated whitelist of hosts from which Dataverse will accept and process messages. By default, no hosts are allowed. ``*`` can be used in testing to indicate all hosts are allowed.

Messages can be sent via POST, using the application/ld+json ContentType:

.. code-block:: bash

export SERVER_URL=https://demo.dataverse.org

curl -X POST -H 'ContentType:application/ld+json' $SERVER_URL/api/inbox --upload-file message.jsonld

The supported message format is described by `our preliminary specification <https://docs.google.com/document/d/1dqj8_vEcIBeyDIZCaPQvp0FM1eSGO_5CSNCdXOpoUz0/edit?usp=sharing>`_. The format is expected to change in the near future to match the standard for relationship announcements being developed as part of `the COAR Notify Project <https://notify.coar-repositories.org/>`_.

An example message is shown below. It indicates that a resource with the name "An Interesting Title" exists and "IsSupplementedBy" the dataset with DOI https://doi.org/10.5072/FK2/GGCCDL. If this dataset is managed in the receiving Dataverse, a notification will be sent to user with the relevant permissions (as described above).

.. code:: json

{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://purl.org/coar/notify"
],
"id": "urn:uuid:94ecae35-dcfd-4182-8550-22c7164fe23f",
"actor": {
"id": "https://research-organisation.org/dspace",
"name": "DSpace Repository",
"type": "Service"
},
"context": {
"IsSupplementedBy":
{
"id": "http://dev-hdc3b.lib.harvard.edu/dataset.xhtml?persistentId=doi:10.5072/FK2/GGCCDL",
"ietf:cite-as": "https://doi.org/10.5072/FK2/GGCCDL",
"type": "sorg:Dataset"
}
},
"object": {
"id": "https://research-organisation.org/dspace/item/35759679-5df3-4633-b7e5-4cf24b4d0614",
"ietf:cite-as": "https://research-organisation.org/authority/resolve/35759679-5df3-4633-b7e5-4cf24b4d0614",
"sorg:name": "An Interesting Title",
"type": "sorg:ScholarlyArticle"
},
"origin": {
"id": "https://research-organisation.org/dspace",
"inbox": "https://research-organisation.org/dspace/inbox/",
"type": "Service"
},
"target": {
"id": "https://research-organisation.org/dataverse",
"inbox": "https://research-organisation.org/dataverse/inbox/",
"type": "Service"
},
"type": [
"Announce",
"coar-notify:ReleaseAction"
]
}

28 changes: 28 additions & 0 deletions doc/sphinx-guides/source/developers/workflows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,31 @@ Note - the example step includes two settings required for any archiver, three (
}
}


ldnannounce
+++++++++++

An experimental step that sends a Linked Data Notification (LDN) message to a specific LDN Inbox announcing the publication/availability of a dataset meeting certain criteria.

The two parameters are
* ``:LDNAnnounceRequiredFields`` - a list of metadata fields that must exist to trigger the message. Currently, the message also includes the values for these fields but future versions may only send the dataset's persistent identifier (making the receiver responsible for making a call-back to get any metadata).
* ``:LDNTarget`` - a JSON object containing an ``inbox`` key whose value is the URL of the target LDN inbox to which messages should be sent, e.g. ``{"id": "https://dashv7-dev.lib.harvard.edu","inbox": "https://dashv7-api-dev.lib.harvard.edu/server/ldn/inbox","type": "Service"}`` ).

The supported message format is desribed by `our preliminary specification <https://docs.google.com/document/d/1dqj8_vEcIBeyDIZCaPQvp0FM1eSGO_5CSNCdXOpoUz0/edit?usp=sharing>`_. The format is expected to change in the near future to match the standard for relationship announcements being developed as part of `the COAR Notify Project <https://notify.coar-repositories.org/>`_.


.. code:: json


{
"provider":":internal",
"stepType":"ldnannounce",
"parameters": {
"stepName":"LDN Announce"
},
"requiredSettings": {
":LDNAnnounceRequiredFields": "string",
":LDNTarget": "string"
}
}

16 changes: 16 additions & 0 deletions doc/sphinx-guides/source/installation/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2904,3 +2904,19 @@ For configuration details, see :ref:`mute-notifications`.
Overrides the default empty list of never muted notifications. Never muted notifications cannot be muted by the users. Always muted notifications are grayed out and are not adjustable by the user.

For configuration details, see :ref:`mute-notifications`.

:LDNMessageHosts
++++++++++++++++

The comma-separated list of hosts allowed to send Dataverse Linked Data Notification messages. See :doc:`/api/linkeddatanotification` for details. ``*`` allows messages from anywhere (not recommended for production). By default, messages are not accepted from anywhere.


:LDN_TARGET
+++++++++++

The URL of an LDN Inbox to which the LDN Announce workflow step will send messages. See :doc:`/developers/workflows` for details.

:LDNAnnounceRequiredFields
++++++++++++++++++++++++++

The list of parent dataset field names for which the LDN Announce workflow step should send messages. See :doc:`/developers/workflows` for details.
29 changes: 15 additions & 14 deletions doc/sphinx-guides/source/user/dataverse-management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,24 @@ To edit your Dataverse collection, navigate to your Dataverse collection's landi
- :ref:`Theme <theme>`: upload a logo for your Dataverse collection, add a link to your department or personal website, add a custom footer image, and select colors for your Dataverse collection in order to brand it
- :ref:`Widgets <dataverse-widgets>`: get code to add to your website to have your Dataverse collection display on it
- :ref:`Permissions <dataverse-permissions>`: give other users permissions to your Dataverse collection, i.e.-can edit datasets, and see which users already have which permissions for your Dataverse collection
- :ref:`Dataset Templates <dataset-templates>`: these are useful when you have several datasets that have the same information in multiple metadata fields that you would prefer not to have to keep manually typing in
- :ref:`Dataset Templates <dataset-templates>`: these are useful when you want to provide custom instructions on how to fill out fields or have several datasets that have the same information in multiple metadata fields that you would prefer not to have to keep manually typing in
- :ref:`Dataset Guestbooks <dataset-guestbooks>`: allows you to collect data about who is downloading the files from your datasets
- :ref:`Featured Dataverse collections <featured-dataverses>`: if you have one or more Dataverse collection, you can use this option to show them at the top of your Dataverse collection page to help others easily find interesting or important Dataverse collections
- **Delete Dataverse**: you are able to delete your Dataverse collection as long as it is not published and does not have any draft datasets

.. _general-information:

General Information
---------------------
-------------------

The General Information page is how you edit the information you filled in while creating your Dataverse collection. If you need to change or add a contact email address, this is the place to do it. Additionally, you can update the metadata elements used for datasets within the Dataverse collection, change which metadata fields are hidden, required, or optional, and update the facets you would like displayed for browsing the Dataverse collection. If you plan on using templates, you need to select the metadata fields on the General Information page.

Tip: The metadata fields you select as required will appear on the Create Dataset form when someone goes to add a dataset to the Dataverse collection.

.. _theme:

Theme
---------
Theme
-----

The Theme features provides you with a way to customize the look of your Dataverse collection. You can:

Expand All @@ -77,7 +77,7 @@ Supported image types for logo images and footer images are JPEG, TIFF, or PNG a
.. _dataverse-widgets:

Widgets
--------------
-------

The Widgets feature provides you with code for you to put on your personal website to have your Dataverse collection displayed there. There are two types of Widgets for a Dataverse collection, a Dataverse collection Search Box widget and a Dataverse collection Listing widget. Once a Dataverse collection has been published, from the Widgets tab on the Dataverse collection's Theme + Widgets page, it is possible to copy the code snippets for the widget(s) you would like to add to your website. If you need to adjust the height of the widget on your website, you may do so by editing the `heightPx=500` parameter in the code snippet.

Expand All @@ -94,16 +94,16 @@ The Dataverse Collection Listing Widget provides a listing of all your Dataverse
.. _openscholar-dataverse-level:

Adding Widgets to an OpenScholar Website
******************************************
****************************************
#. Log in to your OpenScholar website
#. Either build a new page or navigate to the page you would like to use to show the Dataverse collection widgets.
#. Click on the Settings Cog and select Layout
#. At the top right, select Add New Widget and under Misc. you will see the Dataverse Collection Search Box and the Dataverse Collection Listing Widgets. Click on the widget you would like to add, fill out the form, and then drag it to where you would like it to display in the page.

.. _dataverse-permissions:

Roles & Permissions
---------------------
Roles & Permissions
-------------------
Dataverse installation user accounts can be granted roles that define which actions they are allowed to take on specific Dataverse collections, datasets, and/or files. Each role comes with a set of permissions, which define the specific actions that users may take.

Roles and permissions may also be granted to groups. Groups can be defined as a collection of Dataverse installation user accounts, a collection of IP addresses (e.g. all users of a library's computers), or a collection of all users who log in using a particular institutional login (e.g. everyone who logs in with a particular university's account credentials).
Expand All @@ -127,7 +127,7 @@ When you access a Dataverse collection's permissions page, you will see three se
Please note that even on a newly created Dataverse collection, you may see user and groups have already been granted role(s) if your installation has ``:InheritParentRoleAssignments`` set. For more on this setting, see the :doc:`/installation/config` section of the Installation Guide.

Setting Access Configurations
*******************************
*****************************

Under the Permissions tab, you can click the "Edit Access" button to open a box where you can add to your Dataverse collection and what permissions are granted to those who add to your Dataverse collection.

Expand All @@ -140,7 +140,7 @@ The second question on this page allows you to choose the role (and thus the per
Both of these settings can be changed at any time.

Assigning Roles to Users and Groups
*************************************
***********************************

Under the Users/Groups tab, you can add, edit, or remove the roles granted to users and groups on your Dataverse collection. A role is a set of permissions granted to a user or group when they're using your Dataverse collection. For example, giving your research assistant the "Contributor" role would give them the following self-explanatory permissions on your Dataverse collection and all datasets within your Dataverse collection: "ViewUnpublishedDataset", "DownloadFile", "EditDataset", and "DeleteDatasetDraft". They would, however, lack the "PublishDataset" permission, and thus would be unable to publish datasets on your Dataverse collection. If you wanted to give them that permission, you would give them a role with that permission, like the Curator role. Users and groups can hold multiple roles at the same time if needed. Roles can be removed at any time. All roles and their associated permissions are listed under the "Roles" tab of the same page.

Expand All @@ -155,15 +155,16 @@ Note: If you need to assign a role to ALL user accounts in a Dataverse installat
.. _dataset-templates:

Dataset Templates
-------------------
-----------------

Templates are useful when you have several datasets that have the same information in multiple metadata fields that you would prefer not to have to keep manually typing in, or if you want to use a custom set of Terms of Use and Access for multiple datasets in a Dataverse collection. In Dataverse Software 4.0+, templates are created at the Dataverse collection level, can be deleted (so it does not show for future datasets), set to default (not required), or can be copied so you do not have to start over when creating a new template with similar metadata from another template. When a template is deleted, it does not impact the datasets that have used the template already.
Templates are useful when you want to provide custom instructions on how to fill out a field, have several datasets that have the same information in multiple metadata fields that you would prefer not to have to keep manually typing in, or if you want to use a custom set of Terms of Use and Access for multiple datasets in a Dataverse collection. In Dataverse Software 4.0+, templates are created at the Dataverse collection level, can be deleted (so it does not show for future datasets), set to default (not required), or can be copied so you do not have to start over when creating a new template with similar metadata from another template. When a template is deleted, it does not impact the datasets that have used the template already.

How do you create a template?

#. Navigate to your Dataverse collection, click on the Edit Dataverse button and select Dataset Templates.
#. Once you have clicked on Dataset Templates, you will be brought to the Dataset Templates page. On this page, you can 1) decide to use the dataset templates from your parent Dataverse collection 2) create a new dataset template or 3) do both.
#. Click on the Create Dataset Template to get started. You will see that the template is the same as the create dataset page with an additional field at the top of the page to add a name for the template.
#. To add custom instructions, click on ''(None - click to add)'' and enter the instructions you wish users to see. If you wish to edit existing instructions, click on them to make the text editable.
#. After adding information into the metadata fields you have information for and clicking Save and Add Terms, you will be brought to the page where you can add custom Terms of Use and Access. If you do not need custom Terms of Use and Access, click the Save Dataset Template, and only the metadata fields will be saved.
#. After clicking Save Dataset Template, you will be brought back to the Manage Dataset Templates page and should see your template listed there now with the make default, edit, view, or delete options.
#. A Dataverse collection does not have to have a default template and users can select which template they would like to use while on the Create Dataset page.
Expand All @@ -174,7 +175,7 @@ How do you create a template?
.. _dataset-guestbooks:

Dataset Guestbooks
-----------------------------
------------------

Guestbooks allow you to collect data about who is downloading the files from your datasets. You can decide to collect account information (username, given name & last name, affiliation, etc.) as well as create custom questions (e.g., What do you plan to use this data for?). You are also able to download the data collected from the enabled guestbooks as CSV files to store and use outside of the Dataverse installation.

Expand Down Expand Up @@ -227,7 +228,7 @@ Similarly to dataset linking, Dataverse collection linking allows a Dataverse co
If you need to have a Dataverse collection linked to your Dataverse collection, please contact the support team for the Dataverse installation you are using.

Publish Your Dataverse Collection
=================================================================
=================================

Once your Dataverse collection is ready to go public, go to your Dataverse collection page, click on the "Publish" button on the right
hand side of the page. A pop-up will appear to confirm that you are ready to actually Publish, since once a Dataverse collection
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<dependency>
<groupId>com.apicatalog</groupId>
<artifactId>titanium-json-ld</artifactId>
<version>0.8.6</version>
<version>1.3.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
Expand Down
1 change: 1 addition & 0 deletions scripts/api/data/metadatablocks/citation.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
publicationIDType upc 14
publicationIDType url 15
publicationIDType urn 16
publicationIDType DASH-NRS 17
contributorType Data Collector 0
contributorType Data Curator 1
contributorType Data Manager 2
Expand Down
16 changes: 16 additions & 0 deletions scripts/api/data/workflows/internal-ldnannounce-workflow.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "LDN Announce workflow",
"steps": [
{
"provider":":internal",
"stepType":"ldnannounce",
"parameters": {
"stepName":"LDN Announce"
},
"requiredSettings": {
":LDNAnnounceRequiredFields": "string",
":LDNTarget": "string"
}
}
]
}
20 changes: 19 additions & 1 deletion src/main/java/edu/harvard/iq/dataverse/Dataset.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import edu.harvard.iq.dataverse.util.BundleUtil;
import edu.harvard.iq.dataverse.util.StringUtil;
import edu.harvard.iq.dataverse.util.SystemConfig;

/**
*
Expand Down Expand Up @@ -152,6 +152,19 @@ public void setCitationDateDatasetFieldType(DatasetFieldType citationDateDataset
this.citationDateDatasetFieldType = citationDateDatasetFieldType;
}


@ManyToOne
@JoinColumn(name="template_id",nullable = true)
private Template template;

public Template getTemplate() {
return template;
}

public void setTemplate(Template template) {
this.template = template;
}

public Dataset() {
DatasetVersion datasetVersion = new DatasetVersion();
datasetVersion.setDataset(this);
Expand Down Expand Up @@ -743,6 +756,11 @@ public void setHarvestIdentifier(String harvestIdentifier) {
this.harvestIdentifier = harvestIdentifier;
}

public String getLocalURL() {
//Assumes GlobalId != null
return SystemConfig.getDataverseSiteUrlStatic() + "/dataset.xhtml?persistentId=" + this.getGlobalId().asString();
}

public String getRemoteArchiveURL() {
if (isHarvested()) {
if (HarvestingClient.HARVEST_STYLE_DATAVERSE.equals(this.getHarvestedFrom().getHarvestStyle())) {
Expand Down
Loading