Search in sources :

Example 11 with ModelDriverResult

use of org.kie.workbench.common.services.datamodeller.driver.model.ModelDriverResult in project kie-wb-common by kiegroup.

the class DataModelOracleModelDriver method loadModel.

@Override
public ModelDriverResult loadModel() throws ModelDriverException {
    ModelDriverResult result = new ModelDriverResult();
    result.setDataModel(loadModel(oracleDataModel, moduleClassLoader));
    return result;
}
Also used : ModelDriverResult(org.kie.workbench.common.services.datamodeller.driver.model.ModelDriverResult)

Example 12 with ModelDriverResult

use of org.kie.workbench.common.services.datamodeller.driver.model.ModelDriverResult in project kie-wb-common by kiegroup.

the class JavaRoasterModelDriver method loadModel.

@Override
public ModelDriverResult loadModel() throws ModelDriverException {
    ModelDriverResult result = new ModelDriverResult();
    DataModel dataModel;
    String fileContent;
    dataModel = createModel();
    result.setDataModel(dataModel);
    List<Path> rootPaths = new ArrayList<Path>();
    rootPaths.add(javaRootPath);
    Collection<FileUtils.ScanResult> scanResults = FileUtils.getInstance().scan(ioService, rootPaths, ".java", true);
    if (scanResults != null) {
        for (FileUtils.ScanResult scanResult : scanResults) {
            logger.debug("Starting file loading into model, file: " + scanResult.getFile());
            fileContent = ioService.readAllString(scanResult.getFile());
            if (fileContent == null || "".equals(fileContent)) {
                logger.debug("file: " + scanResult.getFile() + " is empty.");
                result.addError(new DriverError("File has no content", Paths.convert(scanResult.getFile())));
                continue;
            }
            try {
                JavaType<?> javaType = Roaster.parse(fileContent);
                final boolean isManaged = isManagedJavaType(javaType);
                final boolean vetoed = (isManaged ? isVetoed(javaType) : false);
                if (isManaged && !vetoed) {
                    if (javaType.getSyntaxErrors() != null && !javaType.getSyntaxErrors().isEmpty()) {
                        // if a file has parsing errors it will be skipped.
                        addSyntaxErrors(result, scanResult.getFile(), javaType.getSyntaxErrors());
                    } else if (javaType.isEnum()) {
                        loadFromJavaEnum((JavaEnumSource) javaType, scanResult.getFile(), dataModel, result);
                    } else {
                        loadFromJavaClass((JavaClassSource) javaType, scanResult.getFile(), dataModel, result);
                    }
                } else if (vetoed) {
                    logger.debug("The class, {}, in the file, {}, was vetoed and will be skipped.", javaType.getQualifiedName(), scanResult.getFile());
                } else {
                    logger.debug("File: " + scanResult.getFile() + " do not contain a managed java type, it will be skipped.");
                }
            } catch (ParserException e) {
                result.addError(new DriverError(e.getMessage(), Paths.convert(scanResult.getFile())));
            } catch (Exception e) {
                // Unexpected error.
                logger.error(errorMessage(MODEL_LOAD_GENERIC_ERROR, javaRootPath.toUri()), e);
                throw new ModelDriverException(errorMessage(MODEL_LOAD_GENERIC_ERROR, javaRootPath.toUri()), e);
            }
        }
    }
    return result;
}
Also used : Path(org.uberfire.java.nio.file.Path) ParserException(org.jboss.forge.roaster.ParserException) FileUtils(org.kie.workbench.common.services.datamodeller.util.FileUtils) ArrayList(java.util.ArrayList) JavaClassSource(org.jboss.forge.roaster.model.source.JavaClassSource) ModelDriverException(org.kie.workbench.common.services.datamodeller.driver.ModelDriverException) ModelDriverException(org.kie.workbench.common.services.datamodeller.driver.ModelDriverException) IOException(java.io.IOException) ParserException(org.jboss.forge.roaster.ParserException) DriverError(org.kie.workbench.common.services.datamodeller.driver.model.DriverError) DataModel(org.kie.workbench.common.services.datamodeller.core.DataModel) JavaEnumSource(org.jboss.forge.roaster.model.source.JavaEnumSource) ModelDriverResult(org.kie.workbench.common.services.datamodeller.driver.model.ModelDriverResult)

