Class Pathway

All Implemented Interfaces:
java.lang.Cloneable, Referenceable, Referenceable.Annotatable, Referenceable.Citable, Referenceable.Evidenceable, Xrefable

public class Pathway
extends PathwayElement
implements Xrefable
The Pathway class stores information or metadata for a Pathway Model.

NB:

  1. Pathway is treated as a PathwayElement for simplicity of listeners and implementation.
  2. There can only be one Pathway per a PathwayModel.
  3. A Pathway references its PathwayModel, but has no elementId (null).
Author:
finterly
  • Field Details

    • title

      private java.lang.String title
    • boardWidth

      private double boardWidth
    • boardHeight

      private double boardHeight
    • backgroundColor

      private java.awt.Color backgroundColor
    • authors

      private java.util.List<Pathway.Author> authors
    • description

      private java.lang.String description
    • organism

      private java.lang.String organism
    • source

      private java.lang.String source
    • version

      private java.lang.String version
    • license

      private java.lang.String license
    • xref

      private org.bridgedb.Xref xref
  • Constructor Details

    • Pathway

      public Pathway()
      Instantiates a pathway with default values.
  • Method Details

    • getObjectType

      public ObjectType getObjectType()
      Returns the object type of this pathway element.
      Specified by:
      getObjectType in class PathwayObject
      Returns:
      the object type.
    • getTitle

      public java.lang.String getTitle()
      Returns the title or name of this pathway.
      Returns:
      title the title.
    • setTitle

      public void setTitle​(java.lang.String v)
      Sets the title or name of this pathway.
      Parameters:
      v - the title to set.
    • getBoardWidth

      public double getBoardWidth()
      Returns the board width. Board width together with board height define drawing size.
      Returns:
      boardWidth the board width
    • setBoardWidth

      public void setBoardWidth​(double v)
      Sets the board width.
      Parameters:
      v - the board width to set.
    • getBoardHeight

      public double getBoardHeight()
      Returns the board height. Board width together with board height define drawing size.
      Returns:
      boardHeight the board height
    • setBoardHeight

      public void setBoardHeight​(double v)
      Sets the board height.
      Parameters:
      v - the board height to set.
    • getBackgroundColor

      public java.awt.Color getBackgroundColor()
      Returns the background color of this pathway.
      Returns:
      backgroundColor the background color.
    • setBackgroundColor

      public void setBackgroundColor​(java.awt.Color v)
      Sets the background color of this pathway.
      Parameters:
      v - the background color to set.
    • getAuthors

      public java.util.List<Pathway.Author> getAuthors()
      Returns the list of authors for this pathway model.
      Returns:
      authors the list of authors.
    • addAuthor

      public Pathway.Author addAuthor​(Pathway.Author author)
      Adds the given author to authors list.
      Parameters:
      author - the author to add.
    • addAuthor

      public Pathway.Author addAuthor​(java.lang.String name)
      Creates and adds an author to authors list.
      Parameters:
      name - the name of author.
    • removeAuthor

      public void removeAuthor​(Pathway.Author author)
      Removes the given author from authors list.
      Parameters:
      author - the author to remove.
    • getDescription

      public java.lang.String getDescription()
      Returns the description of this pathway.
      Returns:
      description the description.
    • setDescription

      public void setDescription​(java.lang.String v)
      Sets the description of this pathway.
      Parameters:
      v - the description to set.
    • getOrganism

      public java.lang.String getOrganism()
      Returns the organism of this pathway. Organism is the scientific name (e.g., Homo sapiens) of the species being described by this pathway.
      Returns:
      organism the organism.
    • setOrganism

      public void setOrganism​(java.lang.String v)
      Sets the organism of this pathway. Organism is the scientific name (e.g., Homo sapiens) of the species being described by this pathway.
      Parameters:
      v - the organism to set.
    • getSource

      public java.lang.String getSource()
      Returns the source of this pathway, e.g. WikiPathways, KEGG, Cytoscape.
      Returns:
      source the source.
    • setSource

      public void setSource​(java.lang.String v)
      Sets the source of this pathway, e.g. WikiPathways, KEGG, Cytoscape.
      Parameters:
      v - the source to set.
    • getVersion

      public java.lang.String getVersion()
      Returns the version of this pathway.
      Returns:
      version the version
    • setVersion

      public void setVersion​(java.lang.String v)
      Sets the version of this pathway.
      Parameters:
      v - the version to set.
    • getLicense

      public java.lang.String getLicense()
      Returns the license of this pathway.
      Returns:
      license the license.
    • setLicense

      public void setLicense​(java.lang.String v)
      Sets the license of this pathway.
      Parameters:
      v - the license to set.
    • getXref

      public org.bridgedb.Xref getXref()
      Returns the Xref for this pathway.
      Specified by:
      getXref in interface Xrefable
      Returns:
      xref the xref of this pathway.
    • setXref

      public void setXref​(org.bridgedb.Xref v)
      Sets the Xref for this pathway.
      Specified by:
      setXref in interface Xrefable
      Parameters:
      v - the xref to set for this pathway.
    • copyValuesFrom

      public void copyValuesFrom​(Pathway src)
      Note: doesn't change parent, only fields Used by UndoAction.
      Parameters:
      src -
    • copy

      public CopyElement copy()
      Copy Object. The object will not be part of the same Pathway object, it's parent will be set to null. No events will be sent to the parent of the original.
      Specified by:
      copy in class PathwayElement
      Returns:
      the copyElement for the new pathway element and this source pathway element.
    • getStaticPropertyKeys

      public java.util.Set<StaticProperty> getStaticPropertyKeys()
      Returns all static properties for this pathway object.
      Overrides:
      getStaticPropertyKeys in class PathwayElement
      Returns:
      result the set of static property for this pathway object.
    • getStaticProperty

      public java.lang.Object getStaticProperty​(StaticProperty key)
      Description copied from class: PathwayElement
      Returns static property value for given key.
      Overrides:
      getStaticProperty in class PathwayElement
      Parameters:
      key - the key.
      Returns:
      the static property value.
    • setStaticProperty

      public void setStaticProperty​(StaticProperty key, java.lang.Object value)
      This works so that o.setNotes(x) is the equivalent of o.setProperty("Notes", x); Value may be null in some cases, e.g. graphRef
      Overrides:
      setStaticProperty in class PathwayElement
      Parameters:
      key -
      value -