TPTP 4.5.0 Platform Project
Public API Specification

org.eclipse.hyades.models.common.datapool.impl
Class DPLDatapoolImpl

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.hyades.models.common.common.impl.CMNNamedElementImpl
                  extended by org.eclipse.hyades.models.common.configuration.impl.CFGClassImpl
                      extended by org.eclipse.hyades.models.common.datapool.impl.DPLDatapoolImpl
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject, IDatapool, CMNNamedElement, CFGClass, DPLDatapool, IDeployableComponent, INamedElement

public class DPLDatapoolImpl
extends CFGClassImpl
implements DPLDatapool

An implementation of the model object 'DPL Datapool'.

The following features are implemented:

Generated

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
org.eclipse.emf.ecore.InternalEObject.EStore
 
Field Summary
static java.lang.String copyright
           
 
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
ELAST_EOBJECT_FLAG
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Method Summary
 void addDatapoolListener(IDatapoolListener listener)
          Register a listener for actions against the datapool that modify the data or structure of the data model.
 void appendEquivalenceClass(IDatapoolEquivalenceClass equivalenceClass)
          Append the supplied equivalence class to the end of the set of available equivalence classes.
 void appendVariable(IDatapoolVariable variable)
          Append a variable to the end of the datapool ordered variable collection.
 org.eclipse.emf.common.notify.NotificationChain basicSetDatapoolSpec(DPLDatapoolSpec newDatapoolSpec, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 IDatapoolEquivalenceClass constructEquivalenceClass()
          Constructs an empty equivalence class
 IDatapoolVariable constructVariable()
          Constructs an empty variable
 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)
           
 java.lang.String getChallenge()
           
 IDatapoolListener getDatapoolListener()
          Returns the first listener from the datapool instance (convenience method)
 IDatapoolListener[] getDatapoolListeners()
          Returns current listeners from the datapool instance (convenience method)
 DPLDatapoolSpec getDatapoolSpec()
           
 int getDefaultEquivalenceClassIndex()
          Accessor for the default equivalence class in the datapool.
 IDatapoolEquivalenceClass getEquivalenceClass(int index)
          Accessor for the equivalence class at the specified zero based index in the datapool.
 int getEquivalenceClassCount()
          Returns the number of equivalence classes associated with a datapool.
 org.eclipse.emf.common.util.EList getEquivalenceClasses()
           
 int getEquivalenceClassIndex(java.lang.String equivalenceClassName)
          Locate an equivalence class by name within an instance of a datapool.
 int getEquivalenceClassIndexById(java.lang.String equivalenceClassId)
          Locate an equivalence class by ID within an instance of a datapool.
 java.lang.String getLocation()
          Returns the location of the deployable component.
 ITest getOwner()
          Returns the test suite that owns this deployable component.
 java.lang.String getResource()
          Returns the resource of the deployable component.
 IDatapoolVariable getVariable(int variableIndex)
          The variable at a specified zero based column index.
 int getVariableCount()
          The number of variables available in each record.
 int getVariableIndex(java.lang.String variableName)
          Locates the appropriate index associated with a specific variable name.
 int getVariableIndexById(java.lang.String variableId)
          Locates the appropriate index associated with a specific variable ID.
 void insertEquivalenceClass(IDatapoolEquivalenceClass equivalenceClass, int beforeEquivalenceClassIndex)
          Insert the equivalence class at a supplied index.
 void insertVariable(IDatapoolVariable variable, int beforeVariableIndex)
          Insert a variable before the variable at the specified zero based variable index.
 void logDatapoolAsStrings()
          Convenience method - for testing
 void moveEquivalenceClass(int sourceEquivalenceClassIndex, int targetEquivalenceClassIndex)
          Move the equivalence class at a supplied index to a new position within the set of available equivalence classes.
 void moveVariable(int sourceVariableIndex, int targetVariableIndex)
          Move a variable to immediately before another variable.
 void removeDatapoolListener(IDatapoolListener listener)
          Removes a listener from the datapool instance.
 void removeEquivalenceClass(int equivalenceClassIndex)
          Remove the equivalence class at a supplied index.
 void removeVariable(int variableIndex)
          Remove the specified variable from the datapool.
 void setChallenge(java.lang.String newChallenge)
           
 void setDatapoolSpec(DPLDatapoolSpec newDatapoolSpec)
           
 void setDefaultEquivalenceClassIndex(int equivalenceClassIndex)
          Define the default equivalence class in a datapool.
 void setLocation(java.lang.String location)
          Sets the location of the deployable component.
 void setResource(java.lang.String resource)
          Sets the resource of the deployable component.
 java.lang.String toString()
           
 void updateEquivalenceClass(IDatapoolEquivalenceClass equivalenceClass, int equivalenceClassIndex)
          Replace the equivalence class at a supplied index with a new value.
 void updateVariable(IDatapoolVariable variable, int variableIndex)
          Update the variable at a specified zero based variable index.
 
