Class: Stats

Stats()

This model contains all a collection of statistics/metrics about a collection of DataONE objects

Constructor

new Stats()

Source:

Extends

  • Backbone.Model

Methods

defaults()

Default attributes for Stats models
Properties:
Name Type Description
query string The base query that defines the data collection to get statistis about.
postQuery string A copy of the `query`, but without any URL encoding
isSystemMetadataQuery boolean If true, the `query` set on this model is only filtering on system metadata fields which are common between both metadata and data objects.
metadataCount number The number of metadata objects in this data collection @readonly
dataCount number The number of data objects in this data collection
totalCount number The number of metadata and data objects in this data collection. Essentially this is the sum of metadataCount and dataCount
metadataFormatIDs number | Array.<string> An array of metadata formatIds and the number of metadata objects with that formatId. Uses same structure as Solr facet counts: ["text/csv", 5]
dataFormatIDs number | Array.<string> An array of data formatIds and the number of data objects with that formatId. Uses same structure as Solr facet counts: ["text/csv", 5]
firstUpdate string The earliest upload date for any object in this collection, excluding uploads of obsoleted objects
dataUpdateDates number | Array.<string> An array of date strings and the number of data objects uploaded on that date. Uses same structure as Solr facet counts: ["2015-08-02", 5]
metadataUpdateDates number | Array.<string> An array of date strings and the number of data objects uploaded on that date. Uses same structure as Solr facet counts: ["2015-08-02", 5]
firstBeginDate string An ISO date string of the earliest year that this data collection describes, from the science metadata
lastEndDate string An ISO date string of the latest year that this data collection describes, from the science metadata
firstPossibleDate string The first possible date (as a string) that data could have been collected. This is to weed out badly formatted dates when sending queries.
temporalCoverage object A simple object of date ranges (the object key) and the number of metadata objects uploaded in that date range (the object value). Example: { "1990-2000": 5 }
queryCoverageFrom number The year to start the temporal coverage range query
queryCoverageUntil number The year to end the temporal coverage range query
metadataTotalSize number The total number of bytes of all metadata files
dataTotalSize number The total number of bytes of all data files
totalSize number The total number of bytes or metadata and data files
hideMetadataAssessment boolean If true, metadata assessment scores will not be retrieved
mdqScoresImage Image The Image objet of an aggregated metadata assessment chart
maxQueryLength number The maximum query length that will be sent via GET to the query service. Queries that go beyond this length will be sent via POST, if POST is enabled in the AppModel
mdqImageId string The identifier to use in the request for the metadata assessment chart
Source:

getAll()

This function serves as a shorthand way to get all of the statistics stored in the model
Source:

getCollectionYearFacets()

Deprecated:
  • as of MetacatUI version 2.12.0. Use Stats#getMetadataStats to get the formatTypes. This function may be removed in a future release.
Source:

getDataFormatIDs()

Deprecated:
  • as of MetacatUI version 2.12.0. Use Stats#getDataStats to get the formatTypes. This function may be removed in a future release.
Source:

getDataStats()

Queries for statistics about data objects
Source:

getFirstBeginDate()

Sends a Solr query to get the earliest beginDate. If there are no beginDates in the index, then it searches for the earliest endDate.
Source:

getFormatTypes()

Deprecated:
Source:

getLastEndDate()

Gets the latest endDate from the Solr index
Source:

getMdqScores()

Retrieves an image of the metadata assessment scores
Source:

getMetadataFormatIDs()

Deprecated:
  • as of MetacatUI version 2.12.0. Use Stats#getMetadataStats to get the formatTypes. This function may be removed in a future release.
Source:

getMetadataStats()

Queries for statistics about metadata objects
Source:

getRequestType(queryOrURLString) → {string}

Given the query or URL, determine whether this model should send GET or POST requests, because of URL length restrictions in browsers.
Parameters:
Name Type Description
queryOrURLString string The full query or URL that will be sent to the query service
Source:
Returns:
The request type to use. Either `GET` or `POST`
Type
string

getUpdateDates()

Deprecated:
Source:

imgLoad(url)

Retrieves an image via a Promise. Primarily used by Stats#getMdqScores
Parameters:
Name Type Description
url string The URL of the image
Source: