1 /* $Id: ArchiConnection.java 1 2010-02-24 13:03:05Z haidw $ */
2 package dol.datamodel.architecture;
4 import dol.visitor.ArchiVisitor;
7 * This class defines an architecture connection. Used in the simplified
8 * architecture specification. An architecture connection contains one
9 * origin and one target resource.
11 public class ArchiConnection extends ArchiResource {
13 * Constructor to create an architecture connection with a name.
16 public ArchiConnection(String name) {
23 * @param x visitor object
25 public void accept(ArchiVisitor x) {
26 x.visitComponent(this);
30 * Clone this architectural connection.
32 * @return a new instance of the architectural connection.
34 public Object clone() {
35 ArchiConnection newObj = (ArchiConnection) super.clone();
36 newObj.setOrigin(_origin);
37 newObj.setTarget(_target);
42 * Return a string representation of the architectural connection.
44 * @return string representation of the architectural connection
46 public String toString() {
47 return "ArchiConnection: " + getName();
51 * Return the origin of the architectural connection.
53 * @return origin architectural resource of the architectural connection
55 public ArchiResource getOrigin() { return _origin; }
58 * Set the origin of the architectural connection.
60 * @param origin architectural resource.
62 public void setOrigin(ArchiResource origin) { _origin = origin; }
65 * Return the target of the architectural connection.
67 * @return target architectural resource of the architectural connection
69 public ArchiResource getTarget() { return _target; }
72 * Set the target of the architectural connection.
74 * @param target architectural resource.
76 public void setTarget(ArchiResource target) { _target = target; }
78 protected ArchiResource _origin;
79 protected ArchiResource _target;