|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
F - Base class for facts.public interface ForwardReasoningSession<F>
Marker base interface for forward reasoning sessions.
| Method Summary | |
|---|---|
boolean |
contains(Handle<F> handle)
|
boolean |
contains(Object fact)
|
void |
executeRules()
Fires rules execution. |
F |
get(Handle<F> handle)
Retrieves object by its handle. |
Map<Class<F>,Set<Class<F>>> |
getConclusionMap()
Retrieves mapping of conclusion types to fact types from which given conclusion type can be inferred. |
Collection<Derivation<F>> |
getDerivations(F obj)
Returns information on how given object was derived. |
Collection<Derivation<F>> |
getDerivations(Handle<F> handle)
Returns information on how given object was derived. |
Handle<F> |
getHandle(Object fact)
Retrieves object handle. |
Collection<Handle<F>> |
getHandles()
|
InferenceListener<F> |
getInferenceListener()
|
Collection<? extends F> |
getObjects()
|
Handle<F> |
put(F fact)
Puts object to knowledge base. |
Handle<F>[] |
putAll(F... facts)
Puts facts to the knowledge base and returns array of their handles. |
List<Handle<F>> |
putAll(List<? extends F> facts)
Puts objects in the list to the knowledge base and returns their handles. |
void |
remove(F fact,
boolean strict)
Removes fact from the knowledge base. |
void |
remove(Handle<F> handle,
boolean strict)
Removes fact from the knowledge base. |
void |
setInferenceListener(InferenceListener<F> listener)
Sets reasoning listener for the session. |
void |
updateObject(Handle<F> handle,
F obj)
Updates fact. |
| Methods inherited from interface com.hammurapi.reasoning.ReasoningSession |
|---|
close, getDescription, getExceptionHandler, getName, reset, setExceptionHandler |
| Method Detail |
|---|
Handle<F> put(F fact)
throws ReasoningException
fact -
ReasoningException
List<Handle<F>> putAll(List<? extends F> facts)
throws ReasoningException
facts -
ReasoningException
Handle<F>[] putAll(F... facts)
throws ReasoningException
facts -
ReasoningException
boolean contains(Object fact)
throws ReasoningException
fact - Fact.
ReasoningException
boolean contains(Handle<F> handle)
throws ReasoningException
handle - Handle.
ReasoningException
F get(Handle<F> handle)
throws ReasoningException
handle -
ReasoningExceptionHandle<F> getHandle(Object fact)
fact -
void remove(F fact,
boolean strict)
throws ReasoningException
fact - Fact to be removed.strict - True means that the fact is known to be false
and the fact and all derivations shall be removed from the knowledge base.
False means that it is not known that the fact is true, but it
is not known that the fact is false either. As such, the fact
shall be removed (and all derivations) only if it wasn't derived
from other facts.
ReasoningException
void remove(Handle<F> handle,
boolean strict)
throws ReasoningException
handle - Fact represented by this handle to be removed.strict - True means that the fact is known to be false
and the fact and all derivations shall be removed from the knowledge base.
False means that it is not known that the fact is true, but it
is not known that the fact is false either. As such, the fact
shall be removed (and all derivations) only if it wasn't derived
from other facts.
ReasoningException
Collection<? extends F> getObjects()
throws ReasoningException
ReasoningException
Collection<Handle<F>> getHandles()
throws ReasoningException
ReasoningException
Collection<Derivation<F>> getDerivations(F obj)
throws ReasoningException
obj - Conclusion.
ReasoningException
Collection<Derivation<F>> getDerivations(Handle<F> handle)
throws ReasoningException
handle - Conclusion handle.
ReasoningException
void executeRules()
throws ReasoningException
ReasoningException
void setInferenceListener(InferenceListener<F> listener)
throws ReasoningException
listener -
ReasoningException
InferenceListener<F> getInferenceListener()
throws ReasoningException
ReasoningException
void updateObject(Handle<F> handle,
F obj)
throws ReasoningException
handle - Fact handle.obj - New fact value.
InvalidReasoningSessionException
InvalidHandleException
ReasoningExceptionMap<Class<F>,Set<Class<F>>> getConclusionMap()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||