@Test public void testGetDocumentFromImportsWithImportsFileIsImported() { includedModels.add(new PMMLIncludedModel(NAME, PACKAGE, IMPORT_PATH, DMNImportTypes.DMN.getDefaultNamespace(), MODEL_COUNT)); when(pathsHelper.getRelativeURI(dmnModelPath, includedModelPath)).thenReturn(IMPORT_PATH); assertThat(filter.getDocumentFromImports(dmnModelPath, includedModelPath, includedModels)).isEqualTo(pmmlDocumentMetadata); }
public PMMLDocumentMetadata getDocumentFromImports(final Path dmnModelPath, final Path includedModelPath, final List<PMMLIncludedModel> includedModels) { final Optional<PMMLIncludedModel> documentImport = getDocumentImport(dmnModelPath, includedModelPath, includedModels); return documentImport .map(pmml -> pmmlDocumentFactory.getDocumentByPath(includedModelPath, pmml)) .orElse(null); }
PMMLIncludedDocumentsFilter { public PMMLDocumentMetadata getDocumentFromImports(final Path dmnModelPath, final Path includedModelPath, final List<PMMLIncludedModel> includedModels) { final Optional<PMMLIncludedModel> documentImport = getDocumentImport(dmnModelPath, includedModelPath, includedModels); return documentImport .map(pmml -> pmmlDocumentFactory.getDocumentByPath(includedModelPath, pmml)) .orElse(null); } }
PMMLIncludedDocumentsFilter { public PMMLDocumentMetadata getDocumentFromImports(final Path dmnModelPath, final Path includedModelPath, final List<PMMLIncludedModel> includedModels) { final Optional<PMMLIncludedModel> documentImport = getDocumentImport(dmnModelPath, includedModelPath, includedModels); return documentImport .map(pmml -> pmmlDocumentFactory.getDocumentByPath(includedModelPath, pmml)) .orElse(null); } @Inject  PMMLIncludedDocumentsFilter(final DMNPathsHelper pathsHelper,
                                       final PMMLIncludedDocumentFactory pmmlDocumentFactory); }
PMMLIncludedDocumentsFilter { public PMMLDocumentMetadata getDocumentFromImports(final Path dmnModelPath, final Path includedModelPath, final List<PMMLIncludedModel> includedModels) { final Optional<PMMLIncludedModel> documentImport = getDocumentImport(dmnModelPath, includedModelPath, includedModels); return documentImport .map(pmml -> pmmlDocumentFactory.getDocumentByPath(includedModelPath, pmml)) .orElse(null); } @Inject  PMMLIncludedDocumentsFilter(final DMNPathsHelper pathsHelper,
                                       final PMMLIncludedDocumentFactory pmmlDocumentFactory); PMMLDocumentMetadata getDocumentFromImports(final Path dmnModelPath,
                                                       final Path includedModelPath,
                                                       final List<PMMLIncludedModel> includedModels); }
PMMLIncludedDocumentsFilter { public PMMLDocumentMetadata getDocumentFromImports(final Path dmnModelPath, final Path includedModelPath, final List<PMMLIncludedModel> includedModels) { final Optional<PMMLIncludedModel> documentImport = getDocumentImport(dmnModelPath, includedModelPath, includedModels); return documentImport .map(pmml -> pmmlDocumentFactory.getDocumentByPath(includedModelPath, pmml)) .orElse(null); } @Inject  PMMLIncludedDocumentsFilter(final DMNPathsHelper pathsHelper,
                                       final PMMLIncludedDocumentFactory pmmlDocumentFactory); PMMLDocumentMetadata getDocumentFromImports(final Path dmnModelPath,
                                                       final Path includedModelPath,
                                                       final List<PMMLIncludedModel> includedModels);  }