log( "Got RuleAdministrator implementation: " + ruleAdministrator );
// get an input stream to the file to load
InputStream inStream = Main.class.getResourceAsStream( fileName );
log( "Acquired InputStream to input file: " + inStream );
// load a RuleExecutionSet
RuleExecutionSet ruleExecutionSet =
ruleAdministrator.getLocalRuleExecutionSetProvider( null )
.createRuleExecutionSet( inStream, null );
log( "Loaded RuleExecutionSet: " + ruleExecutionSet );
// print the metadata about the ruleset
log( "Name: " + ruleExecutionSet.getName( ) );
log( "Description: " + ruleExecutionSet.getDescription( ) );
log( "Rules:" );
// print the names of the rules in the ruleset
for ( Iterator it = ruleExecutionSet.getRules( ).iterator( );
it.hasNext( ); )
{
Rule rule = ( Rule ) it.next( );
log( rule.getName( ) );
}