@hestia-earth/schema
Version:
HESTIA Schema
153 lines (152 loc) • 7.3 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.Practice = exports.practiceUniquenessFields = exports.practiceTermTermType = exports.PracticeOwnershipStatus = exports.PracticeCostStatsDefinition = exports.PracticePriceStatsDefinition = exports.PracticeMethodClassification = exports.PracticeStatsDefinition = void 0;
// auto-generated content
var types_1 = require("./types");
var Term_1 = require("./Term");
var PracticeStatsDefinition;
(function (PracticeStatsDefinition) {
PracticeStatsDefinition["animals"] = "animals";
PracticeStatsDefinition["cycles"] = "cycles";
PracticeStatsDefinition["modelled"] = "modelled";
PracticeStatsDefinition["other observations"] = "other observations";
PracticeStatsDefinition["regions"] = "regions";
PracticeStatsDefinition["replications"] = "replications";
PracticeStatsDefinition["simulated"] = "simulated";
PracticeStatsDefinition["sites"] = "sites";
PracticeStatsDefinition["spatial"] = "spatial";
PracticeStatsDefinition["time"] = "time";
})(PracticeStatsDefinition = exports.PracticeStatsDefinition || (exports.PracticeStatsDefinition = {}));
var PracticeMethodClassification;
(function (PracticeMethodClassification) {
PracticeMethodClassification["consistent external sources"] = "consistent external sources";
PracticeMethodClassification["estimated with assumptions"] = "estimated with assumptions";
PracticeMethodClassification["expert opinion"] = "expert opinion";
PracticeMethodClassification["inconsistent external sources"] = "inconsistent external sources";
PracticeMethodClassification["modelled"] = "modelled";
PracticeMethodClassification["non-verified survey data"] = "non-verified survey data";
PracticeMethodClassification["physical measurement"] = "physical measurement";
PracticeMethodClassification["unsourced assumption"] = "unsourced assumption";
PracticeMethodClassification["verified survey data"] = "verified survey data";
})(PracticeMethodClassification = exports.PracticeMethodClassification || (exports.PracticeMethodClassification = {}));
var PracticePriceStatsDefinition;
(function (PracticePriceStatsDefinition) {
PracticePriceStatsDefinition["cycles"] = "cycles";
PracticePriceStatsDefinition["cycles and time"] = "cycles and time";
PracticePriceStatsDefinition["time"] = "time";
})(PracticePriceStatsDefinition = exports.PracticePriceStatsDefinition || (exports.PracticePriceStatsDefinition = {}));
var PracticeCostStatsDefinition;
(function (PracticeCostStatsDefinition) {
PracticeCostStatsDefinition["cycles"] = "cycles";
PracticeCostStatsDefinition["cycles and time"] = "cycles and time";
PracticeCostStatsDefinition["time"] = "time";
})(PracticeCostStatsDefinition = exports.PracticeCostStatsDefinition || (exports.PracticeCostStatsDefinition = {}));
var PracticeOwnershipStatus;
(function (PracticeOwnershipStatus) {
PracticeOwnershipStatus["borrowed"] = "borrowed";
PracticeOwnershipStatus["owned"] = "owned";
PracticeOwnershipStatus["rented"] = "rented";
})(PracticeOwnershipStatus = exports.PracticeOwnershipStatus || (exports.PracticeOwnershipStatus = {}));
/**
* Contains all the TermTermType with override on the Practice.
* Note: it does not contain the default TermTermType on related Blank Nodes.
*/
exports.practiceTermTermType = {
term: [
Term_1.TermTermType.animalBreed,
Term_1.TermTermType.animalManagement,
Term_1.TermTermType.aquacultureManagement,
Term_1.TermTermType.cropEstablishment,
Term_1.TermTermType.cropResidueManagement,
Term_1.TermTermType.excretaManagement,
Term_1.TermTermType.landCover,
Term_1.TermTermType.landUseManagement,
Term_1.TermTermType.pastureManagement,
Term_1.TermTermType.standardsLabels,
Term_1.TermTermType.system,
Term_1.TermTermType.tillage,
Term_1.TermTermType.waterRegime,
Term_1.TermTermType.wasteManagement,
Term_1.TermTermType.operation
],
key: [
Term_1.TermTermType.crop,
Term_1.TermTermType.forage,
Term_1.TermTermType.biologicalControlAgent,
Term_1.TermTermType.inorganicFertiliser,
Term_1.TermTermType.organicFertiliser,
Term_1.TermTermType.biochar,
Term_1.TermTermType.otherInorganicChemical,
Term_1.TermTermType.otherOrganicChemical,
Term_1.TermTermType.pesticideAI,
Term_1.TermTermType.soilAmendment,
Term_1.TermTermType.landCover
],
model: [
Term_1.TermTermType.model
],
all: [
Term_1.TermTermType.animalBreed,
Term_1.TermTermType.animalManagement,
Term_1.TermTermType.aquacultureManagement,
Term_1.TermTermType.cropEstablishment,
Term_1.TermTermType.cropResidueManagement,
Term_1.TermTermType.excretaManagement,
Term_1.TermTermType.landCover,
Term_1.TermTermType.landUseManagement,
Term_1.TermTermType.pastureManagement,
Term_1.TermTermType.standardsLabels,
Term_1.TermTermType.system,
Term_1.TermTermType.tillage,
Term_1.TermTermType.waterRegime,
Term_1.TermTermType.wasteManagement,
Term_1.TermTermType.operation,
Term_1.TermTermType.crop,
Term_1.TermTermType.forage,
Term_1.TermTermType.biologicalControlAgent,
Term_1.TermTermType.inorganicFertiliser,
Term_1.TermTermType.organicFertiliser,
Term_1.TermTermType.biochar,
Term_1.TermTermType.otherInorganicChemical,
Term_1.TermTermType.otherOrganicChemical,
Term_1.TermTermType.pesticideAI,
Term_1.TermTermType.soilAmendment,
Term_1.TermTermType.model
]
};
/**
* Contains all the fields that make the blank nodes unique.
*/
exports.practiceUniquenessFields = {
properties: ['term.@id',
'key.@id',
'date',
'startDate',
'endDate']
};
/**
* A Practice used during a [Cycle](/schema/Cycle) or [Transformation](/schema/Transformation). Each Practice must be unique, and the fields which determine uniqueness are defined in the <code>[practices](/schema/Cycle#practices)</code> field of the Cycle or [Transformation](/schema/Transformation#inputs).
*/
var Practice = /** @class */ (function (_super) {
__extends(Practice, _super);
function Practice() {
return _super !== null && _super.apply(this, arguments) || this;
}
return Practice;
}(types_1.JSON));
exports.Practice = Practice;