UNPKG

@hestia-earth/schema

Version:
162 lines (161 loc) 6.38 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.cycleFields = exports.Cycle = exports.cycleUniquenessFields = exports.CycleDefaultMethodClassification = exports.CycleStartDateDefinition = exports.CycleFunctionalUnit = void 0; // auto-generated content var types_1 = require("./types"); var CycleFunctionalUnit; (function (CycleFunctionalUnit) { CycleFunctionalUnit["1 ha"] = "1 ha"; CycleFunctionalUnit["relative"] = "relative"; })(CycleFunctionalUnit = exports.CycleFunctionalUnit || (exports.CycleFunctionalUnit = {})); var CycleStartDateDefinition; (function (CycleStartDateDefinition) { CycleStartDateDefinition["first bearing year"] = "first bearing year"; CycleStartDateDefinition["harvest of previous crop"] = "harvest of previous crop"; CycleStartDateDefinition["one year prior"] = "one year prior"; CycleStartDateDefinition["orchard or vineyard establishment date"] = "orchard or vineyard establishment date"; CycleStartDateDefinition["soil preparation date"] = "soil preparation date"; CycleStartDateDefinition["sowing date"] = "sowing date"; CycleStartDateDefinition["start of animal life"] = "start of animal life"; CycleStartDateDefinition["start of wild harvest period"] = "start of wild harvest period"; CycleStartDateDefinition["start of year"] = "start of year"; CycleStartDateDefinition["stocking date"] = "stocking date"; CycleStartDateDefinition["transplanting date"] = "transplanting date"; })(CycleStartDateDefinition = exports.CycleStartDateDefinition || (exports.CycleStartDateDefinition = {})); var CycleDefaultMethodClassification; (function (CycleDefaultMethodClassification) { CycleDefaultMethodClassification["consistent external sources"] = "consistent external sources"; CycleDefaultMethodClassification["estimated with assumptions"] = "estimated with assumptions"; CycleDefaultMethodClassification["expert opinion"] = "expert opinion"; CycleDefaultMethodClassification["inconsistent external sources"] = "inconsistent external sources"; CycleDefaultMethodClassification["modelled"] = "modelled"; CycleDefaultMethodClassification["non-verified survey data"] = "non-verified survey data"; CycleDefaultMethodClassification["physical measurement"] = "physical measurement"; CycleDefaultMethodClassification["unsourced assumption"] = "unsourced assumption"; CycleDefaultMethodClassification["verified survey data"] = "verified survey data"; })(CycleDefaultMethodClassification = exports.CycleDefaultMethodClassification || (exports.CycleDefaultMethodClassification = {})); /** * Contains all the fields that make the blank nodes unique. */ exports.cycleUniquenessFields = { practices: ['term.@id', 'key.@id', 'dates', 'startDate', 'endDate', 'areaPercent', 'ownershipStatus', 'variety', 'site.id'], animals: ['animalId'], inputs: ['term.@id', 'dates', 'startDate', 'endDate', 'isAnimalFeed', 'producedInCycle', 'transport.term.@id', 'operation.@id', 'country.@id', 'region.@id', 'impactAssessment.id', 'site.id'], products: ['term.@id', 'dates', 'startDate', 'endDate', 'variety', 'fate'], transformations: ['transformationId'], emissions: ['term.@id', 'key.@id', 'dates', 'startDate', 'endDate', 'depth', 'inputs.@id', 'animals.@id', 'transport.@id', 'operation.@id', 'transformation.@id', 'site.id', 'country.@id'] }; /** * The [Inputs](/schema/Input), [Emissions](/schema/Emission), [Products](/schema/Product), and [Practices](/schema/Practice) created or used during a period. A Cycle also includes a [Completeness](/schema/Completeness) assessment, describing how complete the Inputs and Products data are, and [Transformations](/schema/Transformation), which allow Products to be transformed into new Products in the same Cycle. For animal production Cycles, the types of [Animal](/schema/Animal) present can also be specified. A Cycle occurs on a [Site](/schema/Site). */ var Cycle = /** @class */ (function (_super) { __extends(Cycle, _super); function Cycle() { return _super !== null && _super.apply(this, arguments) || this; } return Cycle; }(types_1.JSON)); exports.Cycle = Cycle; exports.cycleFields = [ 'name', 'description', 'functionalUnit', 'functionalUnitDetails', 'endDate', 'startDate', 'startDateDefinition', 'cycleDuration', 'site', 'otherSites', 'siteDuration', 'otherSitesDuration', 'siteUnusedDuration', 'otherSitesUnusedDuration', 'siteArea', 'otherSitesArea', 'harvestedArea', 'numberOfCycles', 'treatment', 'commercialPracticeTreatment', 'numberOfReplications', 'sampleWeight', 'defaultMethodClassification', 'defaultMethodClassificationDescription', 'defaultSource', 'completeness', 'practices', 'animals', 'inputs', 'products', 'transformations', 'emissions', 'dataPrivate', 'originalId', 'schemaVersion', 'added', 'addedVersion', 'updated', 'updatedVersion', 'aggregated', 'aggregatedDataValidated', 'aggregatedVersion', 'aggregatedQualityScore', 'aggregatedQualityScoreMax', 'aggregatedCycles', 'aggregatedSources', 'covarianceMatrixIds', 'covarianceMatrix', 'createdAt', 'updatedAt' ];