pl.edu.agh.cast.model.base
Interface IModel

All Superinterfaces:
Mappable
All Known Implementing Classes:
Model

public interface IModel
extends Mappable

The model interface represents single unit of work. One model may contain many data sets. The model name must be uniq globally (i.e. within the Eclipse workspace).
The model primarly consists of entities and relations. The relations are organized into data sets.

Model corresponds to the IProject, but since it does not contain diagrams (while IProject does) it is separated from it. The diagrams in the IProject contain some visual data (e.g. the entity icon) while IModel only contains "raw" data.
The other difference is that in the default implementation the model is mapped to base model, while IProject is not (it is kept in the Eclipse Workspace).

Author:
AGH CAST Team

Method Summary
 boolean addDataSet(IDataSet dataSet)
          Add data set to the collection of data sets.
 List<IDataSet> getDataSets()
          Return all data sets which belong to this model.
 Collection<IEntity> getEntities()
          Return all entities which are present in this model.
 String getName()
          Model name getter.
 List<IRelation> getRelations()
          Return all relations which belong to this model.
 void setDataSets(List<IDataSet> dataSets)
          Data sets setter.
 void setName(String name)
          Model name setter.
 
Methods inherited from interface pl.edu.agh.cast.model.mapper.Mappable
clone, getAttribute, getAttributeNames, getAttributeType, getId, getMid, getType, setAttribute, setId, setMid
 

Method Detail

getRelations

List<IRelation> getRelations()
Return all relations which belong to this model.

Returns:
The collection of all relations

getDataSets

List<IDataSet> getDataSets()
Return all data sets which belong to this model.

Returns:
The collection of all data sets

setDataSets

void setDataSets(List<IDataSet> dataSets)
Data sets setter.

Parameters:
dataSets - The data sets to set.

addDataSet

boolean addDataSet(IDataSet dataSet)
Add data set to the collection of data sets.

Parameters:
dataSet - The data set to add.
Returns:
True if the set was add

getName

String getName()
Model name getter.

Returns:
the name of the model.

setName

void setName(String name)
Model name setter.

Parameters:
name - New name of the model

getEntities

Collection<IEntity> getEntities()
Return all entities which are present in this model.

Returns:
Collection of entities


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.