//----------------------------BEGIN LICENSE----------------------------
/* 
 * Willow : the Open Source WorkFlow Project
 * Distributable under GNU LGPL license by gun.org
 *
 * Copyright (C) 2004-2010 huihoo.org 
 * Copyright (C) 2004-2010  ZosaTapo <dertyang@hotmail.com> 
 * 
 * ====================================================================
 * Project Homepage : http://www.huihoo.org/god4j
 * Source Forge     : http://sourceforge.net/projects/huihoo
 * Mailing list     : god4j@lists.sourceforge.net 
 */
//----------------------------END  LICENSE-----------------------------

package org.huihoo.god4j.jgraph;
//import org.apache.commons.logging.Log;//import org.apache.commons.logging.LogFactory;
//import org.apache.commons.logging.Log;//import org.apache.commons.logging.LogFactory;
import java.util.List;

import org.jgraph.graph.DefaultGraphModel;
public class XPDLJGraphModel extends DefaultGraphModel
{
	public XPDLJGraphModel()
	{
		super();
	}
	
	public void clear()
	{
		remove(getRoots(this));
	}
	
	public List getChildren()
	{
		List allCellsInModel = getDescendants(this, this.getRoots(this));
		if (allCellsInModel == null || allCellsInModel.size() == 0)
		{
			return null;
		}
		else
		{
			return allCellsInModel;
		}
	}
}