Class ActorConstraintsDefinitionAttribute

    • Field Detail

      • actorClassName

        public StringParameter actorClassName
        The string that represents the class name of the actor for which this attribute defines lattice ontology solver constraints.
      • foundActorClassName

        public StringParameter foundActorClassName
        The parameter that contains the last valid actor class name found.
      • ATTR_SUFFIX

        public static final java.lang.String ATTR_SUFFIX
        The string suffix for attribute names that represent constraint definitions for actor attributes.
        See Also:
        Constant Field Values
      • EQ

        public static final java.lang.String EQ
        String representing an equal to constraint choice.
        See Also:
        Constant Field Values
      • GTE

        public static final java.lang.String GTE
        String representing a greater than or equal to constraint choice.
        See Also:
        Constant Field Values
      • IGNORE

        public static final java.lang.String IGNORE
        String representing that the actor port or attribute should be ignored for the ontology analysis and not have a concept assigned to it.
        See Also:
        Constant Field Values
      • LTE

        public static final java.lang.String LTE
        String representing a less than or equal to constraint choice.
        See Also:
        Constant Field Values
      • NO_CONSTRAINTS

        public static final java.lang.String NO_CONSTRAINTS
        String representing that the actor port or attribute has no constraints but should have a concept assigned to it.
        See Also:
        Constant Field Values
      • PORT_SUFFIX

        public static final java.lang.String PORT_SUFFIX
        The string suffix for attribute names that represent constraint definitions for actor ports.
        See Also:
        Constant Field Values
      • SEPARATOR

        public static final java.lang.String SEPARATOR
        String representing the separator character ";" between constraint expressions in the constraint expression string.
        See Also:
        Constant Field Values
      • SUFFIX_LENGTH

        public static final int SUFFIX_LENGTH
        The length of the attribute and port suffix strings.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ActorConstraintsDefinitionAttribute

        public ActorConstraintsDefinitionAttribute​(CompositeEntity container,
                                                   java.lang.String name)
                                            throws IllegalActionException,
                                                   NameDuplicationException
        Construct the ActorConstraintsDefinitionAttribute attribute with the given container and name.
        Parameters:
        container - The container.
        name - The name of this attribute.
        Throws:
        IllegalActionException - If the entity cannot be contained by the proposed container.
        NameDuplicationException - If the container already has an actor with this name.
    • Method Detail

      • attributeChanged

        public void attributeChanged​(Attribute attribute)
                              throws IllegalActionException
        Override the attributeChanged method so that if the actor class name changes, the attribute interface adds and removes fields for constraints for the actor's ports and attributes.
        Overrides:
        attributeChanged in class NamedObj
        Parameters:
        attribute - The attribute that has been changed.
        Throws:
        IllegalActionException - If there is a problem changing the attribute.
      • createAdapter

        public ActorConstraintsDefinitionAdapter createAdapter​(ComponentEntity component,
                                                               LatticeOntologySolver solver)
                                                        throws IllegalActionException
        Get the adapter defined by this attribute.
        Parameters:
        component - The model component for which the adapter will be created.
        solver - The lattice ontology solver for which this adapter is being created.
        Returns:
        The ActorConstraintsDefinitionAdapter specified by this attribute.
        Throws:
        IllegalActionException - If the container model's solver cannot be found or there is a problem initializing the adapter.
      • createConstraintParameterName

        public static java.lang.String createConstraintParameterName​(NamedObj actorElement)
        Return a constraint parameter name based on the name of the specified actor element. This method supports ports and attributes.
        Parameters:
        actorElement - The actor element for which to generate a constraint parameter name.
        Returns:
        The string name for the constraint parameter for this actor element.
      • getActorElementName

        public static java.lang.String getActorElementName​(StringParameter expressionParameter)
                                                    throws IllegalActionException
        Get the name of the element contained by the actor (either a port or an attribute) for which the specified parameter defines a constraint.
        Parameters:
        expressionParameter - The string parameter that defines the element's constraints.
        Returns:
        The string name of the element (either a port or an attribute).
        Throws:
        IllegalActionException - If the expressionParameter passed in is null.
      • getConstraintDirAndRHSStrings

        public static java.util.List<java.lang.String> getConstraintDirAndRHSStrings​(java.lang.String constraintExpressionString)
        Return the string constraint direction for the given constraint expression specified as a string.
        Parameters:
        constraintExpressionString - The string that specifies a single constraint expression for an actor element.
        Returns:
        The string '≤', '≥', or '==' depending on the specified constraint direction, false otherwise.
      • isActorElementAnAttribute

        public static boolean isActorElementAnAttribute​(StringParameter actorElementConstraintExpression)
                                                 throws IllegalActionException
        Return true if the actor element constraint expression is for an attribute, false otherwise.
        Parameters:
        actorElementConstraintExpression - The constraint expression for the actor element.
        Returns:
        true if the actor element constraint expression is for an attribute, false otherwise.
        Throws:
        IllegalActionException - If the constrain expression parameter is null.
      • isActorElementAPort

        public static boolean isActorElementAPort​(StringParameter actorElementConstraintExpression)
                                           throws IllegalActionException
        Return true if the actor element constraint expression is for a port, false otherwise.
        Parameters:
        actorElementConstraintExpression - The constraint expression for the actor element.
        Returns:
        true if the actor element constraint expression is for a port, false otherwise.
        Throws:
        IllegalActionException - If the constrain expression parameter is null.
      • isActorElementIgnored

        public static boolean isActorElementIgnored​(StringParameter actorElementConstraintExpression)
                                             throws IllegalActionException
        Return true if the actor element is set to be ignored by the ontology analysis, false otherwise.
        Parameters:
        actorElementConstraintExpression - The constraint expression for the actor element.
        Returns:
        true if the actor element is set to be ignored by the ontology analysis, false otherwise.
        Throws:
        IllegalActionException - If the constrain expression parameter is null.
      • isActorElementUnconstrained

        public static boolean isActorElementUnconstrained​(StringParameter actorElementConstraintExpression)
                                                   throws IllegalActionException
        Return true if the actor element is set to have no constraints for the ontology analysis, false otherwise.
        Parameters:
        actorElementConstraintExpression - The constraint expression for the actor element.
        Returns:
        true if the actor element is set to have no constraints for the ontology analysis, false otherwise.
        Throws:
        IllegalActionException - If the constrain expression parameter is null.