use of org.openlca.ilcd.models.Modelling in project olca-modules by GreenDelta.
the class SystemExport method initModel.
private Model initModel() {
Model model = new Model();
Models.setOrigin(model, "openLCA");
model.version = "1.1";
model.locations = "../ILCDLocations.xml";
DataSetInfo info = Models.forceDataSetInfo(model);
info.uuid = system.refId;
ModelName name = Models.forceModelName(model);
name.name.add(LangString.of(system.name, config.lang));
if (system.description != null) {
info.comment.add(LangString.of(system.description, config.lang));
}
CategoryConverter conv = new CategoryConverter();
Classification c = conv.getClassification(system.category);
if (c != null)
Models.forceClassifications(model).add(c);
if (system.referenceProcess != null) {
long refId = system.referenceProcess.id;
QuantitativeReference qRef = Models.forceQuantitativeReference(model);
qRef.refProcess = processIDs.getOrDefault(refId, -1);
}
Models.forcePublication(model).version = Version.asString(system.version);
model.modelling = new Modelling();
return model;
}
Aggregations