/*
 * JBoss, Home of Professional Open Source
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.deployment.spi.beans;

import java.util.ArrayList;

/**
 * @author Rob Stryker
 * @version $Revision: 1.3 $
 */
public class ConfigBeanXPaths
{
   private ArrayList children;
   private String relativePath;
   private ConfigBeanXPaths parent;

   public ConfigBeanXPaths(String relativePath, ConfigBeanXPaths parent)
   {
      children = new ArrayList();
      this.relativePath = relativePath;
      this.parent = parent;
      if (parent != null)
         parent.addChild(this);
   }

   public ConfigBeanXPaths getParent()
   {
      return parent;
   }

   public void setParent(ConfigBeanXPaths parent)
   {
      this.parent = parent;
      parent.addChild(this);
   }

   public String getPath()
   {
      return relativePath;
   }

   public ArrayList getChildren()
   {
      return children;
   }

   public void addChild(ConfigBeanXPaths path)
   {
      children.add(path);
   }
}
