public void addPackageFromDrl ( final Reader source , final Reader dsl ) throws DroolsParserException , IOException { this . resource = new ReaderResource ( source , ResourceType . DSLR ) ; final DrlParser parser = new DrlParser ( configuration . getLanguageLevel ( ) ) ; final PackageDescr pkg = parser . parse ( source , dsl ) ; this . results . addAll ( parser . getErrors ( ) ) ; if ( ! parser . hasErrors ( ) ) { addPackage ( pkg ) ; } this . resource = null ; }
Load a rule package from DRL source using the supplied DSL configuration .