hmi.bml.parser
Class BMLParser

java.lang.Object
  extended by hmi.bml.parser.BMLParser

public class BMLParser
extends Object

This is the scheduler. It can be fed with objects of the type BehaviourBlock. Scheduling is divided in two parts: resolving full ids of all BML-elements and actually shift the behaviours so the constraints are met.

Author:
PaulRC

Field Summary
private  ArrayList<BehaviourBlock> bbs
           
private  HashMap<String,BMLElement> BMLElementsById
           
private  ArrayList<Constraint> constraints
           
private static org.slf4j.Logger logger
           
 
Constructor Summary
BMLParser()
           
 
Method Summary
 void addBehaviourBlock(BehaviourBlock bb)
          Adds a behavior block.
 void clear()
          clear all behaviors from the scheduler
 void constructConstraint(SyncPoint left, SyncPoint right)
           
private  void constructConstraints(BehaviourBlock bb)
          This method constructs constraints synchronization points.
 void constructConstraints(String bbId, Behaviour behaviour)
           
 void constructConstraints(String bbId, Synchronize synchronize)
           
 ArrayList<BehaviourBlock> getBehaviourBlocks()
           
 ArrayList<Behaviour> getBehaviours()
          Herwin: a bit of a hack, gets the behaviors in order of XML processing, to be used for SmartBody reference schedular
 BMLElement getBMLElementById(String id)
           
 ArrayList<Constraint> getConstraints()
           
 void registerBMLElement(BMLElement element, Breadcrumb breadcrumb)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bbs

private ArrayList<BehaviourBlock> bbs

BMLElementsById

private HashMap<String,BMLElement> BMLElementsById

constraints

private ArrayList<Constraint> constraints

logger

private static org.slf4j.Logger logger
Constructor Detail

BMLParser

public BMLParser()
Method Detail

clear

public void clear()
clear all behaviors from the scheduler


addBehaviourBlock

public void addBehaviourBlock(BehaviourBlock bb)
Adds a behavior block.

Parameters:
bb -

constructConstraints

private void constructConstraints(BehaviourBlock bb)
This method constructs constraints synchronization points. The source SyncPoint are directly known to each Behavior, while the target SyncPoint are constructed from the literal references in them.

Parameters:
bb -

constructConstraints

public void constructConstraints(String bbId,
                                 Behaviour behaviour)

constructConstraints

public void constructConstraints(String bbId,
                                 Synchronize synchronize)

constructConstraint

public void constructConstraint(SyncPoint left,
                                SyncPoint right)

registerBMLElement

public void registerBMLElement(BMLElement element,
                               Breadcrumb breadcrumb)

getBMLElementById

public BMLElement getBMLElementById(String id)

getConstraints

public ArrayList<Constraint> getConstraints()
Returns:
the constraints

getBehaviours

public ArrayList<Behaviour> getBehaviours()
Herwin: a bit of a hack, gets the behaviors in order of XML processing, to be used for SmartBody reference schedular


getBehaviourBlocks

public ArrayList<BehaviourBlock> getBehaviourBlocks()
Returns:
the bbs