@hestia-earth/schema
Version:
HESTIA Schema
165 lines (164 loc) • 7.73 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.Product = exports.productUniquenessFields = exports.productTermTermType = exports.ProductRevenueStatsDefinition = exports.ProductPriceStatsDefinition = exports.ProductFate = exports.ProductMethodClassification = exports.ProductStatsDefinition = void 0;
// auto-generated content
var types_1 = require("./types");
var Term_1 = require("./Term");
var ProductStatsDefinition;
(function (ProductStatsDefinition) {
ProductStatsDefinition["animals"] = "animals";
ProductStatsDefinition["cycles"] = "cycles";
ProductStatsDefinition["modelled"] = "modelled";
ProductStatsDefinition["other observations"] = "other observations";
ProductStatsDefinition["regions"] = "regions";
ProductStatsDefinition["replications"] = "replications";
ProductStatsDefinition["simulated"] = "simulated";
ProductStatsDefinition["sites"] = "sites";
ProductStatsDefinition["spatial"] = "spatial";
ProductStatsDefinition["time"] = "time";
})(ProductStatsDefinition = exports.ProductStatsDefinition || (exports.ProductStatsDefinition = {}));
var ProductMethodClassification;
(function (ProductMethodClassification) {
ProductMethodClassification["consistent external sources"] = "consistent external sources";
ProductMethodClassification["estimated with assumptions"] = "estimated with assumptions";
ProductMethodClassification["expert opinion"] = "expert opinion";
ProductMethodClassification["inconsistent external sources"] = "inconsistent external sources";
ProductMethodClassification["modelled"] = "modelled";
ProductMethodClassification["non-verified survey data"] = "non-verified survey data";
ProductMethodClassification["physical measurement"] = "physical measurement";
ProductMethodClassification["unsourced assumption"] = "unsourced assumption";
ProductMethodClassification["verified survey data"] = "verified survey data";
})(ProductMethodClassification = exports.ProductMethodClassification || (exports.ProductMethodClassification = {}));
var ProductFate;
(function (ProductFate) {
ProductFate["anaerobic digestion"] = "anaerobic digestion";
ProductFate["bedding"] = "bedding";
ProductFate["breeding"] = "breeding";
ProductFate["burnt"] = "burnt";
ProductFate["burnt for fuel"] = "burnt for fuel";
ProductFate["composted"] = "composted";
ProductFate["fodder"] = "fodder";
ProductFate["home consumption"] = "home consumption";
ProductFate["processing"] = "processing";
ProductFate["saved for seeds"] = "saved for seeds";
ProductFate["sold"] = "sold";
ProductFate["sold for breeding"] = "sold for breeding";
ProductFate["sold for fattening"] = "sold for fattening";
ProductFate["sold for slaughter"] = "sold for slaughter";
ProductFate["sold to domestic market"] = "sold to domestic market";
ProductFate["sold to export market"] = "sold to export market";
ProductFate["used as fertiliser"] = "used as fertiliser";
ProductFate["used as mulch"] = "used as mulch";
ProductFate["used as soil amendment"] = "used as soil amendment";
})(ProductFate = exports.ProductFate || (exports.ProductFate = {}));
var ProductPriceStatsDefinition;
(function (ProductPriceStatsDefinition) {
ProductPriceStatsDefinition["cycles"] = "cycles";
ProductPriceStatsDefinition["cycles and time"] = "cycles and time";
ProductPriceStatsDefinition["time"] = "time";
})(ProductPriceStatsDefinition = exports.ProductPriceStatsDefinition || (exports.ProductPriceStatsDefinition = {}));
var ProductRevenueStatsDefinition;
(function (ProductRevenueStatsDefinition) {
ProductRevenueStatsDefinition["cycles"] = "cycles";
ProductRevenueStatsDefinition["cycles and time"] = "cycles and time";
ProductRevenueStatsDefinition["time"] = "time";
})(ProductRevenueStatsDefinition = exports.ProductRevenueStatsDefinition || (exports.ProductRevenueStatsDefinition = {}));
/**
* Contains all the TermTermType with override on the Product.
* Note: it does not contain the default TermTermType on related Blank Nodes.
*/
exports.productTermTermType = {
term: [
Term_1.TermTermType.animalProduct,
Term_1.TermTermType.crop,
Term_1.TermTermType.cropResidue,
Term_1.TermTermType.electricity,
Term_1.TermTermType.feedFoodAdditive,
Term_1.TermTermType.forage,
Term_1.TermTermType.fuel,
Term_1.TermTermType.liveAnimal,
Term_1.TermTermType.liveAquaticSpecies,
Term_1.TermTermType.excreta,
Term_1.TermTermType.organicFertiliser,
Term_1.TermTermType.inorganicFertiliser,
Term_1.TermTermType.biochar,
Term_1.TermTermType.otherOrganicChemical,
Term_1.TermTermType.otherInorganicChemical,
Term_1.TermTermType.processingAid,
Term_1.TermTermType.processedFood,
Term_1.TermTermType.seed,
Term_1.TermTermType.soilAmendment,
Term_1.TermTermType.substrate,
Term_1.TermTermType.material,
Term_1.TermTermType.waste
],
model: [
Term_1.TermTermType.model
],
all: [
Term_1.TermTermType.animalProduct,
Term_1.TermTermType.crop,
Term_1.TermTermType.cropResidue,
Term_1.TermTermType.electricity,
Term_1.TermTermType.feedFoodAdditive,
Term_1.TermTermType.forage,
Term_1.TermTermType.fuel,
Term_1.TermTermType.liveAnimal,
Term_1.TermTermType.liveAquaticSpecies,
Term_1.TermTermType.excreta,
Term_1.TermTermType.organicFertiliser,
Term_1.TermTermType.inorganicFertiliser,
Term_1.TermTermType.biochar,
Term_1.TermTermType.otherOrganicChemical,
Term_1.TermTermType.otherInorganicChemical,
Term_1.TermTermType.processingAid,
Term_1.TermTermType.processedFood,
Term_1.TermTermType.seed,
Term_1.TermTermType.soilAmendment,
Term_1.TermTermType.substrate,
Term_1.TermTermType.material,
Term_1.TermTermType.waste,
Term_1.TermTermType.model
]
};
/**
* Contains all the fields that make the blank nodes unique.
*/
exports.productUniquenessFields = {
properties: ['term.@id',
'key.@id',
'value',
'share',
'date',
'startDate',
'endDate'],
transport: ['term.@id',
'value',
'distance']
};
/**
* A Product created during a [Cycle](/schema/Cycle) or [Transformation](/schema/Transformation). Each Product must be unique, and the fields which determine uniqueness are defined in the <code>[products](/schema/Cycle#products)</code> field of the Cycle or [Transformation](/schema/Transformation#products).
*/
var Product = /** @class */ (function (_super) {
__extends(Product, _super);
function Product() {
return _super !== null && _super.apply(this, arguments) || this;
}
return Product;
}(types_1.JSON));
exports.Product = Product;