fixed formatting and indentation.

This commit is contained in:
hns 2002-07-04 17:05:52 +00:00
parent 96cd8c406c
commit 47a3202ba8

View file

@ -114,22 +114,19 @@ public class XmlReader implements XmlConstants {
try {
childElement = (Element)list.item(i);
} catch( ClassCastException e ) {
continue; // ignore CDATA, comments etc
// ignore CDATA, comments etc
continue;
}
INode workNode = null;
if ( childElement.getTagName().equals("hop:child") ) {
convert (childElement, helmaNode.createNode(null));
} else if ( !"".equals(childElement.getAttribute("id")) || !"".equals(childElement.getAttribute("idref")) ) {
} else if ( !"".equals(childElement.getAttribute("id")) ||
!"".equals(childElement.getAttribute("idref")) ) {
String childTagName = childElement.getTagName();
INode newNode = convert (childElement, helmaNode.createNode (childTagName));
helmaNode.setNode (childTagName, newNode);
} else {
String type = childElement.getAttribute("type");
String key = childElement.getTagName();
String content = XmlUtil.getTextContent(childElement);
@ -170,7 +167,7 @@ public class XmlReader implements XmlConstants {
// FIXME: this method should use Element.getAttributeNS():
// FIXME: do we need the name value or is it retrieved through mappings anyway?
String name = element.getAttribute("name");
// String name = null;
// String name = null;
String id = element.getAttribute("id");
String prototype = element.getAttribute("prototype");
if ( "".equals(prototype) )
@ -189,13 +186,14 @@ public class XmlReader implements XmlConstants {
int len = list.getLength();
Hashtable propMap = new Hashtable();
List subnodes = new ExternalizableVector();
for ( int i=0; i<len; i++ ) {
for ( int i=0; i<len; i++ ) {
Element childElement;
try {
childElement = (Element)list.item(i);
} catch( ClassCastException e ) {
continue; // ignore CDATA, comments etc
// ignore CDATA, comments etc
continue;
}
if ( childElement.getTagName().equals("hop:child") ) {
@ -213,11 +211,11 @@ public class XmlReader implements XmlConstants {
// if we come until here, childelement is a property value
Property prop = new Property (childElement.getTagName(), helmaNode);
if ( !"".equals(childElement.getAttribute("id")) || !"".equals(childElement.getAttribute("idref")) ) {
if ( !"".equals(childElement.getAttribute("id")) ||
!"".equals(childElement.getAttribute("idref")) ) {
// we've got an object!
String idref = childElement.getAttribute("idref");
prop.setNodeHandle (new NodeHandle(new DbKey(null,idref)));
} else {
String type = childElement.getAttribute("type");
String content = XmlUtil.getTextContent(childElement);