public class OntologyGraphModel extends AbstractBasicGraphModel
FSMGraphModel
but
many features of the Modal Model
editors are not used, so it doesn't make sense to inherit directly from
that class.Red (cshelton) |
Red (cshelton) |
Modifier and Type | Class and Description |
---|---|
class |
OntologyGraphModel.ConceptModel
The model for an icon that represents concepts in the ontology model.
|
class |
OntologyGraphModel.RelationModel
The model for relations between concepts in the ontology.
|
_graphListeners
Constructor and Description |
---|
OntologyGraphModel(CompositeEntity composite)
Construct a new graph model whose root is the given composite entity.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
_update()
Update the graph model.
|
void |
disconnectEdge(java.lang.Object eventSource,
java.lang.Object edge)
Disconnect an edge (a
Link object which contains a ConceptRelation in the ontology model) from its two endpoints and
notify graph listeners with an EDGE_HEAD_CHANGED and an
EDGE_TAIL_CHANGED event whose source is the given source. |
OntologyGraphModel.ConceptModel |
getConceptModel()
Get the concept model which maps all nodes in the graph to the
Concept elements in the
ontology model. |
java.lang.String |
getDeleteEdgeMoML(java.lang.Object edge)
Return a MoML String that will delete the given edge from the
Ptolemy model.
|
java.lang.String |
getDeleteNodeMoML(java.lang.Object node)
Return a MoML String that will delete the given node from the
Ptolemy model.
|
EdgeModel |
getEdgeModel(java.lang.Object edge)
Return the model for the given edge object.
|
NodeModel |
getNodeModel(java.lang.Object node)
Return the node model for the given object.
|
OntologyGraphModel.RelationModel |
getRelationModel()
Get the relation model.
|
java.lang.Object |
getSemanticObject(java.lang.Object element)
Return the semantic object corresponding to the given node, edge,
or composite.
|
void |
removeNode(java.lang.Object eventSource,
java.lang.Object node)
Delete a node from its parent graph and notify
graph listeners with a NODE_REMOVED event.
|
_getLocation, changeExecuted, changeFailed, getCompositeModel, getProperty, getPtolemyModel, isNode, removeListeners, setProperty, setSemanticObject
containsNode, getHead, getNodeCount, getParent, getRoot, getTail, inEdges, isComposite, isDirected, isEdge, nodes, nodesAfterEdges, nodesBeforeEdges, outEdges
addGraphListener, dispatchGraphEvent, removeGraphListener, setDispatchEnabled
public OntologyGraphModel(CompositeEntity composite)
Ontology
composite entity.composite
- The top-level composite entity for the model.public void disconnectEdge(java.lang.Object eventSource, java.lang.Object edge)
Link
object which contains a ConceptRelation
in the ontology model) from its two endpoints and
notify graph listeners with an EDGE_HEAD_CHANGED and an
EDGE_TAIL_CHANGED event whose source is the given source.disconnectEdge
in class AbstractBasicGraphModel
eventSource
- The source of the event that will be dispatched,
e.g. the view that made this call.edge
- The edge to be disconnected.public OntologyGraphModel.ConceptModel getConceptModel()
Concept
elements in the
ontology model.public java.lang.String getDeleteEdgeMoML(java.lang.Object edge)
getDeleteEdgeMoML
in class AbstractBasicGraphModel
edge
- The edge.public java.lang.String getDeleteNodeMoML(java.lang.Object node)
getDeleteNodeMoML
in class AbstractBasicGraphModel
node
- The node.public EdgeModel getEdgeModel(java.lang.Object edge)
getEdgeModel
in class ModularGraphModel
edge
- An object which is assumed to be in this graph model.public NodeModel getNodeModel(java.lang.Object node)
Concepts
or Ptolemy
annotation
TextAttributes
.getNodeModel
in class AbstractBasicGraphModel
node
- An object which is assumed to be in this graph model.public OntologyGraphModel.RelationModel getRelationModel()
ConceptRelations
.public java.lang.Object getSemanticObject(java.lang.Object element)
getSemanticObject
in interface GraphModel
getSemanticObject
in class AbstractBasicGraphModel
element
- A graph element.AbstractBasicGraphModel.setSemanticObject(Object, Object)
public void removeNode(java.lang.Object eventSource, java.lang.Object node)
removeNode
in class AbstractBasicGraphModel
eventSource
- The source of the event that will be dispatched,
e.g. the view that made this call.node
- The node to be removed.protected boolean _update()
_update
in class AbstractBasicGraphModel