Documentation
¶
Overview ¶
Package golcas provides a Go implementation of the olca-schema definition (http://greendelta.github.io/olca-schema).
Index ¶
- Constants
- func FindUUID(path string) string
- func IsActorPath(path string) bool
- func IsCategoryPath(path string) bool
- func IsCurrencyPath(path string) bool
- func IsFlowPath(path string) bool
- func IsFlowPropertyPath(path string) bool
- func IsImpactCategoryPath(path string) bool
- func IsImpactMethodPath(path string) bool
- func IsLocationPath(path string) bool
- func IsNwSetPath(path string) bool
- func IsParameterPath(path string) bool
- func IsProcessPath(path string) bool
- func IsProductSystemPath(path string) bool
- func IsProjectPath(path string) bool
- func IsSocialIndicatorPath(path string) bool
- func IsSourcePath(path string) bool
- func IsUnitGroupPath(path string) bool
- type Actor
- type AllocationFactor
- type AllocationType
- type CategorizedEntity
- type Category
- type Entity
- type Exchange
- type Flow
- type FlowProperty
- type FlowPropertyFactor
- type FlowPropertyType
- type FlowRef
- type FlowType
- type ImpactCategory
- type ImpactFactor
- type ImpactMethod
- type Location
- type ModelType
- type PackReader
- func (r *PackReader) Close() error
- func (r *PackReader) EachActor(fn func(*Actor) bool) error
- func (r *PackReader) EachCategory(fn func(*Category) bool) error
- func (r *PackReader) EachFile(fn func(f *ZipFile) bool)
- func (r *PackReader) EachFlow(fn func(*Flow) bool) error
- func (r *PackReader) EachFlowProperty(fn func(*FlowProperty) bool) error
- func (r *PackReader) EachImpactCategory(fn func(*ImpactCategory) bool) error
- func (r *PackReader) EachImpactMethod(fn func(*ImpactMethod) bool) error
- func (r *PackReader) EachLocation(fn func(*Location) bool) error
- func (r *PackReader) EachParameter(fn func(*Parameter) bool) error
- func (r *PackReader) EachProcess(fn func(*Process) bool) error
- func (r *PackReader) EachSocialIndicator(fn func(*SocialIndicator) bool) error
- func (r *PackReader) EachSource(fn func(*Source) bool) error
- func (r *PackReader) EachUnitGroup(fn func(*UnitGroup) bool) error
- func (r *PackReader) GetActor(id string) (*Actor, error)
- type PackWriter
- func (w *PackWriter) Close() error
- func (w *PackWriter) Put(path string, bytes []byte) error
- func (w *PackWriter) PutActor(a *Actor) error
- func (w *PackWriter) PutCategory(c *Category) error
- func (w *PackWriter) PutFlow(f *Flow) error
- func (w *PackWriter) PutFlowProperty(fp *FlowProperty) error
- func (w *PackWriter) PutImpactCategory(ic *ImpactCategory) error
- func (w *PackWriter) PutImpactMethod(im *ImpactMethod) error
- func (w *PackWriter) PutProcess(p *Process) error
- func (w *PackWriter) PutSocialIndicator(si *SocialIndicator) error
- func (w *PackWriter) PutSource(s *Source) error
- func (w *PackWriter) PutUnitGroup(ug *UnitGroup) error
- type Parameter
- type ParameterScope
- type Process
- type ProcessDocumentation
- type ProcessType
- type Ref
- type RiskLevel
- type RootEntity
- type SocialAspect
- type SocialIndicator
- type Source
- type Uncertainty
- type UncertaintyType
- type Unit
- type UnitGroup
- type ZipFile
- func (f *ZipFile) Path() string
- func (f *ZipFile) Read() ([]byte, error)
- func (f *ZipFile) ReadActor() (*Actor, error)
- func (f *ZipFile) ReadCategory() (*Category, error)
- func (f *ZipFile) ReadFlow() (*Flow, error)
- func (f *ZipFile) ReadFlowProperty() (*FlowProperty, error)
- func (f *ZipFile) ReadImpactCategory() (*ImpactCategory, error)
- func (f *ZipFile) ReadImpactMethod() (*ImpactMethod, error)
- func (f *ZipFile) ReadLocation() (*Location, error)
- func (f *ZipFile) ReadParameter() (*Parameter, error)
- func (f *ZipFile) ReadProcess() (*Process, error)
- func (f *ZipFile) ReadSocialIndicator() (*SocialIndicator, error)
- func (f *ZipFile) ReadSource() (*Source, error)
- func (f *ZipFile) ReadUnitGroup() (*UnitGroup, error)
Constants ¶
const ContextURL = "http://greendelta.github.io/olca-schema/context.jsonld"
ContextURL is the URL to the olca-schema definition
Variables ¶
This section is empty.
Functions ¶
func FindUUID ¶
FindUUID returns the UUID from the given path or an empty string if it cannot find it.
func IsActorPath ¶
IsActorPath returns true if the given path describes a JSON file in the folder where data sets of type `Actor` are stored.
func IsCategoryPath ¶
IsCategoryPath returns true if the given path describes a JSON file in the folder where data sets of type `Category` are stored.
func IsCurrencyPath ¶
IsCurrencyPath returns true if the given path describes a JSON file in the folder where data sets of type `Currency` are stored.
func IsFlowPath ¶
IsFlowPath returns true if the given path describes a JSON file in the folder where data sets of type `Flow` are stored.
func IsFlowPropertyPath ¶
IsFlowPropertyPath returns true if the given path describes a JSON file in the folder where data sets of type `FlowProperty` are stored.
func IsImpactCategoryPath ¶
IsImpactCategoryPath returns true if the given path describes a JSON file in the folder where data sets of type `ImpactCategory` are stored.
func IsImpactMethodPath ¶
IsImpactMethodPath returns true if the given path describes a JSON file in the folder where data sets of type `ImpactMethod` are stored.
func IsLocationPath ¶
IsLocationPath returns true if the given path describes a JSON file in the folder where data sets of type `Location` are stored.
func IsNwSetPath ¶
IsNwSetPath returns true if the given path describes a JSON file in the folder where data sets of type `NwSet` are stored.
func IsParameterPath ¶
IsParameterPath returns true if the given path describes a JSON file in the folder where data sets of type `Parameter` are stored.
func IsProcessPath ¶
IsProcessPath returns true if the given path describes a JSON file in the folder where data sets of type `Process` are stored.
func IsProductSystemPath ¶
IsProductSystemPath returns true if the given path describes a JSON file in the folder where data sets of type `ProductSystem` are stored.
func IsProjectPath ¶
IsProjectPath returns true if the given path describes a JSON file in the folder where data sets of type `Project` are stored.
func IsSocialIndicatorPath ¶
IsSocialIndicatorPath returns true if the given path describes a JSON file in the folder where data sets of type `SocialIndicator` are stored.
func IsSourcePath ¶
IsSourcePath returns true if the given path describes a JSON file in the folder where data sets of type `Source` are stored.
func IsUnitGroupPath ¶
IsUnitGroupPath returns true if the given path describes a JSON file in the folder where data sets of type `UnitGroup` are stored.
Types ¶
type Actor ¶
type Actor struct { CategorizedEntity Address string `json:"address,omitempty"` City string `json:"city,omitempty"` Country string `json:"country,omitempty"` Email string `json:"email,omitempty"` Telefax string `json:"telefax,omitempty"` Telephone string `json:"telephone,omitempty"` Website string `json:"website,omitempty"` ZipCode string `json:"zipCode,omitempty"` }
Actor http://greendelta.github.io/olca-schema/html/Actor.html
type AllocationFactor ¶
type AllocationFactor struct { Entity ProductExchange *Entity `json:"productExchange,omitempty"` Type AllocationType `json:"allocationType,omitempty"` Value float64 `json:"value"` AllocatedExchange *Entity `json:"allocatedExchange,omitempty"` }
AllocationFactor http://greendelta.github.io/olca-schema/html/AllocationFactor.html
type AllocationType ¶
type AllocationType string
AllocationType enumeration
const ( PhysicalAllocation AllocationType = "PHYSICAL_ALLOCATION" EconomicAllocation AllocationType = "ECONOMIC_ALLOCATION" CausalAllocation AllocationType = "CAUSAL_ALLOCATION" )
Enum constants of AllocationType
type CategorizedEntity ¶
type CategorizedEntity struct { RootEntity Category *Ref `json:"category,omitempty"` }
CategorizedEntity http://greendelta.github.io/olca-schema/html/CategorizedEntity.html
type Category ¶
type Category struct { CategorizedEntity ModelType ModelType `json:"modelType,omitempty"` }
Category http://greendelta.github.io/olca-schema/html/Category.html
func NewCategory ¶
NewCategory initializes a new category with the given ID and name.
func ReadCategory ¶
ReadCategory converts the given bytes into a Category
type Entity ¶
type Entity struct { Context string `json:"@context,omitempty"` ID string `json:"@id,omitempty"` Type string `json:"@type,omitempty"` }
Entity http://greendelta.github.io/olca-schema/html/Entity.html
type Exchange ¶
type Exchange struct { Entity InternalID int `json:"internalId"` IsAvoidedProduct bool `json:"avoidedProduct"` Flow *FlowRef `json:"flow,omitempty"` FlowProperty *Ref `json:"flowProperty,omitempty"` IsInput bool `json:"input"` IsQuantitativeReference bool `json:"quantitativeReference"` BaseUncertainty float64 `json:"baseUncertainty"` Provider *Ref `json:"provider,omitempty"` // TODO: ProcessRef Amount float64 `json:"amount"` AmountFormula string `json:"amountFormula,omitempty"` Unit *Ref `json:"unit,omitempty"` PedigreeUncertainty string `json:"pedigreeUncertainty,omitempty"` Uncertainty *Uncertainty `json:"uncertainty,omitempty"` Comment string `json:"comment,omitempty"` }
Exchange http://greendelta.github.io/olca-schema/html/Exchange.html
type Flow ¶
type Flow struct { CategorizedEntity Type FlowType `json:"flowType,omitempty"` Cas string `json:"cas,omitempty"` Formula string `json:"formula,omitempty"` FlowProperties []FlowPropertyFactor `json:"flowProperties,omitempty"` Location *Ref `json:"location,omitempty"` }
type FlowProperty ¶
type FlowProperty struct { CategorizedEntity Type FlowPropertyType `json:"flowPropertyType,omitempty"` UnitGroup *Ref `json:"unitGroup,omitempty"` }
FlowProperty http://greendelta.github.io/olca-schema/html/FlowProperty.html
func NewFlowProperty ¶
func NewFlowProperty(id, name string) *FlowProperty
NewFlowProperty initializes a new FlowProperty with the given id and name
func ReadFlowProperty ¶
func ReadFlowProperty(data []byte) (*FlowProperty, error)
ReadFlowProperty converts the given bytes into a FlowProperty
type FlowPropertyFactor ¶
type FlowPropertyFactor struct { Entity FlowProperty *Ref `json:"flowProperty,omitempty"` ConversionFactor float64 `json:"conversionFactor"` IsReferenceFlowProperty bool `json:"referenceFlowProperty"` }
FlowPropertyFactor http://greendelta.github.io/olca-schema/html/FlowPropertyFactor.html
type FlowPropertyType ¶
type FlowPropertyType string
FlowPropertyType enumeration
const ( EconomicQuantity FlowPropertyType = "ECONOMIC_QUANTITY" PhysicalQuantity FlowPropertyType = "PHYSICAL_QUANTITY" )
Enum constants of FlowPropertyType
type FlowRef ¶
type FlowRef struct { Ref RefUnit string `json:"refUnit,omitempty"` Location string `json:"location,omitempty"` FlowType FlowType `json:"flowType,omitempty"` }
FlowRef http://greendelta.github.io/olca-schema/html/FlowRef.html
type ImpactCategory ¶
type ImpactCategory struct { RootEntity ReferenceUnit string `json:"referenceUnitName,omitempty"` ImpactFactors []ImpactFactor `json:"impactFactors,omitempty"` }
ImpactCategory http://greendelta.github.io/olca-schema/html/ImpactCategory.html
func NewImpactCategory ¶
func NewImpactCategory(id, name string) *ImpactCategory
NewImpactCategory initializes a new ImpactCategory with the given id and name
func ReadImpactCategory ¶
func ReadImpactCategory(data []byte) (*ImpactCategory, error)
ReadImpactCategory converts the given bytes into a ImpactCategory
type ImpactFactor ¶
type ImpactFactor struct { Entity Flow *FlowRef `json:"flow,omitempty"` FlowProperty *Ref `json:"flowProperty,omitempty"` Unit *Ref `json:"unit,omitempty"` Value float64 `json:"value"` Formula string `json:"formula,omitempty"` Uncertainty *Uncertainty `json:"uncertainty,omitempty"` }
ImpactFactor http://greendelta.github.io/olca-schema/html/ImpactFactor.html
type ImpactMethod ¶
type ImpactMethod struct { CategorizedEntity ImpactCategories []Ref `json:"impactCategories,omitempty"` Parameters []Ref `json:"parameters,omitempty"` }
ImpactMethod http://greendelta.github.io/olca-schema/html/ImpactMethod.html
func NewImpactMethod ¶
func NewImpactMethod(id, name string) *ImpactMethod
NewImpactMethod initializes a new ImpactMethod with the given id and name
func ReadImpactMethod ¶
func ReadImpactMethod(data []byte) (*ImpactMethod, error)
ReadImpactMethod converts the given bytes into a ImpactMethod
type Location ¶
type Location struct { RootEntity Code string `json:"code,omitempty"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Kml string `json:"kml,omitempty"` }
Location http://greendelta.github.io/olca-schema/html/Location.html
func NewLocation ¶
NewLocation initializes a new Location with the given id and name
func ReadLocation ¶
ReadLocation converts the given bytes into a Location
type ModelType ¶
type ModelType string
ModelType enumeration
const ( ProjectModel ModelType = "PROJECT" ImpactMethodModel ModelType = "IMPACT_METHOD" ImpactCategoryModel ModelType = "IMPACT_CATEGORY" ProductSystemModel ModelType = "PRODUCT_SYSTEM" ProcessModel ModelType = "PROCESS" FlowModel ModelType = "FLOW" FlowPropertyModel ModelType = "FLOW_PROPERTY" UnitGroupModel ModelType = "UNIT_GROUP" UnitModel ModelType = "UNIT" ActorModel ModelType = "ACTOR" SourceModel ModelType = "SOURCE" CategoryModel ModelType = "CATEGORY" LocationModel ModelType = "LOCATION" NwSetModel ModelType = "NW_SET" SocialIndicatorModel ModelType = "SOCIAL_INDICATOR" )
Enum constants of ModelType
type PackReader ¶
type PackReader struct {
// contains filtered or unexported fields
}
PackReader reads data sets from a zip file in the olca-schema package format.
func NewPackReader ¶
func NewPackReader(filePath string) (*PackReader, error)
NewPackReader creates a new PackReader
func (*PackReader) EachActor ¶
func (r *PackReader) EachActor(fn func(*Actor) bool) error
EachActor iterates over each `Actor` data set in the package unless the given handler returns false.
func (*PackReader) EachCategory ¶
func (r *PackReader) EachCategory(fn func(*Category) bool) error
EachCategory iterates over each `Category` data set in the package unless the given handler returns false.
func (*PackReader) EachFile ¶
func (r *PackReader) EachFile(fn func(f *ZipFile) bool)
EachFile calls the given function for each file in the zip package. It stops when the function returns false or when there are no more files in the package.
func (*PackReader) EachFlow ¶
func (r *PackReader) EachFlow(fn func(*Flow) bool) error
EachFlow iterates over each `Flow` data set in the package unless the given handler returns false.
func (*PackReader) EachFlowProperty ¶
func (r *PackReader) EachFlowProperty(fn func(*FlowProperty) bool) error
EachFlowProperty iterates over each `FlowProperty` data set in the package unless the given handler returns false.
func (*PackReader) EachImpactCategory ¶
func (r *PackReader) EachImpactCategory(fn func(*ImpactCategory) bool) error
EachImpactCategory iterates over each `ImpactCategory` data set in the package unless the given handler returns false.
func (*PackReader) EachImpactMethod ¶
func (r *PackReader) EachImpactMethod(fn func(*ImpactMethod) bool) error
EachImpactMethod iterates over each `ImpactMethod` data set in the package unless the given handler returns false.
func (*PackReader) EachLocation ¶
func (r *PackReader) EachLocation(fn func(*Location) bool) error
EachLocation iterates over each `Location` data set in the package unless the given handler returns false.
func (*PackReader) EachParameter ¶
func (r *PackReader) EachParameter(fn func(*Parameter) bool) error
EachParameter iterates over each `Parameter` data set in the package unless the given handler returns false.
func (*PackReader) EachProcess ¶
func (r *PackReader) EachProcess(fn func(*Process) bool) error
EachProcess iterates over each `Process` data set in the package unless the given handler returns false.
func (*PackReader) EachSocialIndicator ¶
func (r *PackReader) EachSocialIndicator(fn func(*SocialIndicator) bool) error
EachSocialIndicator iterates over each `SocialIndicator` data set in the package unless the given handler returns false.
func (*PackReader) EachSource ¶
func (r *PackReader) EachSource(fn func(*Source) bool) error
EachSource iterates over each `Source` data set in the package unless the given handler returns false.
func (*PackReader) EachUnitGroup ¶
func (r *PackReader) EachUnitGroup(fn func(*UnitGroup) bool) error
EachUnitGroup iterates over each `UnitGroup` data set in the package unless the given handler returns false.
type PackWriter ¶
type PackWriter struct {
// contains filtered or unexported fields
}
PackWriter writes data sets to a zip file in the olca-schema package format.
func NewPackWriter ¶
func NewPackWriter(filePath string) (*PackWriter, error)
NewPackWriter creates a new PackWriter
func (*PackWriter) Put ¶
func (w *PackWriter) Put(path string, bytes []byte) error
Put writes the given bytes to the given path
func (*PackWriter) PutActor ¶
func (w *PackWriter) PutActor(a *Actor) error
PutActor writes the given actor to the package
func (*PackWriter) PutCategory ¶
func (w *PackWriter) PutCategory(c *Category) error
PutCategory writes the given category to the package
func (*PackWriter) PutFlow ¶
func (w *PackWriter) PutFlow(f *Flow) error
PutFlow writes the given flow to the package
func (*PackWriter) PutFlowProperty ¶
func (w *PackWriter) PutFlowProperty(fp *FlowProperty) error
PutFlowProperty writes the given flow property to the package
func (*PackWriter) PutImpactCategory ¶
func (w *PackWriter) PutImpactCategory(ic *ImpactCategory) error
PutImpactCategory writes the given LCIA category to the package
func (*PackWriter) PutImpactMethod ¶
func (w *PackWriter) PutImpactMethod(im *ImpactMethod) error
PutImpactMethod writes the given LCIA method to the package
func (*PackWriter) PutProcess ¶
func (w *PackWriter) PutProcess(p *Process) error
PutProcess writes the given process to the package
func (*PackWriter) PutSocialIndicator ¶
func (w *PackWriter) PutSocialIndicator(si *SocialIndicator) error
PutSocialIndicator writes the given social indicator to the package
func (*PackWriter) PutSource ¶
func (w *PackWriter) PutSource(s *Source) error
PutSource writes the given source to the package
func (*PackWriter) PutUnitGroup ¶
func (w *PackWriter) PutUnitGroup(ug *UnitGroup) error
PutUnitGroup writes the given unit group to the package
type Parameter ¶
type Parameter struct { Entity Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Scope ParameterScope `json:"parameterScope,omitempty"` IsInputParameter bool `json:"inputParameter"` Value float64 `json:"value"` Formula string `json:"formula,omitempty"` ExternalSource string `json:"externalSource,omitempty"` SourceType string `json:"sourceType,omitempty"` Uncertainty *Uncertainty `json:"uncertainty,omitempty"` }
Parameter http://greendelta.github.io/olca-schema/html/Parameter.html
func ReadParameter ¶
ReadParameter converts the given bytes into a Parameter
type ParameterScope ¶
type ParameterScope string
ParameterScope enumeration
const ( ProcessScope ParameterScope = "PROCESS_SCOPE" LCIAMethodScope ParameterScope = "LCIA_METHOD_SCOPE" GlobalScope ParameterScope = "GLOBAL_SCOPE" )
Enum constants of ParameterScope
type Process ¶
type Process struct { CategorizedEntity DefaultAllocationMethod AllocationType `json:"defaultAllocationMethod,omitempty"` AllocationFactors []AllocationFactor `json:"allocationFactors,omitempty"` Exchanges []Exchange `json:"exchanges,omitempty"` Location *Ref `json:"location,omitempty"` Parameters []Ref `json:"parameters,omitempty"` ProcessDocumentation ProcessDocumentation `json:"processDocumentation"` Type ProcessType `json:"processType,omitempty"` SocialAspects []SocialAspect `json:"socialAspects,omitempty"` }
Process http://greendelta.github.io/olca-schema/html/Process.html
func NewProcess ¶
NewProcess initializes a new Process with the given id and name
func ReadProcess ¶
ReadProcess converts the given bytes into a Process
func (*Process) QuantitativeReference ¶
QuantitativeReference reteruns the Exchange that is the quantitative reference of the process.
type ProcessDocumentation ¶
type ProcessDocumentation struct { Entity TimeDescription string `json:"timeDescription,omitempty"` ValidUntil string `json:"validUntil,omitempty"` ValidFrom string `json:"validFrom,omitempty"` TechnologyDescription string `json:"technologyDescription,omitempty"` DataCollectionDescription string `json:"dataCollectionDescription,omitempty"` CompletenessDescription string `json:"completenessDescription,omitempty"` DataSelectionDescription string `json:"dataSelectionDescription,omitempty"` ReviewDetails string `json:"reviewDetails,omitempty"` DataTreatmentDescription string `json:"dataTreatmentDescription,omitempty"` InventoryMethodDescription string `json:"inventoryMethodDescription,omitempty"` ModelingConstantsDescription string `json:"modelingConstantsDescription,omitempty"` Reviewer *Ref `json:"reviewer,omitempty"` SamplingDescription string `json:"samplingDescription,omitempty"` Sources []Ref `json:"sources,omitempty"` RestrictionsDescription string `json:"restrictionsDescription,omitempty"` HasCopyright bool `json:"copyright"` CreationDate string `json:"creationDate,omitempty"` DataDocumentor *Ref `json:"dataDocumentor,omitempty"` DataGenerator *Ref `json:"dataGenerator,omitempty"` DataSetOwner *Ref `json:"dataSetOwner,omitempty"` IntendedApplication string `json:"intendedApplication,omitempty"` ProjectDescription string `json:"projectDescription,omitempty"` Publication *Ref `json:"publication,omitempty"` GeographyDescription string `json:"geographyDescription,omitempty"` }
ProcessDocumentation http://greendelta.github.io/olca-schema/html/ProcessDocumentation.html
type ProcessType ¶
type ProcessType string
ProcessType enumeration
const ( LCIResult ProcessType = "LCI_RESULT" UnitProcess ProcessType = "UNIT_PROCESS" )
Enum constants of ProcessType
type Ref ¶
type Ref struct { RootEntity CategoryPath []string `json:"categoryPath,omitempty"` }
Ref http://greendelta.github.io/olca-schema/html/Ref.html
func NewReference ¶
NewReference creates a RootEntity with the given id, type, and name. This function can be used for creating references to root entities.
type RiskLevel ¶
type RiskLevel string
RiskLevel enumeration
const ( HighOpportunity RiskLevel = "HIGH_OPPORTUNITY" MediumOpportunity RiskLevel = "MEDIUM_OPPORTUNITY" LowOpportunity RiskLevel = "LOW_OPPORTUNITY" NoRisk RiskLevel = "NO_RISK" VeryLowRisk RiskLevel = "VERY_LOW_RISK" LowRisk RiskLevel = "LOW_RISK" MediumRisk RiskLevel = "MEDIUM_RISK" HighRisk RiskLevel = "HIGH_RISK" VeryHighRisk RiskLevel = "VERY_HIGH_RISK" NoData RiskLevel = "NO_DATA" NotApplicable RiskLevel = "NOT_APPLICABLE" )
Enum constants of RiskLevel
type RootEntity ¶
type RootEntity struct { Entity Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Version string `json:"version,omitempty"` LastChange string `json:"lastChange,omitempty"` }
RootEntity http://greendelta.github.io/olca-schema/html/RootEntity.html
type SocialAspect ¶
type SocialAspect struct { Entity Indicator *Ref `json:"socialIndicator,omitempty"` ActivityValue float64 `json:"activityValue"` RawAmount string `json:"rawAmount,omitempty"` RiskLevel RiskLevel `json:"riskLevel,omitempty"` Comment string `json:"comment,omitempty"` Source *Ref `json:"source,omitempty"` Quality string `json:"quality,omitempty"` }
SocialAspect http://greendelta.github.io/olca-schema/html/SocialAspect.html
type SocialIndicator ¶
type SocialIndicator struct { CategorizedEntity ActivityVariable string `json:"activityVariable,omitempty"` ActivityQuantity *Ref `json:"activityQuantity,omitempty"` ActivityUnit *Ref `json:"activityUnit,omitempty"` UnitOfMeasurement string `json:"unitOfMeasurement,omitempty"` EvaluationScheme string `json:"evaluationScheme,omitempty"` }
SocialIndicator http://greendelta.github.io/olca-schema/html/SocialIndicator.html
func NewSocialIndicator ¶
func NewSocialIndicator(id, name string) *SocialIndicator
NewSocialIndicator initializes a new SocialIndicator with the given id and name
func ReadSocialIndicator ¶
func ReadSocialIndicator(data []byte) (*SocialIndicator, error)
ReadSocialIndicator converts the given bytes into a SocialIndicator
type Source ¶
type Source struct { CategorizedEntity Doi string `json:"doi,omitempty"` TextReference string `json:"textReference,omitempty"` Year int `json:"year,omitempty"` ExternalFile string `json:"externalFile,omitempty"` }
Source http://greendelta.github.io/olca-schema/html/Source.html
func ReadSource ¶
ReadSource converts the given bytes into a Source
type Uncertainty ¶
type Uncertainty struct { Entity Type UncertaintyType `json:"distributionType,omitempty"` Mean *float64 `json:"mean,omitempty"` MeanFormula string `json:"meanFormula,omitempty"` GeomMean *float64 `json:"geomMean,omitempty"` GeomMeanFormula string `json:"geomMeanFormula,omitempty"` Minimum *float64 `json:"minimum,omitempty"` MinimumFormula string `json:"minimumFormula,omitempty"` Sd *float64 `json:"sd,omitempty"` SdFormula string `json:"sdFormula,omitempty"` GeomSd *float64 `json:"geomSd,omitempty"` GeomSdFormula string `json:"geomSdFormula,omitempty"` Mode *float64 `json:"mode,omitempty"` ModeFormula string `json:"modeFormula,omitempty"` Maximum *float64 `json:"maximum,omitempty"` MaximumFormula string `json:"maximumFormula,omitempty"` }
Uncertainty http://greendelta.github.io/olca-schema/html/Uncertainty.html
type UncertaintyType ¶
type UncertaintyType string
UncertaintyType enumeration
const ( LogNormalDistribution UncertaintyType = "LOG_NORMAL_DISTRIBUTION" NormalDistribution UncertaintyType = "NORMAL_DISTRIBUTION" TriangleDistribution UncertaintyType = "TRIANGLE_DISTRIBUTION" UniformDistribution UncertaintyType = "UNIFORM_DISTRIBUTION" )
Enum constants of UncertaintyType
type Unit ¶
type Unit struct { RootEntity ConversionFactor float64 `json:"conversionFactor"` IsReferenceUnit bool `json:"referenceUnit"` Synonyms []string `json:"synonyms,omitempty"` }
type UnitGroup ¶
type UnitGroup struct { CategorizedEntity DefaultFlowProperty *Ref `json:"defaultFlowProperty,omitempty"` Units []Unit `json:"units,omitempty"` }
UnitGroup http://greendelta.github.io/olca-schema/html/UnitGroup.html
func NewUnitGroup ¶
NewUnitGroup initializes a new UnitGroup with the given id and name
func ReadUnitGroup ¶
ReadUnitGroup converts the given bytes into a UnitGroup
type ZipFile ¶
type ZipFile struct {
// contains filtered or unexported fields
}
ZipFile embedds the type `File` from the `archive/zip` package and provides additional ILCD specific methods.
func (*ZipFile) ReadCategory ¶
ReadCategory reads a Category from the zip file
func (*ZipFile) ReadFlowProperty ¶
func (f *ZipFile) ReadFlowProperty() (*FlowProperty, error)
ReadFlowProperty reads a FlowProperty from the zip file
func (*ZipFile) ReadImpactCategory ¶
func (f *ZipFile) ReadImpactCategory() (*ImpactCategory, error)
ReadImpactCategory reads a ImpactCategory from the zip file
func (*ZipFile) ReadImpactMethod ¶
func (f *ZipFile) ReadImpactMethod() (*ImpactMethod, error)
ReadImpactMethod reads a ImpactMethod from the zip file
func (*ZipFile) ReadLocation ¶
ReadLocation reads a Location from the zip file
func (*ZipFile) ReadParameter ¶
ReadParameter reads a Parameter from the zip file
func (*ZipFile) ReadProcess ¶
ReadProcess reads a Process from the zip file
func (*ZipFile) ReadSocialIndicator ¶
func (f *ZipFile) ReadSocialIndicator() (*SocialIndicator, error)
ReadSocialIndicator reads a SocialIndicator from the zip file
func (*ZipFile) ReadSource ¶
ReadSource reads a Source from the zip file
func (*ZipFile) ReadUnitGroup ¶
ReadUnitGroup reads a UnitGroup from the zip file