Package org.pathvisio.libgpml.model
Class Pathway
java.lang.Object
org.pathvisio.libgpml.model.PathwayObject
org.pathvisio.libgpml.model.PathwayElement
org.pathvisio.libgpml.model.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:
- Pathway is treated as a
PathwayElement
for simplicity of listeners and implementation. - There can only be one Pathway per a PathwayModel.
- A Pathway references its PathwayModel, but has no elementId (null).
- Author:
- finterly
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
Pathway.Author
This class stores information for an Author.Nested classes/interfaces inherited from class org.pathvisio.libgpml.model.PathwayElement
PathwayElement.AnnotationRef, PathwayElement.CitationRef, PathwayElement.Comment, PathwayElement.EvidenceRef, PathwayElement.InfoRef
Nested classes/interfaces inherited from interface org.pathvisio.libgpml.model.Referenceable
Referenceable.Annotatable, Referenceable.Citable, Referenceable.Evidenceable
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Pathway.Author>
authors
private java.awt.Color
backgroundColor
private double
boardHeight
private double
boardWidth
private java.lang.String
description
private java.lang.String
license
private java.lang.String
organism
private java.lang.String
source
private java.lang.String
title
private java.lang.String
version
private org.bridgedb.Xref
xref
Fields inherited from class org.pathvisio.libgpml.model.PathwayObject
noFire, pathwayModel
-
Constructor Summary
Constructors Constructor Description Pathway()
Instantiates a pathway with default values. -
Method Summary
Modifier and Type Method Description Pathway.Author
addAuthor(java.lang.String name)
Creates and adds an author to authors list.Pathway.Author
addAuthor(Pathway.Author author)
Adds the given author to authors list.CopyElement
copy()
Copy Object.void
copyValuesFrom(Pathway src)
Note: doesn't change parent, only fields Used by UndoAction.java.util.List<Pathway.Author>
getAuthors()
Returns the list of authors for this pathway model.java.awt.Color
getBackgroundColor()
Returns the background color of this pathway.double
getBoardHeight()
Returns the board height.double
getBoardWidth()
Returns the board width.java.lang.String
getDescription()
Returns the description of this pathway.java.lang.String
getLicense()
Returns the license of this pathway.ObjectType
getObjectType()
Returns the object type of this pathway element.java.lang.String
getOrganism()
Returns the organism of this pathway.java.lang.String
getSource()
Returns the source of this pathway, e.g.java.lang.Object
getStaticProperty(StaticProperty key)
Returns static property value for given key.java.util.Set<StaticProperty>
getStaticPropertyKeys()
Returns all static properties for this pathway object.java.lang.String
getTitle()
Returns the title or name of this pathway.java.lang.String
getVersion()
Returns the version of this pathway.org.bridgedb.Xref
getXref()
Returns the Xref for this pathway.void
removeAuthor(Pathway.Author author)
Removes the given author from authors list.void
setBackgroundColor(java.awt.Color v)
Sets the background color of this pathway.void
setBoardHeight(double v)
Sets the board height.void
setBoardWidth(double v)
Sets the board width.void
setDescription(java.lang.String v)
Sets the description of this pathway.void
setLicense(java.lang.String v)
Sets the license of this pathway.void
setOrganism(java.lang.String v)
Sets the organism of this pathway.void
setSource(java.lang.String v)
Sets the source of this pathway, e.g.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.void
setTitle(java.lang.String v)
Sets the title or name of this pathway.void
setVersion(java.lang.String v)
Sets the version of this pathway.void
setXref(org.bridgedb.Xref v)
Sets the Xref for this pathway.Methods inherited from class org.pathvisio.libgpml.model.PathwayElement
addAnnotation, addAnnotation, addAnnotation, addCitation, addCitation, addCitation, addComment, addComment, addEvidence, addEvidence, addEvidence, copyReferencesFrom, copyValuesFrom, findComment, getAnnotationRefs, getCitationRefs, getComments, getDynamicProperties, getDynamicProperty, getDynamicPropertyKeys, getEvidenceRefs, getPropertyEx, getPropertyKeys, hasAnnotationRef, hasCitationRef, hasEvidenceRef, removeAnnotationRef, removeAnnotationRefs, removeCitationRef, removeCitationRefs, removeComment, removeEvidenceRef, removeEvidenceRefs, setComments, setDynamicProperty, setPropertyEx, terminate
Methods inherited from class org.pathvisio.libgpml.model.PathwayObject
addListener, dontFireEvents, fireObjectModifiedEvent, getElementId, getListeners, getPathwayModel, hasPathwayModel, removeListener, setElementId, setGeneratedElementId, setPathwayModel, setPathwayModelTo, unsetPathwayModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
title
private java.lang.String title -
boardWidth
private double boardWidth -
boardHeight
private double boardHeight -
backgroundColor
private java.awt.Color backgroundColor -
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
Returns the object type of this pathway element.- Specified by:
getObjectType
in classPathwayObject
- 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
Returns the list of authors for this pathway model.- Returns:
- authors the list of authors.
-
addAuthor
Adds the given author to authors list.- Parameters:
author
- the author to add.
-
addAuthor
Creates and adds an author to authors list.- Parameters:
name
- the name of author.
-
removeAuthor
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. -
setXref
public void setXref(org.bridgedb.Xref v)Sets the Xref for this pathway. -
copyValuesFrom
Note: doesn't change parent, only fields Used by UndoAction.- Parameters:
src
-
-
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 classPathwayElement
- Returns:
- the copyElement for the new pathway element and this source pathway element.
-
getStaticPropertyKeys
Returns all static properties for this pathway object.- Overrides:
getStaticPropertyKeys
in classPathwayElement
- Returns:
- result the set of static property for this pathway object.
-
getStaticProperty
Description copied from class:PathwayElement
Returns static property value for given key.- Overrides:
getStaticProperty
in classPathwayElement
- Parameters:
key
- the key.- Returns:
- the static property value.
-
setStaticProperty
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 classPathwayElement
- Parameters:
key
-value
-
-