34 |
to any source code in the Content. |
to any source code in the Content. |
35 |
|
|
36 |
*/ |
*/ |
37 |
|
/** |
38 |
|
* |
39 |
|
* @author Xianfeng Liu <acp04xfl@shef.ac.uk> |
40 |
|
* |
41 |
|
* |
42 |
|
*/ |
43 |
package nongnu.cashews.eclipse.composer.model; |
package nongnu.cashews.eclipse.composer.model; |
44 |
|
|
45 |
import java.util.List; |
import java.util.List; |
95 |
return name; |
return name; |
96 |
} |
} |
97 |
|
|
98 |
public void addInput(Connection connection) |
public void addInput(ConnectionElement connection) |
99 |
{ |
{ |
100 |
inputs.add(connection); |
inputs.add(connection); |
101 |
fireStructureChange(INPUTS, connection); |
fireStructureChange(INPUTS, connection); |
102 |
} |
} |
103 |
|
|
104 |
public void addOutput(Connection connection) |
public void addOutput(ConnectionElement connection) |
105 |
{ |
{ |
106 |
outputs.add(connection); |
outputs.add(connection); |
107 |
fireStructureChange(OUTPUTS, connection); |
fireStructureChange(OUTPUTS, connection); |
117 |
return super.outputs; |
return super.outputs; |
118 |
} |
} |
119 |
|
|
120 |
public void removeInput(Connection connection) |
public void removeInput(ConnectionElement connection) |
121 |
{ |
{ |
122 |
inputs.remove(connection); |
super.inputs.remove(connection); |
123 |
fireStructureChange(INPUTS, connection); |
fireStructureChange(INPUTS, connection); |
124 |
} |
} |
125 |
|
|
126 |
public void removeOutput(Connection connection) |
public void removeOutput(ConnectionElement connection) |
127 |
{ |
{ |
128 |
outputs.remove(connection); |
super.outputs.remove(connection); |
129 |
fireStructureChange(OUTPUTS, connection); |
fireStructureChange(OUTPUTS, connection); |
130 |
} |
} |
131 |
|
|
192 |
|
|
193 |
str.append(">"); |
str.append(">"); |
194 |
Node tempNode = null; |
Node tempNode = null; |
195 |
Connection tempConnection = null; |
ConnectionElement tempConnection = null; |
196 |
if (outputs.size() > 0) |
if (outputs != null && outputs.size() > 0) |
197 |
{ |
{ |
198 |
for (int i = 0; i < outputs.size(); i++) |
for (int i = 0; i < outputs.size(); i++) |
199 |
{ |
{ |
200 |
str.append("<OutgoingEdge destination="); |
str.append("<OutgoingEdge Destination="); |
201 |
tempConnection = (Connection) outputs.get(i); |
tempConnection = (ConnectionElement) outputs.get(i); |
202 |
tempNode = tempConnection.getTarget(); |
tempNode = tempConnection.getTarget(); |
203 |
str.append("\""); |
str.append("\""); |
204 |
str.append(tempNode.getName()); |
str.append(tempNode.getName()); |