@Test public void testAsDMNIncludedModel() { final String modelName = "Model Name"; final String namespace = "The Namespace"; final String type = "The type"; final String file = "my file.dmn"; final String filePath = " final Import anImport = new Import(); anImport.setName(new Name(modelName)); anImport.setNamespace(namespace); anImport.setImportType(type); anImport.setLocationURI(new LocationURI(filePath)); final DMNIncludedModel includedModel = decisionComponents.asDMNIncludedModel(anImport); assertEquals(modelName, includedModel.getModelName()); assertEquals(namespace, includedModel.getNamespace()); assertEquals(type, includedModel.getImportType()); assertEquals(file, includedModel.getPath()); }
DMNIncludedModel asDMNIncludedModel(final Import anImport) { final String modelName = anImport.getName().getValue(); final String namespace = anImport.getNamespace(); final String importType = anImport.getImportType(); final String path = FileUtils.getFileName(anImport.getLocationURI().getValue()); return new DMNIncludedModel(modelName, "", path, namespace, importType, 0, 0); }
DecisionComponents { DMNIncludedModel asDMNIncludedModel(final Import anImport) { final String modelName = anImport.getName().getValue(); final String namespace = anImport.getNamespace(); final String importType = anImport.getImportType(); final String path = FileUtils.getFileName(anImport.getLocationURI().getValue()); return new DMNIncludedModel(modelName, "", path, namespace, importType, 0, 0); } }
DecisionComponents { DMNIncludedModel asDMNIncludedModel(final Import anImport) { final String modelName = anImport.getName().getValue(); final String namespace = anImport.getNamespace(); final String importType = anImport.getImportType(); final String path = FileUtils.getFileName(anImport.getLocationURI().getValue()); return new DMNIncludedModel(modelName, "", path, namespace, importType, 0, 0); } DecisionComponents(); @Inject  DecisionComponents(final View view,
                              final DMNIncludeModelsClient client,
                              final ManagedInstance<DecisionComponentsItem> itemManagedInstance,
                              final DecisionComponentFilter filter,
                              final DMNDiagramsSession dmnDiagramsSession,
                              final DMNGraphUtils dmnGraphUtils); }
DecisionComponents { DMNIncludedModel asDMNIncludedModel(final Import anImport) { final String modelName = anImport.getName().getValue(); final String namespace = anImport.getNamespace(); final String importType = anImport.getImportType(); final String path = FileUtils.getFileName(anImport.getLocationURI().getValue()); return new DMNIncludedModel(modelName, "", path, namespace, importType, 0, 0); } DecisionComponents(); @Inject  DecisionComponents(final View view,
                              final DMNIncludeModelsClient client,
                              final ManagedInstance<DecisionComponentsItem> itemManagedInstance,
                              final DecisionComponentFilter filter,
                              final DMNDiagramsSession dmnDiagramsSession,
                              final DMNGraphUtils dmnGraphUtils); @PostConstruct void init(); View getView(); void refresh(); void removeAllItems(); }
DecisionComponents { DMNIncludedModel asDMNIncludedModel(final Import anImport) { final String modelName = anImport.getName().getValue(); final String namespace = anImport.getNamespace(); final String importType = anImport.getImportType(); final String path = FileUtils.getFileName(anImport.getLocationURI().getValue()); return new DMNIncludedModel(modelName, "", path, namespace, importType, 0, 0); } DecisionComponents(); @Inject  DecisionComponents(final View view,
                              final DMNIncludeModelsClient client,
                              final ManagedInstance<DecisionComponentsItem> itemManagedInstance,
                              final DecisionComponentFilter filter,
                              final DMNDiagramsSession dmnDiagramsSession,
                              final DMNGraphUtils dmnGraphUtils); @PostConstruct void init(); View getView(); void refresh(); void removeAllItems();  }