@hestia-earth/schema
Version:
HESTIA Schema
278 lines (277 loc) • 10.9 kB
JavaScript
;
// auto-generated content
Object.defineProperty(exports, "__esModule", { value: true });
exports.JSON = exports.uniquenessFields = exports.nestedSearchableKeys = exports.searchableProperties = exports.SchemaType = exports.NodeType = void 0;
var NodeType;
(function (NodeType) {
NodeType["Actor"] = "Actor";
NodeType["Cycle"] = "Cycle";
NodeType["ImpactAssessment"] = "ImpactAssessment";
NodeType["Organisation"] = "Organisation";
NodeType["Site"] = "Site";
NodeType["Source"] = "Source";
NodeType["Term"] = "Term";
})(NodeType = exports.NodeType || (exports.NodeType = {}));
var SchemaType;
(function (SchemaType) {
SchemaType["Actor"] = "Actor";
SchemaType["Animal"] = "Animal";
SchemaType["Bibliography"] = "Bibliography";
SchemaType["Completeness"] = "Completeness";
SchemaType["Cycle"] = "Cycle";
SchemaType["Emission"] = "Emission";
SchemaType["ImpactAssessment"] = "ImpactAssessment";
SchemaType["Indicator"] = "Indicator";
SchemaType["Infrastructure"] = "Infrastructure";
SchemaType["Input"] = "Input";
SchemaType["Management"] = "Management";
SchemaType["Measurement"] = "Measurement";
SchemaType["Organisation"] = "Organisation";
SchemaType["Practice"] = "Practice";
SchemaType["Product"] = "Product";
SchemaType["Property"] = "Property";
SchemaType["Site"] = "Site";
SchemaType["Source"] = "Source";
SchemaType["Term"] = "Term";
SchemaType["Transformation"] = "Transformation";
SchemaType["Transport"] = "Transport";
})(SchemaType = exports.SchemaType || (exports.SchemaType = {}));
exports.searchableProperties = {
Actor: ['name', 'orcid', 'scopusID', 'email', 'schemaVersion', 'createdAt', 'updatedAt'],
Animal: ['term', 'observations', 'methodClassification', 'inputs', 'practices'],
Bibliography: ['name', 'documentDOI', 'title', 'arxivID', 'scopus', 'mendeleyID'],
Completeness: ['animalFeed', 'animalPopulation', 'cropResidue', 'electricityFuel', 'excreta', 'fertiliser', 'freshForage', 'ingredient', 'liveAnimalInput', 'material', 'operation', 'otherChemical', 'pesticideVeterinaryDrug', 'product', 'seed', 'soilAmendment', 'transport', 'waste', 'water'],
Cycle: ['name', 'description', 'functionalUnit', 'endDate', 'site', 'otherSites', 'numberOfCycles', 'defaultMethodClassification', 'defaultSource', 'completeness', 'practices', 'animals', 'inputs', 'products', 'transformations', 'emissions', 'schemaVersion', 'aggregated', 'aggregatedDataValidated', 'aggregatedQualityScore', 'aggregatedQualityScoreMax', 'createdAt', 'updatedAt'],
Emission: ['term', 'key', 'value', 'observations', 'methodTier', 'methodModel', 'operation', 'site', 'country'],
ImpactAssessment: ['name', 'cycle', 'product', 'endDate', 'site', 'country', 'region', 'organisation', 'source', 'emissionsResourceUse', 'impacts', 'endpoints', 'schemaVersion', 'aggregated', 'aggregatedDataValidated', 'aggregatedQualityScore', 'aggregatedQualityScoreMax', 'createdAt', 'updatedAt'],
Indicator: ['term', 'key', 'observations', 'methodModel', 'country', 'operation', 'landCover', 'previousLandCover'],
Infrastructure: ['term', 'methodClassification'],
Input: ['term', 'observations', 'methodClassification', 'model', 'operation', 'country', 'region', 'site'],
Management: ['term', 'observations', 'methodClassification', 'model'],
Measurement: ['term', 'observations', 'endDate', 'methodClassification', 'method'],
Organisation: ['name', 'description', 'latitude', 'longitude', 'region', 'country', 'schemaVersion', 'createdAt', 'updatedAt'],
Practice: ['term', 'key', 'observations', 'methodClassification', 'model', 'primaryPercent', 'site'],
Product: ['term', 'value', 'observations', 'methodClassification', 'model', 'primary'],
Property: ['term', 'key', 'value', 'observations', 'methodModel', 'methodClassification'],
Site: ['name', 'siteType', 'latitude', 'longitude', 'country', 'region', 'defaultMethodClassification', 'defaultSource', 'measurements', 'management', 'schemaVersion', 'aggregated', 'aggregatedDataValidated', 'createdAt', 'updatedAt'],
Source: ['name', 'bibliography', 'metaAnalyses', 'sampleDesign', 'weightingMethod', 'experimentDesign', 'originalLicense', 'schemaVersion', 'createdAt', 'updatedAt'],
Term: ['name', 'synonyms', 'description', 'units', 'unitsDescription', 'subClassOf', 'defaultProperties', 'gadmLevel', 'gadmName', 'gadmCountry', 'latitude', 'longitude', 'openLCAId', 'scientificName', 'termType', 'schemaVersion', 'createdAt', 'updatedAt'],
Transformation: ['term', 'site', 'inputs', 'emissions', 'products', 'practices'],
Transport: ['term', 'value', 'observations', 'distance', 'distanceObservations', 'methodModel', 'methodClassification', 'inputs', 'practices', 'emissions']
};
exports.nestedSearchableKeys = [
'inputs', 'practices', 'otherSites', 'animals', 'products', 'transformations', 'emissions', 'emissionsResourceUse', 'impacts', 'endpoints', 'measurements', 'management', 'metaAnalyses', 'subClassOf', 'defaultProperties'
];
exports.uniquenessFields = {
Animal: { properties: ['term.@id',
'key.@id',
'date',
'startDate',
'endDate'],
inputs: ['term.@id',
'dates',
'startDate',
'endDate',
'isAnimalFeed',
'producedInCycle',
'transport.term.@id',
'operation.@id',
'country.@id',
'region.@id',
'impactAssessment.id'],
practices: ['term.@id',
'key.@id',
'dates',
'startDate',
'endDate',
'areaPercent',
'ownershipStatus'] },
Cycle: { 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'] },
Emission: { properties: ['term.@id',
'key.@id',
'date',
'startDate',
'endDate'],
inputs: ['@id'],
animals: ['@id'],
transport: ['@id'] },
ImpactAssessment: { emissionsResourceUse: ['term.@id',
'key.@id',
'inputs.@id',
'animals.@id',
'country.@id',
'operation.@id',
'methodModel.@id',
'transformation.@id',
'landCover.@id',
'previousLandCover.@id'],
impacts: ['term.@id',
'inputs.@id',
'methodModel.@id'],
endpoints: ['term.@id',
'inputs.@id',
'methodModel.@id'] },
Indicator: { inputs: ['@id'],
animals: ['@id'] },
Infrastructure: { inputs: ['term.@id',
'transport.term.@id',
'operation.@id',
'country.@id'],
transport: ['term.@id',
'value',
'distance'] },
Input: { properties: ['term.@id',
'key.@id',
'value',
'share',
'date',
'startDate',
'endDate'],
transport: ['term.@id',
'value',
'distance'] },
Management: { properties: ['term.@id',
'key.@id',
'date',
'startDate',
'endDate'] },
Measurement: { properties: ['term.@id',
'key.@id',
'date',
'startDate',
'endDate'] },
Organisation: { infrastructure: ['term.@id'] },
Practice: { properties: ['term.@id',
'key.@id',
'date',
'startDate',
'endDate'] },
Product: { properties: ['term.@id',
'key.@id',
'value',
'share',
'date',
'startDate',
'endDate'],
transport: ['term.@id',
'value',
'distance'] },
Site: { measurements: ['term.@id',
'dates',
'startDate',
'endDate',
'measurementDuration',
'depthUpper',
'depthLower',
'method.@id',
'methodDescription',
'methodClassification'],
management: ['term.@id',
'startDate',
'endDate'],
infrastructure: ['term.@id',
'defaultLifespan',
'defaultLifespanHours',
'ownershipStatus'] },
Term: { subClassOf: ['@id'],
defaultProperties: ['term.@id',
'key.@id'] },
Transformation: { inputs: ['term.@id',
'dates',
'startDate',
'endDate',
'fromCycle',
'transport.term.@id',
'operation.@id',
'country.@id',
'region.@id',
'impactAssessment.id'],
emissions: ['term.@id',
'dates',
'startDate',
'endDate',
'depth',
'inputs.@id',
'transport.@id',
'operation.@id'],
products: ['term.@id',
'dates',
'startDate',
'endDate',
'variety',
'fate'],
practices: ['term.@id',
'key.@id',
'dates',
'startDate',
'endDate',
'areaPercent',
'ownershipStatus'] },
Transport: { inputs: ['term.@id',
'dates',
'startDate',
'endDate',
'operation.@id',
'country.@id'],
practices: ['term.@id',
'description',
'key.@id',
'dates',
'startDate',
'endDate',
'areaPercent',
'ownershipStatus'],
emissions: ['term.@id',
'dates',
'startDate',
'endDate',
'depth',
'inputs.@id'] }
};
var JSON = /** @class */ (function () {
function JSON() {
}
return JSON;
}());
exports.JSON = JSON;