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