setContent (node.getContent (), node.getContentType ()); created = lastmodified = System.currentTimeMillis (); ntable.put (node, this); adoptName = !conversionRoot; for (Enumeration e = node.getSubnodes (); e.hasMoreElements (); ) { INode next = (INode) e.nextElement (); Node nextc = (Node) ntable.get (next); if (nextc == null) nextc = new Node (next, ntable, true); addNode (nextc); } for (Enumeration e = node.properties (); e.hasMoreElements (); ) { IProperty next = node.get ((String) e.nextElement (), false); if (next == null) continue; int t = next.getType (); if (t == IProperty.NODE) { INode n = next.getNodeValue (); Node nextc = (Node) ntable.get (n); if (nextc == null) nextc = new Node (n, ntable, true); setNode (next.getName (), nextc); } else if (t == IProperty.STRING) { setString (next.getName (), next.getStringValue ()); } else if (t == IProperty.INTEGER) { setInteger (next.getName (), next.getIntegerValue ()); } else if (t == IProperty.FLOAT) { setFloat (next.getName (), next.getFloatValue ()); } else if (t == IProperty.BOOLEAN) { setBoolean (next.getName (), next.getBooleanValue ()); } else if (t == IProperty.DATE) { setDate (next.getName (), next.getDateValue ()); } } adoptName = true;
    public Node (INode node, Hashtable ntable, boolean conversionRoot) {	this.id = generateID ();	this.name = node.getName ();	created = lastmodified = System.currentTimeMillis ();	setContent (node.getContent (), node.getContentType ());	created = lastmodified = System.currentTimeMillis ();	ntable.put (node, this);	adoptName = !conversionRoot;  // only take over name from property if this is not the transient root	for (Enumeration e = node.getSubnodes (); e.hasMoreElements (); ) {	    INode next = (INode) e.nextElement ();	    Node nextc = (Node) ntable.get (next);	    if (nextc == null)	        nextc = new Node (next, ntable, true);	    addNode (nextc);	} 	for (Enumeration e = node.properties (); e.hasMoreElements (); ) {	    IProperty next = node.get ((String) e.nextElement (), false);	    if (next == null)	        continue;	    int t = next.getType ();	    if (t == IProperty.NODE) {	        INode n = next.getNodeValue ();	        Node nextc = (Node) ntable.get (n);	        if (nextc == null)	            nextc = new Node (n, ntable, true);	        setNode (next.getName (), nextc);	    } else if (t == IProperty.STRING) {	        setString (next.getName (), next.getStringValue ());	    } else if (t == IProperty.INTEGER) {	        setInteger (next.getName (), next.getIntegerValue ());	    } else if (t == IProperty.FLOAT) {	        setFloat (next.getName (), next.getFloatValue ());	    } else if (t == IProperty.BOOLEAN) {	        setBoolean (next.getName (), next.getBooleanValue ());	    } else if (t == IProperty.DATE) {	        setDate (next.getName (), next.getDateValue ());	    }	}	adoptName = true; // switch back to normal name adoption behaviour    } 