Class DefaultPublication
- java.lang.Object
-
- psidev.psi.mi.jami.model.impl.DefaultPublication
-
- All Implemented Interfaces:
Publication
- Direct Known Subclasses:
ImexPublication
,MitabPublication
public class DefaultPublication extends Object implements Publication
Default implementation for a Publication Notes: The equals and hashcode methods have NOT been overridden because the Publication object is a complex object. To compare Publication objects, you can use some comparators provided by default: - DefaultPublicationComparator - UnambiguousPublicationComparator - DefaultCuratedPublicationComparator - UnambiguousCuratedPublicationComparator - PublicationComparator - CuratedPublicationComparator- Since:
22/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description DefaultPublication()
Constructor for DefaultPublication.DefaultPublication(String pubmed)
Constructor for DefaultPublication.DefaultPublication(String title, String journal, Date publicationDate)
Constructor for DefaultPublication.DefaultPublication(String title, String journal, Date publicationDate, String imexId, Source source)
Constructor for DefaultPublication.DefaultPublication(String title, String journal, Date publicationDate, CurationDepth curationDepth, Source source)
Constructor for DefaultPublication.DefaultPublication(String pubmed, String imexId, Source source)
Constructor for DefaultPublication.DefaultPublication(String pubmed, CurationDepth curationDepth, Source source)
Constructor for DefaultPublication.DefaultPublication(Xref identifier)
Constructor for DefaultPublication.DefaultPublication(Xref identifier, String imexId, Source source)
Constructor for DefaultPublication.DefaultPublication(Xref identifier, CurationDepth curationDepth, Source source)
Constructor for DefaultPublication.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAllExperiments(Collection<? extends Experiment> exps)
This method will add all the experiments and set the publication of the new experiments to this current publicationboolean
addExperiment(Experiment exp)
This method will add the experiment and set the publication of the new experiment to this current publicationvoid
assignImexId(String identifier)
Assign an IMEx id to a publication.protected void
clearPropertiesLinkedToIdentifiers()
clearPropertiesLinkedToIdentifiersprotected void
clearPropertiesLinkedToXrefs()
clearPropertiesLinkedToXrefsCollection<Annotation>
getAnnotations()
Getter for the fieldannotations
.List<String>
getAuthors()
Getter for the fieldauthors
.CurationDepth
getCurationDepth()
Getter for the fieldcurationDepth
.String
getDoi()
Getter for the fielddoi
.Collection<Experiment>
getExperiments()
Getter for the fieldexperiments
.Collection<Xref>
getIdentifiers()
Getter for the fieldidentifiers
.String
getImexId()
Getter for the fieldimexId
.String
getJournal()
Getter for the fieldjournal
.Date
getPublicationDate()
Getter for the fieldpublicationDate
.String
getPubmedId()
Getter for the fieldpubmedId
.Date
getReleasedDate()
Getter for the fieldreleasedDate
.Source
getSource()
Getter for the fieldsource
.String
getTitle()
Getter for the fieldtitle
.Collection<Xref>
getXrefs()
Getter for the fieldxrefs
.protected void
initialiseAnnotations()
initialiseAnnotationsprotected void
initialiseAnnotationsWith(Collection<Annotation> annotations)
initialiseAnnotationsWithprotected void
initialiseAuthors()
initialiseAuthorsprotected void
initialiseAuthorsWith(List<String> authors)
initialiseAuthorsWithprotected void
initialiseExperiments()
initialiseExperimentsprotected void
initialiseExperimentsWith(Collection<Experiment> experiments)
initialiseExperimentsWithprotected void
initialiseIdentifiers()
initialiseIdentifiersprotected void
initialiseIdentifiersWith(Collection<Xref> identifiers)
initialiseIdentifiersWithprotected void
initialiseXrefs()
initialiseXrefsprotected void
initialiseXrefsWith(Collection<Xref> xrefs)
initialiseXrefsWithprotected void
processAddedIdentifierEvent(Xref added)
processAddedIdentifierEventprotected void
processAddedXrefEvent(Xref added)
processAddedXrefEventprotected void
processRemovedIdentifierEvent(Xref removed)
processRemovedIdentifierEventprotected void
processRemovedXrefEvent(Xref removed)
processRemovedXrefEventboolean
removeAllExperiments(Collection<? extends Experiment> exps)
This method will remove the experiments and set the publication of the removed experiments to null.boolean
removeExperiment(Experiment exp)
This method will remove the experiment and set the publication of the removed experiment to null.void
setCurationDepth(CurationDepth curationDepth)
Set the curation depth of the publication.void
setDoi(String doi)
Sets the doi.void
setJournal(String journal)
Set the journal where the publication has been publishedvoid
setPublicationDate(Date date)
Set the date of publication.void
setPubmedId(String pubmedId)
Sets the pubmed identifier.void
setReleasedDate(Date released)
Set the released date of the curated publicationvoid
setSource(Source source)
Sets the source who curated the publication.void
setTitle(String title)
Set the publication titleString
toString()
-
-
-
Constructor Detail
-
DefaultPublication
public DefaultPublication()
Constructor for DefaultPublication.
-
DefaultPublication
public DefaultPublication(Xref identifier)
Constructor for DefaultPublication.
- Parameters:
identifier
- aXref
object.
-
DefaultPublication
public DefaultPublication(Xref identifier, CurationDepth curationDepth, Source source)
Constructor for DefaultPublication.
- Parameters:
identifier
- aXref
object.curationDepth
- aCurationDepth
object.source
- aSource
object.
-
DefaultPublication
public DefaultPublication(Xref identifier, String imexId, Source source)
Constructor for DefaultPublication.
-
DefaultPublication
public DefaultPublication(String pubmed)
Constructor for DefaultPublication.
- Parameters:
pubmed
- aString
object.
-
DefaultPublication
public DefaultPublication(String pubmed, CurationDepth curationDepth, Source source)
Constructor for DefaultPublication.
- Parameters:
pubmed
- aString
object.curationDepth
- aCurationDepth
object.source
- aSource
object.
-
DefaultPublication
public DefaultPublication(String pubmed, String imexId, Source source)
Constructor for DefaultPublication.
-
DefaultPublication
public DefaultPublication(String title, String journal, Date publicationDate)
Constructor for DefaultPublication.
-
DefaultPublication
public DefaultPublication(String title, String journal, Date publicationDate, CurationDepth curationDepth, Source source)
Constructor for DefaultPublication.
- Parameters:
title
- aString
object.journal
- aString
object.publicationDate
- aDate
object.curationDepth
- aCurationDepth
object.source
- aSource
object.
-
-
Method Detail
-
initialiseAuthors
protected void initialiseAuthors()
initialiseAuthors
-
initialiseXrefs
protected void initialiseXrefs()
initialiseXrefs
-
initialiseAnnotations
protected void initialiseAnnotations()
initialiseAnnotations
-
initialiseExperiments
protected void initialiseExperiments()
initialiseExperiments
-
initialiseIdentifiers
protected void initialiseIdentifiers()
initialiseIdentifiers
-
initialiseAuthorsWith
protected void initialiseAuthorsWith(List<String> authors)
initialiseAuthorsWith
- Parameters:
authors
- aList
object.
-
initialiseXrefsWith
protected void initialiseXrefsWith(Collection<Xref> xrefs)
initialiseXrefsWith
- Parameters:
xrefs
- aCollection
object.
-
initialiseAnnotationsWith
protected void initialiseAnnotationsWith(Collection<Annotation> annotations)
initialiseAnnotationsWith
- Parameters:
annotations
- aCollection
object.
-
initialiseExperimentsWith
protected void initialiseExperimentsWith(Collection<Experiment> experiments)
initialiseExperimentsWith
- Parameters:
experiments
- aCollection
object.
-
initialiseIdentifiersWith
protected void initialiseIdentifiersWith(Collection<Xref> identifiers)
initialiseIdentifiersWith
- Parameters:
identifiers
- aCollection
object.
-
getPubmedId
public String getPubmedId()
Getter for the field
pubmedId
.- Specified by:
getPubmedId
in interfacePublication
- Returns:
- a
String
object.
-
setPubmedId
public void setPubmedId(String pubmedId)
Sets the pubmed identifier. It will remove the previous pubmed identifier from the collection of identifiers, and add the new one in the collection of identifiers with qualifier identity. If pubmedId is null, it will remove all the pubmed identifiers from the collection of identifiers.- Specified by:
setPubmedId
in interfacePublication
- Parameters:
pubmedId
- : pubmed identifier
-
getDoi
public String getDoi()
Getter for the field
doi
.- Specified by:
getDoi
in interfacePublication
- Returns:
- a
String
object.
-
setDoi
public void setDoi(String doi)
Sets the doi. It will remove the previous doi from the collection of identifiers, and add the new one in the collection of identifiers with qualifier identity. If doi is null, it will remove all the doi from the collection of identifiers.- Specified by:
setDoi
in interfacePublication
- Parameters:
doi
- : DOI identifier
-
getIdentifiers
public Collection<Xref> getIdentifiers()
Getter for the field
identifiers
.- Specified by:
getIdentifiers
in interfacePublication
- Returns:
- a
Collection
object.
-
getImexId
public String getImexId()
Getter for the field
imexId
.- Specified by:
getImexId
in interfacePublication
- Returns:
- a
String
object.
-
assignImexId
public void assignImexId(String identifier)
Assign an IMEx id to a publication. It will add a Xref imex with qualifier imex-primary to the list of xrefs.- Specified by:
assignImexId
in interfacePublication
- Parameters:
identifier
- : the IMEx id from IMEx central
-
getTitle
public String getTitle()
Getter for the field
title
.- Specified by:
getTitle
in interfacePublication
- Returns:
- a
String
object.
-
setTitle
public void setTitle(String title)
Set the publication title- Specified by:
setTitle
in interfacePublication
- Parameters:
title
- : publication title
-
getJournal
public String getJournal()
Getter for the field
journal
.- Specified by:
getJournal
in interfacePublication
- Returns:
- a
String
object.
-
setJournal
public void setJournal(String journal)
Set the journal where the publication has been published- Specified by:
setJournal
in interfacePublication
- Parameters:
journal
- : the journal
-
getPublicationDate
public Date getPublicationDate()
Getter for the field
publicationDate
.- Specified by:
getPublicationDate
in interfacePublication
- Returns:
- a
Date
object.
-
setPublicationDate
public void setPublicationDate(Date date)
Set the date of publication.- Specified by:
setPublicationDate
in interfacePublication
- Parameters:
date
- : publication date
-
getAuthors
public List<String> getAuthors()
Getter for the field
authors
.- Specified by:
getAuthors
in interfacePublication
- Returns:
- a
List
object.
-
getXrefs
public Collection<Xref> getXrefs()
Getter for the field
xrefs
.- Specified by:
getXrefs
in interfacePublication
- Returns:
- a
Collection
object.
-
getAnnotations
public Collection<Annotation> getAnnotations()
Getter for the field
annotations
.- Specified by:
getAnnotations
in interfacePublication
- Returns:
- a
Collection
object.
-
getExperiments
public Collection<Experiment> getExperiments()
Getter for the field
experiments
.- Specified by:
getExperiments
in interfacePublication
- Returns:
- a
Collection
object.
-
getCurationDepth
public CurationDepth getCurationDepth()
Getter for the field
curationDepth
.- Specified by:
getCurationDepth
in interfacePublication
- Returns:
- a
CurationDepth
object.
-
setCurationDepth
public void setCurationDepth(CurationDepth curationDepth)
Set the curation depth of the publication. If the curation depth is null, it should set the cuuration depth to CurationDepth.undefined- Specified by:
setCurationDepth
in interfacePublication
- Parameters:
curationDepth
- : the curation depth
-
getReleasedDate
public Date getReleasedDate()
Getter for the field
releasedDate
.- Specified by:
getReleasedDate
in interfacePublication
- Returns:
- a
Date
object.
-
setReleasedDate
public void setReleasedDate(Date released)
Set the released date of the curated publication- Specified by:
setReleasedDate
in interfacePublication
- Parameters:
released
- : the released date
-
getSource
public Source getSource()
Getter for the field
source
.- Specified by:
getSource
in interfacePublication
- Returns:
- a
Source
object.
-
setSource
public void setSource(Source source)
Sets the source who curated the publication.- Specified by:
setSource
in interfacePublication
- Parameters:
source
- : source for this publication
-
addExperiment
public boolean addExperiment(Experiment exp)
This method will add the experiment and set the publication of the new experiment to this current publication- Specified by:
addExperiment
in interfacePublication
- Parameters:
exp
- : experiment to add- Returns:
- true if experiment is added to the list of experiments
-
removeExperiment
public boolean removeExperiment(Experiment exp)
This method will remove the experiment and set the publication of the removed experiment to null.- Specified by:
removeExperiment
in interfacePublication
- Parameters:
exp
- : experiment to remove- Returns:
- true if experiment is removed from the list of experiments
-
addAllExperiments
public boolean addAllExperiments(Collection<? extends Experiment> exps)
This method will add all the experiments and set the publication of the new experiments to this current publication- Specified by:
addAllExperiments
in interfacePublication
- Parameters:
exps
- : experiments to add- Returns:
- true if experiments are added to the list of experiments
-
removeAllExperiments
public boolean removeAllExperiments(Collection<? extends Experiment> exps)
This method will remove the experiments and set the publication of the removed experiments to null.- Specified by:
removeAllExperiments
in interfacePublication
- Parameters:
exps
- : experiments to remove- Returns:
- true if experiments are removed from the list of experiments
-
processAddedIdentifierEvent
protected void processAddedIdentifierEvent(Xref added)
processAddedIdentifierEvent
- Parameters:
added
- aXref
object.
-
processRemovedIdentifierEvent
protected void processRemovedIdentifierEvent(Xref removed)
processRemovedIdentifierEvent
- Parameters:
removed
- aXref
object.
-
clearPropertiesLinkedToIdentifiers
protected void clearPropertiesLinkedToIdentifiers()
clearPropertiesLinkedToIdentifiers
-
processAddedXrefEvent
protected void processAddedXrefEvent(Xref added)
processAddedXrefEvent
- Parameters:
added
- aXref
object.
-
processRemovedXrefEvent
protected void processRemovedXrefEvent(Xref removed)
processRemovedXrefEvent
- Parameters:
removed
- aXref
object.
-
clearPropertiesLinkedToXrefs
protected void clearPropertiesLinkedToXrefs()
clearPropertiesLinkedToXrefs
-
-