Class ActorConstraintsDefinitionAdapter

    • Field Detail

      • _constraintTermExpressions

        protected java.util.List<StringParameter> _constraintTermExpressions
        The list of expressions that represent the constraint terms for each constraint in the actor.
    • Constructor Detail

      • ActorConstraintsDefinitionAdapter

        public ActorConstraintsDefinitionAdapter​(LatticeOntologySolver solver,
                                                 ComponentEntity component,
                                                 java.util.List<StringParameter> constraintExpressions)
                                          throws IllegalActionException
        Construct the lattice ontology adapter for the given component and property lattice.
        solver - The specified lattice-based ontology solver.
        component - The given component.
        constraintExpressions - The list of constraint expressions for each port or component in the actor.
        IllegalActionException - Thrown if the adapter cannot be initialized.
    • Method Detail

      • constraintList

        public java.util.List<Inequality> constraintList()
                                                  throws IllegalActionException
        Return the constraints of this component. The constraints are generated from the expressions passed in from an ActorConstraintsDefinitionAttribute that allows the user to define actor constraints in the OntologySolver model.
        constraintList in class LatticeOntologyAdapter
        The list of constraints for this component.
        IllegalActionException - If there is a problem parsing the constraint expression strings to create the actor constraints.
      • getPropertyables

        public java.util.List<java.lang.Object> getPropertyables()
        Return a list of property-able ports and attributes contained by the component. If any of the actor element expressions are set to IGNORE then they are not added to the list of property-able objects.
        getPropertyables in class OntologyAdapter
        The list of property-able ports and attributes.
      • _getConceptFunctionTerm

        protected ConceptFunctionInequalityTerm _getConceptFunctionTerm​(NamedObj actorElement,
                                                                        java.lang.String functionString)
                                                                 throws IllegalActionException
        Return the inequality term representing the concept function defined by the specified string.
        actorElement - The actor element for which this concept function constraint is being defined.
        functionString - The string containing the expression for the concept function.
        The concept function inequality term that implements the concept function and contains the correct inequality term inputs.
        IllegalActionException - If the string cannot be correctly parsed and the concept function cannot be created.
      • _getPropertyableAttributes

        protected java.util.List<Attribute> _getPropertyableAttributes()
        Return the list of property-able Attributes. This list is defined by the expressions for each attribute taken from the ActorConstraintsDefinitionAttribute. Any attribute that is set to IGNORE is not added to the list of property-able attributes.
        _getPropertyableAttributes in class OntologyAdapter
        The list of property-able Attributes.
      • _setConstraints

        protected void _setConstraints​(NamedObj actorElement,
                                       java.lang.String constraintExpressionString)
                                throws IllegalActionException
        Set the constraints for the actor attribute or port based on the parsed expression string.
        actorElement - The attribute or port from the actor to be constrained.
        constraintExpressionString - The expression string that is parsed to get the constraints for the actor attribute or port.
        IllegalActionException - If the constraint cannot be set due to problems parsing the expression.