Example 13 with ModelDriverResult

use of org.kie.workbench.common.services.datamodeller.driver.model.ModelDriverResult in project kie-wb-common by kiegroup.

the class JavaRoasterModelDriver method loadDataObject.

public ModelDriverResult loadDataObject(final String source, final Path path) throws ModelDriverException {
    ModelDriverResult result = new ModelDriverResult();
    DataModel dataModel = createModel();
    result.setDataModel(dataModel);
    if (source == null || "".equals(source)) {
        logger.debug("source: " + source + " is empty.");
        result.addError(new DriverError("Source is empty", Paths.convert(path)));
        return result;
    }
    try {
        JavaType<?> javaType = Roaster.parse(source);
        if (javaType.isClass()) {
            if (javaType.getSyntaxErrors() != null && !javaType.getSyntaxErrors().isEmpty()) {
                // if a file has parsing errors it will be skipped.
                addSyntaxErrors(result, path, javaType.getSyntaxErrors());
            } else {
                try {
                    // try to load the data object.
                    Pair<DataObject, List<ObjectProperty>> pair = parseDataObject((JavaClassSource) javaType);
                    dataModel.addDataObject(pair.getK1());
                    result.setClassPath(pair.getK1().getClassName(), Paths.convert(path));
                    result.setUnmanagedProperties(pair.getK1().getClassName(), pair.getK2());
                } catch (ModelDriverException e) {
                    logger.error("An error was produced when source: " + source + " was being loaded into a DataObject.", e);
                    addModelDriverError(result, path, e);
                }
            }
        } else {
            logger.debug("No Class definition was found for source: " + source + ", it will be skipped.");
        }
    } catch (ParserException e) {
        result.addError(new DriverError(e.getMessage(), Paths.convert(path)));
    } catch (Exception e) {
        // Unexpected exception.
        logger.error(errorMessage(MODEL_LOAD_GENERIC_ERROR, javaRootPath.toUri()), e);
        throw new ModelDriverException(errorMessage(MODEL_LOAD_GENERIC_ERROR, javaRootPath.toUri()), e);
    }
    return result;
}
Also used : ParserException(org.jboss.forge.roaster.ParserException) DataObject(org.kie.workbench.common.services.datamodeller.core.DataObject) DataModel(org.kie.workbench.common.services.datamodeller.core.DataModel) List(java.util.List) ArrayList(java.util.ArrayList) ModelDriverResult(org.kie.workbench.common.services.datamodeller.driver.model.ModelDriverResult) ModelDriverException(org.kie.workbench.common.services.datamodeller.driver.ModelDriverException) ModelDriverException(org.kie.workbench.common.services.datamodeller.driver.ModelDriverException) IOException(java.io.IOException) ParserException(org.jboss.forge.roaster.ParserException) DriverError(org.kie.workbench.common.services.datamodeller.driver.model.DriverError)

Example 14 with ModelDriverResult

use of org.kie.workbench.common.services.datamodeller.driver.model.ModelDriverResult in project kie-wb-common by kiegroup.

the class JavaRoasterModelDriverTest method nestedClassUpdateTest.

