blob: 00018a0468aedf72fd85abaf79f48c0659f67c84 [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;
import java.util.Collection;
/**
* Interface for representing VPM entities
*
* @author Andras Balogh
*
*/
public interface IEntity extends IModelElement {
/**
* Gets the entitys value
*
* @return the value
*/
public String getValue();
/**
* Retrives a model element that is contained by this entity and has a given
* name
*
* @param n
* name of element to return
* @return element ref, or null if not found
*/
public IModelElement getContentByName(String n);
/**
* Retrives a model element that is contained by this entity and has a given
* type
*
* @param n
* type of element to return
* @return element ref, or null if not found
*/
public IModelElement getContentByType(IModelElement n);
/**
* Returns nested elements of the Entity
*
* @return Set of contained elements.
*/
public Collection<IModelElement> getContents();
/**
* Gets the parent entity of modelelement will return null for root entity.
*
* @return set
*/
public IEntity getParent();
/**
* Checks wether the entity is fully isolated eg. it has no connections to
* other elements in the modelspace.
*/
// public boolean isFullyIsolated();
/**
* Checks wether the entity is isolated, eg. it has no connection to the
* components in the given Collection
*
* @param e
* The base Collection.
*/
// public boolean isFullyIsolatedInE(Collection e);
/**
* Checks wether the entity has connections.
*
* @return true, if the entity has no Relations or Functions associated
* with.
*/
// public boolean isIsolated();
/**
* Checks if the entity has a connection to the submodel with root e
*
* @param e
* The base entity
* @return true, if the submodel and the entity are disjunct.
*/
// public boolean isIsolatedInE(IEntity e);
/**
* Returns the components of the entity.
*
* @return set of elements contained by the entity. (recursive)
*/
public Collection<IModelElement> getAllComponents();
}