UNPKG

sdmx-rest

Version:

SDMX REST API client for JavaScript

61 lines (49 loc) 2.03 kB
// Generated by CoffeeScript 2.7.0 (function() { var MetadataType, all, excluded, k1, k2, special, v1, v2, hasProp = {}.hasOwnProperty, indexOf = [].indexOf; ({MetadataType} = require('./metadata-type')); // Specifies the references to be returned. // References can be artefacts referenced by the artefact to be returned // (for example, the code lists and concepts used by the data structure // definition matching the query), or artefacts that use the matching artefact // (for example, the dataflows that use the data structure definition matching // the query) special = { // No references will be returned NONE: 'none', // The artefacts that use the artefact matching the query will be returned. PARENTS: 'parents', // The artefacts that use the artefact matching the query, as well as the // artefacts referenced by these artefacts will be returned. PARENTSANDSIBLINGS: 'parentsandsiblings', // The artefacts that use the artefact matching the query, up to any level. ANCESTORS: 'ancestors', // The artefacts referenced by the matching artefact will be returned. CHILDREN: 'children', // References of references, up to any level, will also be returned. DESCENDANTS: 'descendants', // The combination of parentsandsiblings and descendants. ALL: 'all' }; excluded = ['structure', 'actualconstraint', 'allowedconstraint', '*']; // All the predefined SDMX types are valid references, except for the 'catch all' // `structure` all = {}; for (k1 in MetadataType) { if (!hasProp.call(MetadataType, k1)) continue; v1 = MetadataType[k1]; if (indexOf.call(excluded, v1) < 0) { all[k1] = v1; } } for (k2 in special) { if (!hasProp.call(special, k2)) continue; v2 = special[k2]; all[k2] = v2; } exports.MetadataReferences = Object.freeze(all); exports.MetadataReferencesExcluded = Object.freeze(excluded); exports.MetadataReferencesSpecial = Object.freeze(special); }).call(this);