be.ac.vub.cocompose.lang.constraints
Interface Constraint

All Superinterfaces:
Cloneable, Element, ModelElement, Namespace, VisitedElement
All Known Subinterfaces:
AndConstraint, CompositeConstraint, ElementConstraint, OrConstraint
All Known Implementing Classes:
DefaultAndConstraint, DefaultCompositeConstraint, DefaultConstraint, DefaultElementConstraint, DefaultOrConstraint

public interface Constraint
extends Namespace

General constraint interface.

Since:
0.0.23
Version:
0.2.0
Author:
Dennis Wagelaar

Method Summary
 void check()
          Checks whether the constraint holds.
 CompositeConstraint getOwnerConstraint()
          Gets the owner constraint.
 boolean isInverted()
          Gets the inverted attribute.
 void setInverted(boolean inverted)
          Sets the inverted attribute.
 void setOwnerConstraint(CompositeConstraint ownerConstraint)
          Sets the owner constraint.
 
Methods inherited from interface be.ac.vub.cocompose.lang.core.Namespace
addOwnedElement, addOwnedElement, getDeepOwnedElement, getDeepOwnedElements, getOwnedElement, getOwnedElementId, getOwnedElements, getOwnedElements, getOwnedIds, isRegistered, registerNameChange, removeOwnedElement
 
Methods inherited from interface be.ac.vub.cocompose.lang.core.ModelElement
getId, getModel, getName, getNamespace, getRootNamespace, setId, setName, setNamespace
 
Methods inherited from interface be.ac.vub.cocompose.lang.Element
addPropertyChangeListener, removePropertyChangeListener
 
Methods inherited from interface be.ac.vub.cocompose.lang.VisitedElement
accept
 

Method Detail

check

public void check()
           throws ModelElementException
Checks whether the constraint holds.

Throws:
ModelElementException - - if the hard constraint doesn't hold.

getOwnerConstraint

public CompositeConstraint getOwnerConstraint()
Gets the owner constraint.

Returns:
the owner constraint.

setOwnerConstraint

public void setOwnerConstraint(CompositeConstraint ownerConstraint)
Sets the owner constraint.

Parameters:
ownerConstraint - - the owner constraint.

isInverted

public boolean isInverted()
Gets the inverted attribute.

Returns:
true if and only if the constraint is inverted.

setInverted

public void setInverted(boolean inverted)
Sets the inverted attribute.

Parameters:
inverted - - if true, the constraint is inverted.