Class Evidence

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

public class Evidence
extends PathwayObject
This class stores information for an Evidence.
Author:
finterly
  • Field Details

    • value

      private java.lang.String value
    • xref

      private org.bridgedb.Xref xref
    • evidenceRefs

      private java.util.List<PathwayElement.EvidenceRef> evidenceRefs
      evidenceRefs with this evidence as source
  • Constructor Details

    • Evidence

      protected Evidence​(java.lang.String value, org.bridgedb.Xref xref, java.lang.String urlLink)
      Instantiates an Evidence pathway element given all possible parameters: elementId, parent pathway model, value, xref, and url. NB: Manipulated the order of variables to overload constructor.
      Parameters:
      value - the name, term, or text of this evidence.
      xref - this evidence xref.
      urlLink - the url of this evidence.
  • Method Details

    • getObjectType

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

      public java.lang.String getValue()
      Returns the name, term, or text of this evidence.
      Returns:
      value the name, term, or text of this evidence.
    • setValue

      protected void setValue​(java.lang.String v)
      Sets the name, term, or text of this evidence.
      Parameters:
      v - the name, term, or text of this evidence.
    • getXref

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

      protected void setXref​(org.bridgedb.Xref v)
      Sets the Xref for this evidence.
      Parameters:
      v - the xref of this evidence.
    • 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.
    • getEvidenceRefs

      public java.util.List<PathwayElement.EvidenceRef> getEvidenceRefs()
      Returns the list of evidenceRefs which reference this evidence.
      Returns:
      evidenceRefs the list of evidenceRefs which reference this evidence.
    • hasEvidenceRef

      public boolean hasEvidenceRef​(PathwayElement.EvidenceRef evidenceRef)
      Check whether evidenceRefs has the given evidenceRef.
      Parameters:
      evidenceRef - this evidenceRef to look for.
      Returns:
      true if has evidenceRef, false otherwise.
    • addEvidenceRef

      protected void addEvidenceRef​(PathwayElement.EvidenceRef evidenceRef)
      Adds the given evidenceRef to evidenceRefs list of this evidence. NB: This method is not used directly.
      Parameters:
      evidenceRef - the given evidenceRef to add.
    • removeEvidenceRef

      protected void removeEvidenceRef​(PathwayElement.EvidenceRef evidenceRef)
      Removes the given evidenceRef from evidenceRefs list of this evidence. If evidenceRefs becomes empty, this evidence is removed from the pathway model because it is no longer referenced/used. NB: This method is not used directly.
      Parameters:
      evidenceRef - the given evidenceRef to remove.
    • removeEvidenceRefs

      private void removeEvidenceRefs()
      Removes all evidenceRefs from evidenceRefs list.
    • terminate

      protected void terminate()
      Terminates this evidence. The pathway model, if any, is unset from this evidence. Links to all evidenceRefs are removed from this evidence.
      Overrides:
      terminate in class PathwayObject
    • equalsEvidence

      public boolean equalsEvidence​(Evidence evidence)
      Compares this evidence to the given evidence. Checks all properties except evidenceRefs list to determine whether they are equal.
      Parameters:
      evidence - the evidence to compare to.
      Returns:
      true if evidences have equal properties, false otherwise.
    • copyValuesFrom

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

      NB:

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

      public Evidence copyRef()
      Copies this evidence.
      Returns:
      the new evidence copied from this evidence.