/*
 * Copyright (c) 1998-2006 Caucho Technology -- all rights reserved
 *
 * This file is part of Resin(R) Open Source
 *
 * Each copy or derived work must preserve the copyright notice and this
 * notice unmodified.
 *
 * Resin Open Source is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Resin Open Source 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, or any warranty
 * of NON-INFRINGEMENT.  See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Resin Open Source; if not, write to the
 *   Free SoftwareFoundation, Inc.
 *   59 Temple Place, Suite 330
 *   Boston, MA 02111-1307  USA
 *
 * @author Scott Ferguson
 */

package com.caucho.ejb.doclet;

import java.io.*;
import java.util.*;
import java.util.logging.*;

import com.caucho.util.L10N;
import com.caucho.util.BeanUtil;

import com.caucho.log.Log;

import com.caucho.vfs.Path;
import com.caucho.vfs.Vfs;
import com.caucho.vfs.WriteStream;

import com.caucho.make.Make;

import com.caucho.java.JavaWriter;

import com.caucho.config.ConfigException;
import com.caucho.config.LineConfigException;

import com.caucho.doclet.RootDocImpl;
import com.caucho.doclet.ClassDocImpl;
import com.caucho.doclet.MethodDocImpl;
import com.caucho.doclet.DocImpl;

/**
 * Represents a relation generated by the doclet.
 * picks up new jars.
 */
public class DocletRelation {
  private static final Logger log = Log.open(DocletRelation.class);
  private static final L10N L = new L10N(DocletRelation.class);

  private String _name;

  private String _sourceEJB;
  private String _sourceField;

  private String _targetEJB;
  private String _targetField;

  /**
   * Returns the relation's name.
   */
  public String getName()
  {
    return _name;
  }

  /**
   * Sets the relation's name.
   */
  public void setName(String name)
  {
    _name = name;
  }

  /**
   * Returns the source EJB.  The source EJB is the one
   * primarily reponsible for the link in a one way link.
   */
  public String getSourceEJB()
  {
    return _sourceEJB;
  }

  /**
   * Sets the source EJB.  The source EJB is the one
   * primarily reponsible for the link in a one way link.
   */
  public void setSourceEJB(String ejb)
  {
    _sourceEJB = ejb;
  }

  /**
   * Returns the source field.  The source field is the one
   * primarily reponsible for the link in a one way link.
   */
  public String getSourceField()
  {
    return _sourceField;
  }

  /**
   * Sets the source field.  The source field is the one
   * primarily reponsible for the link in a one way link.
   */
  public void setSourceField(String ejb)
  {
    _sourceField = ejb;
  }

  /**
   * Returns the target EJB.  The target EJB is the one
   * primarily reponsible for the link in a one way link.
   */
  public String getTargetEJB()
  {
    return _targetEJB;
  }

  /**
   * Sets the target EJB.  The target EJB is the one
   * primarily reponsible for the link in a one way link.
   */
  public void setTargetEJB(String ejb)
  {
    _targetEJB = ejb;
  }

  /**
   * Returns the target field.  The target field is the one
   * primarily reponsible for the link in a one way link.
   */
  public String getTargetField()
  {
    return _targetField;
  }

  /**
   * Sets the target field.  The target field is the one
   * primarily reponsible for the link in a one way link.
   */
  public void setTargetField(String ejb)
  {
    _targetField = ejb;
  }
}
