Package ptolemy.kernel.test
Class ExampleSystem
- java.lang.Object
-
- ptolemy.kernel.test.ExampleSystem
-
- All Implemented Interfaces:
java.io.Serializable
public class ExampleSystem extends java.lang.Object implements java.io.Serializable
ExampleSystem constructs a hierarchal graph as shown in Ptolemy II design document, Figure 8. The graph has 10 entities, 14 ports, and 12 relations. The main function also returns the results of some key functions of ComponentRelation and ComponentPort. See Ptolemy 2 design document, Figure 11- Since:
- Ptolemy II 0.2
- Version:
- $Id$
- Author:
- Jie Liu
- See Also:
- Serialized Form
- Pt.AcceptedRating:
- Red
- Pt.ProposedRating:
- Red
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ExampleSystem()
Construct the graph.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
Create an Example System, then print it out.java.lang.String
printConnectedPorts(ComponentPort p)
Print the connected ports for a given ComponentPort.java.lang.String
printDeepConnectedPorts(ComponentPort p)
Print the deeply connected ports for a given ComponentPort.java.lang.String
printDeepLinkedPorts(ComponentRelation r)
Print the deeply linked ports for a given ComponentRelation.java.lang.String
printLinkedPorts(ComponentRelation r)
Print the linked ports for a given ComponentRelation.java.lang.String
toString()
Return the results as a String.
-
-
-
Field Detail
-
e0
public CompositeEntity e0
-
e3
public CompositeEntity e3
-
e4
public CompositeEntity e4
-
e7
public CompositeEntity e7
-
e10
public CompositeEntity e10
-
e1
public ComponentEntity e1
-
e2
public ComponentEntity e2
-
e5
public ComponentEntity e5
-
e6
public ComponentEntity e6
-
e8
public ComponentEntity e8
-
e9
public ComponentEntity e9
-
p0
public ComponentPort p0
-
p1
public ComponentPort p1
-
p2
public ComponentPort p2
-
p3
public ComponentPort p3
-
p4
public ComponentPort p4
-
p5
public ComponentPort p5
-
p6
public ComponentPort p6
-
p7
public ComponentPort p7
-
p8
public ComponentPort p8
-
p9
public ComponentPort p9
-
p10
public ComponentPort p10
-
p11
public ComponentPort p11
-
p12
public ComponentPort p12
-
p13
public ComponentPort p13
-
p14
public ComponentPort p14
-
r1
public ComponentRelation r1
-
r2
public ComponentRelation r2
-
r3
public ComponentRelation r3
-
r4
public ComponentRelation r4
-
r5
public ComponentRelation r5
-
r6
public ComponentRelation r6
-
r7
public ComponentRelation r7
-
r8
public ComponentRelation r8
-
r9
public ComponentRelation r9
-
r10
public ComponentRelation r10
-
r11
public ComponentRelation r11
-
r12
public ComponentRelation r12
-
-
Constructor Detail
-
ExampleSystem
public ExampleSystem() throws IllegalActionException, NameDuplicationException
Construct the graph.- Throws:
NameDuplicationException
- if the example system cannot be built because of a duplicate nameIllegalActionException
- if the example system cannot be built.
-
-
Method Detail
-
toString
public java.lang.String toString()
Return the results as a String.- Overrides:
toString
in classjava.lang.Object
-
printLinkedPorts
public java.lang.String printLinkedPorts(ComponentRelation r)
Print the linked ports for a given ComponentRelation. The ports are restricted in the same level of hierarchy- Parameters:
r
- Print the linked ports for this relation.- See Also:
Relation.linkedPortList()
-
printDeepLinkedPorts
public java.lang.String printDeepLinkedPorts(ComponentRelation r)
Print the deeply linked ports for a given ComponentRelation. Look through all transparent ports and return only non transparent ports (those with no inside links).- Parameters:
r
- Print the deeply linked ports for this relation.- See Also:
ComponentRelation.deepLinkedPortList()
-
printConnectedPorts
public java.lang.String printConnectedPorts(ComponentPort p)
Print the connected ports for a given ComponentPort. Restricted to the same level of hierarchy.- Parameters:
p
- Print the connected ports for this Port.- See Also:
Port.connectedPortList()
-
printDeepConnectedPorts
public java.lang.String printDeepConnectedPorts(ComponentPort p)
Print the deeply connected ports for a given ComponentPort. Look through all transparent ports and return only non transparent ports (those with no inside links).- Parameters:
p
- Print the deeply connected ports for this Port.- See Also:
ComponentPort.deepConnectedPortList()
-
main
public static void main(java.lang.String[] args) throws NameDuplicationException, IllegalActionException
Create an Example System, then print it out.- Throws:
NameDuplicationException
- if the example system cannot be built because of a duplicate nameIllegalActionException
- if the example system cannot be built.
-
-