org.eodisp.hla.crc.data.impl
Class FederateImpl

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.eodisp.hla.crc.data.impl.FederateImpl
All Implemented Interfaces:
org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject, Federate

public class FederateImpl
extends org.eclipse.emf.ecore.impl.EObjectImpl
implements Federate

An implementation of the model object 'Federate'.

The following features are implemented:

generated

Nested Class Summary
 
Nested classes/interfaces 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/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
           
protected static FederationExecution FEDERATION_EXECUTION_EDEFAULT
          The default value of the 'Federation Execution' attribute.
protected  FederationExecution federationExecution
          The cached value of the 'Federation Execution' attribute.
protected  FederateHandle handle
          The cached value of the 'Handle' attribute.
protected static FederateHandle HANDLE_EDEFAULT
          The default value of the 'Handle' attribute.
protected static LrcHandle LRC_HANDLE_EDEFAULT
          The default value of the 'Lrc Handle' attribute.
protected  LrcHandle lrcHandle
          The cached value of the 'Lrc Handle' attribute.
protected  org.eclipse.emf.common.util.EList publishedAttributes
          The cached value of the 'Published Attributes' reference list.
protected  org.eclipse.emf.common.util.EList publishedInteractions
          The cached value of the 'Published Interactions' reference list.
protected  org.eclipse.emf.common.util.EList registeredObjectInstances
          The cached value of the 'Registered Object Instances' containment reference list.
protected  org.eclipse.emf.common.util.EList subscribedAttributes
          The cached value of the 'Subscribed Attributes' reference list.
protected  org.eclipse.emf.common.util.EList subscribedInteractions
          The cached value of the 'Subscribed Interactions' reference list.
 
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 FederateImpl()
           
 
Method Summary
 void checkPublication(ObjectClass objectClass)
          Checks if the given object class is published by this federate, throws an ObjectClassNotPublished otherwise.
 void checkPublication(java.util.Set<Attribute> attributes)
          Checks if the given attributes are published by this federate, throws a AttributeNotPublished exception otherwise.
 java.lang.Object eGet(int featureID, boolean resolve, boolean coreType)
           
 org.eclipse.emf.common.notify.NotificationChain eInverseAdd(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)
          // *
 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)
           
 FederationExecution getFederationExecution()
           
 FederateHandle getHandle()
           
 LrcHandle getLrcHandle()
           
 org.eclipse.emf.common.util.EList getPublishedAttributes()
           
 org.eclipse.emf.common.util.EList getPublishedInteractions()
           
 org.eclipse.emf.common.util.EList getPublishedObjectClasses()
          Returns the value of the 'Published Object Classes' reference list.
 org.eclipse.emf.common.util.EList getRegisteredObjectInstances()
           
 org.eclipse.emf.common.util.EList getSubscribedAttributes()
           
 org.eclipse.emf.common.util.EList getSubscribedInteractions()
           
 org.eclipse.emf.common.util.EList getSubscribedObjectClasses()
          Returns the value of the 'Subscribed Object Classes' reference list.
 boolean ownsAttributes()
          Returns true if this federate owns at least one attribute, otherwise returns false.
 boolean ownsAttributes(ObjectInstance objectInstance, java.util.Set<Attribute> attributes)
          Returns true if this federate owns all of the given attributes.
 void setFederationExecution(FederationExecution newFederationExecution)
           
 void setHandle(FederateHandle newHandle)
           
 void setLrcHandle(LrcHandle newLrcHandle)
           
 java.lang.String 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, 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.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

copyright

public static final java.lang.String copyright

See Also:
Constant Field Values
generated

registeredObjectInstances

protected org.eclipse.emf.common.util.EList registeredObjectInstances
The cached value of the 'Registered Object Instances' containment reference list.

See Also:
getRegisteredObjectInstances()
generated
ordered

subscribedAttributes

protected org.eclipse.emf.common.util.EList subscribedAttributes
The cached value of the 'Subscribed Attributes' reference list.

See Also:
getSubscribedAttributes()
generated
ordered

subscribedInteractions

protected org.eclipse.emf.common.util.EList subscribedInteractions
The cached value of the 'Subscribed Interactions' reference list.

See Also:
getSubscribedInteractions()
generated
ordered

