Documentation ¶
Index ¶
- Variables
- func FindUUID(path string) string
- func IsContactPath(path string) bool
- func IsExternalDoc(path string) bool
- func IsFlowPath(path string) bool
- func IsFlowPropertyPath(path string) bool
- func IsMethodPath(path string) bool
- func IsModelPath(path string) bool
- func IsProcessPath(path string) bool
- func IsSourcePath(path string) bool
- func IsUnitGroupPath(path string) bool
- type Category
- type CategoryList
- type CategorySystem
- type Class
- type Classification
- type CommonDataEntry
- type CommonPublication
- type Compartment
- type Contact
- type ContactInfo
- type DataSet
- type DataSetType
- type DownstreamLink
- type Exchange
- type Flow
- type FlowInfo
- type FlowName
- type FlowProperty
- type FlowPropertyInfo
- type FlowPropertyRef
- type FlowType
- type ImpactFactor
- type LangString
- type LangStringItem
- type MemStore
- func (store *MemStore) Contact(id string) *Contact
- func (store *MemStore) Contacts() []*Contact
- func (store *MemStore) EachContact(fn func(*Contact) bool)
- func (store *MemStore) EachFlow(fn func(*Flow) bool)
- func (store *MemStore) EachFlowProperty(fn func(*FlowProperty) bool)
- func (store *MemStore) EachMethod(fn func(*Method) bool)
- func (store *MemStore) EachModel(fn func(*Model) bool)
- func (store *MemStore) EachProcess(fn func(*Process) bool)
- func (store *MemStore) EachSource(fn func(*Source) bool)
- func (store *MemStore) EachUnitGroup(fn func(*UnitGroup) bool)
- func (store *MemStore) FillFromZip(reader *ZipReader) error
- func (store *MemStore) Flow(id string) *Flow
- func (store *MemStore) FlowProperties() []*FlowProperty
- func (store *MemStore) FlowProperty(id string) *FlowProperty
- func (store *MemStore) Flows() []*Flow
- func (store *MemStore) Method(id string) *Method
- func (store *MemStore) Methods() []*Method
- func (store *MemStore) Model(id string) *Model
- func (store *MemStore) Models() []*Model
- func (store *MemStore) Process(id string) *Process
- func (store *MemStore) Processes() []*Process
- func (store *MemStore) Source(id string) *Source
- func (store *MemStore) Sources() []*Source
- func (store *MemStore) UnitGroup(id string) *UnitGroup
- func (store *MemStore) UnitGroups() []*UnitGroup
- type Method
- type MethodInfo
- type Model
- type ModelParameter
- type Parameter
- type Process
- type ProcessConnection
- type ProcessInfo
- type ProcessInstance
- type ProcessLocation
- type ProcessName
- type Ref
- type Source
- type SourceInfo
- type Unit
- type UnitGroup
- type UnitGroupInfo
- type ZipFile
- func (f *ZipFile) Path() string
- func (f *ZipFile) Read() ([]byte, error)
- func (f *ZipFile) ReadContact() (*Contact, error)
- func (f *ZipFile) ReadFlow() (*Flow, error)
- func (f *ZipFile) ReadFlowProperty() (*FlowProperty, error)
- func (f *ZipFile) ReadMethod() (*Method, error)
- func (f *ZipFile) ReadModel() (*Model, error)
- func (f *ZipFile) ReadProcess() (*Process, error)
- func (f *ZipFile) ReadSource() (*Source, error)
- func (f *ZipFile) ReadUnitGroup() (*UnitGroup, error)
- func (f *ZipFile) Type() DataSetType
- type ZipReader
- func (r *ZipReader) Close() error
- func (r *ZipReader) EachContact(fn func(*Contact) bool) error
- func (r *ZipReader) EachFile(fn func(f *ZipFile) bool)
- func (r *ZipReader) EachFlow(fn func(*Flow) bool) error
- func (r *ZipReader) EachFlowProperty(fn func(*FlowProperty) bool) error
- func (r *ZipReader) EachMethod(fn func(*Method) bool) error
- func (r *ZipReader) EachModel(fn func(*Model) bool) error
- func (r *ZipReader) EachProcess(fn func(*Process) bool) error
- func (r *ZipReader) EachSource(fn func(*Source) bool) error
- func (r *ZipReader) EachUnitGroup(fn func(*UnitGroup) bool) error
- func (r *ZipReader) FindDataSet(dsType DataSetType, uuid string) *ZipFile
- func (r *ZipReader) Map(w *ZipWriter, fn func(file *ZipFile) (string, []byte))
- type ZipWriter
Constants ¶
This section is empty.
Variables ¶
var ( // ErrDataSetNotFound indicates that a data set could not be found ErrDataSetNotFound = errors.New("data set not found") )
Functions ¶
func FindUUID ¶
FindUUID returns the UUID from the given path or an empty string if it cannot find it.
func IsContactPath ¶
IsContactPath returns true if the given file path or zip entry name is probably a contact data set.
func IsExternalDoc ¶
IsExternalDoc returns true if the given path is something in the `external_docs` folder.
func IsFlowPath ¶
IsFlowPath returns true if the given file path or zip entry name is probably a flow data set.
func IsFlowPropertyPath ¶
IsFlowPropertyPath returns true if the given file path or zip entry name is probably a flow property data set.
func IsMethodPath ¶
IsMethodPath returns true if the given file path or zip entry name is probably a LCIA method data set.
func IsModelPath ¶
IsModelPath returns true if the given file path or zip entry name is probably a life cycle model data set (of the extended ILCD format).
func IsProcessPath ¶
IsProcessPath returns true if the given file path or zip entry name is probably a process data set.
func IsSourcePath ¶
IsSourcePath returns true if the given file path or zip entry name is probably a source data set.
func IsUnitGroupPath ¶
IsUnitGroupPath returns true if the given file path or zip entry name is probably a unit group data set.
Types ¶
type Category ¶
type Category struct { ID string `xml:"id,attr,omitempty"` Name string `xml:"name,attr,omitempty"` Childs []Category `xml:"category"` }
Category contains the information of a category in a category system.
type CategoryList ¶
type CategoryList struct { DataType string `xml:"dataType,attr,omitempty"` Categories []Category `xml:"category"` }
CategoryList contains the root categories of a category system for a data set type.
type CategorySystem ¶
type CategorySystem struct { XMLName xml.Name `xml:"CategorySystem"` Name string `xml:"name,attr,omitempty"` CategoryLists []CategoryList `xml:"categories"` }
CategorySystem contains categories that can be used in the data sets.
func ReadCategoryFile ¶
func ReadCategoryFile(filePath string) (*CategorySystem, error)
ReadCategoryFile reads a category system from the given file.
type Class ¶
type Class struct { Level int `xml:"level,attr"` ID string `xml:"classId1,attr"` Name string `xml:",chardata"` }
Class is a category in an ILCD data set classification.
type Classification ¶
Classification describes an ILCD classification entry in a data set
func (*Classification) GetClass ¶
func (c *Classification) GetClass(level int) *Class
GetClass returns the class with the given level from the classification.
type CommonDataEntry ¶
type CommonDataEntry struct { TimeStamp string `xml:"timeStamp"` DataFormats []Ref `xml:"referenceToDataSetFormat"` }
CommonDataEntry <dataEntryBy>
type CommonPublication ¶
type CommonPublication struct { Version string `xml:"dataSetVersion"` URI string `xml:"permanentDataSetURI"` }
CommonPublication <publicationAndOwnership>
type Compartment ¶
A Compartment is a category in an ILCD elementary flow categorization. Note that the tag names in ILCD are elementaryFlowCategorization > category
type Contact ¶
type Contact struct { XMLName xml.Name `xml:"contactDataSet"` Info *ContactInfo `xml:"contactInformation>dataSetInformation"` DataEntry *CommonDataEntry `xml:"administrativeInformation>dataEntryBy"` Publication *CommonPublication `xml:"administrativeInformation>publicationAndOwnership"` }
Contact represents an ILCD contact data set
func ReadContact ¶
ReadContact reads a contact data set from the given data
func ReadContactFile ¶
ReadContactFile reads a contact data set from the given file
type ContactInfo ¶
type ContactInfo struct { UUID string `xml:"UUID"` ShortName LangString `xml:"shortName"` Name LangString `xml:"name"` Classifications []Classification `xml:"classificationInformation>classification"` Address LangString `xml:"contactAddress"` Email string `xml:"email,omitempty"` URL string `xml:"WWWAddress,omitempty"` Comment LangString `xml:"contactDescriptionOrComment"` }
ContactInfo <dataSetInformation>
type DataSetType ¶
type DataSetType int
DataSetType is an enumeration type of the different ILCD data set types.
const ( ModelDataSet DataSetType = iota + 1 ProcessDataSet MethodDataSet FlowDataSet FlowPropertyDataSet UnitGroupDataSet SourceDataSet ContactDataSet // External documents that can be linked to source data sets. ExternalDoc // Assets are all the additional things that may occur in an ILCD package // like XML schemas, style sheets, etc. Asset )
The ILCD data set types
func DataSetTypes ¶
func DataSetTypes() []DataSetType
DataSetTypes returns a list with all possible data set types.
func (DataSetType) Folder ¶
func (t DataSetType) Folder() string
Folder returns the name of the folder where data sets of the given type are stored in an ILCD package.
func (DataSetType) String ¶
func (t DataSetType) String() string
type DownstreamLink ¶
type DownstreamLink struct { InputFlow string `xml:"flowUUID,attr"` ProcessID int `xml:"id,attr"` Location string `xml:"location,attr,omitempty"` IsDominant *bool `xml:"dominant,attr,omitempty"` }
A DownstreamLink links the output of a process to an input of another process in a life cylce model.
type Exchange ¶
type Exchange struct { InternalID int `xml:"dataSetInternalID,attr"` Flow *Ref `xml:"referenceToFlowDataSet"` Direction string `xml:"exchangeDirection"` MeanAmount float64 `xml:"meanAmount"` Variable string `xml:"referenceToVariable,omitempty"` ResultingAmount float64 `xml:"resultingAmount"` Location string `xml:"location"` }
Exchange is an input or output of an ILCD process data set. Note that an exchange has a MeanAmount and ResultingAmount. Both values are the same if the exchange has no reference to a variable. Otherwise the ResultingAmount is calculated via the formula: ResultingAmount = MeanAmount * Variable.
type Flow ¶
type Flow struct { XMLName xml.Name `xml:"flowDataSet"` Info *FlowInfo `xml:"flowInformation>dataSetInformation"` QRef int `xml:"flowInformation>quantitativeReference>referenceToReferenceFlowProperty"` Type string `xml:"modellingAndValidation>LCIMethod>typeOfDataSet"` DataEntry *CommonDataEntry `xml:"administrativeInformation>dataEntryBy"` Publication *CommonPublication `xml:"administrativeInformation>publicationAndOwnership"` FlowProperties []FlowPropertyRef `xml:"flowProperties>flowProperty"` }
Flow represents an ILCD flow data set
func ReadFlowFile ¶
ReadFlowFile reads a flow data set from the given file.
func (*Flow) ReferenceFlowProperty ¶
func (f *Flow) ReferenceFlowProperty() *FlowPropertyRef
ReferenceFlowProperty returns the reference to the reference flow property of the flow.
type FlowInfo ¶
type FlowInfo struct { UUID string `xml:"UUID"` Name *FlowName `xml:"name"` Synonyms LangString `xml:"synonyms"` Classifications []Classification `xml:"classificationInformation>classification"` Compartments []Compartment `xml:"classificationInformation>elementaryFlowCategorization>category"` CAS string `xml:"CASNumber"` Comment LangString `xml:"generalComment"` }
FlowInfo contains the general flow information
type FlowName ¶
type FlowName struct { BaseName LangString `xml:"baseName"` Treatment LangString `xml:"treatmentStandardsRoutes"` MixAndLocation LangString `xml:"mixAndLocationTypes"` Properties LangString `xml:"flowProperties"` }
FlowName contains the name fields of a flow.
type FlowProperty ¶
type FlowProperty struct { XMLName xml.Name `xml:"flowPropertyDataSet"` Info *FlowPropertyInfo `xml:"flowPropertiesInformation>dataSetInformation"` UnitGroup *Ref `xml:"flowPropertiesInformation>quantitativeReference>referenceToReferenceUnitGroup"` DataEntry *CommonDataEntry `xml:"administrativeInformation>dataEntryBy"` Publication *CommonPublication `xml:"administrativeInformation>publicationAndOwnership"` }
FlowProperty represents an ILCD flow property data set.
func ReadFlowProperty ¶
func ReadFlowProperty(data []byte) (*FlowProperty, error)
ReadFlowProperty reads a flow property data set from the given data.
func ReadFlowPropertyFile ¶
func ReadFlowPropertyFile(filePath string) (*FlowProperty, error)
ReadFlowPropertyFile reads a flow property data set from the given file.
func (*FlowProperty) UUID ¶
func (fp *FlowProperty) UUID() string
UUID returns the UUID of the data set.
func (*FlowProperty) Version ¶
func (fp *FlowProperty) Version() string
Version returns the version of the data set.
type FlowPropertyInfo ¶
type FlowPropertyInfo struct { UUID string `xml:"UUID"` Name LangString `xml:"name"` Classifications []Classification `xml:"classificationInformation>classification"` Comment LangString `xml:"generalComment"` }
FlowPropertyInfo contains the general flow property information
type FlowPropertyRef ¶
type FlowPropertyRef struct { ID int `xml:"dataSetInternalID,attr"` FlowProperty *Ref `xml:"referenceToFlowPropertyDataSet"` Mean float64 `xml:"meanValue"` Comment LangString `xml:"generalComment"` }
FlowPropertyRef describes a flow property of a flow.
type FlowType ¶
type FlowType int
FlowType is an enumeration type of the different ILCD flow types.
Enumaration constants for the ILCD flow types.
type ImpactFactor ¶
type ImpactFactor struct { Flow *Ref `xml:"referenceToFlowDataSet"` Direction string `xml:"exchangeDirection"` MeanValue float64 `xml:"meanValue"` DataDerivation string `xml:"dataDerivationTypeStatus"` Location string `xml:"location"` }
ImpactFactor :<characterisationFactors/factor>
type LangString ¶
type LangString []LangStringItem
LangString is an ILCD multi-language string
func (LangString) Default ¶
func (ls LangString) Default() string
Default returns the default value of a multi-language string which is the English string (code = "en") or the first string in the list.
func (LangString) Get ¶
func (ls LangString) Get(lang string) string
Get returns the value for the given language code
type LangStringItem ¶
LangStringItem represents an item in an ILCD multi-language string
type MemStore ¶
type MemStore struct {
// contains filtered or unexported fields
}
func NewMemStore ¶
func NewMemStore() *MemStore
func (*MemStore) EachContact ¶
func (*MemStore) EachFlowProperty ¶
func (store *MemStore) EachFlowProperty(fn func(*FlowProperty) bool)
func (*MemStore) EachMethod ¶
func (*MemStore) EachProcess ¶
func (*MemStore) EachSource ¶
func (*MemStore) EachUnitGroup ¶
func (*MemStore) FillFromZip ¶
func (*MemStore) FlowProperties ¶
func (store *MemStore) FlowProperties() []*FlowProperty
func (*MemStore) FlowProperty ¶
func (store *MemStore) FlowProperty(id string) *FlowProperty
func (*MemStore) UnitGroups ¶
type Method ¶
type Method struct { XMLName xml.Name `xml:"LCIAMethodDataSet"` Info *MethodInfo `xml:"LCIAMethodInformation>dataSetInformation"` RefQuantity *Ref `xml:"LCIAMethodInformation>quantitativeReference>referenceQuantity"` DataEntry *CommonDataEntry `xml:"administrativeInformation>dataEntryBy"` Publication *CommonPublication `xml:"administrativeInformation>publicationAndOwnership"` Factors []ImpactFactor `xml:"characterisationFactors>factor"` }
Method contains the information of an ILCD LCIA method data set.
func ReadMethod ¶
ReadMethod reads a LCIA method data set from the given data.
func ReadMethodFile ¶
ReadMethodFile reads a LCIA method data set from the given file.
type MethodInfo ¶
type MethodInfo struct { UUID string `xml:"UUID"` Name LangString `xml:"name"` Methodology string `xml:"methodology"` ImpactCategory string `xml:"impactCategory"` ImpactIndicator string `xml:"impactIndicator"` Comment LangString `xml:"generalComment"` ExternalDocs []Ref `xml:"referenceToExternalDocumentation"` }
MethodInfo :<dataSetInformation>
type Model ¶
type Model struct { XMLName xml.Name `xml:"lifeCycleModelDataSet"` Info *ProcessInfo `xml:"lifeCycleModelInformation>dataSetInformation"` QRef *int `xml:"lifeCycleModelInformation>quantitativeReference>referenceToReferenceProcess"` Processes []ProcessInstance `xml:"lifeCycleModelInformation>technology>processes>processInstance"` DataEntry *CommonDataEntry `xml:"administrativeInformation>dataEntryBy"` Publication *CommonPublication `xml:"administrativeInformation>publicationAndOwnership"` }
Model represents a life cycle model data set of the extended ILCD (eILCD) format.
func ReadModelFile ¶
ReadModelFile reads a life cycle model from the given file.
func (*Model) FindProviders ¶
func (m *Model) FindProviders(pi *ProcessInstance) []*ProcessInstance
FindProviders searches for the processes that are linked to the inputs of the given process in the life cycle model.
In the eILCD format, the output (downstream) connections of a process are stored. This method searches for connections in the other (upstream) direction: processes that provide an input to the given process.
func (*Model) FullName ¶
FullName returns the full name of the life cylce model for the given language whith all name parts concatenated to a single string.
func (*Model) RefProcess ¶
func (m *Model) RefProcess() *ProcessInstance
RefProcess returns the reference process (instance) of the life cycle model.
type ModelParameter ¶
A ModelParameter is a parameter of a process instance in a life cycle model.
type Parameter ¶
type Parameter struct { Name string `xml:"name,attr"` Formula string `xml:"formula,omitempty"` Value float64 `xml:"meanValue"` SD95 float64 `xml:"relativeStandardDeviation95In"` Comment LangString `xml:"comment"` }
Parameter contains the information of a process parameter or variable under the tag <variableParameter>
type Process ¶
type Process struct { XMLName xml.Name `xml:"processDataSet"` Info *ProcessInfo `xml:"processInformation>dataSetInformation"` QRefs []int `xml:"processInformation>quantitativeReference>referenceToReferenceFlow"` Location *ProcessLocation `xml:"processInformation>geography>locationOfOperationSupplyOrProduction"` Parameters []Parameter `xml:"processInformation>mathematicalRelations>variableParameter"` DataEntry *CommonDataEntry `xml:"administrativeInformation>dataEntryBy"` Publication *CommonPublication `xml:"administrativeInformation>publicationAndOwnership"` Exchanges []Exchange `xml:"exchanges>exchange"` }
Process represents an ILCD process data set
func ReadProcess ¶
ReadProcess reads a process data set from the given data
func ReadProcessFile ¶
ReadProcessFile reads a process data set from the given file.
func (*Process) FullName ¶
FullName returns the full name of the process for the given language whith all name parts concatenated to a single string.
type ProcessConnection ¶
type ProcessConnection struct { OutputFlow string `xml:"flowUUID,attr"` IsDominant *bool `xml:"dominant,attr,omitempty"` Links []DownstreamLink `xml:"downstreamProcess"` }
ProcessConnection describes a connection between two processes in a life cycle model.
type ProcessInfo ¶
type ProcessInfo struct { UUID string `xml:"UUID"` Name *ProcessName `xml:"name"` Synonyms LangString `xml:"synonyms"` Classifications []Classification `xml:"classificationInformation>classification"` Comment LangString `xml:"generalComment"` }
ProcessInfo contains the general process information
type ProcessInstance ¶
type ProcessInstance struct { InternalID int `xml:"dataSetInternalID,attr"` MultiplicationFactor float64 `xml:"multiplicationFactor,attr"` Process *Ref `xml:"referenceToProcess"` ScalingFactor *float64 `xml:"scalingFactor,omitempty"` Connections []ProcessConnection `xml:"connections>outputExchange"` Parameters []ModelParameter `xml:"parameters>parameter"` }
ProcessInstance describes a process reference together with its connections in a life cycle model.
type ProcessLocation ¶
type ProcessLocation struct { Code string `xml:"location,attr"` LatLong string `xml:"latitudeAndLongitude,attr"` Description LangString `xml:"descriptionOfRestrictions"` }
ProcessLocation contains the information of a process location.
type ProcessName ¶
type ProcessName struct { BaseName LangString `xml:"baseName"` Treatment LangString `xml:"treatmentStandardsRoutes"` MixAndLocation LangString `xml:"mixAndLocationTypes"` Properties LangString `xml:"functionalUnitFlowProperties"` }
ProcessName contains the name fields of a process.
type Ref ¶
type Ref struct { UUID string `xml:"refObjectId,attr"` Type string `xml:"type,attr"` URI string `xml:"uri,attr"` Version string `xml:"version,attr"` Name LangString `xml:"shortDescription"` }
Ref is a data set reference to an ILCD data set.
func (*Ref) DataSetType ¶
func (ref *Ref) DataSetType() DataSetType
DataSetType returns the type of the data set referenced as defined in the ILCD schema.
type Source ¶
type Source struct { XMLName xml.Name `xml:"sourceDataSet"` Info *SourceInfo `xml:"sourceInformation>dataSetInformation"` DataEntry *CommonDataEntry `xml:"administrativeInformation>dataEntryBy"` Publication *CommonPublication `xml:"administrativeInformation>publicationAndOwnership"` }
Source represents an ILCD source data set
func ReadSource ¶
ReadSource reads a source data set from the given data
func ReadSourceFile ¶
ReadSourceFile reads a source data set from the given file
type SourceInfo ¶
type SourceInfo struct { UUID string `xml:"UUID"` ShortName LangString `xml:"shortName"` Classifications []Classification `xml:"classificationInformation>classification"` Citation string `xml:"sourceCitation,omitempty"` PublicationType string `xml:"publicationType,omitempty"` }
SourceInfo <dataSetInformation>
type Unit ¶
type Unit struct { InternalID int `xml:"dataSetInternalID,attr"` Name string `xml:"name"` Factor float64 `xml:"meanValue"` }
Unit contains the information of a <unit> element in an unit group data set.
type UnitGroup ¶
type UnitGroup struct { XMLName xml.Name `xml:"unitGroupDataSet"` Info *UnitGroupInfo `xml:"unitGroupInformation>dataSetInformation"` QRef int `xml:"unitGroupInformation>quantitativeReference>referenceToReferenceUnit"` DataEntry *CommonDataEntry `xml:"administrativeInformation>dataEntryBy"` Publication *CommonPublication `xml:"administrativeInformation>publicationAndOwnership"` Units []Unit `xml:"units>unit"` }
UnitGroup represents an ILCD unit group data set
func ReadUnitGroup ¶
ReadUnitGroup reads a unit group data set from the given data
func ReadUnitGroupFile ¶
ReadUnitGroupFile reads a unit group data set from the given file
func (*UnitGroup) ReferenceUnit ¶
ReferenceUnit returns the reference unit of an unit group.
type UnitGroupInfo ¶
type UnitGroupInfo struct { UUID string `xml:"UUID"` Name LangString `xml:"name"` Classifications []Classification `xml:"classificationInformation>classification"` Comment LangString `xml:"generalComment"` }
UnitGroupInfo <dataSetInformation>
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) ReadContact ¶
ReadContact reads a Contact data set from the zip file.
func (*ZipFile) ReadFlowProperty ¶
func (f *ZipFile) ReadFlowProperty() (*FlowProperty, error)
ReadFlowProperty reads a FlowProperty data set from the zip file.
func (*ZipFile) ReadMethod ¶
ReadMethod reads a Method data set from the zip file.
func (*ZipFile) ReadProcess ¶
ReadProcess reads a Process data set from the zip file.
func (*ZipFile) ReadSource ¶
ReadSource reads a Source data set from the zip file.
func (*ZipFile) ReadUnitGroup ¶
ReadUnitGroup reads a UnitGroup data set from the zip file.
func (*ZipFile) Type ¶
func (f *ZipFile) Type() DataSetType
Type returns the ILCD data set type of the zip file which is inferred from the path of the zip file.
type ZipReader ¶
type ZipReader struct {
// contains filtered or unexported fields
}
ZipReader can read data sets from ILCD packages.
func NewZipReader ¶
NewZipReader creates a new package reader.
func (*ZipReader) EachContact ¶
EachContact iterates over each Contact data set in the package unless the given handler returns false.
func (*ZipReader) EachFile ¶
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 (*ZipReader) EachFlow ¶
EachFlow iterates over each Flow data set in the package unless the given handler returns false.
func (*ZipReader) EachFlowProperty ¶
func (r *ZipReader) EachFlowProperty(fn func(*FlowProperty) bool) error
EachFlowProperty iterates over each FlowProperty data set in the package unless the given handler returns false.
func (*ZipReader) EachMethod ¶
EachMethod iterates over each Method data set in the package unless the given handler returns false.
func (*ZipReader) EachModel ¶
EachModel iterates over each life cycle model in the package unless the given handler returns false.
func (*ZipReader) EachProcess ¶
EachProcess iterates over each Process data set in the package unless the given handler returns false.
func (*ZipReader) EachSource ¶
EachSource iterates over each Source data set in the package unless the given handler returns false.
func (*ZipReader) EachUnitGroup ¶
EachUnitGroup iterates over each UnitGroup data set in the package unless the given handler returns false.
func (*ZipReader) FindDataSet ¶
func (r *ZipReader) FindDataSet(dsType DataSetType, uuid string) *ZipFile
FindDataSet searches for a data set of the give type and with the given uuid and returns the corresponding zip file. If nothing is found, it returns nil.
func (*ZipReader) Map ¶
Map applies the given function to all entries in the zip file and writes the function's output to the given writer.
The result of a function call is the path and the data that should be written to the writer. If the path or data are empty, nothing will be written. The given function is executed in a separate Go routine.
type ZipWriter ¶
type ZipWriter struct {
// contains filtered or unexported fields
}
ZipWriter provides functions to write ILCD zip packages
func NewZipWriter ¶
NewZipWriter creates a new ZipWriter.
func (*ZipWriter) WriteDataSet ¶
WriteDataSet writes the given data set to the zip package.