@Test
public void nestedClassUpdateTest() {
    try {
        // First read the NestedClassUpdateTest
        Path nestedClassUpdateTestFilePath = rootPath.resolve("package5").resolve("NestedClassUpdateTest.java");
        String source = ioService.readAllString(nestedClassUpdateTestFilePath);
        JavaClassSource nestedClassUpdateTestJavaClassSource = (JavaClassSource) Roaster.parse(source);
        ClassLoader classLoader = getClass().getClassLoader();
        ClassTypeResolver classTypeResolver = DriverUtils.createClassTypeResolver(nestedClassUpdateTestJavaClassSource, classLoader);
        final SourceFilter pojo1Filter = javaType -> false;
        final NestedClassFilter nestedClassFilter = javaType -> javaType.isClass() && javaType.getAnnotation(Generated.class) != null;
        final MethodFilter methodFilter = method -> !method.isConstructor() && method.getAnnotation(Generated.class) != null;
        FilterHolder filterHolder = mock(FilterHolder.class);
        when(filterHolder.getSourceFilters()).thenReturn(Collections.singleton(pojo1Filter));
        when(filterHolder.getNestedClassFilters()).thenReturn(Collections.singleton(nestedClassFilter));
        when(filterHolder.getMethodFilters()).thenReturn(Collections.singleton(methodFilter));
        JavaRoasterModelDriver javaRoasterModelDriver = new JavaRoasterModelDriver(ioService, rootPath, classLoader, filterHolder);
        ModelDriverResult result = javaRoasterModelDriver.loadDataObject(source, nestedClassUpdateTestFilePath);
        // 1) read the NestedClassUpdateTest
        DataObject nestedClassUpdateTest = result.getDataModel().getDataObject("org.kie.workbench.common.services.datamodeller.driver.package5.NestedClassUpdateTest");
        // 2) modify the NestedClassUpdateTest according to the expected result
        JavaClass nestedClass = nestedClassUpdateTest.getNestedClasses().stream().filter(t -> t.getName().equals("NestedClass")).findFirst().get();
        assertNotNull(nestedClass);
        nestedClass.setName("UpdatedNestedClass");
        String removedInterface = nestedClass.removeInterface("ParametrizedInterface<Integer>");
        assertNotNull(removedInterface);
        nestedClass.addInterface("ParametrizedInterface<Double>");
        Method method = nestedClass.getMethod("method", Collections.EMPTY_LIST);
        assertNotNull(method);
        method.setName("updatedMethod");
        nestedClassUpdateTest.setName("NestedClassUpdateTestResult");
        // 3) compare the modified data object with the expected data object.
        Path expectedFilePath = rootPath.resolve("package5").resolve("NestedClassUpdateTestResult.java");
        String expectedSource = ioService.readAllString(expectedFilePath);
        JavaClassSource expectedJavaClassSource = (JavaClassSource) Roaster.parse(expectedSource);
        ModelDriverResult expectedResult = javaRoasterModelDriver.loadDataObject(expectedSource, expectedFilePath);
        DataObject nestedClassUpdateTestResult = expectedResult.getDataModel().getDataObject("org.kie.workbench.common.services.datamodeller.driver.package5.NestedClassUpdateTestResult");
        // First check, the modified data object in memory should be the same as the readed from the model.
        DataModelerAssert.assertEqualsDataObject(nestedClassUpdateTestResult, nestedClassUpdateTest);
        // Second check, update the JavaClassSource corresponding to the NestedClassUpdateTest
        javaRoasterModelDriver.updateSource(nestedClassUpdateTestJavaClassSource, nestedClassUpdateTest, new UpdateInfo(), classTypeResolver);
        ModelDriverResult updatedResult = javaRoasterModelDriver.loadDataObject(nestedClassUpdateTestJavaClassSource.toString(), nestedClassUpdateTestFilePath);
        // and now compare the updatedResult with the expected value.
        DataModelerAssert.assertEqualsDataObject(nestedClassUpdateTestResult, updatedResult.getDataModel().getDataObject("org.kie.workbench.common.services.datamodeller.driver.package5.NestedClassUpdateTestResult"));
        logger.debug(nestedClassUpdateTestJavaClassSource.toString());
    } catch (Exception e) {
        e.printStackTrace();
        fail("Test failed: " + e.getMessage());
    }
}
Also used : Path(org.uberfire.java.nio.file.Path) Description(org.kie.api.definition.type.Description) Arrays(java.util.Arrays) ClassTypeResolver(org.kie.soup.project.datamodel.commons.types.ClassTypeResolver) Timestamp(org.kie.api.definition.type.Timestamp) Label(org.kie.api.definition.type.Label) TestAnnotation1(org.kie.workbench.common.services.datamodeller.parser.test.TestAnnotation1) UpdateInfo(org.kie.workbench.common.services.datamodeller.driver.impl.UpdateInfo) LoggerFactory(org.slf4j.LoggerFactory) DataModelerAssert(org.kie.workbench.common.services.datamodeller.DataModelerAssert) Paths(org.uberfire.backend.server.util.Paths) Generated(javax.annotation.Generated) Matcher(java.util.regex.Matcher) Roaster(org.jboss.forge.roaster.Roaster) ClassAnnotation(org.kie.workbench.common.services.datamodeller.annotations.ClassAnnotation) SequenceGenerator(javax.persistence.SequenceGenerator) SimpleFileSystemProvider(org.uberfire.java.nio.fs.file.SimpleFileSystemProvider) JavaEnum(org.kie.workbench.common.services.datamodeller.core.JavaEnum) URI(java.net.URI) Instance(javax.enterprise.inject.Instance) Entity(javax.persistence.Entity) ParameterImpl(org.kie.workbench.common.services.datamodeller.core.impl.ParameterImpl) UniqueConstraint(javax.persistence.UniqueConstraint) ClassReactive(org.kie.api.definition.type.ClassReactive) JavaTypeInfo(org.kie.workbench.common.services.datamodeller.core.JavaTypeInfo) ENUM3(org.kie.workbench.common.services.datamodeller.annotations.ENUM3) NoSuchFileException(org.uberfire.java.nio.file.NoSuchFileException) List(java.util.List) AnnotationDefinition(org.kie.workbench.common.services.datamodeller.core.AnnotationDefinition) DataModelImpl(org.kie.workbench.common.services.datamodeller.core.impl.DataModelImpl) JavaClassSource(org.jboss.forge.roaster.model.source.JavaClassSource) EnumsAnnotation(org.kie.workbench.common.services.datamodeller.annotations.EnumsAnnotation) AnnotationValuesAnnotation(org.kie.workbench.common.services.datamodeller.annotations.AnnotationValuesAnnotation) Role(org.kie.api.definition.type.Role) JavaClassImpl(org.kie.workbench.common.services.datamodeller.core.impl.JavaClassImpl) PrimitivesAnnotation(org.kie.workbench.common.services.datamodeller.annotations.PrimitivesAnnotation) JavaRoasterModelDriver(org.kie.workbench.common.services.datamodeller.driver.impl.JavaRoasterModelDriver) ObjectProperty(org.kie.workbench.common.services.datamodeller.core.ObjectProperty) Expires(org.kie.api.definition.type.Expires) TestAnnotation(org.kie.workbench.common.services.datamodeller.parser.test.TestAnnotation) MarkerAnnotation(org.kie.workbench.common.services.datamodeller.annotations.MarkerAnnotation) Parameter(org.kie.workbench.common.services.datamodeller.core.Parameter) Mock(org.mockito.Mock) Path(org.uberfire.java.nio.file.Path) RunWith(org.junit.runner.RunWith) DriverUtils(org.kie.workbench.common.services.datamodeller.util.DriverUtils) Annotation(org.kie.workbench.common.services.datamodeller.core.Annotation) Type(org.kie.workbench.common.services.datamodeller.core.Type) ArrayList(java.util.ArrayList) Table(javax.persistence.Table) TypeSafe(org.kie.api.definition.type.TypeSafe) Duration(org.kie.api.definition.type.Duration) DataModel(org.kie.workbench.common.services.datamodeller.core.DataModel) Before(org.junit.Before) Logger(org.slf4j.Logger) JavaEnumImpl(org.kie.workbench.common.services.datamodeller.core.impl.JavaEnumImpl) DataObject(org.kie.workbench.common.services.datamodeller.core.DataObject) IOException(java.io.IOException) Test(org.junit.Test) Method(org.kie.workbench.common.services.datamodeller.core.Method) InputStreamReader(java.io.InputStreamReader) File(java.io.File) ImportImpl(org.kie.workbench.common.services.datamodeller.core.impl.ImportImpl) DataObjectImpl(org.kie.workbench.common.services.datamodeller.core.impl.DataObjectImpl) MethodImpl(org.kie.workbench.common.services.datamodeller.core.impl.MethodImpl) Mockito(org.mockito.Mockito) TestEnums(org.kie.workbench.common.services.datamodeller.annotations.TestEnums) AnnotationImpl(org.kie.workbench.common.services.datamodeller.core.impl.AnnotationImpl) MockitoJUnitRunner(org.mockito.runners.MockitoJUnitRunner) Position(org.kie.api.definition.type.Position) JavaClass(org.kie.workbench.common.services.datamodeller.core.JavaClass) TypeImpl(org.kie.workbench.common.services.datamodeller.core.impl.TypeImpl) ModelDriverResult(org.kie.workbench.common.services.datamodeller.driver.model.ModelDriverResult) IOService(org.uberfire.io.IOService) BufferedReader(java.io.BufferedReader) Key(org.kie.api.definition.type.Key) Assert(org.junit.Assert) Collections(java.util.Collections) Visibility(org.kie.workbench.common.services.datamodeller.core.Visibility) InputStream(java.io.InputStream) JavaClassSource(org.jboss.forge.roaster.model.source.JavaClassSource) Method(org.kie.workbench.common.services.datamodeller.core.Method) NoSuchFileException(org.uberfire.java.nio.file.NoSuchFileException) IOException(java.io.IOException) DataObject(org.kie.workbench.common.services.datamodeller.core.DataObject) JavaClass(org.kie.workbench.common.services.datamodeller.core.JavaClass) ModelDriverResult(org.kie.workbench.common.services.datamodeller.driver.model.ModelDriverResult) ClassTypeResolver(org.kie.soup.project.datamodel.commons.types.ClassTypeResolver) JavaRoasterModelDriver(org.kie.workbench.common.services.datamodeller.driver.impl.JavaRoasterModelDriver) UpdateInfo(org.kie.workbench.common.services.datamodeller.driver.impl.UpdateInfo) Test(org.junit.Test)

