Search in sources :

Example 1 with ImportedValues

use of org.kie.workbench.common.dmn.api.definition.v1_1.ImportedValues in project drools by kiegroup.

the class ImportedValuesConverter method writeAttributes.

@Override
protected void writeAttributes(HierarchicalStreamWriter writer, Object parent) {
    super.writeAttributes(writer, parent);
    ImportedValues iv = (ImportedValues) parent;
    if (iv.getExpressionLanguage() != null)
        writer.addAttribute(EXPRESSION_LANGUAGE, iv.getExpressionLanguage());
}
Also used : ImportedValues(org.kie.dmn.model.v1_1.ImportedValues)

Example 2 with ImportedValues

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

the class ImportedValuesConverter method wbFromDMN.

public static ImportedValues wbFromDMN(final org.kie.dmn.model.v1_1.ImportedValues dmn) {
    if (dmn == null) {
        return null;
    }
    String namespace = dmn.getNamespace();
    LocationURI locationURI = new LocationURI(dmn.getLocationURI());
    String importType = dmn.getImportType();
    String importedElement = dmn.getImportedElement();
    String expressionLanguage = dmn.getExpressionLanguage();
    ImportedValues wb = new ImportedValues(namespace, locationURI, importType, importedElement, expressionLanguage);
    return wb;
}
Also used : LocationURI(org.kie.workbench.common.dmn.api.property.dmn.LocationURI) ImportedValues(org.kie.workbench.common.dmn.api.definition.v1_1.ImportedValues)

Example 3 with ImportedValues

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

the class LiteralExpressionPropertyConverter method wbFromDMN.

public static LiteralExpression wbFromDMN(final org.kie.dmn.model.v1_1.LiteralExpression dmn) {
    if (dmn == null) {
        return null;
    }
    Id id = new Id(dmn.getId());
    Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription());
    QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef());
    String text = dmn.getText();
    String expressionLanguage = dmn.getExpressionLanguage();
    ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues());
    LiteralExpression result = new LiteralExpression(id, description, typeRef, text, importedValues, expressionLanguage);
    return result;
}
Also used : Description(org.kie.workbench.common.dmn.api.property.dmn.Description) QName(org.kie.workbench.common.dmn.api.property.dmn.QName) ImportedValues(org.kie.workbench.common.dmn.api.definition.v1_1.ImportedValues) LiteralExpression(org.kie.workbench.common.dmn.api.definition.v1_1.LiteralExpression) Id(org.kie.workbench.common.dmn.api.property.dmn.Id)

Example 4 with ImportedValues

use of org.kie.workbench.common.dmn.api.definition.v1_1.ImportedValues in project drools by kiegroup.

the class ImportedValuesConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    ImportedValues iv = (ImportedValues) parent;
    writeChildrenNode(writer, context, iv.getImportedElement(), IMPORTED_ELEMENT);
}
Also used : ImportedValues(org.kie.dmn.model.v1_1.ImportedValues)

Example 5 with ImportedValues

use of org.kie.workbench.common.dmn.api.definition.v1_1.ImportedValues in project drools by kiegroup.

the class ImportedValuesConverter method assignAttributes.

@Override
protected void assignAttributes(HierarchicalStreamReader reader, Object parent) {
    super.assignAttributes(reader, parent);
    ImportedValues iv = (ImportedValues) parent;
    String expressionLanguage = reader.getAttribute(EXPRESSION_LANGUAGE);
    iv.setExpressionLanguage(expressionLanguage);
}
Also used : ImportedValues(org.kie.dmn.model.v1_1.ImportedValues)

Aggregations

ImportedValues (org.kie.dmn.model.v1_1.ImportedValues)3 ImportedValues (org.kie.workbench.common.dmn.api.definition.v1_1.ImportedValues)2 LiteralExpression (org.kie.workbench.common.dmn.api.definition.v1_1.LiteralExpression)1 Description (org.kie.workbench.common.dmn.api.property.dmn.Description)1 Id (org.kie.workbench.common.dmn.api.property.dmn.Id)1 LocationURI (org.kie.workbench.common.dmn.api.property.dmn.LocationURI)1 QName (org.kie.workbench.common.dmn.api.property.dmn.QName)1