private void checkTree(int size) {
private void checkTree(int size) throws EXistException {
	private void checkTree(int size) {		// check if the tree structure needs to be changed		int level = ownerDocument.getTreeLevel(gid);		if (ownerDocument.getMaxDepth() == level + 1) {			ownerDocument.incMaxDepth();			LOG.debug("setting maxDepth = " + ownerDocument.getMaxDepth());		}		if (ownerDocument.getTreeLevelOrder(level + 1) < children + size) {			// recompute the order of the tree			ownerDocument.setTreeLevelOrder(level + 1, children + size);			ownerDocument.calculateTreeLevelStartPoints();			if (ownerDocument.reindex < 0 || ownerDocument.reindex > level + 1) {				ownerDocument.reindex = level + 1;			}		}	}