publishedAttributes

protected org.eclipse.emf.common.util.EList publishedAttributes
The cached value of the 'Published Attributes' reference list.

See Also:
getPublishedAttributes()
generated
ordered

publishedInteractions

protected org.eclipse.emf.common.util.EList publishedInteractions
The cached value of the 'Published Interactions' reference list.

See Also:
getPublishedInteractions()
generated
ordered

LRC_HANDLE_EDEFAULT

protected static final LrcHandle LRC_HANDLE_EDEFAULT
The default value of the 'Lrc Handle' attribute.

See Also:
getLrcHandle()
generated
ordered

lrcHandle

protected LrcHandle lrcHandle
The cached value of the 'Lrc Handle' attribute.

See Also:
getLrcHandle()
generated
ordered

HANDLE_EDEFAULT

protected static final FederateHandle HANDLE_EDEFAULT
The default value of the 'Handle' attribute.

See Also:
getHandle()
generated
ordered

handle

protected FederateHandle handle
The cached value of the 'Handle' attribute.

See Also:
getHandle()
generated
ordered

FEDERATION_EXECUTION_EDEFAULT

protected static final FederationExecution FEDERATION_EXECUTION_EDEFAULT
The default value of the 'Federation Execution' attribute.

See Also:
getFederationExecution()
generated
ordered

federationExecution

protected FederationExecution federationExecution
The cached value of the 'Federation Execution' attribute.

See Also:
getFederationExecution()
generated
ordered
Constructor Detail

FederateImpl

protected FederateImpl()

generated
Method Detail

eStaticClass

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

Overrides:
eStaticClass in class org.eclipse.emf.ecore.impl.EObjectImpl
generated

getRegisteredObjectInstances

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

Specified by:
getRegisteredObjectInstances in interface Federate
Returns:
the value of the 'Registered Object Instances' containment reference list.
See Also:
DataPackage.getFederate_RegisteredObjectInstances(), ObjectInstance.getRegisteringFederate()
generated

getSubscribedAttributes

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

Specified by:
getSubscribedAttributes in interface Federate
Returns:
the value of the 'Subscribed Attributes' reference list.
See Also:
DataPackage.getFederate_SubscribedAttributes(), Attribute.getSubscribingFederates()
generated

getSubscribedInteractions

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

Specified by:
getSubscribedInteractions in interface Federate
Returns:
the value of the 'Subscribed Interactions' reference list.
See Also:
DataPackage.getFederate_SubscribedInteractions(), InteractionClass.getSubscribingFederates()
generated

getPublishedAttributes

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

Specified by:
getPublishedAttributes in interface Federate
Returns:
the value of the 'Published Attributes' reference list.
See Also:
DataPackage.getFederate_PublishedAttributes(), Attribute.getPublishingFederates()
generated

getPublishedInteractions

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

Specified by:
getPublishedInteractions in interface Federate
Returns:
the value of the 'Published Interactions' reference list.
See Also:
DataPackage.getFederate_PublishedInteractions(), InteractionClass.getPublishingFederates()
generated

getLrcHandle

public LrcHandle getLrcHandle()

Specified by:
getLrcHandle in interface Federate
Returns:
the value of the 'Lrc Handle' attribute.
See Also:
Federate.setLrcHandle(LrcHandle), DataPackage.getFederate_LrcHandle()
generated

setLrcHandle

public void setLrcHandle(LrcHandle newLrcHandle)

Specified by:
setLrcHandle in interface Federate
Parameters:
newLrcHandle - the new value of the 'Lrc Handle' attribute.
See Also:
Federate.getLrcHandle()
generated

getHandle

public FederateHandle getHandle()

Specified by:
getHandle in interface Federate
Returns:
the value of the 'Handle' attribute.
See Also:
Federate.setHandle(FederateHandle), DataPackage.getFederate_Handle()
generated

setHandle

public void setHandle(FederateHandle newHandle)

Specified by:
setHandle in interface Federate
Parameters:
newHandle - the new value of the 'Handle' attribute.
See Also:
Federate.getHandle()
generated

getFederationExecution

public FederationExecution getFederationExecution()

Specified by:
getFederationExecution in interface Federate
Returns:
the value of the 'Federation Execution' attribute.
See Also:
Federate.setFederationExecution(FederationExecution), DataPackage.getFederate_FederationExecution()
generated

