@hestia-earth/schema
Version:
HESTIA Schema
97 lines (96 loc) • 4.89 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.Infrastructure = exports.infrastructureUniquenessFields = exports.infrastructureTermTermType = exports.InfrastructureMethodClassification = exports.InfrastructureOwnershipStatus = void 0;
// auto-generated content
var types_1 = require("./types");
var Term_1 = require("./Term");
var InfrastructureOwnershipStatus;
(function (InfrastructureOwnershipStatus) {
InfrastructureOwnershipStatus["borrowed"] = "borrowed";
InfrastructureOwnershipStatus["owned"] = "owned";
InfrastructureOwnershipStatus["rented"] = "rented";
})(InfrastructureOwnershipStatus = exports.InfrastructureOwnershipStatus || (exports.InfrastructureOwnershipStatus = {}));
var InfrastructureMethodClassification;
(function (InfrastructureMethodClassification) {
InfrastructureMethodClassification["consistent external sources"] = "consistent external sources";
InfrastructureMethodClassification["estimated with assumptions"] = "estimated with assumptions";
InfrastructureMethodClassification["expert opinion"] = "expert opinion";
InfrastructureMethodClassification["inconsistent external sources"] = "inconsistent external sources";
InfrastructureMethodClassification["modelled"] = "modelled";
InfrastructureMethodClassification["non-verified survey data"] = "non-verified survey data";
InfrastructureMethodClassification["physical measurement"] = "physical measurement";
InfrastructureMethodClassification["unsourced assumption"] = "unsourced assumption";
InfrastructureMethodClassification["verified survey data"] = "verified survey data";
})(InfrastructureMethodClassification = exports.InfrastructureMethodClassification || (exports.InfrastructureMethodClassification = {}));
/**
* Contains all the TermTermType with override on the Infrastructure.
* Note: it does not contain the default TermTermType on related Blank Nodes.
*/
exports.infrastructureTermTermType = {
term: [
Term_1.TermTermType.building,
Term_1.TermTermType.cropSupport,
Term_1.TermTermType.irrigation,
Term_1.TermTermType.machinery
],
inputs: { term: [
Term_1.TermTermType.electricity,
Term_1.TermTermType.fuel,
Term_1.TermTermType.material,
Term_1.TermTermType.seed,
Term_1.TermTermType.substrate,
Term_1.TermTermType.transport,
Term_1.TermTermType.water
] },
all: [
Term_1.TermTermType.building,
Term_1.TermTermType.cropSupport,
Term_1.TermTermType.irrigation,
Term_1.TermTermType.machinery,
Term_1.TermTermType.electricity,
Term_1.TermTermType.fuel,
Term_1.TermTermType.material,
Term_1.TermTermType.seed,
Term_1.TermTermType.substrate,
Term_1.TermTermType.transport,
Term_1.TermTermType.water
]
};
/**
* Contains all the fields that make the blank nodes unique.
*/
exports.infrastructureUniquenessFields = {
inputs: ['term.@id',
'transport.term.@id',
'operation.@id',
'country.@id'],
transport: ['term.@id',
'value',
'distance']
};
/**
* A physical item located on a specific [Site](/schema/Site) (e.g., trellises on vineyards) or a physical item held at the [Organisation](/schema/Organisation) level and used across multiple Sites (e.g., a tractor). Infrastructure is depreciated over [Cycles](/schema/Cycle) and then becomes an [Input](/schema/Input) and terms describing the depreciated Infrastructure are available in the [Glossary](/glossary?termType=material). Each item of Infrastructure must be unique, and the fields which determine uniqueness are defined in the <code>[infrastructure](/schema/Site#infrastructure)</code> field of the Site or Organisation.
*/
var Infrastructure = /** @class */ (function (_super) {
__extends(Infrastructure, _super);
function Infrastructure() {
return _super !== null && _super.apply(this, arguments) || this;
}
return Infrastructure;
}(types_1.JSON));
exports.Infrastructure = Infrastructure;