TPTP 4.2.0 Platform Project
Public API Specification

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

java.lang.Object
  extended byorg.eclipse.emf.common.notify.impl.BasicNotifierImpl
      extended byorg.eclipse.emf.ecore.impl.BasicEObjectImpl
          extended byorg.eclipse.emf.ecore.impl.EObjectImpl
              extended byorg.eclipse.hyades.models.common.common.impl.CMNNamedElementImpl
                  extended byorg.eclipse.hyades.models.common.datapool.impl.DPLEquivalenceClassImpl
All Implemented Interfaces:
CMNNamedElement, DPLEquivalenceClass, org.eclipse.emf.ecore.EObject, org.eclipse.core.runtime.IAdaptable, IDatapoolEquivalenceClass, IDatapoolEquivalenceClass, INamedElement, INamedElement, org.eclipse.emf.ecore.InternalEObject, org.eclipse.emf.common.notify.Notifier

public class DPLEquivalenceClassImpl
extends CMNNamedElementImpl
implements DPLEquivalenceClass

An implementation of the model object 'DPL Equivalence Class'.

The following features are implemented:

Generated

Nested Class Summary
 
Nested classes inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolder, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderBaseImpl, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderImpl
 
Nested classes inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList
 
Nested classes inherited from class org.eclipse.emf.ecore.InternalEObject
org.eclipse.emf.ecore.InternalEObject.EStore
 
Field Summary
static java.lang.String copyright
           
protected  org.eclipse.emf.common.util.EList records
          The cached value of the 'Records' containment reference list
 
Fields inherited from class org.eclipse.hyades.models.common.common.impl.CMNNamedElementImpl
description, DESCRIPTION_EDEFAULT, id, ID_EDEFAULT, name, NAME_EDEFAULT
 
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXY
 
Fields inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Constructor Summary
protected DPLEquivalenceClassImpl()
           
 
Method Summary
 void appendRecord(IDatapoolRecord record)
          Append the specified record to the end of the datapool.
 IDatapoolRecord constructRecord()
          Construct a new record with an appropriate number of elements for the active datapool.
 IDatapoolRecord constructRecord(java.lang.Object[] elements)
          Construct a new record with an appropriate number of elements for the active datapool.
 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)
           
protected  org.eclipse.emf.ecore.EClass eStaticClass()
           
 void eUnset(int featureID)
           
 IDatapool getDatapool()
          Access to the datapool that is the parent of this equivalence class.
 IDatapoolRecord getRecord(int record)
          Access to the record contents at the specified zero based record index.
 int getRecordCount()
          The number of records in the equivalence class.
 org.eclipse.emf.common.util.EList getRecords()
           
 void insertRecord(IDatapoolRecord data, int beforeRecord)
          Insert the specified record before the zero based record index.
 void insertRecordDoNotNotify(IDatapoolRecord data, int beforeRecord)
          Helper function Insert the specified record before the zero based record index.
 void moveRecord(int sourceRecordIndex, int targetRecordIndex)
          Move the specified record.
 IDatapoolRecord removeRecord(int recordIndex)
          Remove the specified record.
protected  IDatapoolRecord removeRecordDoNotNotify(int recordIndex)
          Helper function Remove the specified record.
 void reorder(int[] recordOrder)
          Inform the equivalence class of a new order for records.
 void replaceRecord(IDatapoolRecord data, int recordIndex)
          Update the specified record with the supplied data.
 void setName(java.lang.String name)
          Sets the value of the 'Name' attribute
 
Methods inherited from class org.eclipse.hyades.models.common.common.impl.CMNNamedElementImpl
getAdapter, getDescription, getId, getName, setDescription, setId, toString
 
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eIsProxy, eProperties, eSetClass, eSetDeliver, eSetProxyURI
 
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
eAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicClass, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eHasSettings, eInternalResource, eInverseAdd, eInverseAdd, eInverseRemove, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetDirectResource, eSetResource, eSetStore, eSetting, eSettingDelegate, eSettings, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStore, eUnset, eURIFragmentSegment, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValues
 
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eNotificationRequired, eNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.hyades.models.common.common.CMNNamedElement
getDescription, getId, getName, setDescription, setId
 
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.execution.runtime.datapool.INamedElement
getDescription, getId, getName
 
Methods inherited from interface org.eclipse.hyades.edit.datapool.INamedElement
setDescription, setId
 
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

records

protected org.eclipse.emf.common.util.EList records
The cached value of the 'Records' containment reference list.

See Also:
getRecords()
Generated
[EMF] Ordered
Constructor Detail

DPLEquivalenceClassImpl

protected DPLEquivalenceClassImpl()

Generated
Method Detail

eStaticClass

protected org.eclipse.emf.ecore.EClass eStaticClass()

Overrides:
eStaticClass in class CMNNamedElementImpl
Generated

getRecords

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

Specified by:
getRecords in interface DPLEquivalenceClass
Returns:
the value of the 'Records' containment reference list.
See Also:
Common_DatapoolPackage.getDPLEquivalenceClass_Records()
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)

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

eUnset

public void eUnset(int featureID)

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

eIsSet

public boolean eIsSet(int featureID)

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

constructRecord

public IDatapoolRecord constructRecord()
Construct a new record with an appropriate number of elements for the active datapool. The number of elements equals the number of variables in the datapool.

