Examples of addImport()


Examples of org.drools.core.rule.Package.addImport()

   
    private void setupTest(String consequence, Map<String, Object> namedConsequences) {
        builder = new MVELConsequenceBuilder();

        Package pkg = new Package( "org.drools.compiler.test" );
        pkg.addImport( new ImportDeclaration( Cheese.class.getCanonicalName() ) );

        PackageBuilderConfiguration conf = new PackageBuilderConfiguration();
        PackageBuilder pkgBuilder = new PackageBuilder( pkg,
                                                        conf );
View Full Code Here

Examples of org.drools.decisiontable.model.Package.addImport()

        for ( final Iterator it = this._ruleList.iterator(); it.hasNext(); ) {
            ruleset.addRule( (Rule) it.next() );
        }
        final List importList = RuleSheetParserUtil.getImportList( getProperties().getProperty( DefaultRuleSheetListener.IMPORT_TAG ) );
        for ( final Iterator it = importList.iterator(); it.hasNext(); ) {
            ruleset.addImport( (Import) it.next() );
        }
        final List variableList = RuleSheetParserUtil.getVariableList( getProperties().getProperty( DefaultRuleSheetListener.VARIABLES_TAG ) ); // Set the list of variables to
        // be added to the
        // application-data tags
        for ( final Iterator it = variableList.iterator(); it.hasNext(); ) {
View Full Code Here

Examples of org.drools.decisiontable.model.Ruleset.addImport()

            ruleset.addRule( (Rule) it.next( ) );
        }
        List importList = RuleSheetParserUtil.getImportList( getProperties( ).getProperty( IMPORT_TAG ) );
        for ( Iterator it = importList.iterator( ); it.hasNext( ); )
        {
            ruleset.addImport( (Import) it.next( ) );
        }
        List variableList = RuleSheetParserUtil.getVariableList( getProperties( ).getProperty( VARIABLES_TAG ) ); // Set the list of variables to be added to the application-data tags
        for ( Iterator it = variableList.iterator( ); it.hasNext( ); )
        {
            ruleset.addVariable( (Variable) it.next( ) );
View Full Code Here

Examples of org.drools.guvnor.models.commons.shared.imports.Imports.addImport()

                    if ( line.startsWith( KEYWORD ) ) {
                        line = line.substring( KEYWORD.length() ).trim();
                        if ( line.endsWith( ";" ) ) {
                            line = line.substring( 0, line.length() - 1 );
                        }
                        imports.addImport( new Import( line ) );
                    }
                }
            }

            return imports;
View Full Code Here

Examples of org.drools.lang.descr.PackageDescr.addImport()

            if ( !typeDescr.getNamespace().equals( packageDescr.getNamespace() ) ) {
                // If the type declaration is for a different namespace, process that separately.
                PackageDescr altDescr = new PackageDescr( typeDescr.getNamespace() );
                altDescr.addTypeDeclaration( typeDescr );
                for ( ImportDescr imp : packageDescr.getImports() ) {
                    altDescr.addImport( imp );
                }
                if ( getPackageRegistry().containsKey( altDescr.getNamespace() ) ) {
                    mergePackage( altDescr );
                } else {
                    newPackage( altDescr );
View Full Code Here

Examples of org.drools.rule.MVELDialectRuntimeData.addImport()

                                                                         Person.class.getName(),
                                                                         "addresses['home'].street",
                                                                         true,
                                                                         String.class );
        MVELDialectRuntimeData data = new MVELDialectRuntimeData();
        data.addImport( Person.class.getSimpleName(), Person.class );
        data.onAdd( null, ClassLoaderUtil.getClassLoader( null, getClass(), false ) );
       
        extractor.compile( data );
       
       
View Full Code Here

Examples of org.drools.rule.Package.addImport()

   
    private void setupTest(String consequence, Map<String, Object> namedConsequences) {
        builder = new MVELConsequenceBuilder();

        Package pkg = new Package( "org.drools" );
        pkg.addImport( new ImportDeclaration( "org.drools.Cheese" ) );

        PackageBuilderConfiguration conf = new PackageBuilderConfiguration();
        PackageBuilder pkgBuilder = new PackageBuilder( pkg,
                                                        conf );
View Full Code Here

Examples of org.drools.smf.DefaultImporter.addImport()

    }

    public void setUp() throws Exception
    {
        Importer importer = new DefaultImporter( );
        importer.addImport( new BaseImportEntry( "from java.math import *" ) );
        importer.addImport( new BaseImportEntry( "from org.drools.smf import SMFTestFrameWork" ) );
        importer.addImport( new BaseImportEntry( "from org.drools.smf.SMFTestFrameWork import Cheese" ) );
        super.setUp( "python",
                     importer );
    }
View Full Code Here

Examples of org.drools.spi.Importer.addImport()

    }

    public void setUp() throws Exception
    {
        Importer importer = new DefaultImporter( );
        importer.addImport( new BaseImportEntry( "from java.math import *" ) );
        importer.addImport( new BaseImportEntry( "from org.drools.smf import SMFTestFrameWork" ) );
        importer.addImport( new BaseImportEntry( "from org.drools.smf.SMFTestFrameWork import Cheese" ) );
        super.setUp( "python",
                     importer );
    }
View Full Code Here

Examples of org.drools.template.model.Package.addImport()

            ruleset.addRule( rule );
        }

        final List<Import> importList = RuleSheetParserUtil.getImportList( getProperties().getProperty( IMPORT_TAG ) );
        for ( Import import1 : importList ) {
            ruleset.addImport( import1 );
        }

        final List<Global> variableList = RuleSheetParserUtil.getVariableList( getProperties().getProperty( VARIABLES_TAG ) );
        for ( Global global : variableList ) {
            ruleset.addVariable( global );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.