ides.api.presentation.fsa
Class FSAStateLabeller

java.lang.Object
  extended by ides.api.presentation.fsa.FSAStateLabeller

public class FSAStateLabeller
extends java.lang.Object

Provides state labelling services for FSAModels.

Author:
Lenko Grigorov

Constructor Summary
FSAStateLabeller()
           
 
Method Summary
static void labelCompositeStates(FSAModel fsa)
          Labels in a human-readable way the states in models obtained by composing a number of other models (e.g., by calling the "product" or "sync" operations).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSAStateLabeller

public FSAStateLabeller()
Method Detail

labelCompositeStates

public static void labelCompositeStates(FSAModel fsa)
Labels in a human-readable way the states in models obtained by composing a number of other models (e.g., by calling the "product" or "sync" operations).

The FSAModel whose states will be labelled has to have the AnnotationKeys.COMPOSED_OF annotation with String[] array of the names of the models used in the composition. For example, if the "product" operation has been called to create the model by intersecting the models "A" and "Untitled", the annotation should be
String[]{"A", "Untitled"}

Each state in the model also has to have the AnnotationKeys.COMPOSED_OF annotation with an array of the IDs of the states out of which it is composed. For example, if a state is the composition of the state with ID=34 from "A" and the state with ID=43523 from "Untitled", the annotation should be
long[]{34, 43523}
Furthermore, states can have the AnnotationKeys.COMPOSED_OF_NAMES annotation with an array of the names of the states out of which it is composed. For examples, if a state is the composition of the state called "1" from "A" and the state called "opened" from "Untitled", the annotation should be
String[]{"1", "open"}

Most built-in operations that come with IDES annotate properly composite models and states.

Parameters:
fsa - the model whose states have to be labelled.