001    package biz.hammurapi.rules;
002    
003    import java.util.Iterator;
004    
005    /**
006     * Source of facts of particular type(s). Backward reasoning is built on
007     * pulling facts of needed type from fact sources.
008     * @author Pavel
009     *
010     */
011    public interface FactSource {
012    
013            /**
014             * @return Fact types provided by this source.
015             */
016            Class[] getFactTypes();
017            
018            /**
019             * Retrieves facts.
020             * @param factType
021             * @return Iterator over facts of requested type.
022             */
023            Iterator getFacts(Class factType);
024    }