Search in sources :

Example 1 with FlowBag

use of org.openlca.ilcd.util.FlowBag in project olca-modules by GreenDelta.

the class DataSets method putFlow.

private static void putFlow(SodaClient client) throws Exception {
    Flow flow = load(Flow.class, "flow.xml");
    FlowBag bag = new FlowBag(flow, "en");
    if (!client.contains(Flow.class, bag.getId()))
        client.put(flow);
}
Also used : FlowBag(org.openlca.ilcd.util.FlowBag) Flow(org.openlca.ilcd.flows.Flow)

Example 2 with FlowBag

use of org.openlca.ilcd.util.FlowBag in project olca-modules by GreenDelta.

the class FlowBagTest method setUp.

@Before
public void setUp() throws Exception {
    try (InputStream stream = this.getClass().getResourceAsStream("flow.xml")) {
        XmlBinder binder = new XmlBinder();
        Flow flow = binder.fromStream(Flow.class, stream);
        bag = new FlowBag(flow, "en");
    }
}
Also used : InputStream(java.io.InputStream) FlowBag(org.openlca.ilcd.util.FlowBag) Flow(org.openlca.ilcd.flows.Flow) Before(org.junit.Before)

Aggregations

Flow (org.openlca.ilcd.flows.Flow)2 FlowBag (org.openlca.ilcd.util.FlowBag)2 InputStream (java.io.InputStream)1 Before (org.junit.Before)1