Class KeplerDocumentationAttribute

    • Constructor Detail

      • KeplerDocumentationAttribute

        public KeplerDocumentationAttribute()
        Construct a Kepler documentation attribute.
      • KeplerDocumentationAttribute

        public KeplerDocumentationAttribute​(Workspace workspace)
        Construct a Kepler documentation attribute.
        Parameters:
        workspace - The workspace in which the object is created.
    • Method Detail

      • addPort

        public void addPort​(java.lang.String name,
                            java.lang.String value)
                     throws NameDuplicationException,
                            java.lang.Exception
        Add port to the port hashtable.
        Parameters:
        name - The name of the port.
        value - A String representing the port.
        Throws:
        NameDuplicationException - If thrown while creating the port.
        java.lang.Exception - If thrown while configuring the port
      • addProperty

        public void addProperty​(java.lang.String name,
                                java.lang.String value)
                         throws NameDuplicationException,
                                java.lang.Exception
        Add a property to the property hashtable.
        Parameters:
        name - The name of the property.
        value - A string representing the property.
        Throws:
        NameDuplicationException - If thrown while creating the property
        java.lang.Exception - If thrown while configuring the attribute
        See Also:
        getProperty(String)
      • configure

        public void configure​(java.net.URL base,
                              java.lang.String source,
                              java.lang.String text)
        Configure this documentation attribute.
        Specified by:
        configure in interface Configurable
        Parameters:
        base - Currently ignored.
        source - The source of this configuration.
        text - The configuration text.
      • createEmptyFields

        public void createEmptyFields​(NamedObj target)
        Create empty fields for the main attribute as well as any params or ports that exist in the target.
        Parameters:
        target - the namedobj to create the empty attributes for
      • createInstanceFromExisting

        public void createInstanceFromExisting​(KeplerDocumentationAttribute documentationAttribute)
        Populate the members of KeplerDocumentationAttribute from another given KeplerDocumentationAttribute.
        Parameters:
        documentationAttribute - The DocumentationAttribute from which to copy attributes.
      • exportMoML

        public void exportMoML​(java.io.Writer output,
                               int depth,
                               java.lang.String name)
                        throws java.io.IOException
        Write a MoML description of this object with the specified indentation depth and with the specified name substituting for the name of this object.
        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 in the exported MoML.
        Throws:
        java.io.IOException - If an I/O error occurs.
        See Also:
        MoMLExportable, NamedObj.clone(Workspace), NamedObj.isPersistent(), NamedObj.getDerivedLevel()
      • getAuthor

        public java.lang.String getAuthor()
        Return the author.
        Returns:
        the author
        See Also:
        setAuthor(String)
      • getConfigureSource

        public java.lang.String getConfigureSource()
        Get the configuration source.
        Specified by:
        getConfigureSource in interface Configurable
        Returns:
        The configuration source.
      • getConfigureText

        public java.lang.String getConfigureText()
        Get the configuration text.
        Specified by:
        getConfigureText in interface Configurable
        Returns:
        The configuration text
      • getDescription

        public java.lang.String getDescription()
        Return the description.
        Returns:
        the description
        See Also:
        setDescription(String)
      • getDocAttribute

        public DocAttribute getDocAttribute​(NamedObj target)
        Return a docAttribute with the available kepler documentation. Returns null if an error prevents the doc attribute from being created.
        Parameters:
        target - The container for the DocAttribute
        Returns:
        The DocAttribute.
      • getDocClass

        public java.lang.String getDocClass()
        Return the document class.
        Returns:
        the document class or the empty string.
        See Also:
        setDocClass(String)
      • getDocName

        public java.lang.String getDocName()
        Return the document name.
        Returns:
        the document name
        See Also:
        setDocName(String)
      • getPort

        public java.lang.String getPort​(java.lang.String name)
        Return the port documentation.
        Parameters:
        name - The name of the port.
        Returns:
        the port documentation.
      • getPortHash

        public java.util.Hashtable getPortHash()
        Return the port hash.
        Returns:
        the port hash
        See Also:
        setPortHash(Hashtable)
      • getProperty

        public java.lang.String getProperty​(java.lang.String name)
        Return the property documentation.
        Parameters:
        name - The name of the property.
        Returns:
        the property docs
        See Also:
        addProperty(String, String)
      • getPropertyHash

        public java.util.Hashtable getPropertyHash()
        Return the property hash.
        Returns:
        the property hash
        See Also:
        setPropertyHash(Hashtable)
      • getUserLevelDocumentation

        public java.lang.String getUserLevelDocumentation()
        Return the user level documentation.
        Returns:
        the user level documentation
        See Also:
        setUserLevelDocumentation(String)
      • getVersion

        public java.lang.String getVersion()
        Return the version.
        Returns:
        the version
        See Also:
        setVersion(String)
      • setAuthor

        public void setAuthor​(java.lang.String author)
        Set the author.
        Parameters:
        author - The author.
        See Also:
        getAuthor()
      • setDescription

        public void setDescription​(java.lang.String description)
        Set the description.
        Parameters:
        description - The description.
        See Also:
        getDescription()
      • setDocClass

        public void setDocClass​(java.lang.String className)
        Set the name of this docClass.
        Parameters:
        className - The name of this docClass.
        See Also:
        getDocClass()
      • setDocName

        public void setDocName​(java.lang.String name)
        Set the name of this document.
        Parameters:
        name - The name of this document.
        See Also:
        getDocName()
      • setPortHash

        public void setPortHash​(java.util.Hashtable portHash)
        Set the port hash.
        Parameters:
        portHash - The port hash.
        See Also:
        getPortHash()
      • setUserLevelDocumentation

        public void setUserLevelDocumentation​(java.lang.String userLevelDocumentation)
        Set the user level documentation.
        Parameters:
        userLevelDocumentation - The user level documentation.
        See Also:
        getUserLevelDocumentation()
      • setVersion

        public void setVersion​(java.lang.String version)
        Set the version.
        Parameters:
        version - The version.
        See Also:
        getVersion()
      • toDocML

        public java.lang.String toDocML()
        Exports this documentation attribute as docML.
        Returns:
        The docML
      • updateFromExisting

        public void updateFromExisting​(KeplerDocumentationAttribute oldDoc,
                                       boolean printWhenReplacing)
                                throws java.lang.Exception
        Update the documentation fields of this object from another KeplerDocumentationAttribute. A documentation field in this object is updated if it is empty and the corresponding field in the given object is not empty. However, if a field does not exist in this object, but is present in the given object, the field is *not* created in this object.
        Parameters:
        oldDoc - The KeplerDocumentationAttribute from which to copy attributes.
        printWhenReplacing - If true, print when the values are overwritten.
        Throws:
        java.lang.Exception - if there is an error updating the fields.