X-Git-Url: http://sraa.de/git/?a=blobdiff_plain;f=dol%2Fsrc%2Fdol%2Fdatamodel%2Farchitecture%2FArchiConnection.java;fp=dol%2Fsrc%2Fdol%2Fdatamodel%2Farchitecture%2FArchiConnection.java;h=9e2d71361fb8895f1b063d2da757264e554add1c;hb=8c411cf24ed0eb889191aaeafd8fa1e69081df42;hp=0000000000000000000000000000000000000000;hpb=dea7a4fb1ed110d3ce6e6d9255103d724bd66c0e;p=jump.git diff --git a/dol/src/dol/datamodel/architecture/ArchiConnection.java b/dol/src/dol/datamodel/architecture/ArchiConnection.java new file mode 100644 index 0000000..9e2d713 --- /dev/null +++ b/dol/src/dol/datamodel/architecture/ArchiConnection.java @@ -0,0 +1,80 @@ +/* $Id: ArchiConnection.java 1 2010-02-24 13:03:05Z haidw $ */ +package dol.datamodel.architecture; + +import dol.visitor.ArchiVisitor; + +/** + * This class defines an architecture connection. Used in the simplified + * architecture specification. An architecture connection contains one + * origin and one target resource. + */ +public class ArchiConnection extends ArchiResource { + /** + * Constructor to create an architecture connection with a name. + * + */ + public ArchiConnection(String name) { + super(name); + } + + /** + * Accept a Visitor. + * + * @param x visitor object + */ + public void accept(ArchiVisitor x) { + x.visitComponent(this); + } + + /** + * Clone this architectural connection. + * + * @return a new instance of the architectural connection. + */ + public Object clone() { + ArchiConnection newObj = (ArchiConnection) super.clone(); + newObj.setOrigin(_origin); + newObj.setTarget(_target); + return (newObj); + } + + /** + * Return a string representation of the architectural connection. + * + * @return string representation of the architectural connection + */ + public String toString() { + return "ArchiConnection: " + getName(); + } + + /** + * Return the origin of the architectural connection. + * + * @return origin architectural resource of the architectural connection + */ + public ArchiResource getOrigin() { return _origin; } + + /** + * Set the origin of the architectural connection. + * + * @param origin architectural resource. + */ + public void setOrigin(ArchiResource origin) { _origin = origin; } + + /** + * Return the target of the architectural connection. + * + * @return target architectural resource of the architectural connection + */ + public ArchiResource getTarget() { return _target; } + + /** + * Set the target of the architectural connection. + * + * @param target architectural resource. + */ + public void setTarget(ArchiResource target) { _target = target; } + + protected ArchiResource _origin; + protected ArchiResource _target; +}