pl.edu.agh.cast.schema.model.visual
Class VisualSchemaConnection
java.lang.Object
pl.edu.agh.cast.data.model.property.PropertyContainer
pl.edu.agh.cast.data.model.AbstractElement
pl.edu.agh.cast.data.model.visual.VisualElement<ISchemaConnection>
pl.edu.agh.cast.schema.model.visual.VisualSchemaConnection
- All Implemented Interfaces:
- Serializable, Observer, IDisposable, IReplicable, IValidatable, Identifiable, IElement, IPropertyChangeProvider, IPropertyContainer, IVisualElement<ISchemaConnection>, IVisualSchemaConnection, IVisualSchemaElement<ISchemaConnection>
public class VisualSchemaConnection
- extends VisualElement<ISchemaConnection>
- implements IVisualSchemaConnection
The default implementation of IVisualSchemaConnection
.
- Author:
- AGH CAST Team
- See Also:
- Serialized Form
Methods inherited from class pl.edu.agh.cast.data.model.AbstractElement |
afterSetMetaPropertyManager, canReplicateTo, equals, getDataSet, getDescString, getId, getType, hashCode, isValid, setDataSet, setId, setType, toString |
Methods inherited from class pl.edu.agh.cast.data.model.property.PropertyContainer |
addProperty, createProperty, dispose, getCustomProperties, getMetaPropertyManager, getPermanentProperties, getProperties, getProperty, getTransientProperties, initializeProperties, matches, removeProperty, setMetaPropertyManager, setProperty, update |
VisualSchemaConnection
public VisualSchemaConnection()
- Default constructor.
VisualSchemaConnection
protected VisualSchemaConnection(Type type)
VisualSchemaConnection
protected VisualSchemaConnection(IVisualSchemaDataSet dataSet,
Type type,
ISchemaConnection elementReference)
- The constructor for subclasses which wraps the schema connection.
- Parameters:
dataSet
- The data set of this connection.type
- The type of this connection.elementReference
- The referenced element of presentation model.
VisualSchemaConnection
public VisualSchemaConnection(IVisualSchemaDataSet dataSet,
IVisualSchemaNode visualSourceNode,
IVisualSchemaNode visualTargetNode,
ISchemaConnection connection)
- Constructor for creating new visual connection associated to given connection.
- Parameters:
dataSet
- data set which visual connection belongs tovisualSourceNode
- source node of this connectionvisualTargetNode
- target node of this connectionconnection
- model connection which is visualized by this object
VisualSchemaConnection
public VisualSchemaConnection(IVisualSchemaDataSet dataSet,
ISchemaConnection elementReference)
- The public constructor which wraps the schema connection.
- Parameters:
dataSet
- The data set of this connection.elementReference
- The referenced element of presentation model.
isDirected
public boolean isDirected()
- Indicates if the connection is directed, i.e. it just binds a pair of nodes or the order of nodes is significant.
The general semantics of the connection says that there should be only one connection (in given direction) of
given type between two nodes. Undirected connection may be perceived as two connections pointing in both
directions.
- Specified by:
isDirected
in interface IVisualSchemaConnection
- Returns:
- True if the order of nodes is significant.
- See Also:
IVisualSchemaConnection.isDirected()
getBendpoints
public List<SchemaConnectionBendpoint> getBendpoints()
- Returns list of bend points.
- Specified by:
getBendpoints
in interface IVisualSchemaConnection
- Returns:
- list of bend points
- See Also:
pl.edu.agh.cast.schema.model.presentation.ISchemaConnection#getBendpoints()
setBendpoints
public void setBendpoints(List<SchemaConnectionBendpoint> bendpoints)
- Sets list of bend points.
- Specified by:
setBendpoints
in interface IVisualSchemaConnection
- Parameters:
bendpoints
- list of bend points- See Also:
pl.edu.agh.cast.schema.model.presentation.ISchemaConnection#setBendpoints(java.util.List)
replicateTo
public VisualSchemaConnection replicateTo(Object replica)
throws IllegalArgumentException,
ReplicationException
- Replicates this instance state to given replica object. The replica should be an instance of replicated
instance's class (same class or subclass).
Replicates element type and ID.
Replicates the direction flag, source and target nodes are null empty.
- Specified by:
replicateTo
in interface IReplicable
- Overrides:
replicateTo
in class VisualElement<ISchemaConnection>
- Parameters:
replica
- the object to replicate to
- Returns:
- the replica object (the same instance as given)
- Throws:
IllegalArgumentException
- if given object is null or of invalid type
ReplicationException
- if replication fails- See Also:
VisualElement.replicateTo(java.lang.Object)
replicate
public VisualSchemaConnection replicate()
throws ReplicationException
- Returns a replicated instance of this instance.
- Specified by:
replicate
in interface IReplicable
- Overrides:
replicate
in class AbstractElement
- Returns:
- replicated instance
- Throws:
ReplicationException
- if replication fails- See Also:
IReplicable.replicate()
Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.