|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IDiagram
Interface of a diagram which consists of Nodes and Connections.
| Method Summary | |
|---|---|
void |
addAttributesFromEntities(Collection<IEntity> entities,
Collection<String> attributes,
Map<String,AttributeMergePolicy> mergePolicies,
String nodeType,
org.eclipse.core.runtime.IProgressMonitor monitor)
Adds attributes from a collection of entities to the diagram with join on entity and node IDs. |
void |
addAttributesFromEntities(Collection<IEntity> entities,
Collection<String> attributes,
Map<String,AttributeMergePolicy> mergePolicies,
String nodeType,
String sourceJoinAttribute,
String targetJoinAttribute,
org.eclipse.core.runtime.IProgressMonitor monitor)
Adds attributes from a collection of entities to the diagram. |
Connection |
addConnection(Connection c)
Adds a Connection to the diagram. |
void |
addConnections(Collection<Connection> connections)
Adds multiple Connections. |
Node |
addNode(Node node)
Adds a Node to the model. |
Collection<Node> |
addNodes(Collection<Node> nodes)
Adds Nodes to the model. |
void |
deselect()
Removes selection in diagram edit part. |
Connection |
findConnection(String sourceNodeId,
String targetNodeId,
Date date)
Returns the Connection matching given criteria. |
Node |
findNode(String nodeId)
Returns the Node with given id. |
IRelation |
findRelation(Connection connection)
Finds IRelation for given connection. |
Collection<Connection> |
getConnections()
Returns a collection of Connections. |
String |
getDisplayName()
Returns the display name of the diagram. |
IDataSet |
getDomainModel()
Returns all model data (packaged as one IDataSet) kept in the diagram. |
org.eclipse.core.resources.IFile |
getFile()
Return file in which this diagram is stored. |
NodeAttributeManager |
getNodeAttributeManager()
Returns the NodeAttributeManager of this diagram. |
Collection<Node> |
getNodes()
Returns a collection of all diagram Nodes. |
IDiagramSettings |
getSettings()
Returns diagram settings. |
List<Statistic> |
getStatistics()
Deprecated. Use the getStatistics(IProgressMonitor) version with progress reporting |
List<Statistic> |
getStatistics(org.eclipse.core.runtime.IProgressMonitor monitor)
Returns statistics for current diagram. |
boolean |
isEnhancable()
Checks if the nodes of this diagram may be enhanced with attributes of entities from another IDataSet. |
void |
removeConnection(Connection connection)
Removes a Connection from the model. |
void |
removeNode(Node node)
Removes a Node from the diagram. |
void |
removeNodes(Collection<Node> nodes)
Removes Nodes from the model. |
void |
setDisplayName(String name)
Sets the display name of the diagram. |
void |
setFile(org.eclipse.core.resources.IFile file)
Set the file in which this diagram is stored. |
void |
setSettings(IDiagramSettings settings)
Sets diagram settings. |
void |
setSuppressEvents(boolean newSuppressEvents)
Suppresses all events fired by this diagram. |
| Methods inherited from interface pl.edu.agh.cast.data.model.property.IPropertyChangeProvider |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface pl.edu.agh.cast.model.visual.backward.AttributeValueContainer |
|---|
getAllValues, getAttributeManager, getAttributeValue, isAttributeEditable, removePropertyValue, setAttributeValue, setAttributeValue |
| Method Detail |
|---|
Collection<Node> getNodes()
Nodes.
NodesCollection<Connection> getConnections()
Connections.
This can throw UnsupportedOperationException if diagram does not have information about single
connections.
ConnectionsIDiagramSettings getSettings()
void setSettings(IDiagramSettings settings)
settings - diagram settingsorg.eclipse.core.resources.IFile getFile()
void setFile(org.eclipse.core.resources.IFile file)
file - the file to store the diagram inString getDisplayName()
void setDisplayName(String name)
name - the name of the diagram@Deprecated List<Statistic> getStatistics()
getStatistics(IProgressMonitor) version with progress reporting
List<Statistic> getStatistics(org.eclipse.core.runtime.IProgressMonitor monitor)
IProgressMonitor.
monitor - non-null progress monitor
NodeAttributeManager getNodeAttributeManager()
NodeAttributeManager of this diagram.
NodeAttributeManager of this diagramNode findNode(String nodeId)
Node with given id.
nodeId - id of the node to find
Connection findConnection(String sourceNodeId,
String targetNodeId,
Date date)
Connection matching given criteria.
sourceNodeId - id of the connection source nodetargetNodeId - id of the connection target nodedate - date of the connection
Node addNode(Node node)
Node to the model.
node - the node to add
Collection<Node> addNodes(Collection<Node> nodes)
Nodes to the model.
nodes - collection of nodes to add
Connection addConnection(Connection c)
Connection to the diagram.
c - connection to add
void addConnections(Collection<Connection> connections)
Connections. Calls addConnection(pl.edu.agh.cast.model.visual.backward.Connection).
connections - collection of connections to addvoid removeNode(Node node)
Node from the diagram. Node must have been created by this diagram's factory (i.e. must be a
diagram's node).
node - the node to remove
IllegalArgumentException - if node is not a child of the diagramvoid removeNodes(Collection<Node> nodes)
Nodes from the model. Nodes must have been created by this diagram's factory (i.e. must be
diagram's nodes).
nodes - collection of nodes to remove
IllegalArgumentException - if any of the nodes is not a child of the diagramvoid removeConnection(Connection connection)
Connection from the model. Connection must have been created by this diagram's factory (i.e.
must be a diagram's connection).
connection - connection to add
IllegalArgumentException - if connection is not a child of the diagramvoid deselect()
IDataSet getDomainModel()
IDataSet) kept in the diagram.
IDataSet containing diagram model dataIRelation findRelation(Connection connection)
IRelation for given connection.
connection - the connection which was made of the relation
void addAttributesFromEntities(Collection<IEntity> entities,
Collection<String> attributes,
Map<String,AttributeMergePolicy> mergePolicies,
String nodeType,
org.eclipse.core.runtime.IProgressMonitor monitor)
#addAttributesFromEntities(Collection, Map, String, String, String)
entities - collection of entities to add attributes fromattributes - collection of attributes from entities that should be added to nodesmergePolicies - map of AttributeMergePolicy policiesnodeType - type of nodes that the attributes should be added to, if null then all types are taken
into accountmonitor - progress monitor for this task, if null then
NullProgressMonitor is used
void addAttributesFromEntities(Collection<IEntity> entities,
Collection<String> attributes,
Map<String,AttributeMergePolicy> mergePolicies,
String nodeType,
String sourceJoinAttribute,
String targetJoinAttribute,
org.eclipse.core.runtime.IProgressMonitor monitor)
sourceJoinAttribute of entities and targetJoinAttribute
of diagram nodes.
For each Node node of type nodeType from the current Diagram, if there
is an entity (of type IEntity) such that:
node.getAttributeValue(targetJoinAttribute).equals(entity.getAttribute(sourceJoinAttribute));then the attributes from the
entity are added to the node.
The sourceJoinAttribute entity attribute should be unique across the entities
collection, in order for the results to be deterministic.
In order to resolve conflicts where the same attribute is present in both entity and
node, instances AttributeMergePolicy can be used. These policies should be supplied in a map
with entity attribute IDs as keys. A null key defines the default policy, otherwise
AttributeMergePolicy.MERGE_POLICY_ALWAYS_SECOND is used.
entities - collection of entities to add attributes fromattributes - collection of attributes from entities that should be added to nodesmergePolicies - map of AttributeMergePolicy policiesnodeType - type of nodes that the attributes should be added to, if null then all types are taken
into accountsourceJoinAttribute - id of the entity attribute to join ontargetJoinAttribute - id of the node attribute to join onmonitor - progress monitor for this task, if null then
NullProgressMonitor is usedboolean isEnhancable()
IDataSet.
For details see #addAttributesFromEntities(Collection, Collection, Map, String, String, String) .
void setSuppressEvents(boolean newSuppressEvents)
newSuppressEvents - new value of suppression flag
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||