Constructor
new SolrResult()
- Source:
Extends
Methods
createViewURL() → {string}
Creates a URL for viewing more information about this metadata
- Source:
Returns:
-
Type
-
string
downloadFromResponse(response) → {Response}
Download data onto the user's computer from the response object
Parameters:
Name |
Type |
Description |
response |
Response
|
The response object from the fetch request |
- Since:
- Source:
Returns:
The response object
-
Type
-
Response
downloadWithCredentials() → {Promise}
Download this object while sending the user's auth token in the
request.
- Since:
- Source:
Returns:
A promise that resolves to the response object
-
Type
-
Promise
fetchDataObjectWithCredentials() → {Promise}
This method will fetch this object while sending the user's auth token
in the request. The data can then be downloaded or displayed in the
browser
- Since:
- Source:
Returns:
A promise that resolves when the data is fetched
-
Type
-
Promise
getFileNameFromResponse(response) → {string}
Get the filename from the response headers or default to the model's
title, id, or "download"
Parameters:
Name |
Type |
Description |
response |
Response
|
The response object from the fetch request |
- Since:
- Source:
Returns:
The filename to save the file as
-
Type
-
string
getType() → {string}
Returns a plain-english version of the general format - either image, program, metadata, PDF, annotation or data
- Source:
Returns:
-
Type
-
string
handleDownloadError(e)
Handle an error that occurs when downloading the object
Parameters:
Name |
Type |
Description |
e |
Error
|
The error that occurred |
- Since:
- Source:
isDOI(customString) → {boolean}
Checks if the pid or sid or given string is a DOI
Parameters:
Name |
Type |
Description |
customString |
string
|
Optional. An identifier string to check instead of the id and seriesId attributes on the model |
- Source:
Returns:
True if it is a DOI
-
Type
-
boolean