Methods inherited from class org.eclipse.hyades.models.common.configuration.impl.CFGClassImpl
eInverseAdd, getEnvironmentVariables, getInstances, getInstantiations, getMethods, getOperations
 
Methods inherited from class org.eclipse.hyades.models.common.common.impl.CMNNamedElementImpl
getAdapter, getDescription, getId, getName, setDescription, setId, setName
 
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, 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.hyades.models.common.configuration.CFGClass
getInstances, getInstantiations, getOperations
 
Methods inherited from interface org.eclipse.hyades.models.common.common.CMNNamedElement
getDescription, getId, getName, setDescription, setId, setName
 
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.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.hyades.models.common.facades.behavioral.IDeployableComponent
getEnvironmentVariables, getMethods
 
Methods inherited from interface org.eclipse.hyades.models.common.facades.behavioral.INamedElement
getDescription, getId, getName, setDescription, setId, setName
 
Methods inherited from interface org.eclipse.hyades.execution.runtime.datapool.INamedElement
getDescription, getId, getName
 
Methods inherited from interface org.eclipse.hyades.edit.datapool.INamedElement
setDescription, setId, setName
 
Methods inherited from interface org.eclipse.hyades.execution.runtime.datapool.INamedElement
getDescription, getId, getName
 
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequired
 

Field Detail

copyright

public static final java.lang.String copyright

See Also:
Constant Field Values
Generated
Method Detail

getChallenge

public java.lang.String getChallenge()

Specified by:
getChallenge in interface DPLDatapool
Returns:
the value of the 'Challenge' attribute.
See Also:
DPLDatapool.setChallenge(String), Common_DatapoolPackage.getDPLDatapool_Challenge()
Generated

setChallenge

public void setChallenge(java.lang.String newChallenge)

Specified by:
setChallenge in interface DPLDatapool
Parameters:
newChallenge - the new value of the 'Challenge' attribute.
See Also:
DPLDatapool.getChallenge()
Generated

getEquivalenceClasses

public org.eclipse.emf.common.util.EList getEquivalenceClasses()

Specified by:
getEquivalenceClasses in interface DPLDatapool
Returns:
the value of the 'Equivalence Classes' containment reference list.
See Also:
Common_DatapoolPackage.getDPLDatapool_EquivalenceClasses()
Generated

getDatapoolSpec

public DPLDatapoolSpec getDatapoolSpec()

Specified by:
getDatapoolSpec in interface DPLDatapool
Returns:
the value of the 'Datapool Spec' containment reference.
See Also:
DPLDatapool.setDatapoolSpec(DPLDatapoolSpec), Common_DatapoolPackage.getDPLDatapool_DatapoolSpec()
Generated

basicSetDatapoolSpec

public org.eclipse.emf.common.notify.NotificationChain basicSetDatapoolSpec(DPLDatapoolSpec newDatapoolSpec,
                                                                            org.eclipse.emf.common.notify.NotificationChain msgs)

Generated

setDatapoolSpec

public void setDatapoolSpec(DPLDatapoolSpec newDatapoolSpec)

Specified by:
setDatapoolSpec in interface DPLDatapool
Parameters:
newDatapoolSpec - the new value of the 'Datapool Spec' containment reference.
See Also:
DPLDatapool.getDatapoolSpec()
Generated

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 CFGClassImpl
Generated

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 CFGClassImpl
Generated

eSet

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

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

eUnset

public void eUnset(int featureID)

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

eIsSet

public boolean eIsSet(int featureID)

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

toString

public java.lang.String toString()

Overrides:
toString in class CMNNamedElementImpl
Generated

getLocation

public java.lang.String getLocation()
Description copied from interface: IDeployableComponent
Returns the location of the deployable component.

Specified by:
getLocation in interface IDeployableComponent
Specified by:
getLocation in class CFGClassImpl
Returns:
String

getOwner

public ITest getOwner()
Description copied from interface: IDeployableComponent
Returns the test suite that owns this deployable component.

This reference is bidirectional and its opposite is ITestSuite#getTestComponents().

Specified by:
getOwner in interface IDeployableComponent
Specified by:
getOwner in class CFGClassImpl
Returns:
ITestSuite

getResource

public java.lang.String getResource()
Description copied from interface: IDeployableComponent
Returns the resource of the deployable component.

Specified by:
getResource in interface IDeployableComponent
Specified by:
getResource in class CFGClassImpl
Returns:
String

setLocation

public void setLocation(java.lang.String location)
Description copied from interface: IDeployableComponent
Sets the location of the deployable component.

Specified by:
setLocation in interface IDeployableComponent
Specified by:
setLocation in class CFGClassImpl

setResource

