be.ac.vub.cocompose.lang.impl.core
Class DefaultRelationship

java.lang.Object
  extended bybe.ac.vub.cocompose.lang.impl.DefaultElement
      extended bybe.ac.vub.cocompose.lang.impl.core.DefaultModelElement
          extended bybe.ac.vub.cocompose.lang.impl.core.DefaultRelationship
All Implemented Interfaces:
Cloneable, Element, ModelElement, Relationship, VisitedElement
Direct Known Subclasses:
EclipseRelationship

public class DefaultRelationship
extends DefaultModelElement
implements Relationship

Interface for relationships between CoCompose language elements.

Since:
0.2.0
Version:
0.2.0, 07/01/2003
Author:
Dennis Wagelaar

Constructor Summary
DefaultRelationship()
           
 
Method Summary
 void accept(ModelVisitor modelVisitor)
          Accepts a visitor.
 String getName()
          Gets the name of this ModelElement.
 RelationElement getSourceParticipant()
          Gets the first participant in this relationship.
 RelationElement getTargetParticipant()
          Gets the second participant in this relationship.
 void setSourceParticipant(RelationElement sourceParticipant)
          Sets the first participant in this relationship.
 void setTargetParticipant(RelationElement targetParticipant)
          Sets the second participant in this relationship.
 
Methods inherited from class be.ac.vub.cocompose.lang.impl.core.DefaultModelElement
getId, getModel, getNamespace, setId, setName, setNamespace, toString
 
Methods inherited from class be.ac.vub.cocompose.lang.impl.DefaultElement
addPropertyChangeListener, firePropertyChange, fireStructureChange, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface be.ac.vub.cocompose.lang.core.ModelElement
getId, getModel, getNamespace, setId, setName, setNamespace
 
Methods inherited from interface be.ac.vub.cocompose.lang.Element
addPropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

DefaultRelationship

public DefaultRelationship()
Method Detail

accept

public void accept(ModelVisitor modelVisitor)
            throws ModelElementException
Accepts a visitor.

Specified by:
accept in interface VisitedElement
Overrides:
accept in class DefaultModelElement
Parameters:
modelVisitor - The visitor to accept.
Throws:
ModelElementException

getSourceParticipant

public RelationElement getSourceParticipant()
Gets the first participant in this relationship.

Specified by:
getSourceParticipant in interface Relationship
Returns:
the source participant.

setSourceParticipant

public void setSourceParticipant(RelationElement sourceParticipant)
Sets the first participant in this relationship.

Specified by:
setSourceParticipant in interface Relationship
Parameters:
sourceParticipant - - the source participant.

getTargetParticipant

public RelationElement getTargetParticipant()
Gets the second participant in this relationship.

Specified by:
getTargetParticipant in interface Relationship
Returns:
the target participant.

setTargetParticipant

public void setTargetParticipant(RelationElement targetParticipant)
Sets the second participant in this relationship.

Specified by:
setTargetParticipant in interface Relationship
Parameters:
targetParticipant - - the target participant.

getName

public String getName()
Description copied from interface: ModelElement
Gets the name of this ModelElement.

Specified by:
getName in interface ModelElement
Overrides:
getName in class DefaultModelElement
Returns:
the name of this ModelElement.
See Also:
ModelElement.getName()