Class ConceptAttribute

    • Field Detail

      • _concept

        protected Concept _concept
        The Concept contained by the ConceptAttribute.
    • Constructor Detail

      • ConceptAttribute

        public ConceptAttribute​(NamedObj container,
                                java.lang.String name)
                         throws IllegalActionException,
                                NameDuplicationException
        Construct a ConceptAttribute with the specified name and container.
        Parameters:
        container - The specified container.
        name - The specified name.
        Throws:
        IllegalActionException - If the attribute is not of an acceptable class for the container, or if the name contains a period.
        NameDuplicationException - If the name coincides with an attribute already in the container.
    • Method Detail

      • exportMoML

        public void exportMoML​(java.io.Writer output,
                               int depth,
                               java.lang.String name)
                        throws java.io.IOException
        Write a MoML description of the ConceptAttribute. Nothing is written if the value is null or "".
        Specified by:
        exportMoML in interface MoMLExportable
        Overrides:
        exportMoML in class NamedObj
        Parameters:
        output - The output stream to write to.
        depth - The depth in the hierarchy, to determine indenting.
        name - The name to use instead of the current name.
        Throws:
        java.io.IOException - If an I/O error occurs.
        See Also:
        NamedObj.exportMoML(Writer, int, String)
      • getExpression

        public java.lang.String getExpression()
        Get the string name of the Concept contained by the ConceptAttribute or the empty string if there is none.
        Returns:
        The name of the Concept as a string, or the empty string "".
        See Also:
        Settable.setExpression(String)
      • getVisibility

        public Settable.Visibility getVisibility()
        Get the visibility of this Settable, as set by setVisibility(). If setVisibility() has not been called, then this method returns the default Settable.FULL. The returned value is one of the static instances of the Visibility inner class.
        Returns:
        The visibility of this Settable.
        See Also:
        setVisibility(Settable.Visibility)
      • setConcept

        public void setConcept​(Concept concept)
        Specifies the Concept value.
        Parameters:
        concept - a Concept object specifying the Concept value contained by the ConceptAttribute.
        See Also:
        getConcept()
      • setVisibility

        public void setVisibility​(Settable.Visibility visibility)
        Set the visibility of this Settable. The argument should be one of the static public instances of the inner class Visibility. This is enforced by making it impossible to construct instances of this inner class outside this interface definition.
        Parameters:
        visibility - The visibility of this Settable.
        See Also:
        getVisibility()
      • validate

        public java.util.Collection<?> validate()
                                         throws IllegalActionException
        The validate() method must be implemented to implement the Settable interface but is not relevant for the ConceptAttribute class.
        Returns:
        null
        Throws:
        IllegalActionException - To match the signature of the validate() method in the Settable interface, but this is not ever thrown here.