-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from IQSS/master
Beta build, 6/5, version diffs
- Loading branch information
Showing
94 changed files
with
4,690 additions
and
1,849 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
ProxyPass / ajp://localhost:8009/ | ||
|
||
# From https://wiki.apache.org/httpd/RewriteHTTPToHTTPS | ||
|
||
RewriteEngine On | ||
# This will enable the Rewrite capabilities | ||
|
||
RewriteCond %{HTTPS} !=on | ||
# This checks to make sure the connection is not already HTTPS | ||
|
||
#RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] | ||
RewriteRule ^/dvn/api/data-deposit/?(.*) https://%{SERVER_NAME}/dvn/api/data-deposit/$1 [R,L] | ||
# This rule will redirect users from their original location, to the same location but using HTTPS. | ||
# i.e. http://www.example.com/foo/ to https://www.example.com/foo/ | ||
# The leading slash is made optional so that this will work either in httpd.conf | ||
# or .htaccess context | ||
|
||
# [#GLASSFISH-20694] Glassfish 4.0 and jk Unable to populate SSL attributes - Java.net JIRA - https://java.net/jira/browse/GLASSFISH-20694 | ||
#SSLOptions +StdEnvVars +ExportCertData |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash -x | ||
USERNAME=pete | ||
PASSWORD=pete | ||
DVN_SERVER=localhost:8181 | ||
if [ -z "$1" ]; then | ||
FILE_ID=`scripts/api/data-deposit/show-files | cut -d'/' -f1` | ||
#echo $FILE_ID | ||
#exit | ||
else | ||
FILE_ID=$1 | ||
fi | ||
#curl --insecure -X DELETE https://$DVN_SERVER/api/datasets/$DATABASE_ID?key=$USERNAME | ||
curl --insecure -i -X DELETE https://$USERNAME:$PASSWORD@$DVN_SERVER/dvn/api/data-deposit/v1/swordv2/edit-media/file/$FILE_ID | ||
#| xmllint -format - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env ruby | ||
require "rexml/document" | ||
include REXML | ||
service_document = Document.new `scripts/api/data-deposit/service-document` | ||
collection = XPath.first(service_document, "//collection/@href") | ||
puts collection | ||
|
||
puts "Getting first title from #{collection}" | ||
feed_of_studies = Document.new `scripts/api/data-deposit/show-collection #{collection}` | ||
title = XPath.first(feed_of_studies, "//title") | ||
puts title |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
USERNAME=pete | ||
PASSWORD=pete | ||
DVN_SERVER=localhost:8181 | ||
if [ -z "$1" ]; then | ||
GLOBAL_ID=`scripts/api/data-deposit/list-datasets | xpath '//id/text()' | cut -d'/' -f11,12,13` | ||
else | ||
GLOBAL_ID=$1 | ||
#GLOBAL_ID=doi:10.5072/FK2/5555 | ||
fi | ||
# We cat /dev/null so that contentLength is zero. This makes headersOnly true:: https://github.com/swordapp/JavaServer2.0/blob/sword2-server-1.0/src/main/java/org/swordapp/server/ContainerAPI.java#L338 | ||
# 'to tell curl to read the format from stdin you write "@-"' -- http://curl.haxx.se/docs/manpage.html | ||
cat /dev/null | curl -s --insecure -X POST -H "In-Progress: false" --data-binary @- https://$USERNAME:$PASSWORD@$DVN_SERVER/dvn/api/data-deposit/v1/swordv2/edit/study/$GLOBAL_ID \ | ||
| xmllint --format - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
USERNAME=pete | ||
PASSWORD=pete | ||
DVN_SERVER=localhost:8181 | ||
if [ -z "$1" ]; then | ||
echo "Please supply a dataverse alias" | ||
exit 1 | ||
else | ||
DATAVERSE_ALIAS=$1 | ||
#DATAVERSE_ALIAS=peteTop | ||
fi | ||
cat /dev/null | curl -s --insecure -X POST -H "In-Progress: false" --data-binary @- https://$USERNAME:$PASSWORD@$DVN_SERVER/dvn/api/data-deposit/v1/swordv2/edit/dataverse/$DATAVERSE_ALIAS \ | ||
| xmllint --format - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,12 @@ | ||
#!/bin/bash | ||
curl --insecure https://pete:pete@localhost:8181/dvn/api/data-deposit/v1/swordv2/service-document | xmllint -format - | ||
USERNAME=pete | ||
PASSWORD=$USERNAME | ||
if [ -z "$1" ]; then | ||
HOSTNAME=localhost:8181 | ||
else | ||
HOSTNAME=$1 | ||
fi | ||
URL=https://$HOSTNAME/dvn/api/data-deposit/v1/swordv2/service-document | ||
echo Retrieving service document from $URL >&2 | ||
curl --insecure -u $USERNAME:$PASSWORD $URL \ | ||
| xmllint -format - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
USERNAME=pete | ||
PASSWORD=pete | ||
if [ -z "$1" ]; then | ||
echo "Please provide a URL" | ||
else | ||
URL=$1 | ||
fi | ||
curl --insecure -s -u $USERNAME:$PASSWORD $URL | ||
#| xmllint -format - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/sh | ||
#scripts/api/data-deposit/show-statement | xpath "//entry/content/@*[name()='type' or name()='src']" | ||
scripts/api/data-deposit/show-statement | xpath '//entry/id/text()' | cut -d'/' -f11,12 | ||
scripts/api/data-deposit/show-statement | xpath '//entry/id/text()' | cut -d'/' -f11,12,13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
USERNAME=pete | ||
PASSWORD=pete | ||
DVN_SERVER=localhost:8181 | ||
if [ -z "$1" ]; then | ||
GLOBAL_ID=`scripts/api/data-deposit/list-datasets | xpath '//id/text()' | cut -d'/' -f11,12,13` | ||
else | ||
GLOBAL_ID=$1 | ||
#GLOBAL_ID=doi:10.5072/FK2/5555 | ||
fi | ||
curl -s --insecure https://$USERNAME:$PASSWORD@$DVN_SERVER/dvn/api/data-deposit/v1/swordv2/edit-media/study/$GLOBAL_ID \ | ||
| xmllint -format - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"authority":"anAuthority", | ||
"identifier":"dataset-one", | ||
"protocol":"chadham-house-rule" | ||
"authority": "anAuthority", | ||
"identifier": "dataset-one", | ||
"persistentUrl": "http://dx.doi.org/10.5072/FK2/9", | ||
"protocol": "chadham-house-rule" | ||
} |
Oops, something went wrong.