if (nl[i].gid < 0) {
if (node.gid < 0) {
	private final static boolean getParentSet(NodeProxy[] nl) {		int level;		boolean foundValid = false;		final int len = nl.length;		long pid;		for (int i = 0; i < len; i++) {			// skip invalid nodes			if (nl[i] == null)				continue;			if (nl[i].gid < 0) {				nl[i] = null;				continue;			}			level = nl[i].doc.getTreeLevel(nl[i].gid);			if (level == 0) {				nl[i].gid = -1;			} else {				// calculate parent's gid				pid =					(nl[i].gid - nl[i].doc.treeLevelStartPoints[level])						/ nl[i].doc.treeLevelOrder[level]						+ nl[i].doc.treeLevelStartPoints[level						- 1];				//System.out.println(nl[i].doc.getDocId() + ":" + nl[i].gid + "->" + pid);				nl[i].gid = pid;			}			//if (nl[i].gid > 0)			// continue until all nodes are set to null			foundValid = true;		}		return foundValid;	}