public void setResource(java.lang.String resource)
Description copied from interface: IDeployableComponent
Sets the resource of the deployable component.

Specified by:
setResource in interface IDeployableComponent
Specified by:
setResource in class CFGClassImpl

updateVariable

public void updateVariable(IDatapoolVariable variable,
                           int variableIndex)
Update the variable at a specified zero based variable index.

Parameters:
variable - The variable for the cells at variableIndex.
variableIndex - A zero based variable index.
See Also:
getVariableIndex(String), getVariableIndexById(String), getVariable(int)

insertVariable

public void insertVariable(IDatapoolVariable variable,
                           int beforeVariableIndex)
Insert a variable before the variable at the specified zero based variable index. This action will cause an empty cell to be automatically inserted in each row of the datapool.

Parameters:
variable - The new variable for the cells at beforeVariableIndex.
beforeVariableIndex - A zero based variable index.
See Also:
appendVariable(IDatapoolVariable), moveVariable(int,int), removeVariable(int)

appendVariable

public void appendVariable(IDatapoolVariable variable)
Append a variable to the end of the datapool ordered variable collection. This action will cause an empty cell to be automatically appended to each record of the datapool.

Parameters:
variable - The variable instance to append.
See Also:
insertVariable(IDatapoolVariable,int), moveVariable(int,int), removeVariable(int)

moveVariable

public void moveVariable(int sourceVariableIndex,
                         int targetVariableIndex)
Move a variable to immediately before another variable. The variables are denoted by a zero based variable index. This action will cause the associated cells in each row of the datapool to also be moved.

Parameters:
sourceVariableIndex - A zero based variable index for the variable to be moved.
targetVariableIndex - The variable index marking the target location for the move action.
See Also:
insertVariable(IDatapoolVariable,int), appendVariable(IDatapoolVariable), removeVariable(int)

removeVariable

public void removeVariable(int variableIndex)
Remove the specified variable from the datapool. The specified variable index is zero based. Each record in the datapool is automatically updated to remove the cell that coincides with the variable.

Parameters:
variableIndex - A zero based variable index for the variable to be removed.
See Also:
insertVariable(IDatapoolVariable,int), appendVariable(IDatapoolVariable), moveVariable(int,int)

setDefaultEquivalenceClassIndex

public void setDefaultEquivalenceClassIndex(int equivalenceClassIndex)
Define the default equivalence class in a datapool.

Parameters:
equivalenceClassIndex - The zero-based index for the default equivalence class.
See Also:
getDefaultEquivalenceClassIndex()

updateEquivalenceClass

public void updateEquivalenceClass(IDatapoolEquivalenceClass equivalenceClass,
                                   int equivalenceClassIndex)
Replace the equivalence class at a supplied index with a new value. This method is essentially a shortcut for a call to removeEquivalenceClass followed by a call to insertEquivalenceClass.

Parameters:
equivalenceClass - The equivalence class to insert.
equivalenceClassIndex - The equivalence class indsex to remove and insert at.
See Also:
insertEquivalenceClass(IDatapoolEquivalenceClass,int), appendEquivalenceClass(IDatapoolEquivalenceClass), moveEquivalenceClass(int,int), removeEquivalenceClass(int)

insertEquivalenceClass

public void insertEquivalenceClass(IDatapoolEquivalenceClass equivalenceClass,
                                   int beforeEquivalenceClassIndex)
Insert the equivalence class at a supplied index. The records in the equivalence class must match the layout of all other records in the datapool.

Parameters:
equivalenceClass - The equivalence class to insert.
beforeEquivalenceClassIndex - The equivalence class index to insert before.
See Also:
updateEquivalenceClass(IDatapoolEquivalenceClass,int), appendEquivalenceClass(IDatapoolEquivalenceClass), moveEquivalenceClass(int,int), removeEquivalenceClass(int)

appendEquivalenceClass

public void appendEquivalenceClass(IDatapoolEquivalenceClass equivalenceClass)
Append the supplied equivalence class to the end of the set of available equivalence classes. The records in the equivalence class must match the layout of all other records in the datapool.

Parameters:
equivalenceClass - The equivalence class to append.
See Also:
updateEquivalenceClass(IDatapoolEquivalenceClass,int), insertEquivalenceClass(IDatapoolEquivalenceClass,int), moveEquivalenceClass(int,int), removeEquivalenceClass(int)

moveEquivalenceClass

public void moveEquivalenceClass(int sourceEquivalenceClassIndex,
                                 int targetEquivalenceClassIndex)
Move the equivalence class at a supplied index to a new position within the set of available equivalence classes.

Parameters:
sourceEquivalenceClassIndex - The equivalence class index to move.
targetEquivalenceClassIndex - The equivalence class destination index.
See Also:
updateEquivalenceClass(IDatapoolEquivalenceClass,int), insertEquivalenceClass(IDatapoolEquivalenceClass,int), appendEquivalenceClass(IDatapoolEquivalenceClass), removeEquivalenceClass(int)

