|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.hammurapi.util.VisitableBase
biz.hammurapi.config.GenericContainer
biz.hammurapi.config.DomConfigurableContainer
biz.hammurapi.rules.backwardreasoning.BackwardReasoningRulesContainer
public class BackwardReasoningRulesContainer
Backward reasoning rules container. How to use:
Field Summary | |
---|---|
protected int |
maxPass
|
Fields inherited from interface biz.hammurapi.rules.Constants |
---|
COLLECTION_MANAGER, DESCRIPTION, HANDLE_MANAGER, KNOWLEDGE_COMPACTOR, NAME, NEGATOR_CLASS, OBJECT_FILTER, RETAIN_NEGATORS, RULES, URI_DIRECT, URI_PROPERTY, WORKER_REF |
Constructor Summary | |
---|---|
BackwardReasoningRulesContainer()
|
Method Summary | |
---|---|
void |
addFactSource(FactSource factSource)
Sets single fact source. |
void |
addFactSources(java.util.Collection factSources)
Sets multiple fact sources. |
protected Accumulator |
createAccumulator(java.lang.Class type)
This implementation creates simple accumulator which doesn't eliminate duplicates. |
protected java.lang.String |
getComponentName(org.w3c.dom.Node node)
|
java.util.Iterator |
getFacts(java.lang.Class factType)
If there is exact match, returns iterator for that match, combines subclasses otherwise. |
java.lang.Class[] |
getFactTypes()
|
java.util.Collection |
getRules()
|
void |
join()
This method blocks until all reasoning jobs finish execution. |
protected void |
onAccumulatorBlock()
|
void |
setCollectionManager(CollectionManager collectionManager)
Collection manager is required for join (multi-parameter) rules. |
void |
setExceptionSink(biz.hammurapi.util.ExceptionSink exceptionSink)
Exception sink to consume exceptions during reasoning. |
void |
setMaxWorkerJobs(int maxWorkerJobs)
When concurrent reasoning is used, deadlocks are possible depending on worker implementation/configuration. |
void |
setWorker(biz.hammurapi.util.Worker worker)
Set worker for concurrent reasoning. |
void |
start()
|
Methods inherited from class biz.hammurapi.config.DomConfigurableContainer |
---|
configure |
Methods inherited from class biz.hammurapi.config.GenericContainer |
---|
acceptChildren, addComponent, addMeasurement, execute, get, getAttribute, getComponentMap, getComponentNames, getComponents, getMeasurementConsumer, getOwner, removeAttribute, setAttribute, setMeasurementConsumer, setOwner, stop |
Methods inherited from class biz.hammurapi.util.VisitableBase |
---|
accept, convert2searchable, find, findAll, object2visitor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int maxPass
Constructor Detail |
---|
public BackwardReasoningRulesContainer()
Method Detail |
---|
public void addFactSource(FactSource factSource)
factSource
- public void setExceptionSink(biz.hammurapi.util.ExceptionSink exceptionSink)
exceptionSink
- public void setMaxWorkerJobs(int maxWorkerJobs)
maxWorkerJobs
- public void addFactSources(java.util.Collection factSources)
factSources
- public void start() throws biz.hammurapi.config.ConfigurationException
start
in interface biz.hammurapi.config.Component
start
in class biz.hammurapi.config.GenericContainer
biz.hammurapi.config.ConfigurationException
public void setCollectionManager(CollectionManager collectionManager) throws biz.hammurapi.config.ConfigurationException
collectionManager
-
biz.hammurapi.config.ConfigurationException
public void setWorker(biz.hammurapi.util.Worker worker)
worker
- public java.util.Collection getRules()
protected java.lang.String getComponentName(org.w3c.dom.Node node)
getComponentName
in class biz.hammurapi.config.DomConfigurableContainer
public void join() throws java.lang.InterruptedException
java.lang.InterruptedException
public java.util.Iterator getFacts(java.lang.Class factType)
getFacts
in interface FactSource
protected Accumulator createAccumulator(java.lang.Class type)
producers
-
protected void onAccumulatorBlock()
public java.lang.Class[] getFactTypes()
getFactTypes
in interface FactSource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |