Search in sources :

Example 76 with Category

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

the class CommentsPage method getFullPath.

private String getFullPath(Comment comment) {
    if (// not needed
    model != null)
        return null;
    var descriptor = getDescriptor(comment.type(), comment.refId());
    Category category = getCategory(descriptor);
    List<String> categories = Categories.path(category);
    if (categories == null || categories.size() == 0)
        return descriptor.name;
    return Strings.join(categories, '/') + "/" + descriptor.name;
}
Also used : Category(org.openlca.core.model.Category)

Example 77 with Category

use of org.openlca.core.model.Category 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

Category (org.openlca.core.model.Category)77 Test (org.junit.Test)11 CategoryDao (org.openlca.core.database.CategoryDao)11 Flow (org.openlca.core.model.Flow)6 Parameter (org.openlca.core.model.Parameter)6 CategoryElement (org.openlca.app.navigation.elements.CategoryElement)4 ModelElement (org.openlca.app.navigation.elements.ModelElement)4 IDatabase (org.openlca.core.database.IDatabase)4 FlowProperty (org.openlca.core.model.FlowProperty)4 Location (org.openlca.core.model.Location)4 Process (org.openlca.core.model.Process)4 UnitGroup (org.openlca.core.model.UnitGroup)4 ArrayList (java.util.ArrayList)3 ImpactCategory (org.openlca.core.model.ImpactCategory)3 ImpactMethod (org.openlca.core.model.ImpactMethod)3 ModelType (org.openlca.core.model.ModelType)3 IsicNode (org.openlca.io.ecospold2.input.IsicTree.IsicNode)3 Actor (org.openlca.core.model.Actor)2 Currency (org.openlca.core.model.Currency)2 DQSystem (org.openlca.core.model.DQSystem)2