Package org.pathvisio.libgpml.model
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 Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String>
authors
private java.util.List<PathwayElement.CitationRef>
citationRefs
citationRefs with this citation as sourceprivate java.lang.String
source
private java.lang.String
title
Optional attributes for GPML2013a Biopaxprivate java.lang.String
urlLink
private org.bridgedb.Xref
xref
One or both xref and/or Url link is requiredprivate java.lang.String
year
Fields inherited from class org.pathvisio.libgpml.model.PathwayObject
noFire, pathwayModel
-
Constructor Summary
Constructors Modifier Constructor Description protected
Citation(org.bridgedb.Xref xref, java.lang.String urlLink)
Instantiates a Citation pathway element given all possible parameters. -
Method Summary
Modifier and Type Method Description protected void
addCitationRef(PathwayElement.CitationRef citationRef)
Adds the given citationRef to citationRefs list of this citation.Citation
copyRef()
Copies this citation.void
copyValuesFrom(Citation src)
Copies values from the given source pathway element.boolean
equalsCitation(Citation citation)
Compares this citation to the given citation.java.util.List<java.lang.String>
getAuthors()
Returns list of authors for this citation (for GPML2013a Biopax).java.util.List<PathwayElement.CitationRef>
getCitationRefs()
Returns the list of citationRefs which reference this citation.ObjectType
getObjectType()
Returns the object type of this pathway element.java.lang.String
getSource()
Returns source for this citation (for GPML2013a Biopax).java.lang.String
getTitle()
Returns source for this citation (for GPML2013a Biopax).java.lang.String
getUrlLink()
Returns the url link for a web address.org.bridgedb.Xref
getXref()
Returns this Citation Xref.java.lang.String
getYear()
Returns year for this citation (for GPML2013a Biopax).boolean
hasCitationRef(PathwayElement.CitationRef citationRef)
Check whether citationRefs has the given citationRef.protected void
removeCitationRef(PathwayElement.CitationRef citationRef)
Removes the given citationRef from citationRefs list of the citation.private void
removeCitationRefs()
Removes all citationRefs from citationRefs list.protected void
setAuthors(java.util.List<java.lang.String> authors)
Sets list of authors for this citation (for GPML2013a Biopax).protected void
setSource(java.lang.String v)
Sets source for this citation (for GPML2013a Biopax).protected void
setTitle(java.lang.String v)
Sets source for this citation (for GPML2013a Biopax).protected void
setUrlLink(java.lang.String v)
Sets the url link for a web address.protected void
setXref(org.bridgedb.Xref v)
Sets the Xref for this citation.protected void
setYear(java.lang.String v)
Sets year for this citation (for GPML2013a Biopax).protected void
terminate()
Terminates this citation.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
-
xref
private org.bridgedb.Xref xrefOne or both xref and/or Url link is required -
urlLink
private java.lang.String urlLink -
title
private java.lang.String titleOptional 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
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
Returns the object type of this pathway element.- Specified by:
getObjectType
in classPathwayObject
- 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
Returns the list of citationRefs which reference this citation.- Returns:
- citationRefs the list of citationRefs which reference this citation.
-
hasCitationRef
Check whether citationRefs has the given citationRef.- Parameters:
citationRef
- the citationRef to look for.- Returns:
- true if has citationRef, false otherwise.
-
addCitationRef
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
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 classPathwayObject
-
equalsCitation
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
Copies values from the given source pathway element.NB:
- 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
Copies this citation.- Returns:
- the new citation copied from this citation.
-