Class PathwayElement.Comment

java.lang.Object
org.pathvisio.libgpml.model.PathwayElement.Comment
All Implemented Interfaces:
java.lang.Cloneable
Enclosing class:
PathwayElement

public class PathwayElement.Comment
extends java.lang.Object
implements java.lang.Cloneable
This class stores all information relevant to a Comment. Comments can be descriptions or arbitrary notes. Each comment has a source and a text. Pathway elements (e.g. DataNode, State, Interaction, GraphicalLine, Label, Shape, Group) can have zero or more comments with it.
Author:
unknown, finterly
  • Field Summary

    Fields
    Modifier and Type Field Description
    private java.lang.String commentText  
    private java.lang.String source  
  • Constructor Summary

    Constructors
    Constructor Description
    Comment​(java.lang.String commentText, java.lang.String source)
    Instantiates a Comment with commentText and source.
  • Method Summary

    Modifier and Type Method Description
    java.lang.Object clone()
    Clones this comment.
    java.lang.String getCommentText()
    Returns the text of this Comment.
    java.lang.String getSource()
    Returns the source of this Comment.
    void setCommentText​(java.lang.String v)
    Sets the text of this Comment.
    void setSource​(java.lang.String v)
    Sets the source of this Comment.
    java.lang.String toString()
    Writes comment out as a string.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • commentText

      private java.lang.String commentText
    • source

      private java.lang.String source
  • Constructor Details

    • Comment

      public Comment​(java.lang.String commentText, java.lang.String source)
      Instantiates a Comment with commentText and source. This private constructor is called by PathwayElement.addComment(String commentText, String source).
      Parameters:
      commentText - the text of the comment, between Comment tags in GPML.
      source - the source of this comment.
  • Method Details

    • clone

      public java.lang.Object clone() throws java.lang.CloneNotSupportedException
      Clones this comment.
      Overrides:
      clone in class java.lang.Object
      Returns:
      the cloned comment.
      Throws:
      java.lang.CloneNotSupportedException
    • getCommentText

      public java.lang.String getCommentText()
      Returns the text of this Comment.
      Returns:
      commentText the text of this comment.
    • setCommentText

      public void setCommentText​(java.lang.String v)
      Sets the text of this Comment.
      Parameters:
      v - the text of this comment.
    • getSource

      public java.lang.String getSource()
      Returns the source of this Comment.
      Returns:
      source the source of this comment.
    • setSource

      public void setSource​(java.lang.String v)
      Sets the source of this Comment.
      Parameters:
      v - the source of this comment.
    • toString

      public java.lang.String toString()
      Writes comment out as a string.
      Overrides:
      toString in class java.lang.Object