Class ConceptTermManager.InequalityTerm

  • All Implemented Interfaces:
    InequalityTerm
    Enclosing class:
    ConceptTermManager

    public class ConceptTermManager.InequalityTerm
    extends java.lang.Object
    implements InequalityTerm
    An InequalityTerm class that is used for ontology analysis and contains a reference to the associated object for the InequalityTerm.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.Object _object
      The model object associated with the InequalityTerm.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected InequalityTerm​(java.lang.Object object)
      Construct an InequalityTerm for the given model object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getAssociatedObject()
      Return the model object associated with the InequalityTerm.
      ConceptTermManager.InequalityTerm[] getConstants()
      Return an array of one element with this InequalityTerm if it is a constant InequalityTerm that cannot be changed.
      java.lang.Object getValue()
      Return null if this term is not effective.
      ConceptTermManager.InequalityTerm[] getVariables()
      Return this ptolemy.graph.InequalityTerm in an array if this term represent a property variable.
      void initialize​(java.lang.Object property)
      Reset the variable part of this type to the specified type.
      boolean isEffective()
      Return true if the InequalityTerm is an effective constraint for the OntologySolver, and false otherwise.
      boolean isSettable()
      Test if the property of the port associated with this Term can be changed.
      boolean isValueAcceptable()
      Check whether the current value of this term is acceptable.
      void setEffective​(boolean isEffective)
      Sets whether the InequalityTerm constraint will be effective for the OntologySolver's algorithm.
      void setValue​(java.lang.Object property)
      Set the property value of this term.
      java.lang.String toString()
      Override the base class to give a description of the port and its property.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • _object

        protected java.lang.Object _object
        The model object associated with the InequalityTerm.
    • Constructor Detail

      • InequalityTerm

        protected InequalityTerm​(java.lang.Object object)
        Construct an InequalityTerm for the given model object.
        Parameters:
        object - The model object associated with this InequalityTerm
    • Method Detail

      • getAssociatedObject

        public java.lang.Object getAssociatedObject()
        Return the model object associated with the InequalityTerm.
        Specified by:
        getAssociatedObject in interface InequalityTerm
        Returns:
        The associated model object
      • getValue

        public java.lang.Object getValue()
        Return null if this term is not effective. Otherwise, return the resolved property of this ptolemy.graph.InequalityTerm.
        Specified by:
        getValue in interface InequalityTerm
        Returns:
        The resolved Concept of this InequalityTerm, or null if this term is not effective
        See Also:
        setValue(Object)
      • getVariables

        public ConceptTermManager.InequalityTerm[] getVariables()
        Return this ptolemy.graph.InequalityTerm in an array if this term represent a property variable. This term represents a property variable if the property of this port is not set through setEquals(). If the property of this port is set, return an array of size zero.
        Specified by:
        getVariables in interface InequalityTerm
        Returns:
        An array of InequalityTerm.
      • getConstants

        public ConceptTermManager.InequalityTerm[] getConstants()
        Return an array of one element with this InequalityTerm if it is a constant InequalityTerm that cannot be changed. If it can be changed then return an empty InequalityTerm array.
        Returns:
        The InequalityTerm array with either one or zero elements that is returned.
      • isEffective

        public boolean isEffective()
        Return true if the InequalityTerm is an effective constraint for the OntologySolver, and false otherwise. Effective means the constraint will be used by the OntologySolver when it runs its algorithm. If it is not effective, the constraint will not be used by the OntologySolver.
        Returns:
        true if the InequalityTerm is effective, false otherwise
      • isSettable

        public boolean isSettable()
        Test if the property of the port associated with this Term can be changed. The property can be changed if setEquals() is not called.
        Specified by:
        isSettable in interface InequalityTerm
        Returns:
        True if the property can be changed; false otherwise.
      • isValueAcceptable

        public boolean isValueAcceptable()
        Check whether the current value of this term is acceptable. This method delegates the check to the isTypeAcceptable() method of the outer class.
        Specified by:
        isValueAcceptable in interface InequalityTerm
        Returns:
        True if the current value is acceptable.
      • setEffective

        public void setEffective​(boolean isEffective)
        Sets whether the InequalityTerm constraint will be effective for the OntologySolver's algorithm.
        Parameters:
        isEffective - true if the InequalityTerm should be effective, false if it should be ineffective
        See Also:
        isEffective()
      • toString

        public java.lang.String toString()
        Override the base class to give a description of the port and its property.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A description of the port and its property.