@hestia-earth/schema
Version:
Hestia Schema
283 lines (282 loc) • 13.4 kB
TypeScript
import { JSON, JSONLD, NodeType, SchemaType } from './types';
import { Site } from './Site';
import { Source } from './Source';
import { Completeness } from './Completeness';
import { Input } from './Input';
import { Emission } from './Emission';
import { Product } from './Product';
import { Practice } from './Practice';
import { Transformation } from './Transformation';
export declare enum CycleStartDateDefinition {
'harvest of previous crop' = "harvest of previous crop",
'soil preparation date' = "soil preparation date",
'sowing date' = "sowing date",
'start of year' = "start of year",
'stocking date' = "stocking date"
}
export declare enum CycleFunctionalUnit {
'1 ha' = "1 ha",
relative = "relative"
}
/**
* The [Inputs](./Input), [Emissions](./Emission), [Products](./Product), and [Practices](./Practice) created or used during a period. A Cycle also includes a [Completeness] assessment, describing how complete the Inputs and Products data are, and [Transformations](./Transformation), which allow Products to be transformed into new Products in the same Cycle. A Cycle occurs on a [Site].
*/
export declare class Cycle extends JSON<SchemaType.Cycle> {
/**
* An automatically generated name for the Cycle composed of: primary product name, "-", site.region "," site.country, "-", endDate, "-", treatment and/or description.
*/
name?: string;
/**
* A description of the Cycle, including information that cannot be captured with other fields.
*/
description?: string;
/**
* A description of the treatment administered by researchers to the experimental unit. E.g., a Site is divided into four and each part is 'treated' with a different fertiliser type to see which produces the most maize [(Easton & McColl (1997))](http://www.stat.yale.edu/Courses/1997-98/101/expdes.htm). Use the [numberOfReplications](#numberOfReplications) field to specify the number of replicates for each treatment.
*/
treatment?: string;
/**
* A reference to the [Site] describing the primary location where this Cycle occurred.
*/
site?: Site;
/**
* If the Cycle occurred on multiple [Sites](./Site), a list of the other Sites.
*/
otherSites?: Site[];
/**
* The duration on the [primary site](#site) in days. For a single Site, this is equal to [cycleDuration](#cycleDuration).
*/
siteDuration?: number;
/**
* If a Cycle occurs on multiple [Sites](./Site), a corresponding array to [otherSites](#otherSites) representing the number of days on each Site.
*/
otherSitesDuration?: (number)[];
/**
* For crops, the area harvested in hectares. Area harvested is the same as [area under cultivation](./Site#area) if the entire cultivated area is harvested, but less if crops fail or are not harvested for economic or other reasons.
*/
harvestedArea?: number;
/**
* The default [Source] for all data in the Cycle which can be overridden by specifying a source for each blank node. Required for all public uploads ([dataPrivate](#dataPrivate) = `false`).
*/
defaultSource?: Source;
/**
* The end date or year of the Cycle in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD, YYYY-MM, or YYYY). If startDate is specified to month or day precision, endDate should be too. For crops, endDate is always the harvest date. For continually harvested crops, it should be the end of the year.
*/
endDate?: string;
/**
* The start date of the Cycle in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD, YYYY-MM, or YYYY). Use the [startDateDefinition](#startDateDefinition) field to define what this represents. For consistency with FAOSTAT, this should ideally be the date of harvest of the previous crop (a fallow period of greater than a year but less than five years is counted as a crop). However other start dates can be specified, such as the sowing date or soil preparation date. For continually harvested crops it should be the start of the year.
*/
startDate?: string;
/**
* A definition of what the start date is. This is a required field if [startDate](#startDate) is provided.
*/
startDateDefinition?: CycleStartDateDefinition;
/**
* The duration of the Cycle in days. Calculated from [startDate](#startDate) and [endDate](#endDate) if provided.
*/
cycleDuration?: number;
/**
* The units that the [inputs](#inputs), [emissions](#emissions), [products](#products), and [transformations](#transformations) are expressed 'per'. Can either be: '1 ha' (one hectare) or 'relative' (meaning that the quantities of Inputs and Emissions correspond to the quantities of Products). For agricultural land, the functional unit can only be '1 ha'.
*/
functionalUnit?: CycleFunctionalUnit;
/**
* Further information on the functional unit (e.g. 'one batch').
*/
functionalUnitDetails?: string;
/**
* If data on multiple Cycles are aggregated and represented as a single Cycle, the number of Cycles. For example, Cycles occurred on the same site in multiple growing seasons might be represented as a single Cycle with standard deviations across Cycles.
*/
numberOfCycles?: number;
/**
* In experimental studies, the number of replicates for the [treatment](#treatment).
*/
numberOfReplications?: number;
/**
* A specification of how complete the [Inputs](./Input) and [Products](./Product) data are. If an area of activity data is marked as complete, then the associated Inputs and Products represent a complete description of the Cycle.
*/
dataCompleteness?: Completeness;
/**
* The Inputs used.
*/
inputs?: Input[];
/**
* The Emissions created.
*/
emissions?: Emission[];
/**
* The Products created.
*/
products?: Product[];
/**
* The Practices used.
*/
practices?: Practice[];
/**
* The Transformations applied to [products](#products) generated from this Cycle.
*/
transformations?: Transformation[];
/**
* The identifier for these data in the source database (e.g. if the data were converted from openLCA or ecoinvent, the id field from that database).
*/
originalId?: string;
/**
* The version of the schema when these data were created.
*/
schemaVersion?: string;
/**
* A list of fields that have been added to the original dataset.
*/
added?: (string)[];
/**
* A list of versions of the model used to add these fields.
*/
addedVersion?: (string)[];
/**
* A list of fields that have been updated on the original dataset.
*/
updated?: (string)[];
/**
* A list of versions of the model used to update these fields.
*/
updatedVersion?: (string)[];
/**
* If this Cycle has been 'aggregated' using data from multiple [Cycles](./Cycle).
*/
aggregated?: boolean;
/**
* A version of the aggregation engine corresponding to this Cycle.
*/
aggregatedVersion?: string;
/**
* If these data are private.
*/
dataPrivate?: boolean;
}
/**
* The [Inputs](./Input), [Emissions](./Emission), [Products](./Product), and [Practices](./Practice) created or used during a period. A Cycle also includes a [Completeness] assessment, describing how complete the Inputs and Products data are, and [Transformations](./Transformation), which allow Products to be transformed into new Products in the same Cycle. A Cycle occurs on a [Site].
*/
export interface ICycleJSONLD extends JSONLD<NodeType.Cycle> {
/**
* A description of the Cycle, including information that cannot be captured with other fields.
*/
description?: string;
/**
* A description of the treatment administered by researchers to the experimental unit. E.g., a Site is divided into four and each part is 'treated' with a different fertiliser type to see which produces the most maize [(Easton & McColl (1997))](http://www.stat.yale.edu/Courses/1997-98/101/expdes.htm). Use the [numberOfReplications](#numberOfReplications) field to specify the number of replicates for each treatment.
*/
treatment?: string;
/**
* A reference to the [Site] describing the primary location where this Cycle occurred.
*/
site?: Site;
/**
* If the Cycle occurred on multiple [Sites](./Site), a list of the other Sites.
*/
otherSites?: Site[];
/**
* The duration on the [primary site](#site) in days. For a single Site, this is equal to [cycleDuration](#cycleDuration).
*/
siteDuration?: number;
/**
* If a Cycle occurs on multiple [Sites](./Site), a corresponding array to [otherSites](#otherSites) representing the number of days on each Site.
*/
otherSitesDuration?: (number)[];
/**
* For crops, the area harvested in hectares. Area harvested is the same as [area under cultivation](./Site#area) if the entire cultivated area is harvested, but less if crops fail or are not harvested for economic or other reasons.
*/
harvestedArea?: number;
/**
* The default [Source] for all data in the Cycle which can be overridden by specifying a source for each blank node. Required for all public uploads ([dataPrivate](#dataPrivate) = `false`).
*/
defaultSource?: Source;
/**
* The end date or year of the Cycle in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD, YYYY-MM, or YYYY). If startDate is specified to month or day precision, endDate should be too. For crops, endDate is always the harvest date. For continually harvested crops, it should be the end of the year.
*/
endDate?: string;
/**
* The start date of the Cycle in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD, YYYY-MM, or YYYY). Use the [startDateDefinition](#startDateDefinition) field to define what this represents. For consistency with FAOSTAT, this should ideally be the date of harvest of the previous crop (a fallow period of greater than a year but less than five years is counted as a crop). However other start dates can be specified, such as the sowing date or soil preparation date. For continually harvested crops it should be the start of the year.
*/
startDate?: string;
/**
* A definition of what the start date is. This is a required field if [startDate](#startDate) is provided.
*/
startDateDefinition?: CycleStartDateDefinition;
/**
* The duration of the Cycle in days. Calculated from [startDate](#startDate) and [endDate](#endDate) if provided.
*/
cycleDuration?: number;
/**
* The units that the [inputs](#inputs), [emissions](#emissions), [products](#products), and [transformations](#transformations) are expressed 'per'. Can either be: '1 ha' (one hectare) or 'relative' (meaning that the quantities of Inputs and Emissions correspond to the quantities of Products). For agricultural land, the functional unit can only be '1 ha'.
*/
functionalUnit?: CycleFunctionalUnit;
/**
* Further information on the functional unit (e.g. 'one batch').
*/
functionalUnitDetails?: string;
/**
* If data on multiple Cycles are aggregated and represented as a single Cycle, the number of Cycles. For example, Cycles occurred on the same site in multiple growing seasons might be represented as a single Cycle with standard deviations across Cycles.
*/
numberOfCycles?: number;
/**
* In experimental studies, the number of replicates for the [treatment](#treatment).
*/
numberOfReplications?: number;
/**
* A specification of how complete the [Inputs](./Input) and [Products](./Product) data are. If an area of activity data is marked as complete, then the associated Inputs and Products represent a complete description of the Cycle.
*/
dataCompleteness?: Completeness;
/**
* The Inputs used.
*/
inputs?: Input[];
/**
* The Emissions created.
*/
emissions?: Emission[];
/**
* The Products created.
*/
products?: Product[];
/**
* The Practices used.
*/
practices?: Practice[];
/**
* The Transformations applied to [products](#products) generated from this Cycle.
*/
transformations?: Transformation[];
/**
* The identifier for these data in the source database (e.g. if the data were converted from openLCA or ecoinvent, the id field from that database).
*/
originalId?: string;
/**
* The version of the schema when these data were created.
*/
schemaVersion?: string;
/**
* A list of fields that have been added to the original dataset.
*/
added?: (string)[];
/**
* A list of versions of the model used to add these fields.
*/
addedVersion?: (string)[];
/**
* A list of fields that have been updated on the original dataset.
*/
updated?: (string)[];
/**
* A list of versions of the model used to update these fields.
*/
updatedVersion?: (string)[];
/**
* If this Cycle has been 'aggregated' using data from multiple [Cycles](./Cycle).
*/
aggregated?: boolean;
/**
* A version of the aggregation engine corresponding to this Cycle.
*/
aggregatedVersion?: string;
/**
* If these data are private.
*/
dataPrivate?: boolean;
}