Package org.drools.workbench.models.datamodel.oracle

Examples of org.drools.workbench.models.datamodel.oracle.PackageDataModelOracle


    @Override
    public GuidedDecisionTreeEditorContent loadContent( final Path path ) {
        try {
            final GuidedDecisionTree model = load( path );
            final PackageDataModelOracle oracle = dataModelService.getDataModel( path );
            final PackageDataModelOracleBaselinePayload dataModel = new PackageDataModelOracleBaselinePayload();

            //Get FQCN's used by model
            final GuidedDecisionTreeModelVisitor visitor = new GuidedDecisionTreeModelVisitor( model );
            final Set<String> consumedFQCNs = visitor.getConsumedModelClasses();

            //Get FQCN's used by Globals
            consumedFQCNs.addAll( oracle.getPackageGlobals().values() );

            DataModelOracleUtilities.populateDataModel( oracle,
                                                        dataModel,
                                                        consumedFQCNs );
View Full Code Here


    }

    @Override
    public PackageDataModelOracleBaselinePayload loadDataModel( final Path path ) {
        try {
            final PackageDataModelOracle oracle = dataModelService.getDataModel( path );
            final PackageDataModelOracleBaselinePayload dataModel = new PackageDataModelOracleBaselinePayload();
            //There are no classes to pre-load into the DMO when requesting a new Data Model only
            DataModelOracleUtilities.populateDataModel( oracle,
                                                        dataModel,
                                                        new HashSet<String>() );
View Full Code Here

    @Override
    public ScoreCardModelContent loadContent( final Path path ) {
        try {
            final ScoreCardModel model = load( path );
            final PackageDataModelOracle oracle = dataModelService.getDataModel( path );
            final PackageDataModelOracleBaselinePayload dataModel = new PackageDataModelOracleBaselinePayload();
            final GuidedScoreCardModelVisitor visitor = new GuidedScoreCardModelVisitor( model );
            DataModelOracleUtilities.populateDataModel( oracle,
                                                        dataModel,
                                                        visitor.getConsumedModelClasses() );
View Full Code Here

    @Override
    public TestScenarioModelContent loadContent( Path path ) {
        try {
            final Scenario scenario = load( path );
            final String packageName = projectService.resolvePackage( path ).getPackageName();
            final PackageDataModelOracle oracle = dataModelService.getDataModel( path );
            final PackageDataModelOracleBaselinePayload dataModel = new PackageDataModelOracleBaselinePayload();

            //Get FQCN's used by model
            final TestScenarioModelVisitor visitor = new TestScenarioModelVisitor( dataModel, scenario );
            final Set<String> consumedFQCNs = visitor.visit();

            //Get FQCN's used by Globals
            consumedFQCNs.addAll( oracle.getPackageGlobals().values() );

            DataModelOracleUtilities.populateDataModel( oracle,
                                                        dataModel,
                                                        consumedFQCNs );
View Full Code Here

    @Override
    public GuidedTemplateEditorContent loadContent( final Path path ) {
        try {
            final TemplateModel model = load( path );
            final PackageDataModelOracle oracle = dataModelService.getDataModel( path );
            final PackageDataModelOracleBaselinePayload dataModel = new PackageDataModelOracleBaselinePayload();
            final GuidedRuleModelVisitor visitor = new GuidedRuleModelVisitor( model );
            DataModelOracleUtilities.populateDataModel( oracle,
                                                        dataModel,
                                                        visitor.getConsumedModelClasses() );
View Full Code Here

        String expected = "rule \"test expressionsNestedString\""
                + "\tdialect \"mvel\"\n when "
                + "     Person( favouriteCheese.name == \"Cheedar\" )"
                + " then " + "end";

        PackageDataModelOracle dmo = mock( PackageDataModelOracle.class );
        when(
                dmo.getProjectModelFields()
            ).thenReturn(
                new HashMap<String, ModelField[]>() {{
                    put( "Person", new ModelField[]{
                            new ModelField(
                                    "favouriteCheese",
View Full Code Here

        String expected = "rule \"test expressionsNestedNumber\""
                + "\tdialect \"mvel\"\n when "
                + "     Person( favouriteCheese.age == 55 )"
                + " then " + "end";

        PackageDataModelOracle dmo = mock( PackageDataModelOracle.class );
        when(
                dmo.getProjectModelFields()
            ).thenReturn(
                new HashMap<String, ModelField[]>() {{
                    put( "Person", new ModelField[]{
                            new ModelField(
                                    "favouriteCheese",
View Full Code Here

        String expected = "rule \"test expressionsNestedDate\""
                + "\tdialect \"mvel\"\n when "
                + "     Person( favouriteCheese.dateBrought == \"27-Jun-2011\" )"
                + " then " + "end";

        PackageDataModelOracle dmo = mock( PackageDataModelOracle.class );
        when(
                dmo.getProjectModelFields()
            ).thenReturn(
                new HashMap<String, ModelField[]>() {{
                    put( "Person", new ModelField[]{
                            new ModelField(
                                    "favouriteCheese",
View Full Code Here

        String expected = "rule \"test expressionsNestedJavaEnum\""
                + "\tdialect \"mvel\"\n when "
                + "     Person( favouriteCheese.genericName == CHEESE.Cheddar )"
                + " then " + "end";

        PackageDataModelOracle dmo = mock( PackageDataModelOracle.class );
        when(
                dmo.getProjectModelFields()
            ).thenReturn(
                new HashMap<String, ModelField[]>() {{
                    put( "Person", new ModelField[]{
                            new ModelField(
                                    "favouriteCheese",
View Full Code Here

        String expected = "rule \"test expressionsNestedBoolean\""
                + "\tdialect \"mvel\"\n when "
                + "     Person( favouriteCheese.smelly == true )"
                + " then " + "end";

        PackageDataModelOracle dmo = mock( PackageDataModelOracle.class );
        when(
                dmo.getProjectModelFields()
            ).thenReturn(
                new HashMap<String, ModelField[]>() {{
                    put( "Person", new ModelField[]{
                            new ModelField(
                                    "favouriteCheese",
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.datamodel.oracle.PackageDataModelOracle

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.