biojs-rest-tessapi
Version:
API client to interface with the TeSS Rest API. Retrieve a list of metedata about upcoming Life science events, training materials, and other training opportunities. Return results filtered by metadata facets
325 lines (281 loc) • 11.1 kB
JavaScript
/**
* TeSS API
* Access, search and filter through collections of training materials, events, packages, and workflows in TeSS. As a rule of thumb - You can add .json to the end of most pages to retrieve the data in a common exchange format. e.g - https://tess.elixir-europe.org/events/software-carpentry-west-virginia-university.json - https://tess.elixir-europe.org/materials/rna-seq-de-novo-transcriptome-reconstruction-with-rna-seq.json - https://tess.elixir-europe.org/packages/biocomp-computing-skills-collection.json - https://tess.elixir-europe.org/workflows/das-internet-fur-biologen.json - https://tess.elixir-europe.org/nodes/united-kingdom.json
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.TeSsApi) {
root.TeSsApi = {};
}
root.TeSsApi.ScientificTopic = factory(root.TeSsApi.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
/**
* The ScientificTopic model module.
* @module model/ScientificTopic
* @version 1.0.0
*/
/**
* Constructs a new <code>ScientificTopic</code>.
* @alias module:model/ScientificTopic
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>ScientificTopic</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ScientificTopic} obj Optional instance to populate.
* @return {module:model/ScientificTopic} The populated <code>ScientificTopic</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'Number');
}
if (data.hasOwnProperty('preferred_label')) {
obj['preferred_label'] = ApiClient.convertToType(data['preferred_label'], 'String');
}
if (data.hasOwnProperty('obsolete')) {
obj['obsolete'] = ApiClient.convertToType(data['obsolete'], 'Boolean');
}
if (data.hasOwnProperty('created_in')) {
obj['created_in'] = ApiClient.convertToType(data['created_in'], 'String');
}
if (data.hasOwnProperty('documentation')) {
obj['documentation'] = ApiClient.convertToType(data['documentation'], 'String');
}
if (data.hasOwnProperty('prefix_iri')) {
obj['prefix_iri'] = ApiClient.convertToType(data['prefix_iri'], 'String');
}
if (data.hasOwnProperty('has_definition')) {
obj['has_definition'] = ApiClient.convertToType(data['has_definition'], 'String');
}
if (data.hasOwnProperty('saved_by')) {
obj['saved_by'] = ApiClient.convertToType(data['saved_by'], 'String');
}
if (data.hasOwnProperty('obsolete_since')) {
obj['obsolete_since'] = ApiClient.convertToType(data['obsolete_since'], 'String');
}
if (data.hasOwnProperty('created_at')) {
obj['created_at'] = ApiClient.convertToType(data['created_at'], 'Date');
}
if (data.hasOwnProperty('updated_at')) {
obj['updated_at'] = ApiClient.convertToType(data['updated_at'], 'Date');
}
if (data.hasOwnProperty('class_id')) {
obj['class_id'] = ApiClient.convertToType(data['class_id'], 'String');
}
if (data.hasOwnProperty('slug')) {
obj['slug'] = ApiClient.convertToType(data['slug'], 'String');
}
if (data.hasOwnProperty('synonyms')) {
obj['synonyms'] = ApiClient.convertToType(data['synonyms'], ['String']);
}
if (data.hasOwnProperty('definitions')) {
obj['definitions'] = ApiClient.convertToType(data['definitions'], ['String']);
}
if (data.hasOwnProperty('parents')) {
obj['parents'] = ApiClient.convertToType(data['parents'], ['String']);
}
if (data.hasOwnProperty('consider')) {
obj['consider'] = ApiClient.convertToType(data['consider'], ['String']);
}
if (data.hasOwnProperty('has_alternative_id')) {
obj['has_alternative_id'] = ApiClient.convertToType(data['has_alternative_id'], ['String']);
}
if (data.hasOwnProperty('has_broad_synonym')) {
obj['has_broad_synonym'] = ApiClient.convertToType(data['has_broad_synonym'], ['String']);
}
if (data.hasOwnProperty('has_dbxref')) {
obj['has_dbxref'] = ApiClient.convertToType(data['has_dbxref'], ['String']);
}
if (data.hasOwnProperty('has_exact_synonym')) {
obj['has_exact_synonym'] = ApiClient.convertToType(data['has_exact_synonym'], ['String']);
}
if (data.hasOwnProperty('has_related_synonym')) {
obj['has_related_synonym'] = ApiClient.convertToType(data['has_related_synonym'], ['String']);
}
if (data.hasOwnProperty('has_subset')) {
obj['has_subset'] = ApiClient.convertToType(data['has_subset'], ['String']);
}
if (data.hasOwnProperty('replaced_by')) {
obj['replaced_by'] = ApiClient.convertToType(data['replaced_by'], ['String']);
}
if (data.hasOwnProperty('subset_property')) {
obj['subset_property'] = ApiClient.convertToType(data['subset_property'], ['String']);
}
if (data.hasOwnProperty('has_narrow_synonym')) {
obj['has_narrow_synonym'] = ApiClient.convertToType(data['has_narrow_synonym'], ['String']);
}
if (data.hasOwnProperty('in_subset')) {
obj['in_subset'] = ApiClient.convertToType(data['in_subset'], ['String']);
}
if (data.hasOwnProperty('in_cyclic')) {
obj['in_cyclic'] = ApiClient.convertToType(data['in_cyclic'], ['String']);
}
}
return obj;
}
/**
* Unique ID of scientific topic as given by TeSS. Note, this is not a global persistent ID.
* @member {Number} id
*/
exports.prototype['id'] = undefined;
/**
* The preferred name of the scientific topic
* @member {String} preferred_label
*/
exports.prototype['preferred_label'] = undefined;
/**
* Whether or not the term has been deprecated from EDAM
* @member {Boolean} obsolete
*/
exports.prototype['obsolete'] = undefined;
/**
* When the term was introduced into EDAM e.g. \"beta12orEarlier\"
* @member {String} created_in
*/
exports.prototype['created_in'] = undefined;
/**
* A link, if any, to any documentation about the specific term.
* @member {String} documentation
*/
exports.prototype['documentation'] = undefined;
/**
* The unique ID to reference the term e.g. \"topic_0099\"
* @member {String} prefix_iri
*/
exports.prototype['prefix_iri'] = undefined;
/**
* A succinct canonical definition of the term e.g. \"RNA sequences and structures.\"
* @member {String} has_definition
*/
exports.prototype['has_definition'] = undefined;
/**
* Saved by
* @member {String} saved_by
*/
exports.prototype['saved_by'] = undefined;
/**
* Which version the term has been obsolete since if it is now obsolete
* @member {String} obsolete_since
*/
exports.prototype['obsolete_since'] = undefined;
/**
* Timestamp of when the term was introduced to TeSS e.g. \"2016-03-04T14:06:54.246Z\" (Not when it was introduced to EDAM)
* @member {Date} created_at
*/
exports.prototype['created_at'] = undefined;
/**
* Timestamp of when the term was last updated in TeSS e.g. \"2016-03-04T14:06:54.246Z\" (Not when it was last updated in EDAM)
* @member {Date} updated_at
*/
exports.prototype['updated_at'] = undefined;
/**
* full ID of ontology class. Namespaced IRI e.g. \"http://edamontology.org/topic_0099\"
* @member {String} class_id
*/
exports.prototype['class_id'] = undefined;
/**
* Short hand identifier e.g. \"rna\"
* @member {String} slug
*/
exports.prototype['slug'] = undefined;
/**
* A list of synonym terms that can be used interchangably with the preferred_label.
* @member {Array.<String>} synonyms
*/
exports.prototype['synonyms'] = undefined;
/**
* A list of definitions that can also be used to describe the term e.g. [\"RNA sequences and structures.\"]
* @member {Array.<String>} definitions
*/
exports.prototype['definitions'] = undefined;
/**
* A list of class_ids that are the parents of this term e.g. [\"http://edamontology.org/topic_0077\"]
* @member {Array.<String>} parents
*/
exports.prototype['parents'] = undefined;
/**
* @member {Array.<String>} consider
*/
exports.prototype['consider'] = undefined;
/**
* @member {Array.<String>} has_alternative_id
*/
exports.prototype['has_alternative_id'] = undefined;
/**
* @member {Array.<String>} has_broad_synonym
*/
exports.prototype['has_broad_synonym'] = undefined;
/**
* @member {Array.<String>} has_dbxref
*/
exports.prototype['has_dbxref'] = undefined;
/**
* @member {Array.<String>} has_exact_synonym
*/
exports.prototype['has_exact_synonym'] = undefined;
/**
* @member {Array.<String>} has_related_synonym
*/
exports.prototype['has_related_synonym'] = undefined;
/**
* @member {Array.<String>} has_subset
*/
exports.prototype['has_subset'] = undefined;
/**
* @member {Array.<String>} replaced_by
*/
exports.prototype['replaced_by'] = undefined;
/**
* @member {Array.<String>} subset_property
*/
exports.prototype['subset_property'] = undefined;
/**
* e.g. [\"Small RNA\"]
* @member {Array.<String>} has_narrow_synonym
*/
exports.prototype['has_narrow_synonym'] = undefined;
/**
* e.g. [\"http://purl.obolibrary.org/obo/edam#edam\",\"http://purl.obolibrary.org/obo/edam#topics\"]
* @member {Array.<String>} in_subset
*/
exports.prototype['in_subset'] = undefined;
/**
* @member {Array.<String>} in_cyclic
*/
exports.prototype['in_cyclic'] = undefined;
return exports;
}));