public class TraceAnalysis
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
AGGREGATE |
static java.lang.String |
FACT_UNAVAIL |
static java.lang.String |
INITIAL_FACT |
static java.lang.String |
NOT |
| Constructor and Description |
|---|
TraceAnalysis(DecisionTrace trace)
Create a navigable representation of a decision trace so that it may be analyzed.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<FactTrace> |
getActivationMatchedFacts(ActivationTrace activationTrace)
Get a list of traces for the facts that matched resulting in the activation trace.
|
java.util.List<FactTrace> |
getFactTraces(int factId)
Get a list of the fact traces for the fact with the ID
factId. |
java.util.List<java.lang.String> |
getFactTypes()
Get a list of the fact types that appear in the trace.
|
FactTrace |
getLastFactTrace(int factId)
Get the last fact trace for the fact with the ID
factId. |
java.util.List<FactTrace> |
getLastFactTraces(java.lang.String factType)
Get a list, for each fact of the specified type, of the last fact trace available in the trace.
|
RuleEngineState |
getRuleEngineState(TraceEntry traceEntry) |
java.util.List<FactTrace> |
getRuleMatchedFacts(RuleTrace ruleTrace)
Get a list of traces for the facts that matched resulting in the rule trace.
|
java.util.List<java.lang.String> |
getRules()
Get a list of the rules that appear in the trace.
|
java.util.List<RuleTrace> |
getRuleTraces(java.lang.String ruleName)
Get a list of the rule traces for the named rule.
|
RootGroup |
getTraceGroups() |
TraceEntry |
nextTraceEntry(TraceEntry entry)
Return the trace entry immediately following the entry
entry. |
TraceEntry |
previousTraceEntry(TraceEntry entry)
Return the trace entry immediately preceding the entry
entry. |
RuleTrace |
whichRule(FactTrace factTrace)
Get the rule trace for the rule whose action affected the fact in the fact trace.
|
public static final java.lang.String INITIAL_FACT
public static final java.lang.String NOT
public static final java.lang.String AGGREGATE
public static final java.lang.String FACT_UNAVAIL
public TraceAnalysis(DecisionTrace trace)
trace - the decision trace.public TraceEntry nextTraceEntry(TraceEntry entry)
entry. Returns null if entry is the last entry in the trace.entry - the current trace entrypublic TraceEntry previousTraceEntry(TraceEntry entry)
entry. Returns null if entry is the first entry in the trace.entry - the current trace entrypublic java.util.List<java.lang.String> getRules()
public java.util.List<RuleTrace> getRuleTraces(java.lang.String ruleName)
ruleName - the name of the rulepublic java.util.List<java.lang.String> getFactTypes()
public java.util.List<FactTrace> getLastFactTraces(java.lang.String factType)
factType - the fact type name.public FactTrace getLastFactTrace(int factId)
factId.factId - the fact ID.factId else null if no such fact exists in the trace.public java.util.List<FactTrace> getFactTraces(int factId)
factId.factId - the fact ID.public RuleTrace whichRule(FactTrace factTrace)
factTrace - the fact tracepublic java.util.List<FactTrace> getRuleMatchedFacts(RuleTrace ruleTrace)
ruleTrace - the rule tracepublic java.util.List<FactTrace> getActivationMatchedFacts(ActivationTrace activationTrace)
activationTrace - the activation tracepublic RuleEngineState getRuleEngineState(TraceEntry traceEntry)
public RootGroup getTraceGroups()