/*******************************************************************************
 * Copyright (c) 2004, 2007 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/

package org.eclipse.birt.report.engine.content;

import java.util.Iterator;

/**
 * Tree interface.
 * 
 * implement memory management policy. The node may exist in disk or keep in the
 * memory.
 */
public interface INode
{

	/**
	 * Get the parent of the node, or return null if the node is in tree top
	 * level.
	 * 
	 * @return the parent of the node.
	 */
	INode getParent( );

	/**
	 * Set the parent of the node.
	 * 
	 * @param parent
	 *            the parent of the node.
	 */
	void setParent( INode parent );

	INode getPrevious();
	
	void setPrevious(INode previous);
	
	INode getNext();
	
	void setNext(INode next);
	
	/**
	 * Append a child to this node.
	 * @param child the child need to be appended.
	 */
	void appendChild( INode child );

	/**
	 * Get the children of the node.
	 * @return the children of the node.
	 */
	Iterator getChildren( );

	/**
	 * Remove all children of the node.
	 */
	void removeChildren( );
}

@@ -1052,16 +1052,169 @@
 ent );%0A%0A
+%09/**%0A%09 * Get the sibling node immediately preceding the specified node.%0A%09 * %0A%09 * @return the sibling node immediately preceding the specified node.%0A%09 */%0A
 %09INode g
@@ -1224,21 +1224,198 @@
 revious(
+ 
 );%0A%09%0A
+%09/**%0A%09 * Set the sibling node immediately preceding the specified node.%0A%09 * %0A%09 * @param previous%0A%09 *            the sibling node immediately preceding the specified node.%0A%09 */%0A
 %09void se
@@ -1424,16 +1424,17 @@
 revious(
+ 
 INode pr
@@ -1439,21 +1439,175 @@
 previous
+ 
 );%0A%09%0A
+%09/**%0A%09 * Get the sibling node immediately following the specified node.%0A%09 * %0A%09 * @return the sibling node immediately following the specified node.%0A%09 */%0A
 %09INode g
@@ -1613,21 +1613,194 @@
 getNext(
+ 
 );%0A%09%0A
+%09/**%0A%09 * Set the sibling node immediately following the specified node.%0A%09 * %0A%09 * @param next%0A%09 *            the sibling node immediately following the specified node.%0A%09 */%0A
 %09void se
@@ -1805,16 +1805,17 @@
 setNext(
+ 
 INode ne
@@ -1816,16 +1816,17 @@
 ode next
+ 
 );%0A%09%0A%09/*

add some javadocs for INode API