Class Concept

    • Field Detail

      • isAcceptable

        public Parameter isAcceptable
        A parameter indicating whether this concept is an acceptable outcome during inference. This is a boolean that defaults to true.
    • Method Detail

      • getAssociatedObject

        public final java.lang.Object getAssociatedObject()
        Return the associated object of this InequalityTerm, which is always null for concepts. For variable InequalityTerms, this method will return a reference to the model object associated with that InequalityTerm. For concepts, there is no associated model object, hence returning null is the right thing to do.
        Specified by:
        getAssociatedObject in interface InequalityTerm
        Returns:
        Null, since concepts have no associated objects.
      • getColor

        public ColorAttribute getColor()
                                throws IllegalActionException
        Return the color attribute associated with this Concept, if it exists.
        Returns:
        The first ColorAttribute associated with this concept, if there is one. Null, otherwise.
        Throws:
        IllegalActionException - Not thrown in the base Concept class.
      • getOntology

        public Ontology getOntology()
        Return the ontology that contains this concept.
        Returns:
        The containing ontology.
      • getValue

        public final java.lang.Object getValue()
        Return the current value of the InequalityTerm. Since a concept is a constant, not a variable, its value is just itself.
        Specified by:
        getValue in interface InequalityTerm
        Returns:
        This concept.
        See Also:
        setValue(java.lang.Object)
      • getVariables

        public final InequalityTerm[] getVariables()
        Return an array of variables contained in this InequalityTerm, or in this case, an empty array. A concept is a single constant, so it has no variables.
        Specified by:
        getVariables in interface InequalityTerm
        Returns:
        An empty array.
      • initialize

        public final void initialize​(java.lang.Object object)
                              throws IllegalActionException
        Try to initialize the InequalityTerm, or in this case, throw an exception. A concept is not a variable.
        Specified by:
        initialize in interface InequalityTerm
        Parameters:
        object - The object used to initialize the InequalityTerm; not used since a Concept is a static value that cannot be initialized.
        Throws:
        IllegalActionException - Always thrown.
      • isAboveOrEqualTo

        public boolean isAboveOrEqualTo​(Concept concept)
                                 throws IllegalActionException
        Return true if this concept is greater than or equal to the specified concept in the partial ordering. FIXME: This interface seems awkward, and should probably be removed, since it is obsoleted by ConceptGraph.compare(Object, Object), which provides more functionality. See our discussion in our code review.
        Parameters:
        concept - The concept to compare.
        Returns:
        True if this concept is greater than or equal to the specified concept.
        Throws:
        IllegalActionException - If the specified concept does not have the same ontology as this one.
      • isSettable

        public final boolean isSettable()
        Return whether or not this InequalityTerm is settable. In this case, it is not, since concepts are constants, not variables.
        Specified by:
        isSettable in interface InequalityTerm
        Returns:
        False, because this inequality term is a constant.
      • isValueAcceptable

        public boolean isValueAcceptable()
        Return whether this concept is a valid inference result. This method is required to implement the InequalityTerm interface, but we do not want to use this method going forward for ontology inferences. Acceptability criteria should be of the form variable ≤ Concept. Acceptability criteria prevent a variable from being promoted in the ontology lattice.
        Specified by:
        isValueAcceptable in interface InequalityTerm
        Returns:
        True, if this concept is a valid result of inference. False, otherwise.
      • setValue

        public final void setValue​(java.lang.Object value)
                            throws IllegalActionException
        Try to set the value of this InequalityTerm, or in this case, just throw an exception. A concept is not a variable.
        Specified by:
        setValue in interface InequalityTerm
        Parameters:
        value - The Object being passed in to set the value for the InequalityTerm; not used since a Concept is a static value that cannot be changed.
        Throws:
        IllegalActionException - Always thrown.
        See Also:
        getValue()
      • toString

        public abstract java.lang.String toString()
        Return the (unique) string representation of this concept.
        Overrides:
        toString in class NamedObj
        Returns:
        The string representation of this concept.