Class Citation

java.lang.Object
org.pathvisio.libgpml.model.PathwayObject
org.pathvisio.libgpml.model.Citation

public class Citation
extends PathwayObject
This class stores information for a Citation.
Author:
finterly
  • Field Details

    • xref

      private org.bridgedb.Xref xref
      One or both xref and/or Url link is required
    • title

      private java.lang.String title
      Optional attributes for GPML2013a Biopax
    • source

      private java.lang.String source
    • year

      private java.lang.String year
    • authors

      private java.util.List<java.lang.String> authors
    • citationRefs

      private java.util.List<PathwayElement.CitationRef> citationRefs
      citationRefs with this citation as source
  • Constructor Details

    • Citation

      protected Citation​(org.bridgedb.Xref xref, java.lang.String urlLink)
      Instantiates a Citation pathway element given all possible parameters. NB: A citation much have either xref or url, or both.
      Parameters:
      xref - the citation xref.
      urlLink - the url link and description (optional) for a web address.
  • Method Details

    • getObjectType

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

      public org.bridgedb.Xref getXref()
      Returns this Citation Xref.
      Returns:
      xref this citation xref.
    • setXref

      protected void setXref​(org.bridgedb.Xref v)
      Sets the Xref for this citation.
      Parameters:
      v - the xref of this citation.
    • getUrlLink

      public java.lang.String getUrlLink()
      Returns the url link for a web address.
      Returns:
      urlLink the url link.
    • setUrlLink

      protected void setUrlLink​(java.lang.String v)
      Sets the url link for a web address.
      Parameters:
      v - the url link.
    • getTitle

      public java.lang.String getTitle()
      Returns source for this citation (for GPML2013a Biopax).
      Returns:
      title the title.
    • setTitle

      protected void setTitle​(java.lang.String v)
      Sets source for this citation (for GPML2013a Biopax).
      Parameters:
      v - the title.
    • getSource

      public java.lang.String getSource()
      Returns source for this citation (for GPML2013a Biopax).
      Returns:
      source the source.
    • setSource

      protected void setSource​(java.lang.String v)
      Sets source for this citation (for GPML2013a Biopax).
      Parameters:
      v - the source.
    • getYear

      public java.lang.String getYear()
      Returns year for this citation (for GPML2013a Biopax).
      Returns:
      year the year.
    • setYear

      protected void setYear​(java.lang.String v)
      Sets year for this citation (for GPML2013a Biopax).
      Parameters:
      v - the year.
    • getAuthors

      public java.util.List<java.lang.String> getAuthors()
      Returns list of authors for this citation (for GPML2013a Biopax).
      Returns:
      authors the list of authors.
    • setAuthors

      protected void setAuthors​(java.util.List<java.lang.String> authors)
      Sets list of authors for this citation (for GPML2013a Biopax).
      Parameters:
      authors - the list of authors.
    • getCitationRefs

      public java.util.List<PathwayElement.CitationRef> getCitationRefs()
      Returns the list of citationRefs which reference this citation.
      Returns:
      citationRefs the list of citationRefs which reference this citation.
    • hasCitationRef

      public boolean hasCitationRef​(PathwayElement.CitationRef citationRef)
      Check whether citationRefs has the given citationRef.
      Parameters:
      citationRef - the citationRef to look for.
      Returns:
      true if has citationRef, false otherwise.
    • addCitationRef

      protected void addCitationRef​(PathwayElement.CitationRef citationRef)
      Adds the given citationRef to citationRefs list of this citation. NB: This method is not used directly.
      Parameters:
      citationRef - the given citationRef to add.
    • removeCitationRef

      protected void removeCitationRef​(PathwayElement.CitationRef citationRef)
      Removes the given citationRef from citationRefs list of the citation. If citationRefs becomes empty, this citation is removed from the pathway model because it is no longer referenced/used. NB: This method is not used directly.
      Parameters:
      citationRef - the given citationRef to remove.
    • removeCitationRefs

      private void removeCitationRefs()
      Removes all citationRefs from citationRefs list.
    • terminate

      protected void terminate()
      Terminates this citation. The pathway model, if any, are unset from this citationRef. Links to all citationRefs are removed from this citationRef.
      Overrides:
      terminate in class PathwayObject
    • equalsCitation

      public boolean equalsCitation​(Citation citation)
      Compares this citation to the given citation. Checks xref and url to determine whether they are equal. NB: Optional properties (title, source, year, authors) are assumed to be the same if xref and url are equal.
      Parameters:
      citation - the citation to compare to.
      Returns:
      true if citations have equal properties, false otherwise.
    • copyValuesFrom

      public void copyValuesFrom​(Citation src)
      Copies values from the given source pathway element.

      NB:

      1. citationRefs list is not copied, citationRefs are created and added when a citation is added to a pathway element.
      Parameters:
      src - the source pathway element.
    • copyRef

      public Citation copyRef()
      Copies this citation.
      Returns:
      the new citation copied from this citation.