Package org.drools.workbench.screens.factmodel.model

Examples of org.drools.workbench.screens.factmodel.model.FactModels


                                   final List<String> declaredTypes,
                                   final ConversionResult result ) {
        final Project project = projectService.resolveProject( context );

        for ( String declaredType : declaredTypes ) {
            final FactModels factModels = FactModelPersistence.unmarshal( declaredType );
            final String packageName = factModels.getPackageName();
            final DataModelTO dataModelTO = new DataModelTO();

            for ( FactMetaModel factMetaModel : factModels.getModels() ) {
                final DataObjectTO dataObjectTO = new DataObjectTO( factMetaModel.getName(),
                                                                    packageName,
                                                                    factMetaModel.getSuperType() );
                final List<AnnotationMetaModel> annotationMetaModel = factMetaModel.getAnnotations();
                addAnnotations( dataObjectTO,
View Full Code Here


        }

        final KieProject project = projectService.resolveProject( context );

        for ( String declaredType : declaredTypes ) {
            final FactModels factModels = FactModelPersistence.unmarshal( declaredType );
            final String packageName = factModels.getPackageName();
            final DataModelTO dataModelTO = new DataModelTO();

            for ( FactMetaModel factMetaModel : factModels.getModels() ) {
                final DataObjectTO dataObjectTO = new DataObjectTO( factMetaModel.getName(),
                                                                    packageName,
                                                                    factMetaModel.getSuperType() );
                final List<AnnotationMetaModel> annotationMetaModel = factMetaModel.getAnnotations();
                addAnnotations( dataObjectTO,
View Full Code Here

    @Override
    public void create( final Package pkg,
                        final String baseFileName,
                        final NewResourcePresenter presenter ) {
        final FactModels factModel = new FactModels();
        busyIndicatorView.showBusyIndicator( CommonConstants.INSTANCE.Saving() );
        factModelService.call( getSuccessCallback( presenter ),
                               new HasBusyIndicatorDefaultErrorCallback( busyIndicatorView ) ).create( pkg.getPackageMainResourcesPath(),
                                                                                                       buildFileName( resourceType,
                                                                                                                      baseFileName ),
View Full Code Here

        return FactModelPersistence.unmarshal( content );
    }

    @Override
    public FactModelContent loadContent( final Path path ) {
        final FactModels factModels = load( path );
        final List<FactMetaModel> allAvailableTypes = loadAllAvailableTypes( path );
        allAvailableTypes.addAll( factModels.getModels() );
        final PackageDataModelOracle oracle = dataModelService.getDataModel( path );
        return new FactModelContent( factModels,
                                     allAvailableTypes,
                                     oracle );
    }
View Full Code Here

    public static FactModels unmarshal( final String content ) {
        try {
            //De-serialize model
            final List<FactMetaModel> models = toModel( content );
            final FactModels factModels = new FactModels();
            factModels.getModels().addAll( models );

            //De-serialize Package name
            final String packageName = PackageNameParser.parsePackageName( content );
            factModels.setPackageName( packageName );

            //De-serialize imports
            final Imports imports = ImportsParser.parseImports( content );
            factModels.setImports( imports );

            return factModels;

        } catch ( final DroolsParserException e ) {
            throw new RuntimeException( e );
View Full Code Here

    public static FactModels unmarshal( final String content ) {
        try {
            //De-serialize model
            final List<FactMetaModel> models = toModel( content );
            final FactModels factModels = new FactModels();
            factModels.getModels().addAll( models );

            //De-serialize Package name
            final String packageName = PackageNameParser.parsePackageName( content );
            factModels.setPackageName( packageName );

            //De-serialize imports
            final Imports imports = ImportsParser.parseImports( content );
            factModels.setImports( imports );

            return factModels;

        } catch ( final DroolsParserException e ) {
            throw new RuntimeException( e );
View Full Code Here

    public static FactModels unmarshal( final String content ) {
        try {
            //De-serialize model
            final List<FactMetaModel> models = toModel( content );
            final FactModels factModels = new FactModels();
            factModels.getModels().addAll( models );

            //De-serialize Package name
            final String packageName = PackageNameParser.parsePackageName( content );
            factModels.setPackageName( packageName );

            //De-serialize imports
            final Imports imports = ImportsParser.parseImports( content );
            factModels.setImports( imports );

            return factModels;

        } catch ( final DroolsParserException e ) {
            throw new RuntimeException( e );
View Full Code Here

    }

    @Override
    public FactModelContent loadContent( final Path path ) {
        try {
            final FactModels factModels = load( path );
            final List<FactMetaModel> allAvailableTypes = loadAllAvailableTypes( path );
            allAvailableTypes.addAll( factModels.getModels() );
            final PackageDataModelOracle oracle = dataModelService.getDataModel( path );
            return new FactModelContent( factModels,
                                         allAvailableTypes,
                                         oracle );
View Full Code Here

    public static FactModels unmarshal( final String content ) {
        try {
            //De-serialize model
            final List<FactMetaModel> models = toModel( content );
            final FactModels factModels = new FactModels();
            factModels.getModels().addAll( models );

            //De-serialize Package name
            final String packageName = PackageNameParser.parsePackageName( content );
            factModels.setPackageName( packageName );

            //De-serialize imports
            final Imports imports = ImportsParser.parseImports( content );
            factModels.setImports( imports );

            return factModels;

        } catch ( final DroolsParserException e ) {
            throw new RuntimeException( e );
View Full Code Here

        }

        final Project project = projectService.resolveProject( context );

        for ( String declaredType : declaredTypes ) {
            final FactModels factModels = FactModelPersistence.unmarshal( declaredType );
            final String packageName = factModels.getPackageName();
            final DataModelTO dataModelTO = new DataModelTO();

            for ( FactMetaModel factMetaModel : factModels.getModels() ) {
                final DataObjectTO dataObjectTO = new DataObjectTO( factMetaModel.getName(),
                                                                    packageName,
                                                                    factMetaModel.getSuperType() );
                final List<AnnotationMetaModel> annotationMetaModel = factMetaModel.getAnnotations();
                addAnnotations( dataObjectTO,
View Full Code Here

TOP

Related Classes of org.drools.workbench.screens.factmodel.model.FactModels

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.