Class ActorGraphModel.VertexModel

  • All Implemented Interfaces:
    NodeModel
    Enclosing class:
    ActorGraphModel

    public class ActorGraphModel.VertexModel
    extends NamedObjNodeModel
    The model for vertexes that are contained within the relations of the ptolemy model.
    • Constructor Summary

      Constructors 
      Constructor Description
      VertexModel()  
    • 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 Ptolemy 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 node.
      java.util.Iterator outEdges​(java.lang.Object node)
      Return an iterator over the edges coming into the given node.
      void removeNode​(java.lang.Object eventSource, java.lang.Object node)
      Remove the given node from the model.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VertexModel

        public VertexModel()
    • Method Detail

      • getDeleteNodeMoML

        public java.lang.String getDeleteNodeMoML​(java.lang.Object node)
        Return a MoML String that will delete the given node from the Ptolemy model. This assumes that the context is the container of the vertex.
        Specified by:
        getDeleteNodeMoML in class NamedObjNodeModel
        Parameters:
        node - The node.
        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 Vertex.
        Returns:
        The container of the vertex's container, which is presumably the root of the graph model.
      • inEdges

        public java.util.Iterator inEdges​(java.lang.Object node)
        Return an iterator over the edges coming into the given node. This method ensures that there is a link object for every link to the relation contained by the vertex. Then the iterator is constructed by removing any links that do not have the given node as head.
        Parameters:
        node - The node, which is assumed to be a vertex contained in a relation.
        Returns:
        An iterator of Link objects, all of which have their head as the given node.
      • outEdges

        public java.util.Iterator outEdges​(java.lang.Object node)
        Return an iterator over the edges coming into the given node. This method ensures that there is a link object for every link to the relation contained by the vertex. Then the iterator is constructed by removing any links that do not have the given node as head.
        Parameters:
        node - The node, which is assumed to be a vertex contained in a relation.
        Returns:
        An iterator of Link objects, all of which have their tail as the given node.
      • 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 vertex contained by a relation. This class queues a new change request with the ptolemy model to make this modification.
        Specified by:
        removeNode in class NamedObjNodeModel
        Parameters:
        eventSource - The source of the event that will be dispatched, e.g. the view that made this call.
        node - The node.