org.eclipse.ohf.stem.core.graph
Interface DynamicLabel

All Superinterfaces:
org.eclipse.emf.ecore.EObject, Identifiable, Label, org.eclipse.emf.common.notify.Notifier, SanityChecker
All Known Subinterfaces:
DiseaseModelLabel, DynamicEdgeLabel, DynamicNodeLabel, SEIRLabel, SILabel, SIRLabel, StandardDiseaseModelLabel, TestDynamicEdgeLabel, TestDynamicLabel1, TestDynamicNodeLabel, TransportRelationshipLabel
All Known Implementing Classes:
DiseaseModelLabelImpl, DynamicEdgeLabelImpl, DynamicLabelImpl, DynamicNodeLabelImpl, SEIRLabelImpl, SILabelImpl, SIRLabelImpl, StandardDiseaseModelLabelImpl, TestDynamicEdgeLabelImpl, TestDynamicLabel1Impl, TestDynamicNodeLabelImpl, TransportRelationshipLabelImpl

public interface DynamicLabel
extends Label

A DynamicLabel is a Label that has two LabelValues instead of one. The second value is called the "next" value. It represents the values of the attributes of the Label in the next state of the Graph. The other value is called the "current" value and it represents the value of the attributes in the current state of the Graph.

A DynamicLabel can exchange the "current" and "next' values (see switchToNextValue(). After such a switch, the next value is marked as being "invalid" (see isNextValueValid()).


Field Summary
static org.eclipse.emf.common.util.URI URI_TYPE_DYNAMIC_LABEL
          This is the type URI for a Dynamic Label
static java.lang.String URI_TYPE_DYNAMIC_LABEL_SEGMENT
          This is the top-level segment for all type URI's for dynamic labels.
 
Fields inherited from interface org.eclipse.ohf.stem.core.graph.Label
URI_TYPE_LABEL, URI_TYPE_LABEL_SEGMENT
 
Method Summary
 Decorator getDecorator()
           
 LabelValue getNextValue()
           
 boolean isNextValueValid()
          If the next value has been set since the last call to setNextValue(LabelValue) and the DynamicLabel has not been "reset" then the next value is valid.
 void reset()
          Reset the dynamic label.
 void setDecorator(Decorator value)
          Sets the value of the 'Decorator' reference.
 void setNextValue(LabelValue value)
          Sets the value of the 'Next Value' containment reference.
 void setNextValueValid(boolean value)
          Sets the value of the 'Next Value Valid' attribute.
 void switchToNextValue()
          Exchange the "next" and "current" LabelValues.
 
Methods inherited from interface org.eclipse.ohf.stem.core.graph.Label
getCurrentValue, getIdentifiable, getURIOfIdentifiableToBeLabeled, setCurrentValue, setIdentifiable, setURIOfIdentifiableToBeLabeled
 
Methods inherited from interface org.eclipse.ohf.stem.core.common.Identifiable
getDublinCore, getTypeURI, getURI, sane, setDublinCore, setTypeURI, setURI
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Field Detail

URI_TYPE_DYNAMIC_LABEL_SEGMENT

static final java.lang.String URI_TYPE_DYNAMIC_LABEL_SEGMENT
This is the top-level segment for all type URI's for dynamic labels.

See Also:
Constant Field Values

URI_TYPE_DYNAMIC_LABEL

static final org.eclipse.emf.common.util.URI URI_TYPE_DYNAMIC_LABEL
This is the type URI for a Dynamic Label

Method Detail

getDecorator

Decorator getDecorator()
Returns:
the Decorator that updates this DynamicLabel.

setDecorator

void setDecorator(Decorator value)
Sets the value of the 'Decorator' reference.

Parameters:
value - the new value of the 'Decorator' reference.
See Also:
getDecorator()

reset

void reset()
Reset the dynamic label. This sets the LabelValues back to their inital states.


isNextValueValid

boolean isNextValueValid()
If the next value has been set since the last call to setNextValue(LabelValue) and the DynamicLabel has not been "reset" then the next value is valid.

Returns:
true if the next value is valid

setNextValueValid

void setNextValueValid(boolean value)
Sets the value of the 'Next Value Valid' attribute.

Parameters:
value - the new value of the 'Next Value Valid' attribute.
See Also:
isNextValueValid()

getNextValue

LabelValue getNextValue()
Returns:
the "next" LabelValue.

setNextValue

void setNextValue(LabelValue value)
Sets the value of the 'Next Value' containment reference.

Parameters:
value - the new value of the 'Next Value' containment reference.
See Also:
getNextValue()

switchToNextValue

void switchToNextValue()
Exchange the "next" and "current" LabelValues. This is called when the Graph is ready to move to the next state (see {@link Graph#switchToNextValue()).