RuleAtom bYearAtom = new DatavaluedPropertyAtom( bYear, x, xYear );
RuleAtom bMonthAtom = new DatavaluedPropertyAtom( bMonth, x, xMonth );
RuleAtom bDayAtom = new DatavaluedPropertyAtom( bDay, x, xDay );
RuleAtom bTZAtom = new DatavaluedPropertyAtom( bTZ, x, xTZ );
Rule fromDate = new Rule( Arrays
.asList( new RuleAtom[] { bYearAtom, bMonthAtom, bDayAtom } ), Arrays
.asList( new RuleAtom[] { dateBuiltIn, bDateAtom } ) );
kb.addRule( fromDate );
Rule fromDateTZ = new Rule( Arrays.asList( new RuleAtom[] {
bYearAtom, bMonthAtom, bDayAtom, bTZAtom } ), Arrays.asList( new RuleAtom[] {
dateBuiltInTZ, bDateAtom } ) );
kb.addRule( fromDateTZ );
Rule toDate = new Rule( Arrays.asList( new RuleAtom[] { bDateAtom } ), Arrays
.asList( new RuleAtom[] { dateBuiltIn, bYearAtom, bMonthAtom, bDayAtom } ) );
kb.addRule( toDate );
Rule toDateTZ = new Rule( Arrays.asList( new RuleAtom[] { bDateAtom } ),
Arrays.asList( new RuleAtom[] {
dateBuiltInTZ, bYearAtom, bMonthAtom, bDayAtom, bTZAtom } ) );
kb.addRule( toDateTZ );
assertTrue( kb.isConsistent() );