Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/develop' into 3980-valid…
Browse files Browse the repository at this point in the history
…ation-messages-java
  • Loading branch information
JayanthyChengan committed Jul 5, 2018
2 parents ada7863 + cb98419 commit c121806
Show file tree
Hide file tree
Showing 61 changed files with 3,965 additions and 1,482 deletions.
1 change: 1 addition & 0 deletions conf/docker-aio/1prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ mvn package
cd scripts/installer
make clean
make
mkdir -p ../../conf/docker-aio/dv/install
cp dvinstall.zip ../../conf/docker-aio/dv/install/

2 changes: 1 addition & 1 deletion conf/docker-aio/testscripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export SMTP_SERVER=localhost
export MEM_HEAP_SIZE=2048
export GLASSFISH_DOMAIN=domain1
cd scripts/installer
cp pgdriver/postgresql-8.4-703.jdbc4.jar $GLASSFISH_ROOT/glassfish/lib
cp pgdriver/postgresql-42.2.2.jar $GLASSFISH_ROOT/glassfish/lib
#cp ../../conf/jhove/jhove.conf $GLASSFISH_ROOT/glassfish/domains/$GLASSFISH_DOMAIN/config/jhove.conf
cp /opt/dv/testdata/jhove.conf $GLASSFISH_ROOT/glassfish/domains/$GLASSFISH_DOMAIN/config/jhove.conf
cp /opt/dv/testdata/jhoveConfig.xsd $GLASSFISH_ROOT/glassfish/domains/$GLASSFISH_DOMAIN/config/jhoveConfig.xsd
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"fields": [
{
"typeName": "subject",
"value": ["Astronomy and Astrophysics"]
},
{
"typeName": "author",
"value": [
{
"authorName": {
"typeName": "authorName",
"value": "Poe, Edgar Allen"
}
,
"authorAffiliation": {
"typeName": "authorAffiliation",
"value": "Baltimore Poets"
}
},
{
"authorName": {
"typeName": "authorName",
"value": "Mulligan, Hercules"
}
,
"authorAffiliation": {
"typeName": "authorAffiliation",
"value": "Sons of Liberty"
}
}
]
},
{
"typeName": "producer",
"value": [
{
"producerName": {
"typeName": "producerName",
"value": "Allen, Irwin"
}
,
"producerAffiliation": {
"typeName": "producerAffiliation",
"value": "MGM"
}
},
{
"producerName": {
"typeName": "producerName",
"value": "Spielberg, Stephen"
}
,
"producerAffiliation": {
"typeName": "producerAffiliation",
"value": "ILM"
}
}
]
}
]
}

32 changes: 32 additions & 0 deletions doc/sphinx-guides/source/_static/api/dataset-add-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