removeEquivalenceClass

public void removeEquivalenceClass(int equivalenceClassIndex)
Remove the equivalence class at a supplied index.

Parameters:
equivalenceClassIndex - The equivalence class indsex to remove.
See Also:
updateEquivalenceClass(IDatapoolEquivalenceClass,int), insertEquivalenceClass(IDatapoolEquivalenceClass,int), appendEquivalenceClass(IDatapoolEquivalenceClass), moveEquivalenceClass(int,int)

addDatapoolListener

public void addDatapoolListener(IDatapoolListener listener)
Register a listener for actions against the datapool that modify the data or structure of the data model. The listener is informed when variables and records are added or deleted, and when the contents of a cell are changed.

See Also:
IDatapoolListener

getDatapoolListener

public IDatapoolListener getDatapoolListener()
Returns the first listener from the datapool instance (convenience method)

See Also:
IDatapoolListener

getDatapoolListeners

public IDatapoolListener[] getDatapoolListeners()
Returns current listeners from the datapool instance (convenience method)

See Also:
IDatapoolListener

removeDatapoolListener

public void removeDatapoolListener(IDatapoolListener listener)
Removes a listener from the datapool instance.

See Also:
IDatapoolListener

getVariableCount

public int getVariableCount()
The number of variables available in each record.

Specified by:
getVariableCount in interface IDatapool
Returns:
The number of data variables available in each record.

getVariable

public IDatapoolVariable getVariable(int variableIndex)
The variable at a specified zero based column index. A DatapoolException is thrown if the specified index is not valid.

Specified by:
getVariable in interface IDatapool
Parameters:
variableIndex - A zero based variable index.
Returns:
The variable for the specified zero based index.
See Also:
getVariableIndex(String)

getVariableIndex

public int getVariableIndex(java.lang.String variableName)
Locates the appropriate index associated with a specific variable name. Users will depend on this method to determine the appropriate cell to access within a record given a current record and a variable name. The current record is typically made available from an iterator that is performing an ordered traversal of the records in a datapool.

Specified by:
getVariableIndex in interface IDatapool
Parameters:
variableName - The name of the variable associated with the desired cell.
Returns:
The variable index associated with the specified variableName.
See Also:
getVariableIndexById(String)

getVariableIndexById

public int getVariableIndexById(java.lang.String variableId)
Locates the appropriate index associated with a specific variable ID. Users may use this method to determine the appropriate cell to access within a record given a current record and a variable ID.

Specified by:
getVariableIndexById in interface IDatapool
Parameters:
variableId - The ID of the variable associated with the desired cell.
Returns:
The variable index associated with the specified variableId.
See Also:
getVariableIndex(String)

getEquivalenceClassCount

public int getEquivalenceClassCount()
Returns the number of equivalence classes associated with a datapool.

Specified by:
getEquivalenceClassCount in interface IDatapool
Returns:
The number of equivalence classes associated with a datapool.

getEquivalenceClass

public IDatapoolEquivalenceClass getEquivalenceClass(int index)
Accessor for the equivalence class at the specified zero based index in the datapool. If an invalid index is supplied a DatapoolException with an appropriate message is thrown.

Specified by:
getEquivalenceClass in interface IDatapool
Returns:
The zero-based index for the desired equivalence class.

getDefaultEquivalenceClassIndex

public int getDefaultEquivalenceClassIndex()
Accessor for the default equivalence class in the datapool. If the default equivalence class has not been defined then a value of -1 is returned.

Specified by:
getDefaultEquivalenceClassIndex in interface IDatapool
Returns:
The zero-based index for the default equivalence class.

getEquivalenceClassIndex

public int getEquivalenceClassIndex(java.lang.String equivalenceClassName)
Locate an equivalence class by name within an instance of a datapool.

Specified by:
getEquivalenceClassIndex in interface IDatapool
Returns:
The zero-based index of the equivalence class with the supplied equivalenceClassName.
See Also:
getEquivalenceClassIndexById(String)

getEquivalenceClassIndexById

public int getEquivalenceClassIndexById(java.lang.String equivalenceClassId)
Locate an equivalence class by ID within an instance of a datapool.

Specified by:
getEquivalenceClassIndexById in interface IDatapool
Returns:
The zero-based index of the equivalence class with the supplied equivalenceClassId.
See Also:
getEquivalenceClassIndex(String)

logDatapoolAsStrings

public void logDatapoolAsStrings()
Convenience method - for testing


constructEquivalenceClass

public IDatapoolEquivalenceClass constructEquivalenceClass()
Constructs an empty equivalence class


constructVariable

public IDatapoolVariable constructVariable()
Constructs an empty variable


TPTP 4.5.0 Platform Project
Public API Specification