pl.edu.agh.cast.data.model.presentation
Interface IPresentationDataSet<T extends IPresentationElement<? extends IElement>>

Type Parameters:
T - type of contained presentation elements
All Superinterfaces:
IDataSet<T>, Identifiable, IDisposable, IPropertyChangeProvider, IPropertyContainer, IValidatable, Observer, Serializable
All Known Subinterfaces:
ISchemaDataSet
All Known Implementing Classes:
PresentationDataSet, SchemaDataSet

public interface IPresentationDataSet<T extends IPresentationElement<? extends IElement>>
extends IDataSet<T>, IPropertyChangeProvider

An interface of presentation data set which consists of presentation elements.

Presentation data sets contain elements which can be displayed on diagrams. Each such element is represented as exactly one figure in the diagram (e.g. node, connection, etc.). This model contains only logical data such as label, description, element inter-relations and other properties which are readable by a human. All visual information, such as location, line style, etc. are kept in an associated visual data set.

Presentation data set can be created based on one or many domain data sets (or other presentation data sets). These (original) data sets may be accessed with getOriginalDataSets() method. Similarly, each presentation element can be associated with one or many original elements which belong to original data sets.

Author:
AGH CAST Team
See Also:
IPresentationElement, IVisualDataSet

Nested Class Summary
static class IPresentationDataSet.Properties
          Enumeration of property name constants.
 
Field Summary
static Collection<Type> ACCEPTED_TYPES
          Collection of element types accepted by this type of data set.
static String CHILD_EVENT
          Name of the Model element added/removed event.
static String CHILDREN_EVENT
          Name of the Model elements (multiple) added/removed event.
static Type TYPE
          The presentation data set type.
 
Method Summary
 PresentationDataSetDescriptor getDescriptor()
          Returns the descriptor of this data set.
 List<? extends IDataSet<? extends IElement>> getOriginalDataSets()
          Returns the original data sets which are presented by this presentation data set.
<V extends IVisualDataSet<? extends IVisualElement<T>,? extends IPresentationDataSet<T>>>
V
getVisualDataSet()
          Returns the visual data set associated with this presentation element.
 boolean hasAssociatedVisualDataSet()
          Checks if any visual data set is associated with this presentation data set.
 void setOriginalDataSets(List<? extends IDataSet<? extends IElement>> dataSets)
          Sets the original data sets which are presented by this presentation data set.
 void setSuppressAllEvents(boolean flag)
          Sets suppress all events flag.
 void setVisualDataSet(IVisualDataSet visualDS)
          Sets the visual data set associated with this presentation element.
 
Methods inherited from interface pl.edu.agh.cast.data.model.IDataSet
addElement, addElements, addElements, addMetaPropertyManager, addMetaPropertyManagersForAcceptedTypes, getAcceptedTypes, getAssignableElements, getCreationDate, getElement, getElementCount, getElements, getElements, getElementTypes, getMetaPropertyManager, getMetaPropertyManagers, getName, getRegisteredTypes, removeElement, removeElement, removeElements, removeElements, setCreationDate, setElements, setName
 
Methods inherited from interface pl.edu.agh.cast.data.model.Identifiable
getId, getType
 
Methods inherited from interface pl.edu.agh.cast.data.model.property.IPropertyContainer
addProperty, getCustomProperties, getMetaPropertyManager, getPermanentProperties, getProperties, getProperty, getTransientProperties, matches, removeProperty, setProperty
 
Methods inherited from interface java.util.Observer
update
 
Methods inherited from interface pl.edu.agh.cast.common.IValidatable
isValid
 
Methods inherited from interface pl.edu.agh.cast.common.IDisposable
dispose
 
Methods inherited from interface pl.edu.agh.cast.data.model.property.IPropertyChangeProvider
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

CHILD_EVENT

static final String CHILD_EVENT
Name of the Model element added/removed event.

See Also:
Constant Field Values

CHILDREN_EVENT

static final String CHILDREN_EVENT
Name of the Model elements (multiple) added/removed event.

See Also:
Constant Field Values

TYPE

static final Type TYPE
The presentation data set type.


ACCEPTED_TYPES

static final Collection<Type> ACCEPTED_TYPES
Collection of element types accepted by this type of data set.

Method Detail

getDescriptor

PresentationDataSetDescriptor getDescriptor()
Returns the descriptor of this data set.

Specified by:
getDescriptor in interface IDataSet<T extends IPresentationElement<? extends IElement>>
Returns:
the descriptor of this data set
See Also:
IDataSet.getDescriptor()

getOriginalDataSets

@PropertyGetter(name="ORIGINAL_DATA_SETS",
                type=REFERENCE_LIST,
                matchable=false)
List<? extends IDataSet<? extends IElement>> getOriginalDataSets()
Returns the original data sets which are presented by this presentation data set.

Returns:
a list of original data sets

setOriginalDataSets

@PropertySetter(name="ORIGINAL_DATA_SETS")
void setOriginalDataSets(List<? extends IDataSet<? extends IElement>> dataSets)
Sets the original data sets which are presented by this presentation data set.

Parameters:
dataSets - a list of original data sets presented by this presentation data set

getVisualDataSet

<V extends IVisualDataSet<? extends IVisualElement<T>,? extends IPresentationDataSet<T>>> V getVisualDataSet()
Returns the visual data set associated with this presentation element.

Type Parameters:
V - the type of expected visual data set
Returns:
the associated visual data set or null
See Also:
IVisualDataSet

setVisualDataSet

void setVisualDataSet(IVisualDataSet visualDS)
Sets the visual data set associated with this presentation element.

Parameters:
visualDS - the associated visual data set (null value is allowed)
See Also:
IVisualDataSet

hasAssociatedVisualDataSet

boolean hasAssociatedVisualDataSet()
Checks if any visual data set is associated with this presentation data set.

Returns:
true if an associated visual data set is present

setSuppressAllEvents

void setSuppressAllEvents(boolean flag)
Sets suppress all events flag. If flag set to true all events will be ignored.

Parameters:
flag - suppress all events flag


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