blob: 9501d23ab7ff58b1a903da9dd3462511c127b99c [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
*******************************************************************************/
package org.eclipse.viatra2.core;
/**
* @author Andras Schmidt, Istvan Rath
*
*/
public interface IRelation extends IModelElement {
/**
* Gets the source of this relation.
*
* @return An Entity
*/
public IModelElement getFrom();
/**
* Gets the destination of this relation.
*
* @return an Entity
*/
public IModelElement getTo();
/**
* Gets the multiplicity of this relation.
*
* @return a MultiplicityKind enumeration constant
*/
public EMultiplicityKind getMultiplicity();
/**
* Returns a reference to this relation's inverse, or null if it has none.
*
* @return a reference to this relation's inverse, or null if it has none
*/
public IRelation getInverse();
/**
* Returns whether this relation represents an aggregation.
*
* @return true, if this relation represents an aggregation, false otherwise
*/
public boolean getIsAggregation();
/**
* Returns whether the type of this relation's source can be omitted
* (instances can have source of any type).
*
* @return
*/
public boolean getIsAnyFrom();
/**
* Returns whether the type of this relation's target can be omitted
* (instances can have target of any type).
*
* @return
*/
public boolean getIsAnyTo();
}