Skip to content

Commit 15e7f28

Browse files
authored
Signposting to DANS:signposting branch (#77)
* set default when no config is set for signposting * modification according to reviews * move long json string from code to bunddle * allow empty config on the level 2 profile * revision based on Herbert feedback * coding style cleanup SignpostingResources * remove leading comma * fix capitalize with header name * add items to header when less than maxItems, default license to cc0 * add items to l1 profile and set default license to cc0 * use actual file type on l1 profile for items * limit maxAuthors * Add Dataset type to landing page, both profile and linkset * use configed type instead of string * fix missing author error, note: identity URL is empty sometimes * create function to get author URL * remove num author limit in json * revision list 20210511 * merging conflicts * solving null pointer on license
1 parent 5ec179a commit 15e7f28

12 files changed

Lines changed: 54 additions & 17 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Maven CheckStyle Task
2+
on:
3+
pull_request:
4+
paths:
5+
- "**.java"
6+
7+
jobs:
8+
checkstyle_job:
9+
runs-on: ubuntu-latest
10+
name: Checkstyle job
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
- name: Run check style
15+
uses: nikitasavinov/checkstyle-action@master
16+
with:
17+
fail_on_error: true
18+
reporter: github-pr-review
19+
checkstyle_config: checkstyle.xml
20+
github_token: ${{ secrets.GITHUB_TOKEN }}
21+

doc/release-notes/5.0-release-notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ The instructions below describe the upgrade procedure based on moving an existin
313313

314314
1. Update Astrophysics Metadata Block (if used)
315315

316-
`wget https://github.com/IQSS/dataverse/releases/download/5.0/astrophysics.tsv`
316+
`wget https://github.com/IQSS/dataverse/releases/download/v5.0/astrophysics.tsv`
317317
`curl http://localhost:8080/api/admin/datasetfield/load -X POST --data-binary @astrophysics.tsv -H "Content-type: text/tab-separated-values"`
318318

319319
2. (Recommended) Run ReExportall to update JSON Exports

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,14 +825,20 @@ through the Dataverse application.
825825
826826
For example, if you have a dataset version with 2 files, one with the folder named "subfolder":
827827
828+
|image1|
829+
828830
.. |image1| image:: ./img/dataset_page_files_view.png
829831
830832
or, as viewed as a tree on the dataset page:
831833
834+
|image2|
835+
832836
.. |image2| image:: ./img/dataset_page_tree_view.png
833837
834838
The output of the API for the top-level folder (``/api/datasets/{dataset}/dirindex/``) will be as follows:
835839
840+
|image3|
841+
836842
.. |image3| image:: ./img/index_view_top.png
837843
838844
with the underlying html source:
@@ -851,6 +857,8 @@ with the underlying html source:
851857
852858
The ``/dirindex/?folder=subfolder`` link above will produce the following view:
853859
860+
|image4|
861+
854862
.. |image4| image:: ./img/index_view_subfolder.png
855863
856864
with the html source as follows:

doc/sphinx-guides/source/developers/dev-environment.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,6 @@ To install Solr, execute the following commands:
139139

140140
``curl -O https://raw.githubusercontent.com/IQSS/dataverse/develop/conf/solr/8.8.1/schema_dv_mdb_fields.xml``
141141

142-
``curl -O https://raw.githubusercontent.com/IQSS/dataverse/develop/conf/solr/8.8.1/schema_dv_mdb_copies.xml``
143-
144142
``mv schema*.xml collection1/conf``
145143

146144
``curl -O https://raw.githubusercontent.com/IQSS/dataverse/develop/conf/solr/8.8.1/solrconfig.xml``

scripts/installer/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ GLASSFISH_SETUP_SCRIPT=${INSTALLER_ZIP_DIR}/as-setup.sh
44
API_SCRIPTS=${INSTALLER_ZIP_DIR}/setup-datasetfields.sh ${INSTALLER_ZIP_DIR}/setup-users.sh ${INSTALLER_ZIP_DIR}/setup-builtin-roles.sh ${INSTALLER_ZIP_DIR}/setup-dvs.sh ${INSTALLER_ZIP_DIR}/data ${INSTALLER_ZIP_DIR}/setup-identity-providers.sh ${INSTALLER_ZIP_DIR}/setup-all.sh ${INSTALLER_ZIP_DIR}/post-install-api-block.sh
55
JHOVE_CONFIG=${INSTALLER_ZIP_DIR}/jhove.conf
66
JHOVE_SCHEMA=${INSTALLER_ZIP_DIR}/jhoveConfig.xsd
7-
SOLR_SCHEMA=${INSTALLER_ZIP_DIR}/schema.xml ${INSTALLER_ZIP_DIR}/schema_dv_mdb_fields.xml ${INSTALLER_ZIP_DIR}/schema_dv_mdb_copies.xml ${INSTALLER_ZIP_DIR}/updateSchemaMDB.sh
7+
SOLR_SCHEMA=${INSTALLER_ZIP_DIR}/schema.xml ${INSTALLER_ZIP_DIR}/schema_dv_mdb_fields.xml ${INSTALLER_ZIP_DIR}/updateSchemaMDB.sh
88
SOLR_CONFIG=${INSTALLER_ZIP_DIR}/solrconfig.xml
99
PYTHON_FILES=${INSTALLER_ZIP_DIR}/README_python.txt ${INSTALLER_ZIP_DIR}/installConfig.py ${INSTALLER_ZIP_DIR}/installUtils.py ${INSTALLER_ZIP_DIR}/install.py ${INSTALLER_ZIP_DIR}/installAppServer.py ${INSTALLER_ZIP_DIR}/requirements.txt ${INSTALLER_ZIP_DIR}/default.config ${INSTALLER_ZIP_DIR}/interactive.config
1010
INSTALL_SCRIPT=${INSTALLER_ZIP_DIR}/install
@@ -56,7 +56,7 @@ ${JHOVE_SCHEMA}: ../../conf/jhove/jhoveConfig.xsd ${INSTALLER_ZIP_DIR}
5656
@echo copying jhove schema file
5757
/bin/cp ../../conf/jhove/jhoveConfig.xsd ${INSTALLER_ZIP_DIR}
5858

59-
${SOLR_SCHEMA}: ../../conf/solr/8.8.1/schema.xml ../../conf/solr/8.8.1/schema_dv_mdb_fields.xml ../../conf/solr/8.8.1/schema_dv_mdb_copies.xml ../../conf/solr/8.8.1/updateSchemaMDB.sh ${INSTALLER_ZIP_DIR}
59+
${SOLR_SCHEMA}: ../../conf/solr/8.8.1/schema.xml ../../conf/solr/8.8.1/schema_dv_mdb_fields.xml ../../conf/solr/8.8.1/updateSchemaMDB.sh ${INSTALLER_ZIP_DIR}
6060
@echo copying Solr schema file
6161
/bin/cp ../../conf/solr/8.8.1/schema*.xml ../../conf/solr/8.8.1/updateSchemaMDB.sh ${INSTALLER_ZIP_DIR}
6262

scripts/installer/README.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,5 @@ jhove.conf
3838
SOLR schema and config files, from conf/solr/8.8.1:
3939

4040
schema.xml
41-
schema_dv_cmb_copies.xml
42-
schema_dv_cmb_fields.xml
41+
schema_dv_mdb_fields.xml
4342
solrconfig.xml

src/main/java/edu/harvard/iq/dataverse/DatasetPage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5481,9 +5481,9 @@ public boolean isFileDeleted (DataFile dataFile) {
54815481

54825482
/**
54835483
* Add Signposting
5484-
* @return
5484+
* @return String
54855485
*/
5486-
public String getSignpostingLinkHeader(){
5486+
public String getSignpostingLinkHeader() {
54875487
if (!workingVersion.isReleased())
54885488
return "DRAFT";
54895489
SignpostingResources sr = new SignpostingResources(systemConfig, workingVersion, settingsService.getValueForKey(SettingsServiceBean.Key.SignpostingConf));

src/main/java/edu/harvard/iq/dataverse/api/Admin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ public Response listBuiltinRoles() {
926926
return error(Response.Status.INTERNAL_SERVER_ERROR, e.getMessage());
927927
}
928928
}
929-
929+
930930
@DELETE
931931
@Path("roles/{id}")
932932
public Response deleteRole(@PathParam("id") String id) {

src/main/java/edu/harvard/iq/dataverse/api/Datasets.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ public Response getFileAccessFolderView(@PathParam("id") String datasetId, @Quer
500500

501501
String indexFileName = folderName.equals("") ? ".index.html"
502502
: ".index-" + folderName.replace('/', '_') + ".html";
503-
response.setHeader("Content-disposition", "attachment; filename=\"" + indexFileName + "\"");
503+
response.setHeader("Content-disposition", "filename=\"" + indexFileName + "\"");
504504

505505

506506
return Response.ok()

src/main/java/edu/harvard/iq/dataverse/util/SignpostingResources.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ public String getLinks() {
142142
}
143143
valueList.add(type);
144144

145-
// TODO: support only CC0 now, should add flexible license support when flex-terms is ready
145+
// TODO: support only CC0 now, should add flexible license support when flex-terms or multi-license is ready
146146
TermsOfUseAndAccess.License license = workingDatasetVersion.getTermsOfUseAndAccess().getLicense();
147147
String licenseString = "";
148-
if (license == TermsOfUseAndAccess.License.CC0 || license == TermsOfUseAndAccess.License.NONE) {
148+
if (license == null || license == TermsOfUseAndAccess.License.CC0 || license == TermsOfUseAndAccess.License.NONE) {
149149
// On the current Dataverse, only None and CC0. In the signposting protocol: cardinality is 1
150-
licenseString = "<https://creativecommons.org/publicdomain/zero/1.0/>;rel=\"license\"";
150+
licenseString = licJsonObj.getString(TermsOfUseAndAccess.License.CC0.name()) + ";rel=\"license\"";
151151
valueList.add(licenseString);
152152
} else {
153153
valueList.add(license.toString());

0 commit comments

Comments
 (0)