Search in sources :

Example 1 with ExitElement

use of org.iobserve.analysis.userbehavior.data.ExitElement in project iobserve-analysis by research-iobserve.

the class BranchModelCreator method setBranchSequence.

/**
 * Sets the passed events as branch sequence of the passed branch. The sequenceStartIndex
 * defines at which position of the passed events the branch sequence starts
 *
 * @param examinedBranch
 *            for that the branchSequence will be set
 * @param events
 *            represent the sequence to set
 * @param sequenceStartIndex
 *            states at which position of the passed events the branch sequence starts
 */
private void setBranchSequence(final Branch examinedBranch, final List<EntryCallEvent> events, final int sequenceStartIndex) {
    final List<ISequenceElement> branchSequence = new ArrayList<>();
    for (int j = sequenceStartIndex; j < events.size(); j++) {
        final EntryCallEvent callEvent = events.get(j);
        final CallElement callElement = new CallElement(callEvent.getClassSignature(), callEvent.getOperationSignature());
        callElement.setAbsoluteCount(1);
        branchSequence.add(callElement);
    }
    final ExitElement exitElement = new ExitElement();
    exitElement.setAbsoluteCount(1);
    branchSequence.add(exitElement);
    examinedBranch.setBranchSequence(branchSequence);
}
Also used : EntryCallEvent(org.iobserve.stages.general.data.EntryCallEvent) CallElement(org.iobserve.analysis.userbehavior.data.CallElement) ISequenceElement(org.iobserve.analysis.userbehavior.data.ISequenceElement) ArrayList(java.util.ArrayList) ExitElement(org.iobserve.analysis.userbehavior.data.ExitElement)

Example 2 with ExitElement

use of org.iobserve.analysis.userbehavior.data.ExitElement in project iobserve-analysis by research-iobserve.

the class BranchModelCreator method setExitElement.

/**
 * Adds an exit element to the end of the branch sequence of the passed branch.
 *
 * @param examinedBranch
 *            receives an exit element at the end of its branch sequence
 */
private void setExitElement(final Branch examinedBranch) {
    final ExitElement exitElement = new ExitElement();
    exitElement.setAbsoluteCount(1);
    examinedBranch.getBranchSequence().add(exitElement);
}
Also used : ExitElement(org.iobserve.analysis.userbehavior.data.ExitElement)

Aggregations

ExitElement (org.iobserve.analysis.userbehavior.data.ExitElement)2 ArrayList (java.util.ArrayList)1 CallElement (org.iobserve.analysis.userbehavior.data.CallElement)1 ISequenceElement (org.iobserve.analysis.userbehavior.data.ISequenceElement)1 EntryCallEvent (org.iobserve.stages.general.data.EntryCallEvent)1