use of org.kie.workbench.common.dmn.api.property.dmn.LocationURI 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;
}
use of org.kie.workbench.common.dmn.api.property.dmn.LocationURI in project kie-wb-common by kiegroup.
the class KnowledgeSourceConverter method nodeFromDMN.
@Override
public Node<View<KnowledgeSource>, ?> nodeFromDMN(final org.kie.dmn.model.v1_1.KnowledgeSource dmn) {
@SuppressWarnings("unchecked") Node<View<KnowledgeSource>, ?> node = (Node<View<KnowledgeSource>, ?>) factoryManager.newElement(dmn.getId(), KnowledgeSource.class).asNode();
Id id = new Id(dmn.getId());
Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription());
Name name = new Name(dmn.getName());
KnowledgeSourceType ksType = new KnowledgeSourceType(dmn.getType());
LocationURI locationURI = new LocationURI(dmn.getLocationURI());
KnowledgeSource ks = new KnowledgeSource(id, description, name, ksType, locationURI, new BackgroundSet(), new FontSet(), new RectangleDimensionsSet());
node.getContent().setDefinition(ks);
return node;
}
Aggregations