org.eclipse.ohf.stem.core.sequencer.impl
Class SequencerImpl

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.BasicNotifierImpl
      extended by org.eclipse.emf.ecore.impl.BasicEObjectImpl
          extended by org.eclipse.emf.ecore.impl.EObjectImpl
              extended by org.eclipse.ohf.stem.core.common.impl.IdentifiableImpl
                  extended by org.eclipse.ohf.stem.core.sequencer.impl.SequencerImpl
All Implemented Interfaces:
org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject, Identifiable, SanityChecker, Sequencer
Direct Known Subclasses:
SequentialSequencerImpl

public abstract class SequencerImpl
extends IdentifiableImpl
implements Sequencer

An implementation of the model object 'Sequencer'.

The following features are implemented:


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends java.lang.Object & org.eclipse.emf.common.notify.Adapter>
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
org.eclipse.emf.ecore.InternalEObject.EStore
 
Field Summary
static java.text.SimpleDateFormat dateFormat
           
 
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
ELAST_EOBJECT_FLAG
 
Fields inherited from interface org.eclipse.ohf.stem.core.sequencer.Sequencer
UNKNOWN_DURATION
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Method Summary
 org.eclipse.emf.common.notify.NotificationChain basicSetCurrentTime(STEMTime newCurrentTime, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 org.eclipse.emf.common.notify.NotificationChain basicSetEndTime(STEMTime newEndTime, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 org.eclipse.emf.common.notify.NotificationChain basicSetStartTime(STEMTime newStartTime, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 java.lang.Object eGet(int featureID, boolean resolve, boolean coreType)
           
 org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 boolean eIsSet(int featureID)
           
 void eSet(int featureID, java.lang.Object newValue)
           
 void eUnset(int featureID)
           
 STEMTime getCurrentTime()
           
 int getCycle()
           
 long getDuration()
           
 STEMTime getEndTime()
           
 STEMTime getNextTime()
           
 STEMTime getStartTime()
           
 long getTimeDelta()
           
 double getWorkComplete()
           
 int getWorkIncrement()
           
 boolean isTimeToStop()
           
 void reset()
           
 void setCurrentTime(STEMTime newCurrentTime)
           
 void setCycle(int newCycle)
           
 void setDuration(long newDuration)
           
 void setEndTime(STEMTime newEndTime)
           
 void setStartTime(STEMTime newStartTime)
           
 void setWorkComplete(double newWorkComplete)
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.ohf.stem.core.common.impl.IdentifiableImpl
basicSetDublinCore, getDublinCore, getTypeURI, getURI, sane, setDublinCore, setTypeURI, setURI
 
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eIsProxy, eSetClass, eSetDeliver, eSetProxyURI
 
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eContainer, eContainingFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eInternalResource, eInverseAdd, eInverseAdd, eInverseRemove, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eResolveProxy, eResource, eSet, eSetResource, eSetStore, eSetting, eStore, eUnset, eURIFragmentSegment, eVirtualGet, eVirtualGet, eVirtualIsSet, eVirtualSet, eVirtualUnset
 
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eNotificationRequired, eNotify
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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
 
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequired
 

Field Detail

dateFormat

public static final java.text.SimpleDateFormat dateFormat
Method Detail

getStartTime

public STEMTime getStartTime()

Specified by:
getStartTime in interface Sequencer
Returns:
the start time of the sequence.

basicSetStartTime

public org.eclipse.emf.common.notify.NotificationChain basicSetStartTime(STEMTime newStartTime,
                                                                         org.eclipse.emf.common.notify.NotificationChain msgs)


setStartTime

public void setStartTime(STEMTime newStartTime)

Specified by:
setStartTime in interface Sequencer
Parameters:
newStartTime - the new value of the 'Start Time' containment reference.
See Also:
Sequencer.getStartTime()

getEndTime

public STEMTime getEndTime()

Specified by:
getEndTime in interface Sequencer
Returns:
the ending time of the sequence, or Sequencer.UNKNOWN_DURATION if there is no end time.

basicSetEndTime

public org.eclipse.emf.common.notify.NotificationChain basicSetEndTime(STEMTime newEndTime,
                                                                       org.eclipse.emf.common.notify.NotificationChain msgs)


setEndTime

public void setEndTime(STEMTime newEndTime)

Specified by:
setEndTime in interface Sequencer
Parameters:
newEndTime - the new value of the 'End Time' containment reference.
See Also:
Sequencer.getEndTime()

getCurrentTime

public STEMTime getCurrentTime()

Specified by:
getCurrentTime in interface Sequencer
Returns:
the Sequencer's current time.

basicSetCurrentTime

public org.eclipse.emf.common.notify.NotificationChain basicSetCurrentTime(STEMTime newCurrentTime,
                                                                           org.eclipse.emf.common.notify.NotificationChain msgs)


setCurrentTime

public void setCurrentTime(STEMTime newCurrentTime)

Specified by:
setCurrentTime in interface Sequencer
Parameters:
newCurrentTime - the new value of the 'Current Time' containment reference.
See Also:
Sequencer.getCurrentTime()

getNextTime

public STEMTime getNextTime()

Specified by:
getNextTime in interface Sequencer
Returns:
the next time point in the sequence. As a side effect the sequencer's current time is set to the returned value.

getTimeDelta

public long getTimeDelta()

Specified by:
getTimeDelta in interface Sequencer
Returns:
the time difference in milliseconds between the value returned by Sequencer.getCurrentTime() and that returned by Sequencer.getNextTime(). This value is only valid after a call to Sequencer.getNextTime().
See Also:
Sequencer.getCurrentTime(), Sequencer.getNextTime()

getDuration

public long getDuration()

Specified by:
getDuration in interface Sequencer
Returns:
the total amount of time in milliseconds in the sequence. If there is no ending time specified for the sequence, the constant Sequencer.UNKNOWN_DURATION is returned.
See Also:
Sequencer.UNKNOWN_DURATION

setDuration

public void setDuration(long newDuration)

Specified by:
setDuration in interface Sequencer
Parameters:
newDuration - the new value of the 'Duration' attribute.
See Also:
Sequencer.getDuration()

isTimeToStop

public boolean isTimeToStop()

Specified by:
isTimeToStop in interface Sequencer
Returns:
true if the sequence has ended.

getWorkComplete

public double getWorkComplete()

Specified by:
getWorkComplete in interface Sequencer
Returns:
an value (0-100) representing the percentage of the sequence that has been completed so far. If no end time has been specified, then return 0.

setWorkComplete

public void setWorkComplete(double newWorkComplete)

Specified by:
setWorkComplete in interface Sequencer
Parameters:
newWorkComplete - the new value of the 'Work Complete' attribute.
See Also:
Sequencer.getWorkComplete()

getWorkIncrement

public int getWorkIncrement()

Specified by:
getWorkIncrement in interface Sequencer
Returns:
an integer (0-100) representing the precentage of the sequence that was completed by the time delta between the previous two calls to Sequencer.getNextTime()

getCycle

public int getCycle()

Specified by:
getCycle in interface Sequencer
Returns:
number of completed cycles.

setCycle

public void setCycle(int newCycle)

Specified by:
setCycle in interface Sequencer
Parameters:
newCycle - the new value of the 'Cycle' attribute.
See Also:
Sequencer.getCycle()

reset

public void reset()

Specified by:
reset in interface Sequencer
See Also:
Sequencer.getNextTime(), Sequencer.getWorkComplete()

eInverseRemove

public org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd,
                                                                      int featureID,
                                                                      org.eclipse.emf.common.notify.NotificationChain msgs)

Overrides:
eInverseRemove in class IdentifiableImpl

eGet

public java.lang.Object eGet(int featureID,
                             boolean resolve,
                             boolean coreType)

Specified by:
eGet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eGet in class IdentifiableImpl

eSet

public void eSet(int featureID,
                 java.lang.Object newValue)

Specified by:
eSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eSet in class IdentifiableImpl

eUnset

public void eUnset(int featureID)

Specified by:
eUnset in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eUnset in class IdentifiableImpl

eIsSet

public boolean eIsSet(int featureID)

Specified by:
eIsSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eIsSet in class IdentifiableImpl

toString

public java.lang.String toString()

Overrides:
toString in class IdentifiableImpl