Search in sources :

Example 46 with List

use of org.kie.workbench.common.dmn.api.definition.v1_1.List in project kie-wb-common by kiegroup.

the class ListPropertyConverter method dmnFromWB.

public static org.kie.dmn.model.v1_1.List dmnFromWB(final List wb) {
    org.kie.dmn.model.v1_1.List result = new org.kie.dmn.model.v1_1.List();
    result.setId(wb.getId().getValue());
    result.setDescription(wb.getDescription().getValue());
    QNamePropertyConverter.setDMNfromWB(wb.getTypeRef(), result::setTypeRef);
    for (Expression e : wb.getExpression()) {
        org.kie.dmn.model.v1_1.Expression eConverted = ExpressionPropertyConverter.dmnFromWB(e);
        result.getExpression().add(eConverted);
    }
    return result;
}
Also used : Expression(org.kie.workbench.common.dmn.api.definition.v1_1.Expression) List(org.kie.workbench.common.dmn.api.definition.v1_1.List) ArrayList(java.util.ArrayList)

Aggregations

List (org.kie.workbench.common.dmn.api.definition.v1_1.List)26 Test (org.junit.Test)22 LiteralExpression (org.kie.workbench.common.dmn.api.definition.v1_1.LiteralExpression)20 InformationItem (org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem)15 DMNGridRow (org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow)15 List (java.util.List)13 AbstractCanvasHandler (org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvasHandler)13 GraphCommandExecutionContext (org.kie.workbench.common.stunner.core.graph.command.GraphCommandExecutionContext)11 RuleViolation (org.kie.workbench.common.stunner.core.rule.RuleViolation)11 CanvasViolation (org.kie.workbench.common.stunner.core.client.command.CanvasViolation)10 ArrayList (java.util.ArrayList)9 Optional (java.util.Optional)7 Relation (org.kie.workbench.common.dmn.api.definition.v1_1.Relation)7 Expression (org.kie.workbench.common.dmn.api.definition.v1_1.Expression)6 HasExpression (org.kie.workbench.common.dmn.api.definition.HasExpression)5 HasName (org.kie.workbench.common.dmn.api.definition.HasName)5 DRGElement (org.kie.workbench.common.dmn.api.definition.v1_1.DRGElement)5 GridDataCache (org.kie.workbench.common.dmn.client.widgets.grid.model.GridDataCache)5 Edge (org.kie.workbench.common.stunner.core.graph.Edge)5 View (org.kie.workbench.common.stunner.core.graph.content.view.View)5