Package org.pathvisio.libgpml.model
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 Summary
Fields Modifier and Type Field Description private java.util.List<PathwayElement.EvidenceRef>
evidenceRefs
evidenceRefs with this evidence as sourceprivate java.lang.String
urlLink
private java.lang.String
value
private org.bridgedb.Xref
xref
Fields inherited from class org.pathvisio.libgpml.model.PathwayObject
noFire, pathwayModel
-
Constructor Summary
Constructors Modifier Constructor Description 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. -
Method Summary
Modifier and Type Method Description protected void
addEvidenceRef(PathwayElement.EvidenceRef evidenceRef)
Adds the given evidenceRef to evidenceRefs list of this evidence.Evidence
copyRef()
Copies this evidence.void
copyValuesFrom(Evidence src)
Copies values from the given source pathway element.boolean
equalsEvidence(Evidence evidence)
Compares this evidence to the given evidence.java.util.List<PathwayElement.EvidenceRef>
getEvidenceRefs()
Returns the list of evidenceRefs which reference this evidence.ObjectType
getObjectType()
Returns the object type of this pathway element.java.lang.String
getUrlLink()
Returns the url link for a web address.java.lang.String
getValue()
Returns the name, term, or text of this evidence.org.bridgedb.Xref
getXref()
Returns this evidence Xref.boolean
hasEvidenceRef(PathwayElement.EvidenceRef evidenceRef)
Check whether evidenceRefs has the given evidenceRef.protected void
removeEvidenceRef(PathwayElement.EvidenceRef evidenceRef)
Removes the given evidenceRef from evidenceRefs list of this evidence.private void
removeEvidenceRefs()
Removes all evidenceRefs from evidenceRefs list.protected void
setUrlLink(java.lang.String v)
Sets the url link for a web address.protected void
setValue(java.lang.String v)
Sets the name, term, or text of this evidence.protected void
setXref(org.bridgedb.Xref v)
Sets the Xref for this evidence.protected void
terminate()
Terminates this evidence.Methods inherited from class org.pathvisio.libgpml.model.PathwayObject
addListener, dontFireEvents, fireObjectModifiedEvent, getElementId, getListeners, getPathwayModel, getPropertyEx, getPropertyKeys, getStaticProperty, getStaticPropertyKeys, hasPathwayModel, removeListener, setElementId, setGeneratedElementId, setPathwayModel, setPathwayModelTo, setPropertyEx, setStaticProperty, unsetPathwayModel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
value
private java.lang.String value -
xref
private org.bridgedb.Xref xref -
urlLink
private java.lang.String urlLink -
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
Returns the object type of this pathway element.- Specified by:
getObjectType
in classPathwayObject
- 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
Returns the list of evidenceRefs which reference this evidence.- Returns:
- evidenceRefs the list of evidenceRefs which reference this evidence.
-
hasEvidenceRef
Check whether evidenceRefs has the given evidenceRef.- Parameters:
evidenceRef
- this evidenceRef to look for.- Returns:
- true if has evidenceRef, false otherwise.
-
addEvidenceRef
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
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 classPathwayObject
-
equalsEvidence
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
Copies values from the given source pathway element.NB:
- 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
Copies this evidence.- Returns:
- the new evidence copied from this evidence.
-