return channels;
}
@SuppressWarnings("unchecked")
protected Channel parseChannel(Element element) {
Channel channel = new Channel();
Set from = new HashSet();
Set to = new HashSet();
NodeList childNodes = element.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++) {
Node child = childNodes.item(i);
if (child.getNodeType() == Node.ELEMENT_NODE) {
String localName = child.getLocalName();
if (FROM_ELEMENT.equals(localName)) {
String ref = ((Element) child).getAttribute("value");
from.add(ref);
} else if (TO_ELEMENT.equals(localName)) {
String ref = ((Element) child).getAttribute("value");
to.add(ref);
}
}
}
channel.setFrom(from);
channel.setTo(to);
return channel;
}