use of org.kie.workbench.common.dmn.api.property.dmn.Id in project kie-wb-common by kiegroup.
the class DecisionRulePropertyConverter method wbFromDMN.
public static DecisionRule wbFromDMN(final org.kie.dmn.model.v1_1.DecisionRule dmn) {
Id id = new Id(dmn.getId());
Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription());
DecisionRule result = new DecisionRule();
result.setId(id);
result.setDescription(description);
for (org.kie.dmn.model.v1_1.UnaryTests ie : dmn.getInputEntry()) {
result.getInputEntry().add(UnaryTestsPropertyConverter.wbFromDMN(ie));
}
for (org.kie.dmn.model.v1_1.LiteralExpression oe : dmn.getOutputEntry()) {
result.getOutputEntry().add(LiteralExpressionPropertyConverter.wbFromDMN(oe));
}
return result;
}
use of org.kie.workbench.common.dmn.api.property.dmn.Id in project kie-wb-common by kiegroup.
the class InputClausePropertyConverter method wbFromDMN.
public static InputClause wbFromDMN(final org.kie.dmn.model.v1_1.InputClause dmn) {
Id id = new Id(dmn.getId());
Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription());
LiteralExpression inputExpression = LiteralExpressionPropertyConverter.wbFromDMN(dmn.getInputExpression());
UnaryTests inputValues = UnaryTestsPropertyConverter.wbFromDMN(dmn.getInputValues());
InputClause result = new InputClause(id, description, inputExpression, inputValues);
return result;
}
use of org.kie.workbench.common.dmn.api.property.dmn.Id in project kie-wb-common by kiegroup.
the class InvocationPropertyConverter method wbFromDMN.
public static Invocation wbFromDMN(final org.kie.dmn.model.v1_1.Invocation dmn) {
if (dmn == null) {
return null;
}
Id id = new Id(dmn.getId());
Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription());
QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef());
Invocation result = new Invocation();
result.setId(id);
result.setDescription(description);
result.setTypeRef(typeRef);
Expression convertedExpression = ExpressionPropertyConverter.wbFromDMN(dmn.getExpression());
result.setExpression(convertedExpression);
for (org.kie.dmn.model.v1_1.Binding b : dmn.getBinding()) {
Binding bConverted = BindingPropertyConverter.wbFromDMN(b);
result.getBinding().add(bConverted);
}
return result;
}
use of org.kie.workbench.common.dmn.api.property.dmn.Id in project kie-wb-common by kiegroup.
the class ItemDefinitionPropertyConverter method wbFromDMN.
public static ItemDefinition wbFromDMN(final org.kie.dmn.model.v1_1.ItemDefinition dmn) {
if (dmn == null) {
return null;
}
Id id = new Id(dmn.getId());
Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription());
QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef());
Name name = new Name(dmn.getName());
ItemDefinition result = new ItemDefinition();
result.setId(id);
result.setName(name);
result.setDescription(description);
result.setTypeRef(typeRef);
result.setTypeLanguage(dmn.getTypeLanguage());
result.setIsCollection(dmn.isIsCollection());
UnaryTests utConverted = UnaryTestsPropertyConverter.wbFromDMN(dmn.getAllowedValues());
result.setAllowedValues(utConverted);
for (org.kie.dmn.model.v1_1.ItemDefinition child : dmn.getItemComponent()) {
ItemDefinition convertedChild = ItemDefinitionPropertyConverter.wbFromDMN(child);
result.getItemComponent().add(convertedChild);
}
return result;
}
use of org.kie.workbench.common.dmn.api.property.dmn.Id in project kie-wb-common by kiegroup.
the class ListPropertyConverter method wbFromDMN.
public static List wbFromDMN(final org.kie.dmn.model.v1_1.List dmn) {
Id id = new Id(dmn.getId());
Description description = new Description(dmn.getDescription());
QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef());
java.util.List<Expression> expression = new ArrayList<>();
for (org.kie.dmn.model.v1_1.Expression e : dmn.getExpression()) {
Expression eConverted = ExpressionPropertyConverter.wbFromDMN(e);
expression.add(eConverted);
}
List result = new List(id, description, typeRef, expression);
return result;
}
Aggregations