1 | /** |
2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
3 | * |
4 | * $Id$ |
5 | */ |
6 | package de.uka.ipd.sdq.pcm.repository.impl; |
7 | |
8 | import java.util.Collection; |
9 | |
10 | import org.eclipse.emf.common.notify.NotificationChain; |
11 | import org.eclipse.emf.common.util.EList; |
12 | import org.eclipse.emf.ecore.EClass; |
13 | import org.eclipse.emf.ecore.InternalEObject; |
14 | import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; |
15 | import org.eclipse.emf.ecore.util.InternalEList; |
16 | |
17 | import de.uka.ipd.sdq.pcm.repository.InfrastructureInterface; |
18 | import de.uka.ipd.sdq.pcm.repository.InfrastructureSignature; |
19 | import de.uka.ipd.sdq.pcm.repository.RepositoryPackage; |
20 | |
21 | /** |
22 | * <!-- begin-user-doc --> |
23 | * An implementation of the model object '<em><b>Infrastructure Interface</b></em>'. |
24 | * <!-- end-user-doc --> |
25 | * <p> |
26 | * The following features are implemented: |
27 | * <ul> |
28 | * <li>{@link de.uka.ipd.sdq.pcm.repository.impl.InfrastructureInterfaceImpl#getInfrastructureSignatures__InfrastructureInterface <em>Infrastructure Signatures Infrastructure Interface</em>}</li> |
29 | * </ul> |
30 | * </p> |
31 | * |
32 | * @generated |
33 | */ |
34 | public class InfrastructureInterfaceImpl extends InterfaceImpl implements InfrastructureInterface { |
35 | /** |
36 | * <!-- begin-user-doc --> |
37 | * <!-- end-user-doc --> |
38 | * @generated |
39 | */ |
40 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
41 | |
42 | /** |
43 | * The cached value of the '{@link #getInfrastructureSignatures__InfrastructureInterface() <em>Infrastructure Signatures Infrastructure Interface</em>}' containment reference list. |
44 | * <!-- begin-user-doc --> |
45 | * <!-- end-user-doc --> |
46 | * @see #getInfrastructureSignatures__InfrastructureInterface() |
47 | * @generated |
48 | * @ordered |
49 | */ |
50 | protected EList<InfrastructureSignature> infrastructureSignatures__InfrastructureInterface; |
51 | |
52 | /** |
53 | * <!-- begin-user-doc --> |
54 | * <!-- end-user-doc --> |
55 | * @generated |
56 | */ |
57 | protected InfrastructureInterfaceImpl() { |
58 | super(); |
59 | } |
60 | |
61 | /** |
62 | * <!-- begin-user-doc --> |
63 | * <!-- end-user-doc --> |
64 | * @generated |
65 | */ |
66 | @Override |
67 | protected EClass eStaticClass() { |
68 | return RepositoryPackage.Literals.INFRASTRUCTURE_INTERFACE; |
69 | } |
70 | |
71 | /** |
72 | * <!-- begin-user-doc --> |
73 | * <!-- end-user-doc --> |
74 | * @generated |
75 | */ |
76 | public EList<InfrastructureSignature> getInfrastructureSignatures__InfrastructureInterface() { |
77 | if (infrastructureSignatures__InfrastructureInterface == null) { |
78 | infrastructureSignatures__InfrastructureInterface = new EObjectContainmentWithInverseEList<InfrastructureSignature>(InfrastructureSignature.class, this, RepositoryPackage.INFRASTRUCTURE_INTERFACE__INFRASTRUCTURE_SIGNATURES_INFRASTRUCTURE_INTERFACE, RepositoryPackage.INFRASTRUCTURE_SIGNATURE__INFRASTRUCTURE_INTERFACE_INFRASTRUCTURE_SIGNATURE); |
79 | } |
80 | return infrastructureSignatures__InfrastructureInterface; |
81 | } |
82 | |
83 | /** |
84 | * <!-- begin-user-doc --> |
85 | * <!-- end-user-doc --> |
86 | * @generated |
87 | */ |
88 | @SuppressWarnings("unchecked") |
89 | @Override |
90 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
91 | switch (featureID) { |
92 | case RepositoryPackage.INFRASTRUCTURE_INTERFACE__INFRASTRUCTURE_SIGNATURES_INFRASTRUCTURE_INTERFACE: |
93 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getInfrastructureSignatures__InfrastructureInterface()).basicAdd(otherEnd, msgs); |
94 | } |
95 | return super.eInverseAdd(otherEnd, featureID, msgs); |
96 | } |
97 | |
98 | /** |
99 | * <!-- begin-user-doc --> |
100 | * <!-- end-user-doc --> |
101 | * @generated |
102 | */ |
103 | @Override |
104 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
105 | switch (featureID) { |
106 | case RepositoryPackage.INFRASTRUCTURE_INTERFACE__INFRASTRUCTURE_SIGNATURES_INFRASTRUCTURE_INTERFACE: |
107 | return ((InternalEList<?>)getInfrastructureSignatures__InfrastructureInterface()).basicRemove(otherEnd, msgs); |
108 | } |
109 | return super.eInverseRemove(otherEnd, featureID, msgs); |
110 | } |
111 | |
112 | /** |
113 | * <!-- begin-user-doc --> |
114 | * <!-- end-user-doc --> |
115 | * @generated |
116 | */ |
117 | @Override |
118 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
119 | switch (featureID) { |
120 | case RepositoryPackage.INFRASTRUCTURE_INTERFACE__INFRASTRUCTURE_SIGNATURES_INFRASTRUCTURE_INTERFACE: |
121 | return getInfrastructureSignatures__InfrastructureInterface(); |
122 | } |
123 | return super.eGet(featureID, resolve, coreType); |
124 | } |
125 | |
126 | /** |
127 | * <!-- begin-user-doc --> |
128 | * <!-- end-user-doc --> |
129 | * @generated |
130 | */ |
131 | @SuppressWarnings("unchecked") |
132 | @Override |
133 | public void eSet(int featureID, Object newValue) { |
134 | switch (featureID) { |
135 | case RepositoryPackage.INFRASTRUCTURE_INTERFACE__INFRASTRUCTURE_SIGNATURES_INFRASTRUCTURE_INTERFACE: |
136 | getInfrastructureSignatures__InfrastructureInterface().clear(); |
137 | getInfrastructureSignatures__InfrastructureInterface().addAll((Collection<? extends InfrastructureSignature>)newValue); |
138 | return; |
139 | } |
140 | super.eSet(featureID, newValue); |
141 | } |
142 | |
143 | /** |
144 | * <!-- begin-user-doc --> |
145 | * <!-- end-user-doc --> |
146 | * @generated |
147 | */ |
148 | @Override |
149 | public void eUnset(int featureID) { |
150 | switch (featureID) { |
151 | case RepositoryPackage.INFRASTRUCTURE_INTERFACE__INFRASTRUCTURE_SIGNATURES_INFRASTRUCTURE_INTERFACE: |
152 | getInfrastructureSignatures__InfrastructureInterface().clear(); |
153 | return; |
154 | } |
155 | super.eUnset(featureID); |
156 | } |
157 | |
158 | /** |
159 | * <!-- begin-user-doc --> |
160 | * <!-- end-user-doc --> |
161 | * @generated |
162 | */ |
163 | @Override |
164 | public boolean eIsSet(int featureID) { |
165 | switch (featureID) { |
166 | case RepositoryPackage.INFRASTRUCTURE_INTERFACE__INFRASTRUCTURE_SIGNATURES_INFRASTRUCTURE_INTERFACE: |
167 | return infrastructureSignatures__InfrastructureInterface != null && !infrastructureSignatures__InfrastructureInterface.isEmpty(); |
168 | } |
169 | return super.eIsSet(featureID); |
170 | } |
171 | |
172 | } //InfrastructureInterfaceImpl |