use of spold2.IntermediateExchange in project olca-modules by GreenDelta.
the class EcoSpold2Export method createIntermediateExchange.
private IntermediateExchange createIntermediateExchange(Exchange exchange, Process process, UserMasterData masterData) {
IntermediateExchange e2Ex = new IntermediateExchange();
if (exchange.isInput)
e2Ex.inputGroup = 5;
else {
if (Objects.equals(exchange, process.quantitativeReference))
e2Ex.outputGroup = 0;
else if (exchange.flow.flowType == FlowType.WASTE_FLOW)
e2Ex.outputGroup = 3;
else
e2Ex.outputGroup = 2;
}
e2Ex.flowId = exchange.flow.refId;
ProcessDescriptor provider = getDefaultProvider(exchange);
if (provider != null)
e2Ex.activityLinkId = provider.refId;
mapExchangeData(exchange, e2Ex);
Units.map(exchange.unit, e2Ex, masterData);
MasterData.writeTechFlow(e2Ex, masterData);
return e2Ex;
}
use of spold2.IntermediateExchange in project olca-modules by GreenDelta.
the class MasterData method writeTechFlow.
public static void writeTechFlow(IntermediateExchange techFlow, UserMasterData masterData) {
IntermediateExchange masterFlow = new IntermediateExchange();
masterData.intermediateExchanges.add(masterFlow);
// !
masterFlow.id = techFlow.flowId;
masterFlow.unitId = techFlow.unitId;
masterFlow.name = techFlow.name;
masterFlow.unit = techFlow.unit;
}
Aggregations