@@ -0,0 +1,826 @@
+package org.openlca.util;%0A%0Aimport org.openlca.core.database.IDatabase;%0Aimport org.openlca.core.database.ProcessDao;%0Aimport org.openlca.core.database.ProductSystemDao;%0Aimport org.openlca.core.model.ProductSystem;%0A%0Apublic final class ProductSystems %7B%0A%0A%09private ProductSystems() %7B%0A%09%7D%0A%0A%09/**%0A%09 * Returns true when the given product system has links to library%0A%09 * processes.%0A%09 */%0A%09public static boolean hasLibraryLinks(ProductSystem sys, IDatabase db) %7B%0A%09%09if (sys == null %7C%7C db == null)%0A%09%09%09return false;%0A%09%09if (sys.referenceProcess != null%0A%09%09%09%09&& sys.referenceProcess.isFromLibrary())%0A%09%09%09return true;%0A%09%09var processes = new ProcessDao(db).descriptorMap();%0A%09%09for (var processID : sys.processes) %7B%0A%09%09%09var process = processes.get(processID);%0A%09%09%09if (process != null && process.isFromLibrary())%0A%09%09%09%09return true;%0A%09%09%7D%0A%09%09return false;%0A%09%7D%0A%0A%7D%0A

add util. function ProductSystems.hasLibraryLinks