Package ptolemy.vergil.ontologies
Class OntologySolverGraphModel.OntologyModel
- java.lang.Object
-
- ptolemy.vergil.basic.NamedObjNodeModel
-
- ptolemy.vergil.ontologies.OntologySolverGraphModel.OntologyModel
-
- All Implemented Interfaces:
NodeModel
- Enclosing class:
- OntologySolverGraphModel
public class OntologySolverGraphModel.OntologyModel extends NamedObjNodeModel
The model for an icon that represents ontologies in the ontology solver model.
-
-
Constructor Summary
Constructors Constructor Description OntologyModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDeleteNodeMoML(java.lang.Object node)
Return a MoML String that will delete the given node from the ontology solver model.java.lang.Object
getParent(java.lang.Object node)
Return the graph parent of the given node.java.util.Iterator
inEdges(java.lang.Object node)
Return an iterator over the edges coming into the given ontology node.java.util.Iterator
outEdges(java.lang.Object node)
Return an iterator over the edges coming out of the given ontology node.void
removeNode(java.lang.Object eventSource, java.lang.Object node)
Remove the given node from the model.
-
-
-
Method Detail
-
getDeleteNodeMoML
public java.lang.String getDeleteNodeMoML(java.lang.Object node)
Return a MoML String that will delete the given node from the ontology solver model. This assumes that the context is the container of the ontology.- Specified by:
getDeleteNodeMoML
in classNamedObjNodeModel
- Parameters:
node
- The node to be deleted.- Returns:
- A valid MoML string.
-
getParent
public java.lang.Object getParent(java.lang.Object node)
Return the graph parent of the given node.- Parameters:
node
- The node, which is assumed to be a location.- Returns:
- The container of the icon's container, which should be the root of this graph model.
-
inEdges
public java.util.Iterator inEdges(java.lang.Object node)
Return an iterator over the edges coming into the given ontology node. Since there are no edges in an ontology solver model, this method always returns an iterator over an empty list.- Parameters:
node
- The node, which is assumed to be a location attribute of an ontology in the ontology solver model.- Returns:
- An iterator over an empty list.
-
outEdges
public java.util.Iterator outEdges(java.lang.Object node)
Return an iterator over the edges coming out of the given ontology node. Since there are no edges in an ontology solver model, this method always returns an iterator over an empty list.- Parameters:
node
- The node, which is assumed to be a location attribute of an ontology in the ontology solver model.- Returns:
- An iterator over an empty list.
-
removeNode
public void removeNode(java.lang.Object eventSource, java.lang.Object node)
Remove the given node from the model. The node is assumed to be a Locatable belonging to an entity.- Specified by:
removeNode
in classNamedObjNodeModel
- Parameters:
eventSource
- The source of the event directing the removal of the node.node
- The node to be removed.
-
-