Ref
A Ref
is a reference to some entity. When serializing an entity (e.g. a Process
) that references another standalone entity (e.g. a Flow
in an Exchange
) we do not want to write the complete referenced entity into the serialized JSON object but just a reference. However, the reference contains some meta-data like name, category path etc. that are useful to display.
Properties
@type
Inherited from Entity.@type
- Type:
string
(external doc) - Proto-Index: 1
@id
Inherited from RefEntity.@id
- Type:
string
(external doc) - Proto-Index: 2
name
Inherited from RefEntity.name
- Type:
string
(external doc) - Proto-Index: 3
description
Inherited from RefEntity.description
- Type:
string
(external doc) - Proto-Index: 4
category
The category path of the referenced entity, e.g. Elementary flows/Emissions to air/unspecified
.
- Type:
string
(external doc) - Proto-Index: 5
refUnit
This field is valid for references to entities which can have a (reference) unit, like flows, impact categories, or flow properties.
- Type:
string
(external doc) - Proto-Index: 6
location
This field is only valid for references of processes or flows and contains the location name or code of that respective process or flow.
- Type:
string
(external doc) - Proto-Index: 7
flowType
In case of a reference to a flow, this field can contain the type of flow that is referenced.
- Type: FlowType
- Proto-Index: 8
processType
In case of a reference to a process, this fiel can contain the type of process that is referenced.
- Type: ProcessType
- Proto-Index: 9
library
An identifier of a data library. This field should be only used in service APIs (like IPC, REST, gRPC, etc.) and of course only, if the referenced dataset is part of a library. For data references in data packages, the location of the referenced dataset defines if it is part of a library.
- Type:
string
(external doc) - Proto-Index: 10
Python class stub
The snippet below shows the names of the properties of the corresponding Python class of the olca-schema package. Note that this is not the full class definition but just shows the names of the class and its properties.
@dataclass
class Ref:
id: str
category: str
description: str
flow_type: FlowType
library: str
location: str
name: str
process_type: ProcessType
ref_unit: str