elemConn.setAttribute("to", conn.getTo().getName());
}
if (conn instanceof WeightedConnection) {
elemConn.setAttribute("type", "WEIGHTED");
WeightedConnection wc = (WeightedConnection) conn;
Element param = doc.createElement("param");
param.setAttribute("name", "name");
param.setAttribute("value", Double.toString(wc.getWeight()));
elemConn.appendChild(param);
} else {
throw new UnsupportedOperationException(
"FcmConnection implementation not supported: " + conn.getClass().getName());