Example 15 with ModelDriverResult

use of org.kie.workbench.common.services.datamodeller.driver.model.ModelDriverResult in project kie-wb-common by kiegroup.

the class JavaRoasterModelDriverTest method modelVetoingTest.

@Test
public void modelVetoingTest() throws Exception {
    try {
        final SourceFilter pojo1Filter = javaType -> javaType.getName().equals("Pojo1");
        final NestedClassFilter nestedClassFilter = javaType -> javaType.isClass() && javaType.getAnnotation(Generated.class) != null;
        final MethodFilter methodFilter = method -> !method.isConstructor() && method.getAnnotation(Generated.class) != null;
        FilterHolder filterHolder = mock(FilterHolder.class);
        when(filterHolder.getSourceFilters()).thenReturn(Collections.singleton(pojo1Filter));
        when(filterHolder.getNestedClassFilters()).thenReturn(Collections.singleton(nestedClassFilter));
        when(filterHolder.getMethodFilters()).thenReturn(Collections.singleton(methodFilter));
        final JavaRoasterModelDriver javaRoasterModelDriver = new JavaRoasterModelDriver(ioService, rootPath, getClass().getClassLoader(), filterHolder);
        ModelDriverResult modelDriverResult = javaRoasterModelDriver.loadModel();
        DataModel dataModelOriginal = createModel();
        assertNotNull(modelDriverResult);
        assertNotNull(modelDriverResult.getDataModel());
        assertEquals(dataModelOriginal.getDataObjects().size() - 1, modelDriverResult.getDataModel().getDataObjects().size());
        for (DataObject dataObject : modelDriverResult.getDataModel().getDataObjects()) {
            if (!dataObject.getClassName().endsWith("Pojo1")) {
                DataModelerAssert.assertEqualsDataObject(dataObject, modelDriverResult.getDataModel().getDataObject(dataObject.getClassName()));
            } else {
                fail("Pojo1 should have been vetoed.");
            }
        }
    } catch (Exception e) {
        e.printStackTrace();
        fail("Test failed: " + e.getMessage());
    }
}
Also used : Description(org.kie.api.definition.type.Description) Arrays(java.util.Arrays) ClassTypeResolver(org.kie.soup.project.datamodel.commons.types.ClassTypeResolver) Timestamp(org.kie.api.definition.type.Timestamp) Label(org.kie.api.definition.type.Label) TestAnnotation1(org.kie.workbench.common.services.datamodeller.parser.test.TestAnnotation1) UpdateInfo(org.kie.workbench.common.services.datamodeller.driver.impl.UpdateInfo) LoggerFactory(org.slf4j.LoggerFactory) DataModelerAssert(org.kie.workbench.common.services.datamodeller.DataModelerAssert) Paths(org.uberfire.backend.server.util.Paths) Generated(javax.annotation.Generated) Matcher(java.util.regex.Matcher) Roaster(org.jboss.forge.roaster.Roaster) ClassAnnotation(org.kie.workbench.common.services.datamodeller.annotations.ClassAnnotation) SequenceGenerator(javax.persistence.SequenceGenerator) SimpleFileSystemProvider(org.uberfire.java.nio.fs.file.SimpleFileSystemProvider) JavaEnum(org.kie.workbench.common.services.datamodeller.core.JavaEnum) URI(java.net.URI) Instance(javax.enterprise.inject.Instance) Entity(javax.persistence.Entity) ParameterImpl(org.kie.workbench.common.services.datamodeller.core.impl.ParameterImpl) UniqueConstraint(javax.persistence.UniqueConstraint) ClassReactive(org.kie.api.definition.type.ClassReactive) JavaTypeInfo(org.kie.workbench.common.services.datamodeller.core.JavaTypeInfo) ENUM3(org.kie.workbench.common.services.datamodeller.annotations.ENUM3) NoSuchFileException(org.uberfire.java.nio.file.NoSuchFileException) List(java.util.List) AnnotationDefinition(org.kie.workbench.common.services.datamodeller.core.AnnotationDefinition) DataModelImpl(org.kie.workbench.common.services.datamodeller.core.impl.DataModelImpl) JavaClassSource(org.jboss.forge.roaster.model.source.JavaClassSource) EnumsAnnotation(org.kie.workbench.common.services.datamodeller.annotations.EnumsAnnotation) AnnotationValuesAnnotation(org.kie.workbench.common.services.datamodeller.annotations.AnnotationValuesAnnotation) Role(org.kie.api.definition.type.Role) JavaClassImpl(org.kie.workbench.common.services.datamodeller.core.impl.JavaClassImpl) PrimitivesAnnotation(org.kie.workbench.common.services.datamodeller.annotations.PrimitivesAnnotation) JavaRoasterModelDriver(org.kie.workbench.common.services.datamodeller.driver.impl.JavaRoasterModelDriver) ObjectProperty(org.kie.workbench.common.services.datamodeller.core.ObjectProperty) Expires(org.kie.api.definition.type.Expires) TestAnnotation(org.kie.workbench.common.services.datamodeller.parser.test.TestAnnotation) MarkerAnnotation(org.kie.workbench.common.services.datamodeller.annotations.MarkerAnnotation) Parameter(org.kie.workbench.common.services.datamodeller.core.Parameter) Mock(org.mockito.Mock) Path(org.uberfire.java.nio.file.Path) RunWith(org.junit.runner.RunWith) DriverUtils(org.kie.workbench.common.services.datamodeller.util.DriverUtils) Annotation(org.kie.workbench.common.services.datamodeller.core.Annotation) Type(org.kie.workbench.common.services.datamodeller.core.Type) ArrayList(java.util.ArrayList) Table(javax.persistence.Table) TypeSafe(org.kie.api.definition.type.TypeSafe) Duration(org.kie.api.definition.type.Duration) DataModel(org.kie.workbench.common.services.datamodeller.core.DataModel) Before(org.junit.Before) Logger(org.slf4j.Logger) JavaEnumImpl(org.kie.workbench.common.services.datamodeller.core.impl.JavaEnumImpl) DataObject(org.kie.workbench.common.services.datamodeller.core.DataObject) IOException(java.io.IOException) Test(org.junit.Test) Method(org.kie.workbench.common.services.datamodeller.core.Method) InputStreamReader(java.io.InputStreamReader) File(java.io.File) ImportImpl(org.kie.workbench.common.services.datamodeller.core.impl.ImportImpl) DataObjectImpl(org.kie.workbench.common.services.datamodeller.core.impl.DataObjectImpl) MethodImpl(org.kie.workbench.common.services.datamodeller.core.impl.MethodImpl) Mockito(org.mockito.Mockito) TestEnums(org.kie.workbench.common.services.datamodeller.annotations.TestEnums) AnnotationImpl(org.kie.workbench.common.services.datamodeller.core.impl.AnnotationImpl) MockitoJUnitRunner(org.mockito.runners.MockitoJUnitRunner) Position(org.kie.api.definition.type.Position) JavaClass(org.kie.workbench.common.services.datamodeller.core.JavaClass) TypeImpl(org.kie.workbench.common.services.datamodeller.core.impl.TypeImpl) ModelDriverResult(org.kie.workbench.common.services.datamodeller.driver.model.ModelDriverResult) IOService(org.uberfire.io.IOService) BufferedReader(java.io.BufferedReader) Key(org.kie.api.definition.type.Key) Assert(org.junit.Assert) Collections(java.util.Collections) Visibility(org.kie.workbench.common.services.datamodeller.core.Visibility) InputStream(java.io.InputStream) DataObject(org.kie.workbench.common.services.datamodeller.core.DataObject) DataModel(org.kie.workbench.common.services.datamodeller.core.DataModel) ModelDriverResult(org.kie.workbench.common.services.datamodeller.driver.model.ModelDriverResult) JavaRoasterModelDriver(org.kie.workbench.common.services.datamodeller.driver.impl.JavaRoasterModelDriver) NoSuchFileException(org.uberfire.java.nio.file.NoSuchFileException) IOException(java.io.IOException) Test(org.junit.Test)

Aggregations

ModelDriverResult (org.kie.workbench.common.services.datamodeller.driver.model.ModelDriverResult)17 JavaRoasterModelDriver (org.kie.workbench.common.services.datamodeller.driver.impl.JavaRoasterModelDriver)13 DataModel (org.kie.workbench.common.services.datamodeller.core.DataModel)10 Test (org.junit.Test)9 Path (org.uberfire.java.nio.file.Path)9 IOException (java.io.IOException)8 ArrayList (java.util.ArrayList)8 DataObject (org.kie.workbench.common.services.datamodeller.core.DataObject)8 List (java.util.List)7 JavaClassSource (org.jboss.forge.roaster.model.source.JavaClassSource)7 BufferedReader (java.io.BufferedReader)6 File (java.io.File)6 InputStream (java.io.InputStream)6 InputStreamReader (java.io.InputStreamReader)6 URI (java.net.URI)6 Arrays (java.util.Arrays)6 Collections (java.util.Collections)6 Matcher (java.util.regex.Matcher)6 Generated (javax.annotation.Generated)6 Instance (javax.enterprise.inject.Instance)6