Class ConceptRelation

  • All Implemented Interfaces:
    java.lang.Cloneable, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class ConceptRelation
    extends ComponentRelation
    A relation between concepts in an ontology. This class is really only used to connect the FiniteConcepts in the Ontology class, which corresponds to the relations that a user draws in the Ontology Editor in Vergil. This information is also then used to generate the ordering relations when a ConceptGraph is created.
    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Edward A. Lee, Ben Lickly
    See Also:
    FiniteConcept, Ontology
    Pt.AcceptedRating:
    Red (hyzheng)
    Pt.ProposedRating:
    Yellow (hyzheng)
    • Field Detail

      • annotation

        public StringParameter annotation
        An annotation that describes the transition. If this is non-empty, then a visual editor will be expected to put this annotation on or near the transition to document its function. This is a string that defaults to the empty string. Note that it can reference variables in scope using the notation $name.
      • color

        public ColorAttribute color
        Color in which to render this transition. The default color is black.
      • dashed

        public Parameter dashed
        Indicator that this transition should be rendered as a dashed line. This is a boolean that defaults to false.
      • exitAngle

        public Parameter exitAngle
        Attribute the exit angle of a visual rendition. This parameter contains a DoubleToken, initially with value 0.0. It must lie between -PI and PI. Otherwise, it will be truncated to lie within this range.
      • gamma

        public Parameter gamma
        Attribute giving the orientation of a self-loop. This is equal to the tangent at the midpoint (more or less). This parameter contains a DoubleToken, initially with value 0.0.
    • Constructor Detail

      • ConceptRelation

        public ConceptRelation​(Ontology container,
                               java.lang.String name)
                        throws IllegalActionException,
                               NameDuplicationException
        Construct a ConceptRelation with the given name contained by the specified entity. The container argument must not be null, or a NullPointerException will be thrown. This ConceptRelation will use the workspace of the container for synchronization and version counts. If the name argument is null, then the name is set to the empty string.
        Parameters:
        container - The container.
        name - The name of the ConceptRelation.
        Throws:
        IllegalActionException - If the container is incompatible with this ConceptRelation.
        NameDuplicationException - If the name coincides with any relation already in the container.
      • ConceptRelation

        public ConceptRelation​(Workspace workspace)
                        throws IllegalActionException,
                               NameDuplicationException
        Construct a ConceptRelation in the given workspace with an empty string as a name. If the workspace argument is null, use the default workspace. The object is added to the workspace directory. Increment the version of the workspace.
        Parameters:
        workspace - The workspace for synchronization and version tracking.
        Throws:
        IllegalActionException - If the container is incompatible with this ConceptRelation.
        NameDuplicationException - If the name coincides with any relation already in the container.