/*
 *  Copyright (C) 2006  Takashi Kasuya <kasuya@sfc.keio.ac.jp>
 *
 * This library is free software; you can redistribute it and/or
 *　modify it under the terms of the GNU Lesser General Public
 *　License as published by the Free Software Foundation; either
 *　version 2.1 of the License, or (at your option) any later version.
 *　This library is distributed in the hope that it will be useful,
 *　but WITHOUT ANY WARRANTY; without even the implied warranty of
 *　MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *　Lesser General Public License for more details.
 *
 *　You should have received a copy of the GNU Lesser General Public
 *　License along with this library; if not, write to the Free Software
 *　Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

package jp.ac.naka.ec;

import java.util.Set;

/**
 * 木構造による管理を実現するための基本クラス。
 * @author 粕谷
 *
 */

public interface TreeNode {

	/**
	 * 親を持っているか？
	 * @return
	 */
	public boolean hasParent();
	
	/**
	 * 子ノードを持っているか？
	 */
	public boolean hasChildNodes();
	
	/**
	 * 親ノードの取得
	 * @return
	 */
	public TreeNode getParent();
	
	/**
	 * 子ノードの取得
	 * 
	 * @return 
	 */
	public Set<TreeNode> getChildNodes();
	
	/**
	 * 
	 * @param node
	 */
	public void setParent(TreeNode node);
	
	/**
	 * 
	 * @param node
	 */
	public void addChild(TreeNode node) ;
	
	/**
	 * 
	 * @param node
	 * @return
	 */
	public boolean removeChild (TreeNode node);
	
	/**
	 * 完全修飾名の取得
	 * @return
	 */
	public String getFullyQualifiedName();
	
	/**
	 * ノード内に含まれているか
	 * @param node
	 * @return
	 */
	public boolean include (TreeNode node);
	/**
	 * ユニーク名を返す
	 * @return
	 */
	public String getName();

	/**
	 * 
	 * @param name
	 */
	public void setName(String name);
}
