Search in sources :

Example 21 with ModelType

use of org.openlca.core.model.ModelType in project olca-app by GreenDelta.

the class NavigationTreeFilter method validCategory.

private boolean validCategory(CategoryElement e) {
    Category c = e.getContent();
    if (c == null || c.modelType == null)
        return false;
    ModelType type = c.modelType;
    return (type.isOneOf(ModelType.PROCESS, ModelType.PRODUCT_SYSTEM)) && hasModelChilds(e);
}
Also used : Category(org.openlca.core.model.Category) ModelType(org.openlca.core.model.ModelType)

Aggregations

ModelType (org.openlca.core.model.ModelType)21 JsonObject (com.google.gson.JsonObject)4 Test (org.junit.Test)4 HashSet (java.util.HashSet)3 Category (org.openlca.core.model.Category)3 JsonArray (com.google.gson.JsonArray)2 File (java.io.File)2 HashMap (java.util.HashMap)2 Set (java.util.Set)2 JsonElement (com.google.gson.JsonElement)1 IOException (java.io.IOException)1 Files (java.nio.file.Files)1 Path (java.nio.file.Path)1 StandardCopyOption (java.nio.file.StandardCopyOption)1 ArrayList (java.util.ArrayList)1 Predicate (java.util.function.Predicate)1 Collectors (java.util.stream.Collectors)1 TextDropComponent (org.openlca.app.components.TextDropComponent)1 CommentControl (org.openlca.app.editors.comments.CommentControl)1 Tests (org.openlca.core.Tests)1