Hashtable fields = new Hashtable();
NodeList recordtypes = interfaceDescription
.getElementsByTagName("RecordTypeSpec");
NamedNodeMap attributes;
Node attribute;
String identifierString;
NodeList fieldNodes;
Node node;
Field field = null;
Node name, length;
List fieldList;
for (int i = 0; i < recordtypes.getLength(); i++)
{
Node recordtype = recordtypes.item(i);
attributes = recordtype.getAttributes();
attribute = attributes.getNamedItem("Name");
if (attribute != null)
{
identifierString = attribute.getNodeValue();
}
else
{
throw new XException(Constants.LOCATION_INTERN,
Constants.LAYER_PROTOCOL,
Constants.PACKAGE_PROTOCOL_BYTEARRAYLIST, "15");
}
fieldList = new Vector();
fieldNodes = recordtype.getChildNodes();
for (int k = 0; k < fieldNodes.getLength(); k++)
{
node = fieldNodes.item(k);
if (("Field".equals(node.getNodeName()))
&& (node.getNodeType() == Node.ELEMENT_NODE))
{
field = new Field();
attributes = node.getAttributes();
name = attributes.getNamedItem("Name");
if (name != null)
{
field.name = name.getNodeValue();
}
else
{
throw new XException(Constants.LOCATION_INTERN,
Constants.LAYER_PROTOCOL,
Constants.PACKAGE_PROTOCOL_BYTEARRAYLIST, "16");
}
length = attributes.getNamedItem("Length");
if (length != null)
{
try
{
field.length = Integer.parseInt(length