setFederationExecution

public void setFederationExecution(FederationExecution newFederationExecution)

Specified by:
setFederationExecution in interface Federate
Parameters:
newFederationExecution - the new value of the 'Federation Execution' attribute.
See Also:
Federate.getFederationExecution()
generated

getPublishedObjectClasses

public org.eclipse.emf.common.util.EList getPublishedObjectClasses()
Returns the value of the 'Published Object Classes' reference list. The list contents are of type ObjectClass.

If the meaning of the 'Published Object Classes' reference list isn't clear, there really should be more of a description here...

Specified by:
getPublishedObjectClasses in interface Federate
Returns:
the value of the 'Published Object Classes' reference list.
See Also:
DataPackage.getFederate_PublishedObjectClasses()
generated
not

getSubscribedObjectClasses

public org.eclipse.emf.common.util.EList getSubscribedObjectClasses()
Returns the value of the 'Subscribed Object Classes' reference list. The list contents are of type ObjectClass.

If the meaning of the 'Subscribed Object Classes' reference list isn't clear, there really should be more of a description here...

Specified by:
getSubscribedObjectClasses in interface Federate
Returns:
the value of the 'Subscribed Object Classes' reference list.
See Also:
DataPackage.getFederate_SubscribedObjectClasses()
generated
not

eInverseAdd

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

Overrides:
eInverseAdd in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
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 org.eclipse.emf.ecore.impl.BasicEObjectImpl
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 org.eclipse.emf.ecore.impl.BasicEObjectImpl
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 org.eclipse.emf.ecore.impl.BasicEObjectImpl
generated

eUnset

public void eUnset(int featureID)

Specified by:
eUnset in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eUnset in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
generated

eIsSet

public boolean eIsSet(int featureID)

Specified by:
eIsSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eIsSet in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
generated

toString

public java.lang.String toString()

Overrides:
toString in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
generated
not

checkPublication

public void checkPublication(ObjectClass objectClass)
                      throws ObjectClassNotPublished
Description copied from interface: Federate
Checks if the given object class is published by this federate, throws an ObjectClassNotPublished otherwise.

Specified by:
checkPublication in interface Federate
Parameters:
objectClass - the object class to be checked for publiscation on this federate
Throws:
ObjectClassNotPublished - if the given object class is not published by this federate

checkPublication

public void checkPublication(java.util.Set<Attribute> attributes)
                      throws AttributeNotPublished
Description copied from interface: Federate
Checks if the given attributes are published by this federate, throws a AttributeNotPublished exception otherwise.

Specified by:
checkPublication in interface Federate
Parameters:
attributes - the attributes to be checked for publication on this federate
Throws:
AttributeNotPublished - if this federate is not publishing the given attributes

ownsAttributes

public boolean ownsAttributes(ObjectInstance objectInstance,
                              java.util.Set<Attribute> attributes)
Returns true if this federate owns all of the given attributes. Currently this method tests if the given object instance has been registered by this federate. This is enough because it is not possible to aquire ownership for another federate if one federate has registered an object instance. This may change in the future, when more HLA service are implemented, in particular RTIambassador.attributeOwnershipAcquisition(ObjectInstanceHandle, AttributeHandleSet, byte[]). Note that this method declaration does not need be changed for this.

Specified by:
ownsAttributes in interface Federate
Parameters:
objectInstance - the object instance of that is registered for the given attributes
attributes - the attributes of the given object instance that shall be checked for ownership on this federate.
Returns:
true if this federate owns all of the given attributes of the given object instance

ownsAttributes

public boolean ownsAttributes()
Returns true if this federate owns at least one attribute, otherwise returns false. Currently this method tests if any object instance has been registered by this federate. This is enough because it is not possible to aquire ownership for another federate if one federate has registered an object instance. This may change in the future, when more HLA service are implemented, in particular if the service RTIambassador.attributeOwnershipAcquisition(ObjectInstanceHandle, AttributeHandleSet, byte[]) is implemented. Note that this method declaration does not need be changed for this.

Specified by:
ownsAttributes in interface Federate
Returns:
true if this federate owns at least one attribute, otherwise returns false.