Class 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 Detail

      • DefaultPublication

        public DefaultPublication()

        Constructor for DefaultPublication.

      • DefaultPublication

        public DefaultPublication​(Xref identifier)

        Constructor for DefaultPublication.

        Parameters:
        identifier - a Xref object.
      • DefaultPublication

        public DefaultPublication​(Xref identifier,
                                  CurationDepth curationDepth,
                                  Source source)

        Constructor for DefaultPublication.

        Parameters:
        identifier - a Xref object.
        curationDepth - a CurationDepth object.
        source - a Source object.
      • DefaultPublication

        public DefaultPublication​(Xref identifier,
                                  String imexId,
                                  Source source)

        Constructor for DefaultPublication.

        Parameters:
        identifier - a Xref object.
        imexId - a String object.
        source - a Source object.
      • DefaultPublication

        public DefaultPublication​(String pubmed)

        Constructor for DefaultPublication.

        Parameters:
        pubmed - a String object.
      • DefaultPublication

        public DefaultPublication​(String pubmed,
                                  CurationDepth curationDepth,
                                  Source source)

        Constructor for DefaultPublication.

        Parameters:
        pubmed - a String object.
        curationDepth - a CurationDepth object.
        source - a Source object.
      • DefaultPublication

        public DefaultPublication​(String pubmed,
                                  String imexId,
                                  Source source)

        Constructor for DefaultPublication.

        Parameters:
        pubmed - a String object.
        imexId - a String object.
        source - a Source object.
      • DefaultPublication

        public DefaultPublication​(String title,
                                  String journal,
                                  Date publicationDate)

        Constructor for DefaultPublication.

        Parameters:
        title - a String object.
        journal - a String object.
        publicationDate - a Date object.
      • DefaultPublication

        public DefaultPublication​(String title,
                                  String journal,
                                  Date publicationDate,
                                  CurationDepth curationDepth,
                                  Source source)

        Constructor for DefaultPublication.

        Parameters:
        title - a String object.
        journal - a String object.
        publicationDate - a Date object.
        curationDepth - a CurationDepth object.
        source - a Source object.
      • DefaultPublication

        public DefaultPublication​(String title,
                                  String journal,
                                  Date publicationDate,
                                  String imexId,
                                  Source source)

        Constructor for DefaultPublication.

        Parameters:
        title - a String object.
        journal - a String object.
        publicationDate - a Date object.
        imexId - a String object.
        source - a Source 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 - a List object.
      • initialiseXrefsWith

        protected void initialiseXrefsWith​(Collection<Xref> xrefs)

        initialiseXrefsWith

        Parameters:
        xrefs - a Collection object.
      • initialiseAnnotationsWith

        protected void initialiseAnnotationsWith​(Collection<Annotation> annotations)

        initialiseAnnotationsWith

        Parameters:
        annotations - a Collection object.
      • initialiseExperimentsWith

        protected void initialiseExperimentsWith​(Collection<Experiment> experiments)

        initialiseExperimentsWith

        Parameters:
        experiments - a Collection object.
      • initialiseIdentifiersWith

        protected void initialiseIdentifiersWith​(Collection<Xref> identifiers)

        initialiseIdentifiersWith

        Parameters:
        identifiers - a Collection 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 interface Publication
        Parameters:
        pubmedId - : pubmed identifier
      • 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 interface Publication
        Parameters:
        doi - : DOI identifier
      • 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 interface Publication
        Parameters:
        identifier - : the IMEx id from IMEx central
      • setTitle

        public void setTitle​(String title)
        Set the publication title
        Specified by:
        setTitle in interface Publication
        Parameters:
        title - : publication title
      • setJournal

        public void setJournal​(String journal)
        Set the journal where the publication has been published
        Specified by:
        setJournal in interface Publication
        Parameters:
        journal - : the journal
      • setPublicationDate

        public void setPublicationDate​(Date date)
        Set the date of publication.
        Specified by:
        setPublicationDate in interface Publication
        Parameters:
        date - : publication date
      • 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 interface Publication
        Parameters:
        curationDepth - : the curation depth
      • setReleasedDate

        public void setReleasedDate​(Date released)
        Set the released date of the curated publication
        Specified by:
        setReleasedDate in interface Publication
        Parameters:
        released - : the released date
      • setSource

        public void setSource​(Source source)
        Sets the source who curated the publication.
        Specified by:
        setSource in interface Publication
        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 interface Publication
        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 interface Publication
        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 interface Publication
        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 interface Publication
        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 - a Xref object.
      • processRemovedIdentifierEvent

        protected void processRemovedIdentifierEvent​(Xref removed)

        processRemovedIdentifierEvent

        Parameters:
        removed - a Xref object.
      • clearPropertiesLinkedToIdentifiers

        protected void clearPropertiesLinkedToIdentifiers()

        clearPropertiesLinkedToIdentifiers

      • processAddedXrefEvent

        protected void processAddedXrefEvent​(Xref added)

        processAddedXrefEvent

        Parameters:
        added - a Xref object.
      • processRemovedXrefEvent

        protected void processRemovedXrefEvent​(Xref removed)

        processRemovedXrefEvent

        Parameters:
        removed - a Xref object.
      • clearPropertiesLinkedToXrefs

        protected void clearPropertiesLinkedToXrefs()

        clearPropertiesLinkedToXrefs