Specified by:
constructRecord in interface IDatapoolEquivalenceClass
See Also:
constructRecord(Object[]), IDatapool.getVariableCount(), insertRecord(IDatapoolRecord,int), appendRecord(IDatapoolRecord), replaceRecord(IDatapoolRecord,int)

constructRecord

public IDatapoolRecord constructRecord(java.lang.Object[] elements)
Construct a new record with an appropriate number of elements for the active datapool. The number of elements equals the number of variables in the datapool. The supplied values will be padded or truncated to match the number of variables available. The supplied values may be null in which case all elements in the returned record will be null.

Specified by:
constructRecord in interface IDatapoolEquivalenceClass
Parameters:
elements - The initial values (XML fragments) defined for the record or null if no initial values are desired.
See Also:
IDatapool.getVariableCount(), insertRecord(IDatapoolRecord,int), appendRecord(IDatapoolRecord), replaceRecord(IDatapoolRecord,int)

insertRecord

public void insertRecord(IDatapoolRecord data,
                         int beforeRecord)
Insert the specified record before the zero based record index. Any attempt to insert the same record into a datapool multiple times will result in an appropriate exception.

Specified by:
insertRecord in interface IDatapoolEquivalenceClass
Parameters:
data - The new record.
beforeRecord - The zero based record index to insert the new record before.
See Also:
appendRecord(IDatapoolRecord), replaceRecord(IDatapoolRecord,int), removeRecord(int)

insertRecordDoNotNotify

public void insertRecordDoNotNotify(IDatapoolRecord data,
                                    int beforeRecord)
Helper function Insert the specified record before the zero based record index. Do not notify listeners.

Parameters:
data - The new record.
beforeRecord - The zero based record index to insert the new record before.

appendRecord

public void appendRecord(IDatapoolRecord record)
Append the specified record to the end of the datapool. Any attempt to insert the same Record into a datapool multiple times will result in an appropriate exception.

Specified by:
appendRecord in interface IDatapoolEquivalenceClass
Parameters:
record - The new record.
See Also:
insertRecord(IDatapoolRecord,int), replaceRecord(IDatapoolRecord,int), removeRecord(int)

replaceRecord

public void replaceRecord(IDatapoolRecord data,
                          int recordIndex)
Update the specified record with the supplied data. This method simulates removeRecord followed by insertRecord without the need to perform both calls. The specified record index is zero based. Any attempt to replace a record in the datapool with a record already in the datapool will result in an appropriate exception.

Specified by:
replaceRecord in interface IDatapoolEquivalenceClass
Parameters:
data - The new record data.
recordIndex - The zero based record index to update the new record data into.
See Also:
insertRecord(IDatapoolRecord,int), appendRecord(IDatapoolRecord), removeRecord(int)

removeRecord

public IDatapoolRecord removeRecord(int recordIndex)
Remove the specified record.

Specified by:
removeRecord in interface IDatapoolEquivalenceClass
Parameters:
recordIndex - The zero based record index of the record to remove.
See Also:
insertRecord(IDatapoolRecord,int), appendRecord(IDatapoolRecord), replaceRecord(IDatapoolRecord,int)

removeRecordDoNotNotify

protected IDatapoolRecord removeRecordDoNotNotify(int recordIndex)
Helper function Remove the specified record. Do not notify listener.

Parameters:
recordIndex - The zero based record index of the record to remove.

moveRecord

public void moveRecord(int sourceRecordIndex,
                       int targetRecordIndex)
Move the specified record.

Specified by:
moveRecord in interface IDatapoolEquivalenceClass
Parameters:
sourceRecordIndex - The zero based record index of the record to move.
targetRecordIndex - The reord index marking the target location for the move action.
See Also:
insertRecord(IDatapoolRecord,int), appendRecord(IDatapoolRecord), replaceRecord(IDatapoolRecord,int)

reorder

public void reorder(int[] recordOrder)
Inform the equivalence class of a new order for records. The current record index is specified in the array, with the index into the array expressing the desired order. So if {3, 4, 2, 1, 0} is passed in, the third record if moved to the first position, the fourth to the second and so on.

If the specified set of records is the wrong length or contains redundant record references an appropriate exception is thrown.

Specified by:
reorder in interface IDatapoolEquivalenceClass
Parameters:
recordOrder - The desired order for the records in the equivalence class.

getRecordCount

public int getRecordCount()
The number of records in the equivalence class.

Specified by:
getRecordCount in interface IDatapoolEquivalenceClass
Returns:
The number of records in the equivalence class.

getRecord

public IDatapoolRecord getRecord(int record)
Access to the record contents at the specified zero based record index.

Specified by:
getRecord in interface IDatapoolEquivalenceClass
Parameters:
record - The record contents at the specified zero based record index.

getDatapool

public IDatapool getDatapool()
Access to the datapool that is the parent of this equivalence class.

Specified by:
getDatapool in interface IDatapoolEquivalenceClass
Returns:
The datapool that is the parent of this equivalence class.

setName

public void setName(java.lang.String name)
Description copied from interface: CMNNamedElement
Sets the value of the 'Name' attribute.

Specified by:
setName in interface CMNNamedElement
Overrides:
setName in class CMNNamedElementImpl

TPTP 4.2.0 Platform Project
Public API Specification