Package org.drools.core.util

Examples of org.drools.core.util.HierarchyEncoder


        } else {
            Collection<Thing<K>> removedTypes;
            if ( core.hasTrait( trait.getName() ) ) {
                removedTypes = core.removeTrait( trait.getName() );
            } else {
                HierarchyEncoder hier = ((ReteooRuleBase) this.workingMemory.getRuleBase()).getConfiguration().getComponentFactory().getTraitRegistry().getHierarchy();
                BitSet code = hier.getCode( trait.getName() );
                removedTypes = core.removeTrait( code );
            }

            for ( Thing t : removedTypes ) {
                if ( ! ((TraitType) t).isVirtual() ) {
View Full Code Here


                core._setTraitMap( null );
                return thing;
            } if ( core.hasTrait( trait.getName() ) ) {
                removedTypes = core.removeTrait( trait.getName() );
            } else {
                HierarchyEncoder hier = ((ReteooRuleBase) this.workingMemory.getRuleBase()).getConfiguration().getComponentFactory().getTraitRegistry().getHierarchy();
                BitSet code = hier.getCode( trait.getName() );
                removedTypes = core.removeTrait( code );
            }

            removedTypes = new ArrayList<Thing<K>>( removedTypes );
            for ( Thing t : removedTypes ) {
View Full Code Here

                case TRIPLES:   proxy = konst.newInstance( core, ruleBase.getTripleStore(), getTripleFactory() );
                    break;
                default     :   throw new RuntimeException( " This should not happen : unexpected property wrapping method " + mode );
            }

            HierarchyEncoder hier = ruleBase.getConfiguration().getComponentFactory().getTraitRegistry().getHierarchy();

            ((TraitProxy) proxy).setTypeCode( hier.getCode( trait.getName() ) );
            core._setBottomTypeCode( hier.getBottom() );

            core.addTrait( traitName, proxy );

            return proxy;
        } catch (InstantiationException e) {
View Full Code Here

TOP

Related Classes of org.drools.core.util.HierarchyEncoder

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.