@hestia-earth/schema
Version:
HESTIA Schema
137 lines (136 loc) • 5.05 kB
JavaScript
;
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.impactAssessmentFields = exports.ImpactAssessment = exports.impactAssessmentUniquenessFields = exports.impactAssessmentTermTermType = exports.ImpactAssessmentAllocationMethod = void 0;
// auto-generated content
var types_1 = require("./types");
var Term_1 = require("./Term");
var ImpactAssessmentAllocationMethod;
(function (ImpactAssessmentAllocationMethod) {
ImpactAssessmentAllocationMethod["biophysical"] = "biophysical";
ImpactAssessmentAllocationMethod["economic"] = "economic";
ImpactAssessmentAllocationMethod["energy"] = "energy";
ImpactAssessmentAllocationMethod["mass"] = "mass";
ImpactAssessmentAllocationMethod["none"] = "none";
ImpactAssessmentAllocationMethod["none required"] = "none required";
ImpactAssessmentAllocationMethod["system expansion"] = "system expansion";
})(ImpactAssessmentAllocationMethod = exports.ImpactAssessmentAllocationMethod || (exports.ImpactAssessmentAllocationMethod = {}));
/**
* Contains all the TermTermType with override on the ImpactAssessment.
* Note: it does not contain the default TermTermType on related Blank Nodes.
*/
exports.impactAssessmentTermTermType = {
country: [
Term_1.TermTermType.region
],
region: [
Term_1.TermTermType.region
],
emissionsResourceUse: { term: [
Term_1.TermTermType.emission,
Term_1.TermTermType.resourceUse
] },
impacts: { term: [
Term_1.TermTermType.characterisedIndicator
] },
endpoints: { term: [
Term_1.TermTermType.endpointIndicator
] },
all: [
Term_1.TermTermType.region,
Term_1.TermTermType.emission,
Term_1.TermTermType.resourceUse,
Term_1.TermTermType.characterisedIndicator,
Term_1.TermTermType.endpointIndicator
]
};
/**
* Contains all the fields that make the blank nodes unique.
*/
exports.impactAssessmentUniquenessFields = {
emissionsResourceUse: ['term.@id',
'key.@id',
'inputs.@id',
'animals.@id',
'country.@id',
'operation.@id',
'methodModel.@id',
'transformation.@id',
'landCover.@id',
'previousLandCover.@id'],
impacts: ['term.@id',
'key.@id',
'inputs.@id',
'methodModel.@id'],
endpoints: ['term.@id',
'inputs.@id',
'methodModel.@id']
};
/**
* The emissions, resource uses, and environmental impacts created during the production of one unit of a [Product](/schema/ImpactAssessment#product) from a [Cycle](/schema/Cycle). The functional unit is defined by the units of the Product. If there are more than one Product in the Cycle, allocation is used to apportion these impacts across the Products.
*/
var ImpactAssessment = /** @class */ (function (_super) {
__extends(ImpactAssessment, _super);
function ImpactAssessment() {
var _this = _super !== null && _super.apply(this, arguments) || this;
/**
* The quantity of the <code>[product](/schema/ImpactAssessment#product)</code> that this Impact Assessment is expressed per. The units are determined by the [Term](/schema/Term) of the <code>[product](/schema/ImpactAssessment#product)</code> (e.g., 1kg for [Wheat, grain](/term/wheatGrain), or 1 head for a [Pig](/term/pig)).
*/
_this.functionalUnitQuantity = 1;
return _this;
}
return ImpactAssessment;
}(types_1.JSON));
exports.ImpactAssessment = ImpactAssessment;
exports.impactAssessmentFields = [
'name',
'version',
'versionDetails',
'cycle',
'product',
'functionalUnitQuantity',
'allocationMethod',
'endDate',
'startDate',
'site',
'country',
'region',
'organisation',
'source',
'emissionsResourceUse',
'impacts',
'endpoints',
'dataPrivate',
'organic',
'irrigated',
'autoGenerated',
'originalId',
'schemaVersion',
'added',
'addedVersion',
'updated',
'updatedVersion',
'aggregated',
'aggregatedDataValidated',
'aggregatedVersion',
'aggregatedQualityScore',
'aggregatedQualityScoreMax',
'aggregatedImpactAssessments',
'aggregatedSources',
'createdAt',
'updatedAt'
];