Class TestGraphReader


  • public class TestGraphReader
    extends java.lang.Object
    An application for testing the conversion of Ptolemy models into weighted graphs.

    Usage: java ptolemy.actor.test xmlFileName,

    where xmlFileName is the name of a MoML file that contains a Ptolemy II specification. This application converts the specification into a weighted graph representation, and prints out information about this weighted graph.

    Since:
    Ptolemy II 4.0
    Version:
    $Id$
    Author:
    Shuvra S. Bhattacharyya
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected TestGraphReader()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void _printGraph​(DirectedGraph graph)
      Print information about a graph to standard output.
      protected CompositeActor _readGraph​(java.lang.String[] args)
      Convert a MoML file that contains a Ptolemy II specification into a composite actor representation.
      static void main​(java.lang.String[] args)
      Convert a MoML file that contains a Ptolemy II specification into a weighted graph representation, and display information about the weighted graph.
      • Methods inherited from class java.lang.Object

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

      • TestGraphReader

        protected TestGraphReader()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
        Convert a MoML file that contains a Ptolemy II specification into a weighted graph representation, and display information about the weighted graph.
        Parameters:
        args - The name of the MoML file.
      • _printGraph

        protected void _printGraph​(DirectedGraph graph)
        Print information about a graph to standard output. This method is called by main(String[]) to display information about the model that is read. It should be overridden to change the way this information is displayed.
        Parameters:
        graph - The graph for which information is to be printed.
      • _readGraph

        protected CompositeActor _readGraph​(java.lang.String[] args)
        Convert a MoML file that contains a Ptolemy II specification into a composite actor representation.
        Parameters:
        args - The name of the MoML file.
        Returns:
        The composite actor representation.