From 894a7d15bfc54d915140eaa4e3446936d352ffc0 Mon Sep 17 00:00:00 2001 From: supun Date: Wed, 13 Sep 2023 01:27:32 +0100 Subject: [PATCH 1/5] review --- .../uniprot/core/proteome/ProteomeEntry.java | 10 ++++---- .../proteome/impl/ProteomeEntryBuilder.java | 23 ++++++++++++------- .../core/proteome/impl/ProteomeEntryImpl.java | 20 +++++++++++----- 3 files changed, 35 insertions(+), 18 deletions(-) diff --git a/core-domain/src/main/java/org/uniprot/core/proteome/ProteomeEntry.java b/core-domain/src/main/java/org/uniprot/core/proteome/ProteomeEntry.java index a9ba5ed01..61dce90fe 100644 --- a/core-domain/src/main/java/org/uniprot/core/proteome/ProteomeEntry.java +++ b/core-domain/src/main/java/org/uniprot/core/proteome/ProteomeEntry.java @@ -1,13 +1,13 @@ package org.uniprot.core.proteome; -import java.io.Serializable; -import java.time.LocalDate; -import java.util.List; - import org.uniprot.core.citation.Citation; import org.uniprot.core.taxonomy.TaxonomyLineage; import org.uniprot.core.uniprotkb.taxonomy.Taxonomy; +import java.io.Serializable; +import java.time.LocalDate; +import java.util.List; + public interface ProteomeEntry extends Serializable { ProteomeId getId(); @@ -50,4 +50,6 @@ public interface ProteomeEntry extends Serializable { GenomeAnnotation getGenomeAnnotation(); List getExclusionReasons(); + + ProteomeStatistics getProteomeStatistics(); } diff --git a/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryBuilder.java b/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryBuilder.java index 7d3e4b810..ddf2f2a85 100644 --- a/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryBuilder.java +++ b/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryBuilder.java @@ -1,11 +1,5 @@ package org.uniprot.core.proteome.impl; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Nonnull; - import org.uniprot.core.Builder; import org.uniprot.core.citation.Citation; import org.uniprot.core.proteome.*; @@ -13,6 +7,11 @@ import org.uniprot.core.uniprotkb.taxonomy.Taxonomy; import org.uniprot.core.util.Utils; +import javax.annotation.Nonnull; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.List; + public class ProteomeEntryBuilder implements Builder { private ProteomeId id; private String description; @@ -35,6 +34,7 @@ public class ProteomeEntryBuilder implements Builder { private GenomeAnnotation genomeAnnotation; private List exclusionReasons = new ArrayList<>(); private Integer proteinCount; + private ProteomeStatistics proteomeStatistics; @Override public @Nonnull ProteomeEntry build() { @@ -59,7 +59,8 @@ public class ProteomeEntryBuilder implements Builder { genomeAssembly, genomeAnnotation, exclusionReasons, - proteinCount); + proteinCount, + proteomeStatistics); } public static @Nonnull ProteomeEntryBuilder from(@Nonnull ProteomeEntry instance) { @@ -84,7 +85,8 @@ public class ProteomeEntryBuilder implements Builder { .genomeAssembly(instance.getGenomeAssembly()) .genomeAnnotation(instance.getGenomeAnnotation()) .exclusionReasonsSet(instance.getExclusionReasons()) - .proteinCount(instance.getProteinCount()); + .proteinCount(instance.getProteinCount()) + .proteomeStatistics(instance.getProteomeStatistics()); } public @Nonnull ProteomeEntryBuilder proteomeId(ProteomeId id) { @@ -225,4 +227,9 @@ public class ProteomeEntryBuilder implements Builder { Utils.addOrIgnoreNull(exclusionReason, exclusionReasons); return this; } + + public @Nonnull ProteomeEntryBuilder proteomeStatistics(ProteomeStatistics proteomeStatistics) { + this.proteomeStatistics = proteomeStatistics; + return this; + } } diff --git a/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryImpl.java b/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryImpl.java index cace8a707..a227886df 100644 --- a/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryImpl.java +++ b/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryImpl.java @@ -1,15 +1,15 @@ package org.uniprot.core.proteome.impl; -import java.time.LocalDate; -import java.util.List; -import java.util.Objects; - import org.uniprot.core.citation.Citation; import org.uniprot.core.proteome.*; import org.uniprot.core.taxonomy.TaxonomyLineage; import org.uniprot.core.uniprotkb.taxonomy.Taxonomy; import org.uniprot.core.util.Utils; +import java.time.LocalDate; +import java.util.List; +import java.util.Objects; + public class ProteomeEntryImpl implements ProteomeEntry { private static final long serialVersionUID = 1962327704149624243L; @@ -34,12 +34,13 @@ public class ProteomeEntryImpl implements ProteomeEntry { private final GenomeAnnotation genomeAnnotation; private final List taxonLineage; private final List exclusionReasons; + private final ProteomeStatistics proteomeStatistics; // no arg constructor for JSON deserialization ProteomeEntryImpl() { this( null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null); + null, null, null, null, null, null, null, null); } ProteomeEntryImpl( @@ -63,7 +64,8 @@ public class ProteomeEntryImpl implements ProteomeEntry { GenomeAssembly genomeAssembly, GenomeAnnotation genomeAnnotation, List exclusionReasons, - Integer proteinCount) { + Integer proteinCount, + ProteomeStatistics proteomeStatistics) { super(); this.id = id; this.taxonomy = taxonomy; @@ -88,6 +90,7 @@ public class ProteomeEntryImpl implements ProteomeEntry { this.genomeAnnotation = genomeAnnotation; this.exclusionReasons = Utils.unmodifiableList(exclusionReasons); this.proteinCount = proteinCount; + this.proteomeStatistics = proteomeStatistics; } @Override @@ -195,6 +198,11 @@ public List getExclusionReasons() { return exclusionReasons; } + @Override + public ProteomeStatistics getProteomeStatistics() { + return proteomeStatistics; + } + @Override public int hashCode() { return Objects.hash( From 0c0b96c7fadee927efabde56c744d32419687a99 Mon Sep 17 00:00:00 2001 From: supun Date: Wed, 13 Sep 2023 10:41:50 +0100 Subject: [PATCH 2/5] add tests --- .../core/proteome/impl/ProteomeEntryImpl.java | 6 ++-- .../impl/ProteomeEntryBuilderTest.java | 32 ++++++++++++------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryImpl.java b/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryImpl.java index a227886df..46a6526d4 100644 --- a/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryImpl.java +++ b/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryImpl.java @@ -222,7 +222,8 @@ public int hashCode() { proteomeCompletenessReport, genomeAssembly, proteinCount, - genomeAnnotation); + genomeAnnotation, + proteomeStatistics); } @Override @@ -248,6 +249,7 @@ public boolean equals(Object obj) { && Objects.equals(genomeAssembly, other.genomeAssembly) && Objects.equals(geneCount, other.geneCount) && Objects.equals(proteinCount, other.proteinCount) - && Objects.equals(genomeAnnotation, other.genomeAnnotation); + && Objects.equals(genomeAnnotation, other.genomeAnnotation) + && Objects.equals(proteomeStatistics, other.proteomeStatistics); } } diff --git a/core-domain/src/test/java/org/uniprot/core/proteome/impl/ProteomeEntryBuilderTest.java b/core-domain/src/test/java/org/uniprot/core/proteome/impl/ProteomeEntryBuilderTest.java index 2aa0f9f43..41df66529 100644 --- a/core-domain/src/test/java/org/uniprot/core/proteome/impl/ProteomeEntryBuilderTest.java +++ b/core-domain/src/test/java/org/uniprot/core/proteome/impl/ProteomeEntryBuilderTest.java @@ -1,17 +1,10 @@ package org.uniprot.core.proteome.impl; -import static org.hamcrest.CoreMatchers.hasItem; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.api.Assertions.*; -import static org.uniprot.core.ObjectsForTests.updateCitationBuilderWithCommonAttributes; - -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - import org.junit.jupiter.api.Test; -import org.uniprot.core.citation.*; +import org.uniprot.core.citation.Citation; +import org.uniprot.core.citation.JournalArticle; +import org.uniprot.core.citation.Submission; +import org.uniprot.core.citation.SubmissionDatabase; import org.uniprot.core.citation.impl.JournalArticleBuilder; import org.uniprot.core.citation.impl.SubmissionBuilder; import org.uniprot.core.proteome.*; @@ -20,6 +13,16 @@ import org.uniprot.core.uniprotkb.taxonomy.Taxonomy; import org.uniprot.core.uniprotkb.taxonomy.impl.TaxonomyBuilder; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import static org.hamcrest.CoreMatchers.hasItem; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.jupiter.api.Assertions.*; +import static org.uniprot.core.ObjectsForTests.updateCitationBuilderWithCommonAttributes; + class ProteomeEntryBuilderTest { @Test @@ -350,4 +353,11 @@ void ExclusionReasons() { assertThat(proteome.getExclusionReasons(), hasItem(ExclusionReason.METAGENOME)); assertThat(proteome.getExclusionReasons(), hasItem(ExclusionReason.MIXED_CULTURE)); } + + @Test + void testProteomeStatistics() { + ProteomeStatistics proteomeStatistics = new ProteomeStatisticsBuilder().build(); + ProteomeEntry proteome = new ProteomeEntryBuilder().proteomeStatistics(proteomeStatistics).build(); + assertSame(proteomeStatistics, proteome.getProteomeStatistics()); + } } From a7e4dc0089061d395e1ba669db0b56eb19d5bc1b Mon Sep 17 00:00:00 2001 From: automated changes Date: Wed, 13 Sep 2023 09:46:32 +0000 Subject: [PATCH 3/5] code format with spotless automatic --- .../uniprot/core/proteome/ProteomeEntry.java | 8 +++---- .../proteome/impl/ProteomeEntryBuilder.java | 11 +++++---- .../core/proteome/impl/ProteomeEntryImpl.java | 8 +++---- .../impl/ProteomeEntryBuilderTest.java | 23 ++++++++++--------- 4 files changed, 26 insertions(+), 24 deletions(-) diff --git a/core-domain/src/main/java/org/uniprot/core/proteome/ProteomeEntry.java b/core-domain/src/main/java/org/uniprot/core/proteome/ProteomeEntry.java index 61dce90fe..e90eda78b 100644 --- a/core-domain/src/main/java/org/uniprot/core/proteome/ProteomeEntry.java +++ b/core-domain/src/main/java/org/uniprot/core/proteome/ProteomeEntry.java @@ -1,13 +1,13 @@ package org.uniprot.core.proteome; -import org.uniprot.core.citation.Citation; -import org.uniprot.core.taxonomy.TaxonomyLineage; -import org.uniprot.core.uniprotkb.taxonomy.Taxonomy; - import java.io.Serializable; import java.time.LocalDate; import java.util.List; +import org.uniprot.core.citation.Citation; +import org.uniprot.core.taxonomy.TaxonomyLineage; +import org.uniprot.core.uniprotkb.taxonomy.Taxonomy; + public interface ProteomeEntry extends Serializable { ProteomeId getId(); diff --git a/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryBuilder.java b/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryBuilder.java index ddf2f2a85..ade66886b 100644 --- a/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryBuilder.java +++ b/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryBuilder.java @@ -1,5 +1,11 @@ package org.uniprot.core.proteome.impl; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.Nonnull; + import org.uniprot.core.Builder; import org.uniprot.core.citation.Citation; import org.uniprot.core.proteome.*; @@ -7,11 +13,6 @@ import org.uniprot.core.uniprotkb.taxonomy.Taxonomy; import org.uniprot.core.util.Utils; -import javax.annotation.Nonnull; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.List; - public class ProteomeEntryBuilder implements Builder { private ProteomeId id; private String description; diff --git a/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryImpl.java b/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryImpl.java index 46a6526d4..ef6a37e67 100644 --- a/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryImpl.java +++ b/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeEntryImpl.java @@ -1,15 +1,15 @@ package org.uniprot.core.proteome.impl; +import java.time.LocalDate; +import java.util.List; +import java.util.Objects; + import org.uniprot.core.citation.Citation; import org.uniprot.core.proteome.*; import org.uniprot.core.taxonomy.TaxonomyLineage; import org.uniprot.core.uniprotkb.taxonomy.Taxonomy; import org.uniprot.core.util.Utils; -import java.time.LocalDate; -import java.util.List; -import java.util.Objects; - public class ProteomeEntryImpl implements ProteomeEntry { private static final long serialVersionUID = 1962327704149624243L; diff --git a/core-domain/src/test/java/org/uniprot/core/proteome/impl/ProteomeEntryBuilderTest.java b/core-domain/src/test/java/org/uniprot/core/proteome/impl/ProteomeEntryBuilderTest.java index 41df66529..117f7bfc9 100644 --- a/core-domain/src/test/java/org/uniprot/core/proteome/impl/ProteomeEntryBuilderTest.java +++ b/core-domain/src/test/java/org/uniprot/core/proteome/impl/ProteomeEntryBuilderTest.java @@ -1,5 +1,15 @@ package org.uniprot.core.proteome.impl; +import static org.hamcrest.CoreMatchers.hasItem; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.jupiter.api.Assertions.*; +import static org.uniprot.core.ObjectsForTests.updateCitationBuilderWithCommonAttributes; + +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + import org.junit.jupiter.api.Test; import org.uniprot.core.citation.Citation; import org.uniprot.core.citation.JournalArticle; @@ -13,16 +23,6 @@ import org.uniprot.core.uniprotkb.taxonomy.Taxonomy; import org.uniprot.core.uniprotkb.taxonomy.impl.TaxonomyBuilder; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import static org.hamcrest.CoreMatchers.hasItem; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.api.Assertions.*; -import static org.uniprot.core.ObjectsForTests.updateCitationBuilderWithCommonAttributes; - class ProteomeEntryBuilderTest { @Test @@ -357,7 +357,8 @@ void ExclusionReasons() { @Test void testProteomeStatistics() { ProteomeStatistics proteomeStatistics = new ProteomeStatisticsBuilder().build(); - ProteomeEntry proteome = new ProteomeEntryBuilder().proteomeStatistics(proteomeStatistics).build(); + ProteomeEntry proteome = + new ProteomeEntryBuilder().proteomeStatistics(proteomeStatistics).build(); assertSame(proteomeStatistics, proteome.getProteomeStatistics()); } } From f99e4f116d0df52ae4b1e64e888763c2f5ac6b95 Mon Sep 17 00:00:00 2001 From: supun Date: Wed, 4 Oct 2023 16:03:10 +0100 Subject: [PATCH 4/5] add defualt constructor to proteome stats --- .../proteome/impl/ProteomeStatisticsImpl.java | 9 ++++- .../impl/ProteomeStatisticsImplTest.java | 12 +++++- .../parser/proteome/ProteomeJsonConfig.java | 39 ++++--------------- 3 files changed, 25 insertions(+), 35 deletions(-) diff --git a/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeStatisticsImpl.java b/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeStatisticsImpl.java index 3f425e4b1..7af954e5d 100644 --- a/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeStatisticsImpl.java +++ b/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeStatisticsImpl.java @@ -1,11 +1,12 @@ package org.uniprot.core.proteome.impl; -import java.util.Objects; - import org.uniprot.core.impl.StatisticsImpl; import org.uniprot.core.proteome.ProteomeStatistics; +import java.util.Objects; + public class ProteomeStatisticsImpl extends StatisticsImpl implements ProteomeStatistics { + private static final long serialVersionUID = -8585233468042758658L; private final long isoformProteinCount; ProteomeStatisticsImpl( @@ -14,6 +15,10 @@ public class ProteomeStatisticsImpl extends StatisticsImpl implements ProteomeSt this.isoformProteinCount = isoformProteinCount; } + ProteomeStatisticsImpl() { + this(0, 0,0); + } + @Override public long getIsoformProteinCount() { return isoformProteinCount; diff --git a/core-domain/src/test/java/org/uniprot/core/proteome/impl/ProteomeStatisticsImplTest.java b/core-domain/src/test/java/org/uniprot/core/proteome/impl/ProteomeStatisticsImplTest.java index e4e27baf5..e1e3edcae 100644 --- a/core-domain/src/test/java/org/uniprot/core/proteome/impl/ProteomeStatisticsImplTest.java +++ b/core-domain/src/test/java/org/uniprot/core/proteome/impl/ProteomeStatisticsImplTest.java @@ -1,9 +1,10 @@ package org.uniprot.core.proteome.impl; -import static org.junit.jupiter.api.Assertions.*; - import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; + class ProteomeStatisticsImplTest { public static final int REVIEWED_PROTEIN_COUNT = 98; public static final int UNREVIEWED_PROTEIN_COUNT = 33; @@ -20,6 +21,13 @@ void getCountsAreAccurate() { assertEquals(ISOFORM_PROTEIN_COUNT, PROTEOME_STATISTICS.getIsoformProteinCount()); } + @Test + void defaultConstructor() { + ProteomeStatisticsImpl that = + new ProteomeStatisticsImpl(); + assertEquals(new ProteomeStatisticsImpl(0, 0, 0), that); + } + @Test void equals_whenTrue() { ProteomeStatisticsImpl that = diff --git a/json-parser/src/main/java/org/uniprot/core/json/parser/proteome/ProteomeJsonConfig.java b/json-parser/src/main/java/org/uniprot/core/json/parser/proteome/ProteomeJsonConfig.java index 9040fee57..20b2115e8 100644 --- a/json-parser/src/main/java/org/uniprot/core/json/parser/proteome/ProteomeJsonConfig.java +++ b/json-parser/src/main/java/org/uniprot/core/json/parser/proteome/ProteomeJsonConfig.java @@ -1,41 +1,19 @@ package org.uniprot.core.json.parser.proteome; -import java.time.LocalDate; - +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.jsontype.NamedType; +import com.fasterxml.jackson.databind.module.SimpleModule; import org.uniprot.core.CrossReference; import org.uniprot.core.Database; import org.uniprot.core.Value; -import org.uniprot.core.citation.Author; -import org.uniprot.core.citation.Book; -import org.uniprot.core.citation.ElectronicArticle; -import org.uniprot.core.citation.Journal; -import org.uniprot.core.citation.JournalArticle; -import org.uniprot.core.citation.Locator; -import org.uniprot.core.citation.Patent; -import org.uniprot.core.citation.PublicationDate; -import org.uniprot.core.citation.Submission; -import org.uniprot.core.citation.Thesis; -import org.uniprot.core.citation.Unpublished; -import org.uniprot.core.citation.impl.AuthorImpl; -import org.uniprot.core.citation.impl.BookImpl; -import org.uniprot.core.citation.impl.ElectronicArticleImpl; -import org.uniprot.core.citation.impl.JournalArticleImpl; -import org.uniprot.core.citation.impl.JournalImpl; -import org.uniprot.core.citation.impl.PatentImpl; -import org.uniprot.core.citation.impl.PublicationDateImpl; -import org.uniprot.core.citation.impl.SubmissionImpl; -import org.uniprot.core.citation.impl.ThesisImpl; -import org.uniprot.core.citation.impl.UnpublishedImpl; +import org.uniprot.core.citation.*; +import org.uniprot.core.citation.impl.*; import org.uniprot.core.impl.CrossReferenceImpl; import org.uniprot.core.impl.DefaultDatabase; import org.uniprot.core.impl.ValueImpl; import org.uniprot.core.json.parser.JsonConfig; import org.uniprot.core.json.parser.deserializer.LocalDateDeserializer; -import org.uniprot.core.json.parser.serializer.AuthorSerializer; -import org.uniprot.core.json.parser.serializer.JournalSerializer; -import org.uniprot.core.json.parser.serializer.LocalDateSerializer; -import org.uniprot.core.json.parser.serializer.LocatorSerializer; -import org.uniprot.core.json.parser.serializer.PublicationDateSerializer; +import org.uniprot.core.json.parser.serializer.*; import org.uniprot.core.json.parser.uniprot.serializer.UniProtKBAccessionSerializer; import org.uniprot.core.proteome.*; import org.uniprot.core.proteome.impl.*; @@ -46,9 +24,7 @@ import org.uniprot.core.uniprotkb.taxonomy.Taxonomy; import org.uniprot.core.uniprotkb.taxonomy.impl.TaxonomyImpl; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.jsontype.NamedType; -import com.fasterxml.jackson.databind.module.SimpleModule; +import java.time.LocalDate; public class ProteomeJsonConfig extends JsonConfig { private static ProteomeJsonConfig instance; @@ -89,6 +65,7 @@ private ObjectMapper initObjectMapper() { mod.addAbstractTypeMapping(ProteomeId.class, ProteomeIdImpl.class); mod.addAbstractTypeMapping(Taxonomy.class, TaxonomyImpl.class); mod.addAbstractTypeMapping(TaxonomyLineage.class, TaxonomyLineageImpl.class); + mod.addAbstractTypeMapping(ProteomeStatistics.class, ProteomeStatisticsImpl.class); mod.addAbstractTypeMapping(Value.class, ValueImpl.class); mod.addAbstractTypeMapping(RedundantProteome.class, RedundantProteomeImpl.class); From 9e966bcb8f16eb49c4417a92e38c70dd406b516a Mon Sep 17 00:00:00 2001 From: automated changes Date: Wed, 18 Oct 2023 10:34:46 +0000 Subject: [PATCH 5/5] code format with spotless automatic --- .../core/proteome/impl/ProteomeStatisticsImpl.java | 6 +++--- .../core/proteome/impl/ProteomeStatisticsImplTest.java | 7 +++---- .../core/json/parser/proteome/ProteomeJsonConfig.java | 9 +++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeStatisticsImpl.java b/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeStatisticsImpl.java index 7af954e5d..132f25bd6 100644 --- a/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeStatisticsImpl.java +++ b/core-domain/src/main/java/org/uniprot/core/proteome/impl/ProteomeStatisticsImpl.java @@ -1,10 +1,10 @@ package org.uniprot.core.proteome.impl; +import java.util.Objects; + import org.uniprot.core.impl.StatisticsImpl; import org.uniprot.core.proteome.ProteomeStatistics; -import java.util.Objects; - public class ProteomeStatisticsImpl extends StatisticsImpl implements ProteomeStatistics { private static final long serialVersionUID = -8585233468042758658L; private final long isoformProteinCount; @@ -16,7 +16,7 @@ public class ProteomeStatisticsImpl extends StatisticsImpl implements ProteomeSt } ProteomeStatisticsImpl() { - this(0, 0,0); + this(0, 0, 0); } @Override diff --git a/core-domain/src/test/java/org/uniprot/core/proteome/impl/ProteomeStatisticsImplTest.java b/core-domain/src/test/java/org/uniprot/core/proteome/impl/ProteomeStatisticsImplTest.java index e1e3edcae..e2e3bebc1 100644 --- a/core-domain/src/test/java/org/uniprot/core/proteome/impl/ProteomeStatisticsImplTest.java +++ b/core-domain/src/test/java/org/uniprot/core/proteome/impl/ProteomeStatisticsImplTest.java @@ -1,10 +1,10 @@ package org.uniprot.core.proteome.impl; -import org.junit.jupiter.api.Test; - import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; +import org.junit.jupiter.api.Test; + class ProteomeStatisticsImplTest { public static final int REVIEWED_PROTEIN_COUNT = 98; public static final int UNREVIEWED_PROTEIN_COUNT = 33; @@ -23,8 +23,7 @@ void getCountsAreAccurate() { @Test void defaultConstructor() { - ProteomeStatisticsImpl that = - new ProteomeStatisticsImpl(); + ProteomeStatisticsImpl that = new ProteomeStatisticsImpl(); assertEquals(new ProteomeStatisticsImpl(0, 0, 0), that); } diff --git a/json-parser/src/main/java/org/uniprot/core/json/parser/proteome/ProteomeJsonConfig.java b/json-parser/src/main/java/org/uniprot/core/json/parser/proteome/ProteomeJsonConfig.java index 20b2115e8..cf9bf96d2 100644 --- a/json-parser/src/main/java/org/uniprot/core/json/parser/proteome/ProteomeJsonConfig.java +++ b/json-parser/src/main/java/org/uniprot/core/json/parser/proteome/ProteomeJsonConfig.java @@ -1,8 +1,7 @@ package org.uniprot.core.json.parser.proteome; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.jsontype.NamedType; -import com.fasterxml.jackson.databind.module.SimpleModule; +import java.time.LocalDate; + import org.uniprot.core.CrossReference; import org.uniprot.core.Database; import org.uniprot.core.Value; @@ -24,7 +23,9 @@ import org.uniprot.core.uniprotkb.taxonomy.Taxonomy; import org.uniprot.core.uniprotkb.taxonomy.impl.TaxonomyImpl; -import java.time.LocalDate; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.jsontype.NamedType; +import com.fasterxml.jackson.databind.module.SimpleModule; public class ProteomeJsonConfig extends JsonConfig { private static ProteomeJsonConfig instance;