|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IDiagram
| Method Summary | |
|---|---|
void |
addAttributesFromEntities(java.util.Collection<pl.edu.agh.cast.model.base.IEntity> entities,
java.util.Collection<java.lang.String> attributes,
java.util.Map<java.lang.String,AttributeMergePolicy> mergePolicies,
java.lang.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(java.util.Collection<pl.edu.agh.cast.model.base.IEntity> entities,
java.util.Collection<java.lang.String> attributes,
java.util.Map<java.lang.String,AttributeMergePolicy> mergePolicies,
java.lang.String nodeType,
java.lang.String sourceJoinAttribute,
java.lang.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(java.util.Collection<Connection> connections)
Adds many connections. |
Node |
addNode(Node node)
Adds a node to the model |
java.util.Collection<Node> |
addNodes(java.util.Collection<Node> nodes)
Adds nodes to the model. |
void |
deselect()
|
Connection |
findConnection(java.lang.String sourceNodeId,
java.lang.String targetNodeId,
java.util.Date date)
|
Node |
findNode(java.lang.String nodeId)
|
pl.edu.agh.cast.model.base.IRelation |
findRelation(Connection connection)
Finds relation for given connection |
java.util.Collection<Connection> |
getConnections()
This can throw UnsupportedOperationException if diagram does not
have information about single connections. |
java.lang.String |
getDisplayName()
|
pl.edu.agh.cast.model.base.IDataSet |
getDomainModel()
Returns all model data (packaged as one DataSet) kept in the diagram. |
org.eclipse.core.resources.IFile |
getFile()
Reterun file in which this diagram is stored. |
NodeAttributeManager |
getNodeAttributeManager()
|
java.util.Collection<Node> |
getNodes()
|
IDiagramSettings |
getSettings()
|
java.util.List<Statistic> |
getStatistics()
Deprecated. Use the getStatistics(IProgressMonitor) version with
progress reporting |
java.util.List<Statistic> |
getStatistics(org.eclipse.core.runtime.IProgressMonitor monitor)
|
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 model. |
void |
removeNodes(java.util.Collection<Node> nodes)
Removes nodes from the model. |
void |
setDisplayName(java.lang.String name)
Set 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)
|
void |
setSuppressEvents(boolean newSuppressEvents)
Suppresses all events fired by this diagram. |
| Methods inherited from interface pl.edu.agh.cast.model.IPropertyChangeProvider |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface pl.edu.agh.cast.model.visual.AttributeValueContainer |
|---|
getAllValues, getAttributeManager, getAttributeValue, isAttributeEditable, removePropertyValue, setAttributeValue, setAttributeValue |
| Method Detail |
|---|
java.util.Collection<Node> getNodes()
java.util.Collection<Connection> getConnections()
UnsupportedOperationException if diagram does not
have information about single connections.
IDiagramSettings getSettings()
void setSettings(IDiagramSettings settings)
settings - org.eclipse.core.resources.IFile getFile()
void setFile(org.eclipse.core.resources.IFile file)
file - The file to store the diagram in.java.lang.String getDisplayName()
void setDisplayName(java.lang.String name)
name - new name@Deprecated java.util.List<Statistic> getStatistics()
getStatistics(IProgressMonitor) version with
progress reporting
java.util.List<Statistic> getStatistics(org.eclipse.core.runtime.IProgressMonitor monitor)
monitor - non-null progress monitor
NodeAttributeManager getNodeAttributeManager()
Node findNode(java.lang.String nodeId)
Connection findConnection(java.lang.String sourceNodeId,
java.lang.String targetNodeId,
java.util.Date date)
Node addNode(Node node)
node - is the node to add
java.util.Collection<Node> addNodes(java.util.Collection<Node> nodes)
Connection addConnection(Connection c)
c - connection to add
void addConnections(java.util.Collection<Connection> connections)
void removeNode(Node node)
java.lang.IllegalArgumentException - if node is not a child of the diagramvoid removeNodes(java.util.Collection<Node> nodes)
java.lang.IllegalArgumentException - if any of the nodes is not a child of the diagramvoid removeConnection(Connection connection)
java.lang.IllegalArgumentException - if connection is not a child of the diagramvoid deselect()
pl.edu.agh.cast.model.base.IDataSet getDomainModel()
pl.edu.agh.cast.model.base.IRelation findRelation(Connection connection)
connection - The connection which was made of the relation
void addAttributesFromEntities(java.util.Collection<pl.edu.agh.cast.model.base.IEntity> entities,
java.util.Collection<java.lang.String> attributes,
java.util.Map<java.lang.String,AttributeMergePolicy> mergePolicies,
java.lang.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(java.util.Collection<pl.edu.agh.cast.model.base.IEntity> entities,
java.util.Collection<java.lang.String> attributes,
java.util.Map<java.lang.String,AttributeMergePolicy> mergePolicies,
java.lang.String nodeType,
java.lang.String sourceJoinAttribute,
java.lang.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 | |||||||||