Search in sources :

Example 1 with FlowData

use of spold2.FlowData in project olca-modules by GreenDelta.

the class EcoSpold2Export method mapExchanges.

private void mapExchanges(Process process, DataSet ds) {
    if (ds.flowData == null)
        ds.flowData = new FlowData();
    for (Exchange exchange : process.exchanges) {
        if (!isValid(exchange))
            continue;
        Flow flow = exchange.flow;
        UserMasterData masterData = ds.masterData;
        if (flow.flowType == FlowType.ELEMENTARY_FLOW) {
            ElementaryExchange e = createElemExchange(exchange, masterData);
            ds.flowData.elementaryExchanges.add(e);
        } else {
            IntermediateExchange e = createIntermediateExchange(exchange, process, masterData);
            ds.flowData.intermediateExchanges.add(e);
        }
    }
}
Also used : Exchange(org.openlca.core.model.Exchange) ElementaryExchange(spold2.ElementaryExchange) IntermediateExchange(spold2.IntermediateExchange) FlowData(spold2.FlowData) ElementaryExchange(spold2.ElementaryExchange) IntermediateExchange(spold2.IntermediateExchange) UserMasterData(spold2.UserMasterData) Flow(org.openlca.core.model.Flow)

Aggregations

Exchange (org.openlca.core.model.Exchange)1 Flow (org.openlca.core.model.Flow)1 ElementaryExchange (spold2.ElementaryExchange)1 FlowData (spold2.FlowData)1 IntermediateExchange (spold2.IntermediateExchange)1 UserMasterData (spold2.UserMasterData)1