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 booleanaddAllExperiments(Collection<? extends Experiment> exps)This method will add all the experiments and set the publication of the new experiments to this current publicationbooleanaddExperiment(Experiment exp)This method will add the experiment and set the publication of the new experiment to this current publicationvoidassignImexId(String identifier)Assign an IMEx id to a publication.protected voidclearPropertiesLinkedToIdentifiers()clearPropertiesLinkedToIdentifiersprotected voidclearPropertiesLinkedToXrefs()clearPropertiesLinkedToXrefsCollection<Annotation>getAnnotations()Getter for the fieldannotations.List<String>getAuthors()Getter for the fieldauthors.CurationDepthgetCurationDepth()Getter for the fieldcurationDepth.StringgetDoi()Getter for the fielddoi.Collection<Experiment>getExperiments()Getter for the fieldexperiments.Collection<Xref>getIdentifiers()Getter for the fieldidentifiers.StringgetImexId()Getter for the fieldimexId.StringgetJournal()Getter for the fieldjournal.DategetPublicationDate()Getter for the fieldpublicationDate.StringgetPubmedId()Getter for the fieldpubmedId.DategetReleasedDate()Getter for the fieldreleasedDate.SourcegetSource()Getter for the fieldsource.StringgetTitle()Getter for the fieldtitle.Collection<Xref>getXrefs()Getter for the fieldxrefs.protected voidinitialiseAnnotations()initialiseAnnotationsprotected voidinitialiseAnnotationsWith(Collection<Annotation> annotations)initialiseAnnotationsWithprotected voidinitialiseAuthors()initialiseAuthorsprotected voidinitialiseAuthorsWith(List<String> authors)initialiseAuthorsWithprotected voidinitialiseExperiments()initialiseExperimentsprotected voidinitialiseExperimentsWith(Collection<Experiment> experiments)initialiseExperimentsWithprotected voidinitialiseIdentifiers()initialiseIdentifiersprotected voidinitialiseIdentifiersWith(Collection<Xref> identifiers)initialiseIdentifiersWithprotected voidinitialiseXrefs()initialiseXrefsprotected voidinitialiseXrefsWith(Collection<Xref> xrefs)initialiseXrefsWithprotected voidprocessAddedIdentifierEvent(Xref added)processAddedIdentifierEventprotected voidprocessAddedXrefEvent(Xref added)processAddedXrefEventprotected voidprocessRemovedIdentifierEvent(Xref removed)processRemovedIdentifierEventprotected voidprocessRemovedXrefEvent(Xref removed)processRemovedXrefEventbooleanremoveAllExperiments(Collection<? extends Experiment> exps)This method will remove the experiments and set the publication of the removed experiments to null.booleanremoveExperiment(Experiment exp)This method will remove the experiment and set the publication of the removed experiment to null.voidsetCurationDepth(CurationDepth curationDepth)Set the curation depth of the publication.voidsetDoi(String doi)Sets the doi.voidsetJournal(String journal)Set the journal where the publication has been publishedvoidsetPublicationDate(Date date)Set the date of publication.voidsetPubmedId(String pubmedId)Sets the pubmed identifier.voidsetReleasedDate(Date released)Set the released date of the curated publicationvoidsetSource(Source source)Sets the source who curated the publication.voidsetTitle(String title)Set the publication titleStringtoString()
-
-
-
Constructor Detail
-
DefaultPublication
public DefaultPublication()
Constructor for DefaultPublication.
-
DefaultPublication
public DefaultPublication(Xref identifier)
Constructor for DefaultPublication.
- Parameters:
identifier- aXrefobject.
-
DefaultPublication
public DefaultPublication(Xref identifier, CurationDepth curationDepth, Source source)
Constructor for DefaultPublication.
- Parameters:
identifier- aXrefobject.curationDepth- aCurationDepthobject.source- aSourceobject.
-
DefaultPublication
public DefaultPublication(Xref identifier, String imexId, Source source)
Constructor for DefaultPublication.
-
DefaultPublication
public DefaultPublication(String pubmed)
Constructor for DefaultPublication.
- Parameters:
pubmed- aStringobject.
-
DefaultPublication
public DefaultPublication(String pubmed, CurationDepth curationDepth, Source source)
Constructor for DefaultPublication.
- Parameters:
pubmed- aStringobject.curationDepth- aCurationDepthobject.source- aSourceobject.
-
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- aStringobject.journal- aStringobject.publicationDate- aDateobject.curationDepth- aCurationDepthobject.source- aSourceobject.
-
-
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- aListobject.
-
initialiseXrefsWith
protected void initialiseXrefsWith(Collection<Xref> xrefs)
initialiseXrefsWith
- Parameters:
xrefs- aCollectionobject.
-
initialiseAnnotationsWith
protected void initialiseAnnotationsWith(Collection<Annotation> annotations)
initialiseAnnotationsWith
- Parameters:
annotations- aCollectionobject.
-
initialiseExperimentsWith
protected void initialiseExperimentsWith(Collection<Experiment> experiments)
initialiseExperimentsWith
- Parameters:
experiments- aCollectionobject.
-
initialiseIdentifiersWith
protected void initialiseIdentifiersWith(Collection<Xref> identifiers)
initialiseIdentifiersWith
- Parameters:
identifiers- aCollectionobject.
-
getPubmedId
public String getPubmedId()
Getter for the field
pubmedId.- Specified by:
getPubmedIdin interfacePublication- Returns:
- a
Stringobject.
-
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:
setPubmedIdin interfacePublication- Parameters:
pubmedId- : pubmed identifier
-
getDoi
public String getDoi()
Getter for the field
doi.- Specified by:
getDoiin interfacePublication- Returns:
- a
Stringobject.
-
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:
setDoiin interfacePublication- Parameters:
doi- : DOI identifier
-
getIdentifiers
public Collection<Xref> getIdentifiers()
Getter for the field
identifiers.- Specified by:
getIdentifiersin interfacePublication- Returns:
- a
Collectionobject.
-
getImexId
public String getImexId()
Getter for the field
imexId.- Specified by:
getImexIdin interfacePublication- Returns:
- a
Stringobject.
-
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:
assignImexIdin interfacePublication- Parameters:
identifier- : the IMEx id from IMEx central
-
getTitle
public String getTitle()
Getter for the field
title.- Specified by:
getTitlein interfacePublication- Returns:
- a
Stringobject.
-
setTitle
public void setTitle(String title)
Set the publication title- Specified by:
setTitlein interfacePublication- Parameters:
title- : publication title
-
getJournal
public String getJournal()
Getter for the field
journal.- Specified by:
getJournalin interfacePublication- Returns:
- a
Stringobject.
-
setJournal
public void setJournal(String journal)
Set the journal where the publication has been published- Specified by:
setJournalin interfacePublication- Parameters:
journal- : the journal
-
getPublicationDate
public Date getPublicationDate()
Getter for the field
publicationDate.- Specified by:
getPublicationDatein interfacePublication- Returns:
- a
Dateobject.
-
setPublicationDate
public void setPublicationDate(Date date)
Set the date of publication.- Specified by:
setPublicationDatein interfacePublication- Parameters:
date- : publication date
-
getAuthors
public List<String> getAuthors()
Getter for the field
authors.- Specified by:
getAuthorsin interfacePublication- Returns:
- a
Listobject.
-
getXrefs
public Collection<Xref> getXrefs()
Getter for the field
xrefs.- Specified by:
getXrefsin interfacePublication- Returns:
- a
Collectionobject.
-
getAnnotations
public Collection<Annotation> getAnnotations()
Getter for the field
annotations.- Specified by:
getAnnotationsin interfacePublication- Returns:
- a
Collectionobject.
-
getExperiments
public Collection<Experiment> getExperiments()
Getter for the field
experiments.- Specified by:
getExperimentsin interfacePublication- Returns:
- a
Collectionobject.
-
getCurationDepth
public CurationDepth getCurationDepth()
Getter for the field
curationDepth.- Specified by:
getCurationDepthin interfacePublication- Returns:
- a
CurationDepthobject.
-
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:
setCurationDepthin interfacePublication- Parameters:
curationDepth- : the curation depth
-
getReleasedDate
public Date getReleasedDate()
Getter for the field
releasedDate.- Specified by:
getReleasedDatein interfacePublication- Returns:
- a
Dateobject.
-
setReleasedDate
public void setReleasedDate(Date released)
Set the released date of the curated publication- Specified by:
setReleasedDatein interfacePublication- Parameters:
released- : the released date
-
getSource
public Source getSource()
Getter for the field
source.- Specified by:
getSourcein interfacePublication- Returns:
- a
Sourceobject.
-
setSource
public void setSource(Source source)
Sets the source who curated the publication.- Specified by:
setSourcein 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:
addExperimentin 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:
removeExperimentin 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:
addAllExperimentsin 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:
removeAllExperimentsin 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- aXrefobject.
-
processRemovedIdentifierEvent
protected void processRemovedIdentifierEvent(Xref removed)
processRemovedIdentifierEvent
- Parameters:
removed- aXrefobject.
-
clearPropertiesLinkedToIdentifiers
protected void clearPropertiesLinkedToIdentifiers()
clearPropertiesLinkedToIdentifiers
-
processAddedXrefEvent
protected void processAddedXrefEvent(Xref added)
processAddedXrefEvent
- Parameters:
added- aXrefobject.
-
processRemovedXrefEvent
protected void processRemovedXrefEvent(Xref removed)
processRemovedXrefEvent
- Parameters:
removed- aXrefobject.
-
clearPropertiesLinkedToXrefs
protected void clearPropertiesLinkedToXrefs()
clearPropertiesLinkedToXrefs
-
-