Package org.drools.spi

Examples of org.drools.spi.RuleBaseContext


        PyDictionary dict = new PyDictionary( );

        // dict.setdefault( new PyString( "q" ), qFunc ); //add tenerary
        // function

        RuleBaseContext ruleBaseContext = rule.getRuleSet( ).getRuleBaseContext( );
        ClassLoader cl = (ClassLoader) ruleBaseContext.get( "smf-classLoader" );
        if ( cl == null )
        {
            cl = Thread.currentThread( ).getContextClassLoader( );
            ruleBaseContext.put( "smf-classLoader",
                                 cl );
        }

        if ( cl == null )
        {
            cl = getClass( ).getClassLoader( );
            ruleBaseContext.put( "smf-classLoader",
                                 cl );
        }
       

        while ( declIter.hasNext( ) )
View Full Code Here


    /**
     * Construct.
     */
    public RuleBaseBuilder( )
    {
        this.ruleBaseContext = new RuleBaseContext( );
        this.builder = new Builder( ruleBaseContext );
       
    }
View Full Code Here

        this.name = name;
        this.ruleNames = new HashSet( );
        this.rules = new ArrayList( );
        this.applicationData = new HashMap( );
        this.functions = new HashMap( );
        this.ruleBaseContext = new RuleBaseContext( );
    }
View Full Code Here

        this.repository = DefaultSemanticsRepository.getInstance( );
        module = this.repository.lookupSemanticModule( "http://drools.org/semantics/" + semantic );

        this.importer = importer;

        this.ruleBaseContext = new RuleBaseContext( );

    }
View Full Code Here

                }
            } catch (JavaModelException e) {
                // do nothing
            }

            RuleBaseContext factoryContext = new RuleBaseContext();
            RuleSetReaderWithErrors reader = new RuleSetReaderWithErrors(factoryContext);
            try {
                ClassLoader oldLoader = Thread.currentThread()
                        .getContextClassLoader();
                ClassLoader newLoader = DroolsBuilder.class.getClassLoader();
View Full Code Here

        this( rete,
              DefaultConflictResolver.getInstance( ),
              new DefaultFactHandleFactory( ),
              null,
              new HashMap( ) ,
              new RuleBaseContext( ) );
    }
View Full Code Here

    public void addFromInputSource(InputSource[] sources) throws SAXException,
                                                        IOException,
                                                        IntegrationException
    {
        String packageName = "drools.org";
        RuleBaseContext factoryContext = new RuleBaseContext();
        RuleSet ruleSet = null;
        for ( int i = 0; i < sources.length; ++i )
        {
            RuleSetReader reader = new RuleSetReader( factoryContext );
            try {
View Full Code Here

                                   String typeName,
                                   Semaphore matchedSemaphore,
                                   Semaphore badTypeSemaphore,
                                   Semaphore badIdentifierSemaphore) throws Exception
    {
        RuleBaseContext ruleBaseContext = new RuleBaseContext( );

        DefaultConfiguration configuration = new DefaultConfiguration( "test1" );
        configuration.setAttribute( "type",
                                    typeName );
        configuration.setAttribute( "identifier",
View Full Code Here

        this.characters = null;
        this.configurationStack.clear( );
        this.namespaces.clear( );
        if ( this.factoryContext == null )
        {
            this.factoryContext = new RuleBaseContext( );
        }

        // now assign the smf classloader so smf implementations can access it
        ClassLoader classLoader = (ClassLoader) this.factoryContext.get( "smf-classLoader" );
        if ( classLoader == null )
View Full Code Here

public class ApplicationDataFactoryTest extends TestCase
{

    public void testApplicationDataWithOutImports() throws FactoryException
    {
        RuleBaseContext ruleBaseContext = new RuleBaseContext( );

        DefaultConfiguration configuration = new DefaultConfiguration( "test1" );
        configuration.setText( "java.util.HashMap" );
        configuration.setAttribute( "identifier",
                                    "map" );
View Full Code Here

TOP

Related Classes of org.drools.spi.RuleBaseContext

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.