@@ -2008,7 +2008,61 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
20082008These previewers support the [ REFI-QDA standard] ( https://www.qdasoftware.org/ ) format for qualitative research files.
20092009They allow viewing of the authors, codes, sources, annotations, and relationships listed in the codebook,
20102010with added functionality to view code use frequency and filter by the entries in these tables. The REFI-QDA Project previewer
2011- also allows viewing the annotation anchor text retrieved from the zipped source files.
2011+ also allows viewing the annotation anchor text retrieved from the zipped source files and download of the original and text versions of source files.
2012+ Further, for users who can edit the dataset, the Codebook and Project Previewers allow creation of "redacted" versions that become publicly previewable
2013+ even when the datafiles themselves are restricted. The "View * " previewers will only show when the user can download the datafile, while the "View Redacted * " previewers
2014+ will show all the time. As the first available previewer shows as the default one in the dataset files table, it is recommended that these previewers
2015+ be installed in the order shown below (so the full previewers are the default for those who can download the datafile).
2016+
2017+
2018+
2019+ ``` bash
2020+ curl -X POST -H ' Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
2021+ ' {
2022+ "displayName":"View REFI-QDA Codebook",
2023+ "description":"View the contents of a REFI-QDA codebook file.",
2024+ "toolName":"refiqdaCodebookPreviewer",
2025+ "scope":"file",
2026+ "types":["preview"],
2027+ "toolUrl":"/dataverse-previewers/previewers/betatest/REFIQDAPreview.html",
2028+ "toolParameters": {
2029+ "queryParameters":[
2030+ {"fileid":"{fileId}"},
2031+ {"siteUrl":"{siteUrl}"},
2032+ {"datasetid":"{datasetId}"},
2033+ {"datasetversion":"{datasetVersion}"},
2034+ {"locale":"{localeCode}"}
2035+ ]
2036+ },
2037+ "contentType":"text/x-xml-refiqda",
2038+ "allowedApiCalls": [
2039+ {
2040+ "name": "retrieveFileContents",
2041+ "httpMethod": "GET",
2042+ "urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=true",
2043+ "timeOut": 3600
2044+ },
2045+ {
2046+ "name": "downloadFile",
2047+ "httpMethod": "GET",
2048+ "urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=false",
2049+ "timeOut": 3600
2050+ },
2051+ {
2052+ "name": "uploadRedactedFile",
2053+ "httpMethod": "POST",
2054+ "urlTemplate": "/api/v1/access/datafile/{fileId}/auxiliary/qdc/1.0",
2055+ "timeOut": 3600
2056+ },
2057+ {
2058+ "name": "getDatasetVersionMetadata",
2059+ "httpMethod": "GET",
2060+ "urlTemplate": "/api/v1/datasets/{datasetId}/versions/{datasetVersion}",
2061+ "timeOut": 3600
2062+ }
2063+ ]
2064+ }'
2065+ ```
20122066
20132067``` bash
20142068curl -X POST -H ' Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
@@ -2018,7 +2072,7 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
20182072 "toolName":"refiqdaProjectPreviewer",
20192073 "scope":"file",
20202074 "types":["preview"],
2021- "toolUrl":"https://gdcc.github.io /dataverse-previewers/previewers/betatest/REFIQDPXPreview.html",
2075+ "toolUrl":"/dataverse-previewers/previewers/betatest/REFIQDPXPreview.html",
20222076 "toolParameters": {
20232077 "queryParameters":[
20242078 {"fileid":"{fileId}"},
@@ -2042,6 +2096,12 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
20422096 "urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=false",
20432097 "timeOut": 3600
20442098 },
2099+ {
2100+ "name": "uploadRedactedFile",
2101+ "httpMethod": "POST",
2102+ "urlTemplate": "/api/v1/access/datafile/{fileId}/auxiliary/qdpx/1.0",
2103+ "timeOut": 3600
2104+ },
20452105 {
20462106 "name": "getDatasetVersionMetadata",
20472107 "httpMethod": "GET",
@@ -2055,12 +2115,62 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
20552115``` bash
20562116curl -X POST -H ' Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
20572117' {
2058- "displayName":"View REFI-QDA Codebook ",
2059- "description":"View the contents of a REFI -QDA codebook file.",
2060- "toolName":"refiqdaCodebookPreviewer ",
2118+ "displayName":"View Redacted REFI-QDA Project ",
2119+ "description":"View the contents of a redacted EFI -QDA project file.",
2120+ "toolName":"refiqdaRedactedProjectPreviewer ",
20612121 "scope":"file",
20622122 "types":["preview"],
2063- "toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/betatest/REFIQDAPreview.html",
2123+ "toolUrl":"/dataverse-previewers/previewers/betatest/REFIQDPXPreview.html",
2124+ "toolParameters": {
2125+ "queryParameters":[
2126+ {"fileid":"{fileId}"},
2127+ {"siteUrl":"{siteUrl}"},
2128+ {"datasetid":"{datasetId}"},
2129+ {"datasetversion":"{datasetVersion}"},
2130+ {"locale":"{localeCode}"}
2131+ ]
2132+ },
2133+ "contentType":"application/x-zip-refiqda",
2134+ "requirements": {
2135+ "auxFilesExist": [
2136+ {
2137+ "formatTag": "qdpx",
2138+ "formatVersion": "1.0"
2139+ }
2140+ ]
2141+ },
2142+ "allowedApiCalls": [
2143+ {
2144+ "name": "retrieveFileContents",
2145+ "httpMethod": "GET",
2146+ "urlTemplate": "/api/v1/access/datafile/{fileId}/auxiliary/qdpx/1.0?gbrecs=true",
2147+ "timeOut": 3600
2148+ },
2149+ {
2150+ "name": "downloadFile",
2151+ "httpMethod": "GET",
2152+ "urlTemplate": "/api/v1/access/datafile/{fileId}/auxiliary/qdpx/1.0?gbrecs=false",
2153+ "timeOut": 3600
2154+ },
2155+ {
2156+ "name": "getDatasetVersionMetadata",
2157+ "httpMethod": "GET",
2158+ "urlTemplate": "/api/v1/datasets/{datasetId}/versions/{datasetVersion}",
2159+ "timeOut": 3600
2160+ }
2161+ ]
2162+ }'
2163+ ```
2164+
2165+ ``` bash
2166+ curl -X POST -H ' Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
2167+ ' {
2168+ "displayName":"View Redacted REFI-QDA Codebook",
2169+ "description":"View the contents of a redacted REFI-QDA codebook file.",
2170+ "toolName":"refiqdaRedactedCodebookPreviewer",
2171+ "scope":"file",
2172+ "types":["preview"],
2173+ "toolUrl":"/dataverse-previewers/previewers/betatest/REFIQDAPreview.html",
20642174 "toolParameters": {
20652175 "queryParameters":[
20662176 {"fileid":"{fileId}"},
@@ -2071,17 +2181,25 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
20712181 ]
20722182 },
20732183 "contentType":"text/x-xml-refiqda",
2184+ "requirements": {
2185+ "auxFilesExist": [
2186+ {
2187+ "formatTag": "qdc",
2188+ "formatVersion": "1.0"
2189+ }
2190+ ]
2191+ },
20742192 "allowedApiCalls": [
20752193 {
20762194 "name": "retrieveFileContents",
20772195 "httpMethod": "GET",
2078- "urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=true",
2196+ "urlTemplate": "/api/v1/access/datafile/{fileId}/auxiliary/qdc/1.0 ?gbrecs=true",
20792197 "timeOut": 3600
20802198 },
20812199 {
20822200 "name": "downloadFile",
20832201 "httpMethod": "GET",
2084- "urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=false",
2202+ "urlTemplate": "/api/v1/access/datafile/{fileId}/auxiliary/qdc/1.0 ?gbrecs=false",
20852203 "timeOut": 3600
20862204 },
20872205 {
0 commit comments