{
"fields": [
{
"typeName": "subject",
"value":
["Astronomy and Astrophysics"]

},
{
"typeName": "author",
"value": [
{
"authorName": {
"typeName": "authorName",
"value": "Spruce, Sabrina"
},
"authorAffiliation": {
"typeName": "authorAffiliation",
"value": "Cambridge, MA"
}
}
]
},
{
"typeName": "kindOfData",
"value":
["Bar Chart"]

}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"typeName": "subject",
"value": [
"Social Sciences"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"typeName": "subject",
"value":
["Astronomy and Astrophysics", "Agricultural Sciences",
"Arts and Humanities", "Physics"]

}



Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"fields": [
{
"typeName": "author",
"value": [
{
"authorName": {
"typeName": "authorName",
"value": "Poe, Edgar Allen"
}
,
"authorAffiliation": {
"typeName": "authorAffiliation",
"value": "Baltimore Poets"
}
},
{
"authorName": {
"typeName": "authorName",
"value": "Mulligan, Hercules"
}
,
"authorAffiliation": {
"typeName": "authorAffiliation",
"value": "Sons of Liberty"
}
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

{
"typeName": "author",
"value": [
{
"authorName": {
"typeName": "authorName",
"value": "Spruce, Sabrina"
}
},{
"authorName": {
"typeName": "authorName",
"value": "Poe, Edgar Allen"
}
,
"authorAffiliation": {
"typeName": "authorAffiliation",
"value": "Baltimore Poets"
}
}
]
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"typeName": "subject",
"value":
["Astronomy and Astrophysics", "Arts and Humanities" ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"fields": [
{
"typeName": "subject",
"value": ["Astronomy and Astrophysics"]
},

{
"typeName": "subtitle",
"value": "More Birds and Trees"
},

{
"typeName": "title",
"value": "Post Publish Title Change"
},
{
"typeName": "author",
"value": [
{
"authorName": {
"typeName": "authorName",
"value": "Poe, Edgar Allen"
}
,
"authorAffiliation": {
"typeName": "authorAffiliation",
"value": "Baltimore Poets"
}
},
{
"authorName": {
"typeName": "authorName",
"value": "Mulligan, Hercules"
}
,
"authorAffiliation": {
"typeName": "authorAffiliation",
"value": "Sons of Liberty"
}
}
]
},
{
"typeName": "producer",
"value": [
{
"producerName": {
"typeName": "producerName",
"value": "Allen, Irwin"
}
,
"producerAffiliation": {
"typeName": "producerAffiliation",
"value": "MGM"
}
},
{
"producerName": {
"typeName": "producerName",
"value": "Lucas, George"
}
,
"producerAffiliation": {
"typeName": "producerAffiliation",
"value": "ILM"
}
}
]
}
]
}


Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"fields": [
{
"typeName": "subtitle",
"value": ["Even More Birds and Trees - Redux"]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"typeName": "subject",
"value": [
"Social Sciences", "Mathematical Sciences"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"typeName": "title",
"value": ""
}
1 change: 1 addition & 0 deletions doc/sphinx-guides/source/admin/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ These "superuser" tasks are managed via the new page called the Dashboard. A use
harvestserver
metadataexport
timers
integrations
geoconnect-worldmap
user-administration
dataverses-datasets
Expand Down
25 changes: 24 additions & 1 deletion doc/sphinx-guides/source/api/native-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ Update Metadata For a Dataset

Updates the metadata for a dataset. If a draft of the dataset already exists, the metadata of that draft is overwritten; otherwise, a new draft is created with this metadata.

You cannot currently target a specific field such as the title of a dataset and only update that one field. Instead, you must download a JSON representation of the dataset, edit the JSON you download, and then send the updated JSON to the Dataverse server.
You must download a JSON representation of the dataset, edit the JSON you download, and then send the updated JSON to the Dataverse server.

For example, after making your edits, your JSON file might look like :download:`dataset-update-metadata.json <../_static/api/dataset-update-metadata.json>` which you would send to Dataverse like this::

Expand All @@ -263,6 +263,29 @@ Now that the resulting JSON file only contains the ``metadataBlocks`` key, you c

Now that you've made edits to the metadata in your JSON file, you can send it to Dataverse as described above.

Edit Dataset Metadata
~~~~~~~~~~~~~~~~~~~~~

Alternatively to replacing an entire dataset version with its JSON representation you may add data to dataset fields that are blank or accept multiple values with the following ::

curl -H "X-Dataverse-key: $API_TOKEN" -X PUT $SERVER_URL/api/datasets/:persistentId/editMetadata/?persistentId=$PID --upload-file dataset-add-metadata.json

You may also replace existing metadata in dataset fields with the following (adding the parameter replace=true) ::

curl -H "X-Dataverse-key: $API_TOKEN" -X PUT $SERVER_URL/api/datasets/:persistentId/editMetadata?persistentId=$PID&replace=true --upload-file dataset-update-metadata.json
For these edits your JSON file need only include those dataset fields which you would like to edit. A sample JSON file may be downloaded here: :download:`dataset-edit-metadata-sample.json <../_static/api/dataset-edit-metadata-sample.json>`

Delete Dataset Metadata
~~~~~~~~~~~~~~~~~~~~~

You may delete some of the metadata of a dataset version by supplying a file with a JSON representation of dataset fields that you would like to delete with the following ::

curl -H "X-Dataverse-key: $API_TOKEN" -X PUT $SERVER_URL/api/datasets/:persistentId/deleteMetadata/?persistentId=$PID --upload-file dataset-delete-author-metadata.json
For these deletes your JSON file must include an exact match of those dataset fields which you would like to delete. A sample JSON file may be downloaded here: :download:`dataset-delete-author-metadata.json <../_static/api/dataset-delete-author-metadata.json>`


Publish a Dataset
~~~~~~~~~~~~~~~~~

Expand Down
4 changes: 2 additions & 2 deletions doc/sphinx-guides/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@
# built documents.
#
# The short X.Y version.
version = '4.9'
version = '4.9.1'
# The full version, including alpha/beta/rc tags.
release = '4.9'
release = '4.9.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
9 changes: 8 additions & 1 deletion doc/sphinx-guides/source/developers/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ Unfortunately, the term "integration tests" can mean different things to differe
- Integration tests operate on an installation of Dataverse that is running and able to talk to both PostgreSQL and Solr.
- Integration tests are written using REST Assured.

Running the full API test suite using Docker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To run the full suite of integration tests on your laptop, we recommend using the "all in one" Docker configuration described in ``conf/docker-aio/readme.txt`` in the root of the repo.

Alternatively, you can run tests against Glassfish running on your laptop by following the "getting set up" steps below.

Getting Set Up to Run REST Assured Tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -168,7 +175,7 @@ Once installed, you may run commands with ``mvn [options] [<goal(s)>] [<phase(s)

``mvn test -Dtest=FileMetadataIT -Ddataverse.test.baseurl='http://localhost:8080'``

To run the full suite of integration tests on your laptop, we recommend using the "all in one" Docker configuration described in ``conf/docker-aio/readme.txt``.
To see the full list of tests used by the Docker option mentioned above, see :download:`run-test-suite.sh <../../../../conf/docker-aio/run-test-suite.sh>`.

Load/Performance Testing
------------------------
Expand Down
2 changes: 2 additions & 0 deletions doc/sphinx-guides/source/installation/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ The name of your root dataverse is the brand of your installation of Dataverse a

Downloadable sample HTML and CSS files are provided below which you can edit as you see fit. It's up to you to create a directory in which to store these files, such as ``/var/www/dataverse`` in the examples below.

You may also want to look at samples at https://github.com/shlake/LibraDataHomepage from community member Sherry Lake as well as her poster from the Dataverse Community Meeting 2018 called "Branding Your Local Dataverse": https://github.com/IQSS/dataverse/files/2128735/UVaHomePage.pdf

A simpler option to brand and customize your installation is to utilize the dataverse theme, which each dataverse has, that allows you to change colors, add a logo, tagline or website link to the dataverse header section of the page. Those options are outlined in the :doc:`/user/dataverse-management` section of the User Guide.

Custom Homepage
Expand Down
Loading

0 comments on commit c121806

Please sign in to comment.