}
return structType;
}
public Exception getExceptionDefinition(Node node, Definition def) {
Exception exceptType = new Exception();
NamedNodeMap exceptAttributes = node.getAttributes();
// Store information about the exception
for (int i = 0; i < exceptAttributes.getLength(); ++i) {
if (exceptAttributes.item(i).getNodeName().equals("name")) {
exceptType.setName(exceptAttributes.item(i).getNodeValue());
} else if (exceptAttributes.item(i).getNodeName().equals("repositoryID")) {
exceptType.setRepositoryID(exceptAttributes.item(i).getNodeValue());
}
}
// Store information about the exceptions members
NodeList exceptChildNodes = node.getChildNodes();
for (int i = 0; i < exceptChildNodes.getLength(); ++i) {
Node currentNode = exceptChildNodes.item(i);
if (currentNode.getNodeName().equals("corba:member")) {
MemberType member = new MemberType();
NamedNodeMap memberAttributes = currentNode.getAttributes();
for (int j = 0; j < memberAttributes.getLength(); ++j) {
Node memberAttrNode = memberAttributes.item(j);
if (memberAttrNode.getNodeName().equals("name")) {
member.setName(memberAttrNode.getNodeValue());
} else if (memberAttrNode.getNodeName().equals("idltype")) {
String idlType = memberAttrNode.getNodeValue();
int seperatorIndex = idlType.indexOf(':');
String prefix = idlType.substring(0, seperatorIndex);
String localPart = idlType.substring(seperatorIndex + 1, idlType.length());
member.setIdltype(new QName(def.getNamespace(prefix), localPart, prefix));
}
}
exceptType.getMember().add(member);
}
}
return exceptType;
}